Reply to Message

View discussion in a popup

Replying to:
Sergio81
Contributor
Contributor

Hi, now i use this code to  find the Portgroup name:

my $portgroupKey = $nic->{backing}->{port}->{portgroupKey};

                           my $dvsPortgroup = Vim::find_entity_view (

                                 view_type => "DistributedVirtualPortgroup",

                                 begin_entity => $datacenter_view,

                                 properties => [ 'name', 'key', 'config.distributedVirtualSwitch' ],

                                 filter => { 'key' => $portgroupKey }

                           );  

my $Portgroup_name = $dvsPortgroup->name;

this work.

and with this i can retrive the switch UUID:

my $SwitchUuid = $nic->{backing}->{port}->{switchUuid};

it's look like: 90 2d 05 40 1e 9f ba 9b-ea fe 3d ec 93 21 a1 ba

now i need to retrieve the DVSwitch real name, something like "dvs_TEST-DR"...can i use the UUID to find the associated DVS name, how?
Maybe is there a better way?

Thank You!!

Reply
0 Kudos