Discussion:
Get IP from DRAC Card
jgn
2013-08-19 18:12:09 UTC
Permalink
jgn [http://community.zenoss.org/people/jgn] created the discussion

"Get IP from DRAC Card"

To view the discussion, visit: http://community.zenoss.org/message/74394#74394

--------------------------------------------------------------
I am working on some scripts that populate a CMDB from ZenOSS.

One of the things we would find very useful is getting the DRAC IP from the Card Info
provided by the DellMon ZenPack. It doesn't appear to work 100% on newer cards,
but that is a seperate issue.

Here is my code and what I want to do...

<code>
for d in dmd.Devices.CIM.WMI.AMR.NWS.getSubDevices():
    if d.productionState >= 300:
      osv = d.getOSProductName()
      mfg = d.getHWManufacturerName()
      hwm = d.getHWProductName()
      sn = d.getHWSerialNumber()
      ip = d.getManageIp()
      name = d.id

      print name,osv,mfg,hwm,sn,ip
      for c in d.hw.cards():
        #####################################################################################
        # Here I only want the card if it is a type iDRAC, will have to discover all the types probably or regex it
        if c.getProductName() == "iDRAC6 Enterprise":
          ###################################################################################
          # Here I want to print the Product Name AND IP Address. The IP Address is something I don't know how to get.
          print "%s" % (c.getProductName())
</code


So basically how can I get the IP Address from the card? It is listed in device details for the card, I just don't know
what function to call to get it. <code>c.getManageIp</code> returns the IP of the machine, as you would expect...

Thanks in advance
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/74394#74394]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jgn
2013-08-19 18:45:36 UTC
Permalink
jgn [http://community.zenoss.org/people/jgn] created the discussion

"Re: Get IP from DRAC Card"

To view the discussion, visit: http://community.zenoss.org/message/74411#74411

--------------------------------------------------------------
I was apparently making this harder than it is.

print "%s\t%s" % (c.getProductName(), c.ipaddress)
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/74411#74411]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...