Store keypair and secgroup data on per-user basis
Keypairs and secgroup data are now stored separately for each user. Secgroup data is now a dict not Nova object. Change-Id: Ic4bacad2ff41c4ddcb010e8203559c0dd3945a63
This commit is contained in:
parent
66d4f89f56
commit
df082d31d8
@ -96,7 +96,7 @@ class FakeResource(object):
|
|||||||
def __getattr__(self, name):
|
def __getattr__(self, name):
|
||||||
# NOTE(msdubov): e.g. server.delete() -> manager.delete(server)
|
# NOTE(msdubov): e.g. server.delete() -> manager.delete(server)
|
||||||
def manager_func(*args, **kwargs):
|
def manager_func(*args, **kwargs):
|
||||||
getattr(self.manager, name)(self, *args, **kwargs)
|
return getattr(self.manager, name)(self, *args, **kwargs)
|
||||||
return manager_func
|
return manager_func
|
||||||
|
|
||||||
def __getitem__(self, key):
|
def __getitem__(self, key):
|
||||||
@ -529,6 +529,9 @@ class FakeSecurityGroupManager(FakeManager):
|
|||||||
sg.description = description
|
sg.description = description
|
||||||
return self._cache(sg)
|
return self._cache(sg)
|
||||||
|
|
||||||
|
def to_dict(self, obj):
|
||||||
|
return {"id": obj.id, "name": obj.name}
|
||||||
|
|
||||||
def find(self, name, **kwargs):
|
def find(self, name, **kwargs):
|
||||||
kwargs["name"] = name
|
kwargs["name"] = name
|
||||||
for resource in self.cache.values():
|
for resource in self.cache.values():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user