The networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db Module¶
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.add_network_binding(network_id, network_type, segment_id, netp_id, db_session=None)¶ Create the network to network profile binding.
Parameters: - db_session – database session
- network_id – UUID representing the network
- network_type – string representing type of network (VLAN, VXLAN)
- segment_id – integer representing VLAN or VXLAN ID
- netp_id – network profile ID based on which this network is created
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.add_network_profile(netp_name, netp_type, netp_sub_type=None, db_session=None)¶ Create a network profile.
Parameters: - netp_name – string representing the name of the network profile
- netp_type – string representing the type of the network profile
- netp_sub_type – string representing sub-type of the network profile
- db_session – database session
Returns: network profile object
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.add_policy_binding(port_id, pprofile_id, db_session=None)¶ Create the port to policy profile binding.
Parameters: - port_id – string representing the UUID of the port
- pprofile_id – string representing the UUID of the policy profile
- db_session – database session
Returns: port to policy profile binding object
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.add_profile_tenant_binding(profile_type, profile_id, tenant_id, db_session)¶
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.check_policy_profile_exists_on_all_vsm(pprofiles, vsm_hosts)¶ Checks if policy profile is present on all VSM. :param pprofiles: all the port profile rows for a particular profile :param vsm_hosts: list of configured VSMs :returns: boolean
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.get_network_binding(network_id, db_session=None)¶ Retrieve network binding.
Parameters: - network_id – string representing the UUID of the network
- db_session – database session
Returns: network to network profile binding object
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.get_network_profile_by_name(name, db_session=None)¶ Retrieve a network profile using its name.
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.get_network_profile_by_network(network_id)¶ Given a network, get all the details of its network profile
Parameters: network_id – UUID of the network Returns: network profile object
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.get_network_profile_by_type(segment_type, db_session=None)¶ Retrieve a network profile using its type.
Parameters: - segment_type – string repsresenting the type of segment
- db_session – database session
Returns: network profile of the given segment type
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.get_network_profile_by_uuid(netp_id, db_session=None)¶ Retrieve a network profile using its UUID.
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.get_network_profiles(db_base_plugin=None)¶ Get details for all network profiles from N1kv table of the neutron db.
Returns: List of network profile objects
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.get_networks(db_base_plugin)¶ Get details for all networks, from non-N1kv tables of the neutron database.
Parameters: db_base_plugin – Instance of the NeutronDbPluginV2 class Returns: list of network dictionaries
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.get_policy_binding(port_id, db_session=None)¶ Retrieve port to policy profile binding.
Parameters: - port_id – string representing the UUID of the port
- db_session – database session
Returns: port to policy profile binding object
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.get_policy_profile_by_name(name, db_session=None)¶ Retrieve policy profile by name.
Parameters: - name – string representing the name of the policy profile
- db_session – database session
Returns: policy profile object
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.get_policy_profile_by_uuid(db_session, pprofile_id)¶ Retrieve policy profile by its UUID.
Parameters: - db_session – database session
- profile_id – string representing the UUID of the policy profile
Returns: policy profile object
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.get_policy_profiles_by_host(vsm_ip, db_session=None)¶ Retrieve policy profile by host.
Parameters: - vsm_ip – string representing the ip address of the host(VSM)
- db_session – database session
Returns: policy profile object
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.get_ports(db_base_plugin)¶ Get details for all ports, from non-N1kv tables of the neutron database
Parameters: db_base_plugin – Instance of the NeutronDbPluginV2 class Returns: list of port dictionaries
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.get_profile_binding(tenant_id, profile_id, db_session=None)¶ Get Profile - Tenant binding.
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.get_profiles_for_tenant(db_session, tenant_id, profile_type)¶ Get network or policy profile IDs for a tenant.
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.get_subnets(db_base_plugin)¶ Get details for all subnets, from non-N1kv tables of the neutron database
Parameters: db_base_plugin – Instance of the NeutronDbPluginV2 class Returns: list of subnet dictionaries
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.get_vxlan_networks()¶ Get all VxLAN networks.
Returns: A list of all VxLAN networks
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.policy_profile_in_use(profile_id, db_session=None)¶ Checks if a policy profile is being used in a port binding. :param profile_id: UUID of the policy profile to be checked :param db_session: database session :returns: boolean
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.remove_network_profile(netp_id, db_session=None)¶ Delete a network profile.
Parameters: - netp_id – string representing the UUID of the network profile
- db_session – database session
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.remove_profile_tenant_binding(profile_type, profile_id, tenant_id, db_session)¶
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.update_network_binding_with_segment_id(net_id, segment_id, db_session)¶ Update the network to network profile binding
Parameters: - net_id – UUID representing the network
- segment_id – integer representing VLAN or VXLAN ID
- db_session – database session
-
networking_cisco.plugins.ml2.drivers.cisco.n1kv.n1kv_db.update_policy_profile_binding_with_tenant_id(profile_id, tenant_id, db_session)¶