Add basic CLI
This commit is contained in:
parent
523fb99d79
commit
3b654ad349
10 changed files with 266 additions and 1 deletions
|
|
@ -29,6 +29,14 @@ class ServiceCollection(list):
|
|||
collection.append(Service(client=client, links=links, **service_dict))
|
||||
return collection
|
||||
|
||||
@classmethod
|
||||
def from_config(cls, client, config):
|
||||
dicts = []
|
||||
for name, service in config.items():
|
||||
service['name'] = name
|
||||
dicts.append(service)
|
||||
return cls.from_dicts(client, dicts)
|
||||
|
||||
def get(self, name):
|
||||
for service in self:
|
||||
if service.name == name:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue