Scripting Object - VcVmwareDistributedVirtualSwitch

Scripting-object corresponding to
VmwareDistributedVirtualSwitch

Scripting Object Description

The {@link vim.dvs.VmwareDistributedVirtualSwitch} managed object is the VMware implementation of a distributed virtual switch. The functionality listed here is for a VMware distributed virtual switch only.

When you use a VMware distributed virtual switch, you can perform backup and restore operations on the VMware switch. You can also perform rollback operations on the switch and on portgroups associated with the VMware switch. See the description for the following methods:

Attributes

Name Type Description
alarmActionsEnabledBoolean

@since vSphere API 4.0
availableFieldVcCustomFieldDef []

@since VI API 2.5
capabilityVcDVSCapability

@since vSphere API 4.0
configVcDVSConfigInfo

@since vSphere API 4.0
configIssueVcEvent []

@since VI API 2.5
configStatusVcManagedEntityStatus

@since VI API 2.5
customValueVcCustomFieldValue []

@since VI API 2.5
declaredAlarmStateVcAlarmState []

@since VI API 2.5
descriptionString

@since Unknown
disabledMethodString []

@since VI API 2.5
effectiveRoleNumber []

@since VI API 2.5
idString

@since Unknown
morefVcManagedObjectReference

returns the ManagedObjectReference of this ManagedObject @since Unknown
nameString

@since VI API 2.5
networkResourcePoolVcDVSNetworkResourcePool []

@since vSphere API 4.1
overallStatusVcManagedEntityStatus

@since VI API 2.5
parentVcManagedEntity

@since VI API 2.5
permissionVcPermission []

@since VI API 2.5
portgroupVcDistributedVirtualPortgroup []

@since vSphere API 4.0
recentTaskVcTask []

@since VI API 2.5
runtimeVcDVSRuntimeInfo

@since vSphere API 5.1
sdkConnectionVcSdkConnection

@since Unknown
sdkIdString

@since Unknown
summaryVcDVSSummary

@since vSphere API 4.0
tagVcTag []

@since vSphere API 4.0
triggeredAlarmStateVcAlarmState []

@since VI API 2.5
typeStringDeprecated.

Returns the name for the this managed object's vim type @since Unknown
uuidString

@since vSphere API 4.0
valueVcCustomFieldValue []

@since VI API 2.5
vimHostVcSdkConnection

@since Unknown
vimIdString

@since Unknown
vimTypeString

@since Unknown

Methods

Methods defined in this Scripting Object
_getRef, addDVPortgroup_Task, addNetworkResourcePool, addTag, createDVPortgroup_Task, createTrigger, destroy_Task, dvsReconfigureVmVnicNetworkResourcePool_Task, dVSRollback_Task, enableNetworkResourceManagement, fetchDVPortKeys, fetchDVPorts, lookupDvPortGroup, mergeDvs_Task, moveDVPort_Task, performDvsProductSpecOperation_Task, queryUsedVlanIdInDvs, reconfigureDVPort_Task, reconfigureDvs_Task, rectifyDvsHost_Task, refreshDVPortState, reload, removeNetworkResourcePool, removeTag, rename_Task, retrieveCustomValues, setCustomValue, updateDvsCapability, updateDVSHealthCheckConfig_Task, updateDVSLacpGroupConfig_Task, updateNetworkResourcePool

reconfigureDVPort_Task

Reconfigure individual ports. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcDVPortConfigSpec []


Return Value

Type Description
VcTask

removeTag

Removes a set of tags from this object. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcTag []


Return Value

Type Description
None

removeNetworkResourcePool

Remove a network resource pool. @since vSphere API 5.0

Parameters

NameTypeDescription
arg0String []


Return Value

Type Description
None

destroy_Task

Destroys this object, deleting its contents and removing it from its parent folder (if any).

NOTE: The appropriate privilege must be held on the parent of the destroyed entity as well as the entity itself.

This method can throw one of several exceptions. The exact set of exceptions depends on the kind of entity that is being removed. See comments for each entity for more information on destroy behavior. @since VI API 2.5

Parameters

NameTypeDescription
None

Return Value

Type Description
VcTask

dvsReconfigureVmVnicNetworkResourcePool_Task

reconfigure the Virtual NIC network resource pool configuration. @since vSphere API 6.0

Parameters

NameTypeDescription
arg0VcDvsVmVnicResourcePoolConfigSpec []


Return Value

Type Description
VcTask

updateDvsCapability

Set the capability of the switch. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcDVSCapability


Return Value

Type Description
None

queryUsedVlanIdInDvs

Return the used VLAN ID (PVLAN excluded) in the switch. @since vSphere API 4.0

Parameters

NameTypeDescription
None

Return Value

Type Description
Number []

createTrigger

@since Unknown

Parameters

NameTypeDescription
timeoutNumber

filterString

conditionString

filterToSyncString


Return Value

Type Description
Trigger

addNetworkResourcePool

Add a network resource pool. @since vSphere API 5.0

Parameters

NameTypeDescription
arg0VcDVSNetworkResourcePoolConfigSpec []


Return Value

Type Description
None

dVSRollback_Task

This method determines if the distributed virtual switch configuration has changed. If it has changed, the method returns a {@link vim.dvs.VmwareDistributedVirtualSwitch.ConfigSpec}. Use the {@link vim.DistributedVirtualSwitch#reconfigure} method to apply the rollback configuration to the switch. You can use the rollback method only on a {@link vim.dvs.VmwareDistributedVirtualSwitch}.

To use the rollback method, you must have the DVSwitch.Read privilege.

@since vSphere API 5.1

Parameters

NameTypeDescription
arg0VcEntityBackupConfig


Return Value

Type Description
VcTask

createDVPortgroup_Task

Creates a single {@link vim.dvs.DistributedVirtualPortgroup} and adds it to the distributed virtual switch. @since vSphere API 5.1

Parameters

NameTypeDescription
arg0VcDVPortgroupConfigSpec


Return Value

Type Description
VcTask

updateNetworkResourcePool

Update the network resource pool configuration. @since vSphere API 4.1

Parameters

NameTypeDescription
arg0VcDVSNetworkResourcePoolConfigSpec []


Return Value

Type Description
None

fetchDVPortKeys

Return the keys of ports that meet the criteria. On an ESXi host, the property shows only the connected ports currently on the host. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcDistributedVirtualSwitchPortCriteria


Return Value

Type Description
String []

reconfigureDvs_Task

Reconfigures a distributed virtual switch. You can use this method to set switch properties or to reset the switch to a previous state.

Reconfiguring a Standard Distributed Virtual Switch

To reconfigure a {@link vim.DistributedVirtualSwitch}, use a {@link vim.DistributedVirtualSwitch.ConfigSpec} to set the switch properties.

Reconfiguring a VMware Distributed Virtual Switch

If you use a {@link vim.dvs.VmwareDistributedVirtualSwitch}, you can perform the following switch reconfiguration:

Reconfiguring the switch may require any of the following privileges, depending on what is being changed:

@since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcDVSConfigSpec


Return Value

Type Description
VcTask

mergeDvs_Task

Merge an existing DistributedVirtualSwitch (source) to this switch (destination). The host members and the connected entity of the source switch will be transferred to the destination switch. This operation disconnects the entities from the source switch, tears down its host proxy switches, creates new proxies for the destination switch, and reconnects the entities to the destination switch.

In summary, this operation does the following:

@since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcDistributedVirtualSwitch


Return Value

Type Description
VcTask

_getRef

@since Unknown

Parameters

NameTypeDescription
None

Return Value

Type Description
VcManagedObjectReference

fetchDVPorts

Return the ports that meet the criteria. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcDistributedVirtualSwitchPortCriteria


Return Value

Type Description
VcDistributedVirtualPort []

lookupDvPortGroup

Returns the portgroup identified by the key within this VDS. @since vSphere API 5.1

Parameters

NameTypeDescription
arg0String


Return Value

Type Description
VcDistributedVirtualPortgroup

performDvsProductSpecOperation_Task

This method updates the {@link vim.DistributedVirtualSwitch} product specifications. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0String

arg1VcDistributedVirtualSwitchProductSpec


Return Value

Type Description
VcTask

setCustomValue

Assigns a value to a custom field. The setCustomValue method requires whichever updatePrivilege is defined as one of the {@link CustomFieldsManager.FieldDef#fieldInstancePrivileges} for the CustomFieldDef whose value is being changed. @since VI API 2.5

Parameters

NameTypeDescription
arg0String

arg1String


Return Value

Type Description
None

reload

Reload the entity state. Clients only need to call this method if they changed some external state that affects the service without using the Web service interface to perform the change. For example, hand-editing a virtual machine configuration file affects the configuration of the associated virtual machine but the service managing the virtual machine might not monitor the file for changes. In this case, after such an edit, a client would call "reload" on the associated virtual machine to ensure the service and its clients have current data for the virtual machine. @since VI API 2.5

Parameters

NameTypeDescription
None

Return Value

Type Description
None

refreshDVPortState

Refresh port states. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0String []


Return Value

Type Description
None

updateDVSHealthCheckConfig_Task

Update health check configuration. @since vSphere API 5.1

Parameters

NameTypeDescription
arg0VcDVSHealthCheckConfig []


Return Value

Type Description
VcTask

rectifyDvsHost_Task

Update the switch configuration on the host to bring them in sync with the current configuration in vCenter Server. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcHostSystem []


Return Value

Type Description
VcTask

retrieveCustomValues

Retrieve Custom field values based on specified custom field keys. If there is no key specified, all custom values associated to this ManagedEntity will be returned. @since vSphere API 6.5

Parameters

NameTypeDescription
arg0Number []


Return Value

Type Description
VcCustomFieldValue []

enableNetworkResourceManagement

Enable/Disable network I/O control on the vSphere Distributed Switch. @since vSphere API 4.1

Parameters

NameTypeDescription
arg0Boolean


Return Value

Type Description
None

moveDVPort_Task

Move the ports out of their current portgroup into the specified portgroup. If the moving of any of the ports results in a violation of the portgroup policy, or type of the source or destination portgroup, the operation raises a fault. A conflict port cannot be moved. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0String []

arg1String


Return Value

Type Description
VcTask

addDVPortgroup_Task

Creates one or more {@link vim.dvs.DistributedVirtualPortgroup}s and adds them to the distributed virtual switch. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcDVPortgroupConfigSpec []


Return Value

Type Description
VcTask

updateDVSLacpGroupConfig_Task

Update Link Aggregation Control Protocol groups. It can be called if the value of {@link VmwareDistributedVirtualSwitch.ConfigInfo#lacpApiVersion} is {@link LacpApiVersion#multipleLag} else an exception ConflictingConfiguration will be thrown. @since vSphere API 5.5

Parameters

NameTypeDescription
arg0VcVMwareDvsLacpGroupSpec []


Return Value

Type Description
VcTask

addTag

Add a set of tags to this object that can be queried later. The tag must be of the form "system/" or "global/ Parameters

NameTypeDescription
arg0VcTag []


Return Value

Type Description
None

rename_Task

Renames this managed entity.

Any % (percent) character used in this name parameter must be escaped, unless it is used to start an escape sequence. Clients may also escape any other characters in this name parameter.

@since VI API 2.5

Parameters

NameTypeDescription
arg0String


Return Value

Type Description
VcTask