in reply to Data Structure confusion...
my @hostatt; push @hostatt, # Info for First host { 'value' => 'some value1', 'name' => 'URL', 'arg2' => undef, 'arg4' => undef, 'arg1' => 'someurl.com', 'arg3' => undef }; push @hostatt, # Info for Second host { 'value' => 'some value2', 'name' => 'URL2', 'arg2' => undef, 'arg4' => undef, 'arg1' => 'someur2.com', 'arg3' => undef }; #Finally, assign this to the main structure my $host = $ops->create_or_update_host( ip => 'nodename.com', name => "Name", hostgroup => { name => 'RDG - Prod Services' }, hosttemplates => [ { 'ref' => '/rest/config/hosttemplate/94 +', 'name' => 'AA-RDG-Pseudo-services' } ] +, hostattributes => \@hostatt, # <<< HERE <<<<< notification_period => { name => 'RDG-24x7-Minus-Bounce' } );
This is not an optical illusion, it just looks like one.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Data Structure confusion...
by Spoon71 (Initiate) on Apr 27, 2016 at 08:17 UTC |