Previous topic

The nova.network.quantum.quantum_connection Module

Next topic

The nova.network.quantumv2.api Module

This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Nova 2011.2 docs or all OpenStack docs too.

The nova.network.quantum.sg Module

Implement Security Groups abstraction and API.

The nova security_group_handler flag specifies which class is to be used to implement the security group calls.

The NullSecurityGroupHandler provides a “no-op” plugin that is loaded by default and has no impact on current system behavior. In the future, special purposes classes that inherit from SecurityGroupHandlerBase will provide enhanced functionality and will be loadable via the security_group_handler flag.

class NullSecurityGroupHandler

Bases: nova.network.quantum.sg.SecurityGroupHandlerBase

trigger_instance_add_security_group_refresh(context, instance, group_name)

Called when a security group gains a new member.

Parameters:
  • context – the security context.
  • instance – the instance to be associated.
  • group_name – the name of the security group to be associated.
trigger_instance_remove_security_group_refresh(context, instance, group_name)

Called when a security group loses a member.

Parameters:
  • context – the security context.
  • instance – the instance to be associated.
  • group_name – the name of the security group to be associated.
trigger_security_group_create_refresh(context, group)

Called when a rule is added to a security_group.

Parameters:
  • context – the security context.
  • group – the new group added. group is a dictionary that contains the following: user_id, project_id, name, description).
trigger_security_group_destroy_refresh(context, security_group_id)

Called when a rule is added to a security_group.

Parameters:
  • context – the security context.
  • security_group_id – the security group identifier.
trigger_security_group_members_refresh(context, group_ids)

Called when a security group gains or loses a member.

Parameters:
  • context – the security context.
  • group_ids – a list of security group identifiers.
trigger_security_group_rule_create_refresh(context, rule_ids)

Called when a rule is added to a security_group.

Parameters:
  • context – the security context.
  • rule_ids – a list of rule ids that have been affected.
trigger_security_group_rule_destroy_refresh(context, rule_ids)

Called when a rule is removed from a security_group.

Parameters:
  • context – the security context.
  • rule_ids – a list of rule ids that have been affected.
class SecurityGroupHandlerBase

Bases: object

trigger_instance_add_security_group_refresh(context, instance, group_name)

Called when a security group gains a new member.

Parameters:
  • context – the security context.
  • instance – the instance to be associated.
  • group_name – the name of the security group to be associated.
trigger_instance_remove_security_group_refresh(context, instance, group_name)

Called when a security group loses a member.

Parameters:
  • context – the security context.
  • instance – the instance to be associated.
  • group_name – the name of the security group to be associated.
trigger_security_group_create_refresh(context, group)

Called when a rule is added to a security_group.

Parameters:
  • context – the security context.
  • group – the new group added. group is a dictionary that contains the following: user_id, project_id, name, description).
trigger_security_group_destroy_refresh(context, security_group_id)

Called when a rule is added to a security_group.

Parameters:
  • context – the security context.
  • security_group_id – the security group identifier.
trigger_security_group_members_refresh(context, group_ids)

Called when a security group gains or loses a member.

Parameters:
  • context – the security context.
  • group_ids – a list of security group identifiers.
trigger_security_group_rule_create_refresh(context, rule_ids)

Called when a rule is added to a security_group.

Parameters:
  • context – the security context.
  • rule_ids – a list of rule ids that have been affected.
trigger_security_group_rule_destroy_refresh(context, rule_ids)

Called when a rule is removed from a security_group.

Parameters:
  • context – the security context.
  • rule_ids – a list of rule ids that have been affected.