Friday, 13 July 2012

How to work with HP NNMi use Python and Web Service NNMi

This article describe how to use python with HP NNMi web services
use python to talk to nnmi
Suds is a lightweight SOAP python client for consuming Web Services:


from suds.client import Client
from suds.transport.http import HttpAuthenticated

t = HttpAuthenticated(username='system', password='NNMPASSWORD')

url = 'http://nnmi/NodeBeanService/NodeBean?wsdl'

client = Client(url, transport=t)

# Retrieve full node list
allNodes = client.service.getNodes('*')

print "Nodes in topology:", len(allNodes.item)

for i in allNodes.item[:]:

No comments:

Post a Comment