Security_groupsΒΆ

Security group interface (1.1 extension).

class novaclient.v2.security_groups.SecurityGroup(manager, info, loaded=False, resp=None)

Bases: novaclient.base.Resource

Populate and bind to a manager.

Parameters:
  • manager – BaseManager object
  • info – dictionary representing resource attributes
  • loaded – prevent lazy-loading if set to True
  • resp – Response or list of Response objects
delete()

Delete this security group.

Returns:An instance of novaclient.base.TupleWithMeta
update()

Update this security group.

Returns:SecurityGroup
class novaclient.v2.security_groups.SecurityGroupManager(api)

Bases: novaclient.base.ManagerWithFind

create(name, description)

Create a security group

Parameters:
  • name – name for the security group to create
  • description – description of the security group
Return type:

the security group object

delete(group)

Delete a security group

Parameters:group – The security group to delete (group or ID)
Returns:An instance of novaclient.base.TupleWithMeta
get(group_id)

Get a security group

Parameters:group_id – The security group to get by ID
Return type:SecurityGroup
list(search_opts=None)

Get a list of all security_groups

Return type:list of SecurityGroup
resource_class

alias of SecurityGroup

update(group, name, description)

Update a security group

Parameters:
  • group – The security group to update (group or ID)
  • name – name for the security group to update
  • description – description for the security group to update
Return type:

the security group object

Previous topic

Security_group_rules

Next topic

Services

Project Source

This Page