The networking_cisco.plugins.ml2.drivers.cisco.n1kv.policy_profile_service Module

class networking_cisco.plugins.ml2.drivers.cisco.n1kv.policy_profile_service.PolicyProfilePlugin

Bases: networking_cisco.plugins.ml2.drivers.cisco.n1kv.policy_profile_service.PolicyProfile_db_mixin

Implementation of the Cisco N1KV Policy Profile Service Plugin.

get_policy_profile(context, pprofile_id, fields=None)

Retrieve a policy profile for the given UUID.

Parameters:
  • context – neutron api request context
  • pprofile_id – UUID representing policy profile to fetch
  • fields – a list of strings that are valid keys in a policy profile dictionary. Only these fields will be returned
Returns:

policy profile dictionary

get_policy_profile_bindings(context, filters=None, fields=None)
get_policy_profiles(context, filters=None, fields=None)

Return Cisco N1KV policy profiles.

Parameters:
  • context – neutron api request context
  • filters – a dictionary with keys that are valid keys for a subnet object. Values in this dictiontary are an iterable containing values that will be used for an exact match comparison for that value. Each result returned by this function will have matched one of the values for each key in filters
  • fields – a list of strings that are valid keys in a subnet dictionary. Only these fields will be returned.
Returns:

list of dictionaries of policy profiless

sanitize_policy_profile_table()

Clear policy profiles from stale VSM.

supported_extension_aliases = [‘policy_profile’]
update_policy_profile(context, prof_id, policy_profile)
class networking_cisco.plugins.ml2.drivers.cisco.n1kv.policy_profile_service.PolicyProfile_db_mixin

Bases: networking_cisco.plugins.ml2.drivers.cisco.n1kv.extensions.policy_profile.PolicyProfilePluginBase, neutron.db.common_db_mixin.CommonDbMixin

Policy Profile Mixin class.

get_policy_profile(context, pprofile_id, fields=None)

Retrieve a policy profile for the given UUID.

Parameters:
  • context – neutron api request context
  • pprofile_id – UUID representing policy profile to fetch
  • fields – a list of strings that are valid keys in a policy profile dictionary. Only these fields will be returned
Returns:

policy profile dictionary

get_policy_profile_bindings(context, filters=None, fields=None)
get_policy_profiles(context, filters=None, fields=None)

Retrieve a list of policy profiles.

Retrieve all policy profiles if tenant is admin. For a non-admin tenant, retrieve all policy profiles belonging to this tenant only.

Parameters:
  • context – neutron api request context
  • filters – a dictionary with keys that are valid keys for a policy profile object. Values in this dictiontary are an iterable containing values that will be used for an exact match comparison for that value. Each result returned by this function will have matched one of the values for each key in filters
  • fields – a list of strings that are valid keys in a policy profile dictionary. Only these fields will be returned
Returns:

list of all policy profiles

update_policy_profile(context, prof_id, policy_profile)

Update policy profile by adding/removing tenants.

Parameters:
  • context – neutron api request context
  • prof_id – ID of the policy profile to be updated
  • policy_profile – dictionary with added/removed tenant IDs