Quantcast
Viewing all articles
Browse latest Browse all 3719

Help: How to enable Dynamic IP Address (DHCP or BOOTP) and assign a DNS Hostname through API

Hi, I can add node to SolarWinds perfectly, but I have some nodes need to enable DHCP option with DNS hostname.

 

I tried to use 'DynamicIP': 1, but it return an error.

 

Below is my code.

results = addNode(swis)

 

def addNode(s):

    print "Adding Node...",

    node_props = {

        'IPAddress': node_ip_address,

        'EngineID':    1,

        'ObjectSubType': 'SNMP',

        'Status': 1,

        'SNMPVersion':    2,

        'Community': node_community,

        'Caption': node_name,

        'AgentPort': node_snmp_port,

    }

    res = s.create('Orion.Nodes', **node_props)

    nodeid = re.search(r'(\d+)$', res).group(0)

    print " Done!"

    print "  Node ID: " + nodeid

    for n in node_props:

        print " ", n,": ",node_props[n]

    return res


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>