Idea Details

CAPM :: Seeding CAPM with Devices to Discover By Invoking One REST API Call

Last activity 12-17-2016 10:42 AM
Aurelien_Vallee's profile image
04-21-2015 08:42 AM

For seeding CAPM with devices to discover, it would be nice to have only 1 REST API to call in one time for replacing all the others involved in the discovery profile (Tenant Creation / List, SNMP Profile Creation / List,  Discovery Profile Update, etc.). We use CAPM in multi-tenancy mode and we need to import a list of devices to collect from an inventory provided by an external tool (Maximo). Instead of calling the different REST methods and manage IDs, it might be useful to post an XML payload to a ‘super’ REST API that will be responsible for seeding CAPM. For instance, here is the XML content we could supply:

 

<Seeding>

  <HostList>

    <Tenant name="Microsoft">

      <SnmpAgent name="MSRouter01.microsoft.com" ipAddress="172.16.14.13" transportProtocol="udp" snmpPort="161" timeout="1000" retries="2" snmpVersion="v2c" snmpCommunity="admin" deviceType="Router"/>

   <SnmpAgent name="MSRouter02.microsoft.com" ipAddress="172.16.14.14" transportProtocol="udp" snmpPort="161" timeout="3000" retries="2" snmpVersion="v2c" snmpCommunity="admin" deviceType="Router"/>

      <SnmpAgent name="MSSwitch01.microsoft.com" ipAddress="172.16.14.15" transportProtocol="udp" snmpPort="161" timeout="3000" retries="2" snmpVersion="v2c" snmpCommunity="admin" deviceType="Switch"/>

   <SnmpAgent name="MSSwitch02.microsoft.com" ipAddress="172.16.14.16" transportProtocol="udp" snmpPort="161" timeout="3000" retries="2" snmpVersion="v2c" snmpCommunity="admin" deviceType="Switch"/>

   <SnmpAgent name="MSServer01.microsoft.com" ipAddress="172.16.14.17" transportProtocol="udp" snmpPort="161" timeout="3000" retries="2" snmpVersion="v2c" snmpCommunity="admin" deviceType="Server"/>

      <SnmpAgent name="MSServer02.microsoft.com" ipAddress="172.16.14.18" transportProtocol="udp" snmpPort="161" timeout="3000" retries="2" snmpVersion="v2c" snmpCommunity="admin" deviceType="Server"/>

    </Tenant>

    <Tenant name="Amazon">

    <SnmpAgent name="AMA-SEA-RTR01.amazon.com" ipAddress="192.168.14.13" transportProtocol="udp" snmpPort="161" timeout="1000" retries="2" snmpVersion="v2c" snmpCommunity="public" deviceType="Router"/>

        <SnmpAgent name="AMA-SEA-RTR02.amazon.com" ipAddress="192.168.14.14" transportProtocol="udp" snmpPort="161" timeout="3000" retries="2" snmpVersion="v2c" snmpCommunity="public" deviceType="Router"/>

    </Tenant>  

  <HostList>

  <CollectionGroup name="ResponsePath" tenantName="Microsoft" >

    <Agent>172.16.14.13</Agent>

    <Agent>172.16.14.14</Agent>

  </CollectionGroup>

  <CollectionGroup groupName="Interface" tenantName="Microsoft" >

    <Agent>172.16.14.15</Agent>

    <Agent>172.16.14.16</Agent>

  </CollectionGroup>

  <CollectionGroup groupName="ESX" tenantName="Microsoft" >

    <Agent>172.16.14.17</Agent>

    <Agent>172.16.14.18</Agent>

  </CollectionGroup>     

  <CollectionGroup groupName="QoS" tenantName="Amazon" >

    <Agent>192.168.14.13</Agent>

    <Agent>192.168.14.14</Agent>

  </CollectionGroup>

</Seeding>