13 Replies Latest reply on Mar 18, 2015 3:43 PM by Manilyn Ramos

    Add new IP address to an existing Node?

    gstewart

      I'm attempting to use the Perl SDK to add an IP address to an existing node: specifically the Orion.NodeIPAddresses.

       

      I'm getting an access denied error: <UserMessage>Access to Orion.NodeIPAddresses denied.</UserMessage>

       

      I did search the forums and this does seem to be an often requested feature, but wondering if it's possible to do it programmatically? (rather than via the Web UI).

       

      Our specific use cases are NetScaler / F5 Big IP, with multiple front end load balanced IPs.

       

      Thanks in advance.

       

      Here's the code I'm using:

       

      sub addIPAddress {

          my %NEWIP = (

          'NodeID'            => $_[1],

          'IPAddress'         => $_[2],

          'IPAddressN' => ip2guid($_[2]),

          'IPAddressType'     => 'IPv4'

          );

      return $_[0]->Create('Orion.NodeIPAddresses', \%NEWIP);

      }

       

      my $swis = SW::InformationService->new();

      $swis->outputxml("true");

      $swis->proxy("https://".$hostname.$endpoint);

      $swis->proxy->http_request->authorization_basic($username, $password);

       

      print addIPAddress($swis, '1234', '127.0.01');