The AddPending and DiscoverPending requires the following payload data appended to the HTTP POST request :
addPending
<void> addPending <string>nameOrAddr <string>community <string>description <string>snmpSource <string>snmpState <unsigned short>snmpPort <string>accessMode <string>accessAddressFormat <string>seedName <string>nameFormat <string>snmpVersionStr <string>user <string>engineID <string>authProtocol <string>privProtocol <string>authPass <string>privPass <string>context <boolean>encryptedPassword <string>displayName <string>systemType <string>domainName <string>sourceAddress <string>refreshType
discoverPending
<void> discoverPending <string>refreshType
Create the XML payload similar to the following:
$data1 = $data1 . "\<\?xml version=\"1.0\" encoding=\"UTF-8\"\?\>\n";
$data1 = $data1 . "\<arguments\> \n \<nameOrAddr\> Enter Device IP/FQDN here \</nameOrAddr\> \n \<community\> Enter Community String Here \</community\> \n \<description\> Enter Description Here \</description\> \n</arguments\>\n";
Once the payload is ready, add the payload to the HTTP post. Following is a perl sample of the same :
# Create the request URLs
my $server_endpoint1 = "http://<Tomcat IPAddr>:<Port>/smarts-edaa/msa/<INCHARGE-AM-PM Domain>/instances/ICF_TopologyManager::ICF-TopologyManager/action/addPending";
my $server_endpoint2 = "http://<Tomcat IPAddr>:<Port>/smarts-edaa/msa/<INCHARGE-AM-PM Domain>/instances/ICF_TopologyManager::ICF-TopologyManager/action/discoverPending";
Edit/enter the bold highlighted fields as per environment.
# Add request details like the type and the payload data onto the request
my $request1 = HTTP::Request->new(POST => $server_endpoint1); $request1->header('content-type' => 'application/xml'); $request1->content($data1); my $request2 = HTTP::Request->new(POST => $server_endpoint2);
#Send the request to AddPending and then discover pending
my $response1 = $ua->request($request1);
my $response2 = $ua->request($request2);
A curl representation of the above is as follows:
export DATA="<arguments> <nameOrAddr> Enter Device IP/FQDN here </nameOrAddr> <community> Enter Community String Here </community> <description> Enter Description Here </description> </arguments>"
curl -H "Content-Type: application/xml" -d "$DATA" http://<Tomcat IPAddr>:<Port>/smarts-edaa/msa/<INCHARGE-AM-PM Domain>/instances/ICF_TopologyManager::ICF-TopologyManager/action/addPending
curl http://<Tomcat IPAddr>:<Port>/smarts-edaa/msa/<INCHARGE-AM-PM Domain>/instances/ICF_TopologyManager::ICF-TopologyManager/action/discoverPending