
This external documentation for pyVmomi was generated using Googly Docs (aka Google Standard Documentation) which renders very cleanly in GitHub. Internal documentation for a class should be done in Sphinx format because tools like pyCharm and Eclipse can use that documentation as a hint for code completion. Note: External docs as Googly Docs, internal docs as Sphinx. Closes bug#15
5.9 KiB
5.9 KiB
vim.dvs.DistributedVirtualPortgroup
- The DistributedVirtualPortgroup managed object defines how hosts and virtual machines connect to a network. A distributed virtual portgroup specifies DistributedVirtualPort configuration options for the ports on a DistributedVirtualSwitch . A portgroup also represents a Network entity in the datacenter.
- To configure host access by portgroup, set the portgroup in the host virtual NIC specification (
- HostVirtualNicSpec
- .
- portgroup
- ).
- To configure virtual machine access by portgroup, set the portgroup in the virtual Ethernet card backing (
- VirtualEthernetCard
- .
- backing
- .
- port
- .
- portgroupKey
- ).When you use a portgroup for network access, the Server will create a port according to config . type .
- extends
- since
Attributes
- key (str):
Generated UUID of the portgroup.
- config (vim.dvs.DistributedVirtualPortgroup.ConfigInfo):
Configuration of the portgroup.
- portKeys (str):
Port keys for the set of ports in the portgroup.
Methods
- ReconfigureDVPortgroup(spec):
-
- Reconfigures one or more distributed virtual portgroups. You can use this method to set portgroup properties or to reset the portgroup to a previous state.Reconfiguring a Standard Distributed Virtual PortgroupTo reconfigure a DistributedVirtualPortgroup , use a DVPortgroupConfigSpec to set the portgroup properties.Reconfiguring a Portgroup Associated With a VMware Distributed Virtual SwitchIf you use a VmwareDistributedVirtualSwitch , you can perform the following portgroup reconfiguration:
-
- Use a
- DVPortgroupConfigSpec
- to set the portgroup properties.
- Use the
- DVPortgroupConfigSpec
- returned by
- DVPortgroupRollback_Task
- to reset the portgroup to a previous state.The following privileges are required to reconfigure a portgroup.
- DVPortgroup.PolicyOp if you are changing the policy of the portgroup.
- DVPortgroup.ScopeOp if you are changing the scope of the portgroup.
- DVPortgroup.Modify for anything else.
- Privilege:
-
dynamic
- Args:
-
- spec (vim.dvs.DistributedVirtualPortgroup.ConfigSpec):
-
Configuration data for the portgroup.
- Returns:
Raises:
- vim.fault.DvsFault:
-
if spec is not valid.
- vim.fault.ConcurrentAccess:
-
vim.fault.ConcurrentAccess
- vim.fault.DuplicateName:
-
vim.fault.DuplicateName
- vim.fault.InvalidName:
-
vim.fault.InvalidName
- vmodl.fault.NotSupported:
-
if the spec includes settings for any VDS feature that is not supported on this switch.
- vim.fault.DvsNotAuthorized:
-
if login-session's extension key does not match the switch's configured extensionKey .
- DVPortgroupRollback(entityBackup):
-
- This method determines if the portgroup configuration has changed. If it has changed, the method returns a DVPortgroupConfigSpec . Use the ReconfigureDVPortgroup_Task method to apply the rollback configuration to the portgroup. You can use the rollback method only on a portgroup that is associated with a VmwareDistributedVirtualSwitch .
-
- If you specify the
- entityBackup
- parameter, the returned configuration specification represents the exported portgroup configuration. If the
- entityBackup
- matches the current portgroup configuration, the method does not return a configuration specification.
- If
- entityBackup
- is not specified, the returned configuration specification represents a previous state of the portgroup, if available. When you use a VMware distributed virtual switch, each time you reconfigure the switch, the Server saves the switch configuration before applying the updates. If the vCenter Server is restarted, the saved configuration is not preserved and the method does not return a configuration specification.To use the rollback method, you must have the DVPortgroup.Read privilege.
since: vSphere API 5.1
- Privilege:
-
dynamic
- Args:
-
- entityBackup (vim.dvs.EntityBackup.Config, optional):
-
The backup of Distributed Virtual PortGroup entity.
- Returns:
Raises:
- vim.fault.DvsFault:
-
if operation fails.
- vim.fault.RollbackFailure:
-
if there is no configuration specified in entityBackup and the previous configuration does not exist either