The vmware_nsx.common.utils Module

class vmware_nsx.common.utils.NetworkTypes

Bases: object

Allowed provider network types for the NSX Plugin.

BRIDGE = 'bridge'
FLAT = 'flat'
GRE = 'gre'
L3_EXT = 'l3_ext'
PORTGROUP = 'portgroup'
STT = 'stt'
VLAN = 'vlan'
class vmware_nsx.common.utils.NsxV3NetworkTypes

Bases: object

Allowed provider network types for the NSXv3 Plugin.

FLAT = 'flat'
VLAN = 'vlan'
VXLAN = 'vxlan'
class vmware_nsx.common.utils.NsxVNetworkTypes

Bases: object

Allowed provider network types for the NSX-v Plugin.

FLAT = 'flat'
PORTGROUP = 'portgroup'
VLAN = 'vlan'
VXLAN = 'vxlan'
vmware_nsx.common.utils.add_v3_tag(tags, resource_type, tag)
vmware_nsx.common.utils.build_v3_api_version_tag()

Some resources are created on the manager that do not have a corresponding Neutron resource.

vmware_nsx.common.utils.build_v3_tags_payload(resource, resource_type, project_name)

Construct the tags payload that will be pushed to NSX-v3 Add <resource_type>:<resource-id>, os-project-id:<tenant-id>, os-project-name:<project_name> os-api-version:<neutron-api-version>

vmware_nsx.common.utils.check_and_truncate(display_name)
vmware_nsx.common.utils.device_id_to_vm_id(device_id, obfuscate=False)
vmware_nsx.common.utils.dict_match(dict1, dict2)
vmware_nsx.common.utils.get_name_and_uuid(name, uuid, tag=None, maxlen=80)
vmware_nsx.common.utils.get_tags(**kwargs)
vmware_nsx.common.utils.is_internal_resource(nsx_resource)

Indicates whether the passed nsx-resource is owned by the plugin for internal use.

vmware_nsx.common.utils.is_ipv4_ip_address(addr)
vmware_nsx.common.utils.is_nsx_version_1_1_0(nsx_version)
vmware_nsx.common.utils.is_nsxv_version_6_2(nsx_version)
vmware_nsx.common.utils.list_match(list1, list2)
vmware_nsx.common.utils.read_file(path)
vmware_nsx.common.utils.retry_upon_exception_nsxv3(exc, delay=500, max_delay=2000, max_attempts=10)
vmware_nsx.common.utils.spawn_n(func, *args, **kwargs)

Passthrough method for eventlet.spawn_n.

This utility exists so that it can be stubbed for testing without interfering with the service spawns.

It will also grab the context from the threadlocal store and add it to the store on the new thread. This allows for continuity in logging the context when using this method to spawn a new thread.

vmware_nsx.common.utils.update_v3_tags(current_tags, tags_update)

Previous topic

The vmware_nsx.common.sync Module

Next topic

The vmware_nsx.db.db Module

This Page