Reply

Extensible Attribute in an appliance

Authority
Posts: 36
3115     0

Is there a way to get all the values of an Extensible Attribute (say, City) in an appliance? Using PERL.

Any help would be appreciated.

I got the answer!

Authority
Posts: 36
3116     0

I got the answer!

Could you share the answer?

Posts: 75
3116     0

Could you share the answer?

 

Susan

list values?

Authority
Posts: 37
3116     0
If you're referring to extensible attributes that have a list :

#Get extensible attribute definition

 my @retrieved_objs = $session->get(
     object     => "Infoblox::Grid::ExtensibleAttributeDef",
     name       => "test_ext_attr" );

foreach my $ext_attr_def (@retrieved_objs)

{

#Get list of values
my $ref_list_values = $ext_attr_def->list_values();

print Dumper($ref_list_values);

}

 

If you're referring to extensible attributes definitions that are not lists; you'll have to iterate through each object and create a hash with unique values.

Hi Susan, of course....here's

Authority
Posts: 36
3116     0

Hi Susan, of course....here's what I found that worked.

my @retrieved_objs = $session->get(
         object => "Infoblox::Grid::ExtensibleAttributeDef",
         name   => "Device Type",
         );

my $object = $retrieved_objs[0];

my @ref_list_values = @{ $object->list_values() };

 

After that, just use a foreach loop to print the values.

Showing results for 
Search instead for 
Do you mean 

Recommended for You