Merge "Store keypair and secgroup data on per-user basis"

This commit is contained in:
Jenkins 2015-02-12 18:58:46 +00:00 committed by Gerrit Code Review
commit 77a0644e73

View File

@ -96,7 +96,7 @@ class FakeResource(object):
def __getattr__(self, name):
# NOTE(msdubov): e.g. server.delete() -> manager.delete(server)
def manager_func(*args, **kwargs):
getattr(self.manager, name)(self, *args, **kwargs)
return getattr(self.manager, name)(self, *args, **kwargs)
return manager_func
def __getitem__(self, key):
@ -529,6 +529,9 @@ class FakeSecurityGroupManager(FakeManager):
sg.description = description
return self._cache(sg)
def to_dict(self, obj):
return {"id": obj.id, "name": obj.name}
def find(self, name, **kwargs):
kwargs["name"] = name
for resource in self.cache.values():