Quantcast
Viewing all articles
Browse latest Browse all 20616

Re: Node Details blank when adding node Via Perl SDK

Hi again david.gates,

That error, "An item with the same key has already been added" is occured because set "Description" field. You can't set this field by create method. It's a default field.

 

And I realised your first posting code something.

 

That code block and the one after, whis is adding pollers is not related to each other. I don't know how to write Perl code but I think you are not passing through correctly adding poller process

 

$resp =~ /NodeID=(\d+)\</;

my $nid = $1; //your node id is "1"

print "New node id is $nid\n";

 

//because of your node ID is "1", pollers is added to node which have "1" node ID.

 

foreach my $poller (@pollers) {

    print "Adding $poller to NodeID $nid\n";

    $swis->Create(

        "Orion.Pollers",

        {

            'PollerType'    => $poller,

            'NetObject'     => "N:$nid",

 

Can you check have pollers correct nodeID after adding pollers? Maybe I'm wrong but that thoughts help you.


Viewing all articles
Browse latest Browse all 20616

Trending Articles