- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
nearly there.
In the for loop you need to skip those vm's without custom fields:
for my $vm ( sort { $a->name cmp $b->name } @$vm_view ) {
my $cv_ref = $vm->{'summary.customValue'};
next unless defined ( $vm->{'summary.customValue'} ) ;
print $vm->name . "\n";
for ( @$cv_ref ) {
print "key: ", $_->key, "\tvalue: ", $_->value, "\n";
}
}
o, and you need to retrieve the 'name' property of the vm as well if you copy paste that ![]()