Add basic CLI

This commit is contained in:
Ben Firshman 2013-12-11 14:25:32 +00:00
commit 3b654ad349
10 changed files with 266 additions and 1 deletions

View file

@ -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: