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.check_and_truncate(display_name)
vmware_nsx.common.utils.device_id_to_vm_id(device_id, obfuscate=False)
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_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.is_port_dhcp_configurable(port)
vmware_nsx.common.utils.normalize_xml(data)
vmware_nsx.common.utils.read_file(path)
vmware_nsx.common.utils.retry_upon_exception(exc, delay, max_delay, max_attempts)
vmware_nsx.common.utils.retry_upon_exception_exclude_error_codes(exc, excluded_errors, delay, max_delay, max_attempts)

Retry with the configured exponential delay, unless the exception error code is in the given list

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.

Previous topic

The vmware_nsx.common.sync Module

Next topic

The vmware_nsx.db.db Module

This Page