I have a growing selection of scripts which have all be using SWIS v2 connections. I've begun encountering features that are lacking in v2 and supposedly present in v3. However, when I change the endpoint to tell my library to use a v3 connection, I start getting total junk back from SWIS. Either I get empty result sets, or I get a perl hash back that completely lacks the key/value pairs I get with a v2 connection. Rather, I get a bunch of ordinal number keys instead of usable names.
I'm guessing there's a new namespace missing from the v3 stuff, but I can't figure out what's missing or what's needing to be changed. I'm using the InformationService.pm file provided in the 1.7 SDK.
Calls to simple things seem to work ok, but every call I make via QueryXml() is returning junk. Note that these very same calls work perfectly when I change the endpoint back to a v2 connection.
If I single-step into a unit test and dump the results array, then I see this (with a v2 connection;)
'DNS' => ''
'Description' => 'D-Link Systems, Inc.'
'Displayname' => 'ALBIPIE-BNWF4-S2'
'EngineID' => 2
'IPAddress' => '10.149.8.200'
'Location' => 'University House . Birmingham, AL'
'NodeDescription' => 'D-Link DES-3052 Fast Ethernet Switch'
'NodeID' => 24495
'NodeName' => 'ALBIPIE-BNWF4-S2'
'ObjectSubType' => 'SNMP'
'Status' => 1
'SysName' => 'ALBIPIE-BNWF4-S2'
'SysObjectID' => '220.127.116.11.18.104.22.168.63.8'
'Uri' => 'swis://./Orion/Orion.Nodes/NodeID=24495'
'Vendor' => 'D-Link Systems, Inc.'
'_Col1' => 'D-Link DES-3052 Fast Ethernet Switch'
If I change to a v3 connection (simply by inserting the '/v3' into the endpoint string and reruning the script, I send up with this:
'c0' => 24495
'c1' => 'swis://solarwinds-npm.pavlovmedia.corp/Orion/Orion.Nodes/NodeID=24495'
'c10' => 'University House . Birmingham, AL'
'c11' => 1
'c12' => 2
'c13' => 'D-Link Systems, Inc.'
'c14' => 'ALBIPIE-BNWF4-S2'
'c15' => 'D-Link DES-3052 Fast Ethernet Switch'
'c2' => 'SNMP'
'c3' => ''
'c4' => 'ALBIPIE-BNWF4-S2'
'c5' => 'ALBIPIE-BNWF4-S2'
'c6' => '10.149.8.200'
'c7' => 'D-Link DES-3052 Fast Ethernet Switch'
'c8' => 'D-Link Systems, Inc.'
'c9' => '22.214.171.124.126.96.36.199.63.8'
You can see it's the same node, but the keys are wrong. The ONLY change between these two executions is adding '/v3' into the endpoint string.
I expect this is something obvious, but I can't find any references to similar issues here on Thwack or anywhere else, for that matter.
I'm betting there should be a different set of namespaces in InformationService.pm when a v3 connection is in use but I can't find any documentation for what this might be.
Can anyone point me to the documentation I'm missing?
I'm also wondering what, exactly, is the difference between the services on port 17777 vs the services on port 17778. I thought that 17777 was v2 and 17778 was v3. Yet there are examples here where everyone seems to be using 17778 for both v2 and v3 connections.
When I try to use a /v3/ endpoint with port 17777, I get an SSL error.