icontrol add nodes to configuration

Is it possible to add nodes to the F5 configuration with icontrol and perl. I can not find a function to do this.

Yes. You can.

LocalLB::NodeAddress will do that. Although with v11 onwards, that’s deprecated in favour of LocalLB::NodeAddressV2

There’s a ‘create’ method in each one…

H

Do you have an example?

Not on me…

You’re looking for perl but in what i’ve seen the api is close enough that perhaps this powershell code will be of use to you.

(Get-F5.iControl).LocalLBNodeAddress.create( (,'192.168.1.1'), (,0) )
(Get-F5.iControl).LocalLBNodeAddress.set_screen_name( (,'192.168.1.1'), (,'testnode' ) )
$nodeaddress = New-Object -TypeName iControl.LocalLBMonitorIP;
$nodeaddress.address_type = "ATYPE_STAR_ADDRESS"
$nodeaddress.ipaddress = '192.168.1.1'

Here is the API reference I used

DevCentral - An F5 Technical Community DevCentral - An F5 Technical Community

Here’s a listing of all the Perl iControl samples in the iControl CodeShare. There’s likely something in there.

https://devcentral.f5.com/wiki/iControl.perl.ashx

-Joe