Support instance security group/groupSet attribute modification and description
This commit is contained in:
parent
1fc32fa5cb
commit
9cbe8d57f4
3 changed files with 54 additions and 2 deletions
|
|
@ -543,7 +543,14 @@ class InstanceBackend(object):
|
|||
setattr(instance, key, value)
|
||||
return instance
|
||||
|
||||
def modify_instance_security_groups(self, instance_id, new_group_list):
|
||||
instance = self.get_instance(instance_id)
|
||||
setattr(instance, 'security_groups', new_group_list)
|
||||
return instance
|
||||
|
||||
def describe_instance_attribute(self, instance_id, key):
|
||||
if key == 'group_set':
|
||||
key = 'security_groups'
|
||||
instance = self.get_instance(instance_id)
|
||||
value = getattr(instance, key)
|
||||
return instance, value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue