def get(self): names = lxc.list_names() response = [] for name in names: response.append({ 'name': name, 'state': lxc.info(name)['state']}) return response
def get(self, name): return {'name': name, 'state': lxc.info(name)['state']}