The nova.network.security_group.quantum_driver Module

class SecurityGroupAPI

Bases: nova.network.security_group.security_group_base.SecurityGroupBase

add_rules(context, id, name, vals)

Add security group rule(s) to security group.

Note: the Nova security group API doesn’t support adding muliple security group rules at once but the EC2 one does. Therefore, this function is writen to support both. Multiple rules are installed to a security group in quantum using bulk support.

add_to_instance(context, target, *args, **kwargs)

Add security group to the instance.

create_security_group(context, name, description)
destroy(context, security_group)

This function deletes a security group.

get(context, name=None, id=None, map_exception=False)
get_instance_security_groups(context, instance_id, instance_uuid=None, detailed=False)

Returns the security groups that are associated with an instance. If detailed is True then it also returns the full details of the security groups associated with an instance.

get_instances_security_groups_bindings(context)

Returns a dict(instance_id, [security_groups]) to allow obtaining all of the instances and their security groups in one shot.

get_rule(context, id)
id_is_uuid = True
list(context, names=None, ids=None, project=None, search_opts=None)

Returns list of security group rules owned by tenant.

populate_security_groups(instance, security_groups)
remove_from_instance(context, target, *args, **kwargs)

Remove the security group associated with the instance.

remove_rules(context, security_group, rule_ids)
validate_id(id)

Previous topic

The nova.network.security_group.openstack_driver Module

Next topic

The nova.network.security_group.security_group_base Module

This Page