Hello, I've got a script which creates new Ports-Groups (VLANs) in VirtualDistributedSwitches: ################## (...) my $DatacenterView = Vim::find_entity_view( 'view_type' ...
See more...
Hello, I've got a script which creates new Ports-Groups (VLANs) in VirtualDistributedSwitches: ################## (...) my $DatacenterView = Vim::find_entity_view( 'view_type' => 'Datacenter', 'filter' => { 'name' => "DATACENTER" }); my $DVSView = Vim::find_entity_view( 'view_type' => 'DistributedVirtualSwitch', 'filter' => { 'name' => 'Distributed Switch nbg6a-1' }, 'begin_entity' => $DatacenterView); my $VmwareDistributedVirtualSwitchVlanSpec = VmwareDistributedVirtualSwitchVlanIdSpec->new( 'vlanId' => $pg_vlan, 'inherited' => 'false'); my $DVPortSetting = VMwareDVSPortSetting->new('vlan' => $VmwareDistributedVirtualSwitchVlanSpec); my $DVPortgroupConfigSpec = DVPortgroupConfigSpec->new ( 'name' => $pg_name, 'numPorts' => 16, 'type' => 'earlyBinding', 'defaultPortConfig' => $DVPortSetting); $DVSView->AddDVPortgroup_Task('spec' => $DVPortgroupConfigSpec); (...) ##################### What I need the other way: delete a Portgroup out of the VirtualDistributedSwitch by using the "Name" not the key. And important: I need to specify the DistributedVirtualSwitch, because I could have more Portgroups with the same name in different vdSwitches. How can I do that? Thanks, Greets Alex