The oslo_vmware.dvs_util Module

The oslo_vmware.dvs_util Module

oslo_vmware.dvs_util.add_port_group(session, dvs_moref, name, vlan_id=None, trunk_mode=False)

Add a new port group to the dvs_moref

Parameters:
  • session – vCenter soap session
  • dvs_moref – managed DVS object reference
  • name – the name of the port group
  • vlan_id – vlan_id for the port
  • trunk_mode – indicates if the port will have trunk mode or use specific tag above
Returns:

The new portgroup moref

oslo_vmware.dvs_util.delete_port_group(session, portgroup_moref)

Delete a specific port group

Parameters:
  • session – vCenter soap session
  • portgroup_moref – managed portgroup object reference
oslo_vmware.dvs_util.get_dvs_moref(value)

Get managed DVS object reference.

Parameters:value – value of the DVS managed object
Returns:managed object reference with given value and type ‘VmwareDistributedVirtualSwitch’
oslo_vmware.dvs_util.get_port_group_spec(session, name, vlan_id, trunk_mode=False)

Gets the port group spec for a distributed port group

Parameters:
  • session – vCenter soap session
  • name – the name of the port group
  • vlan_id – vlan_id for the port
  • trunk_mode – indicates if the port will have trunk mode or use specific tag above
Returns:

The configuration for a port group.

oslo_vmware.dvs_util.get_portgroups(session, dvs_moref)

Gets all configured portgroups on the dvs_moref

Parameters:
  • session – vCenter soap session
  • dvs_moref – managed DVS object reference
Returns:

List of tuples that have the following format: (portgroup name, port group moref)

oslo_vmware.dvs_util.get_trunk_vlan_spec(session, start=0, end=4094)

Gets portgroup trunk vlan spec.

Parameters:
  • session – vCenter soap session
  • start – the starting id
  • end – then end id
Returns:

The configuration when a port uses trunk mode. This allows a guest to manage the vlan id.

oslo_vmware.dvs_util.get_vlan_spec(session, vlan_id)

Gets portgroup vlan spec.

Parameters:
  • session – vCenter soap session
  • vlan_id – the vlan_id for the port
Returns:

The configuration when a single vlan_id is used for a port

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.