11.07.2015 Views

DDM 8.0 Advanced Student Guide

DDM 8.0 Advanced Student Guide

DDM 8.0 Advanced Student Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

esultSet = client.executeQuery(_wmiQuery2)if resultSet.next():Manufacturer = resultSet.getString(1)if ((Manufacturer != None) and(Manufacturer.find('system manufacturer') == -1)):hostOSH.setAttribute('host_manufacturer',Manufacturer)HP CONFIDENTIAL - ENABLEMENT ONLY, NOT FOR CUSTOMER USE.# Modification made on 05/12/2006 to retrieve the hostNumberOfProcessors from the win32_computersystem class_wmiQuery3 = 'select NumberOfProcessors fromWin32_ComputerSystem'resultSet = client.executeQuery(_wmiQuery3)if resultSet.next():NumberOfProcessors = resultSet.getString(1)hostOSH.setAttribute('nt_processorsnumber',int(NumberOfProcessors))# Modification made on 05/09/2006 to retrieve the host modelfrom the win32_computersystem class_wmiQuery4 = 'select Model from Win32_ComputerSystem'resultSet = client.executeQuery(_wmiQuery4)if resultSet.next():Model = resultSet.getString(1)hostOSH.setAttribute('host_model', Model)# Modification made on 05/18/2006 to retrieve the host serialfrom the Win32_SystemBIOS.PartComponent class_wmiQuery5 = 'select SerialNumber from Win32_BIOS'resultSet = client.executeQuery(_wmiQuery5)if resultSet.next():SerialNumber = resultSet.getString(1)hostOSH.setAttribute('host_serialnumber', SerialNumber)vector.add(hostOSH)# Query for standard and daylight time from Win32_TimeZoneclasswmiQueryTime = 'SELECT StandardName,DaylightName FROMWin32_TimeZone'#print("QUERY: ", wmiQueryTime)resultSetTime = client.executeQuery(wmiQueryTime)while resultSetTime.next():StandardTime = resultSetTime.getString(1)DaylightTime = resultSetTime.getString(2)hostOSH.setAttribute('nt_standardtime', StandardTime)hostOSH.setAttribute('nt_daylighttime', DaylightTime)#print("STANDARD TIME: ", StandardTime)#print("DAYLIGHT TIME: ", DaylightTime)hostOSH))# add all interfaces to the hostvector.addAll(modeling.createInterfacesOSHV(interfaceList,for i in range(vector.size()):osh = vector.get(i)if osh.getObjectClass() == 'ip':HP Global Enablement© Copyright 2009 Hewlett-Packard Development Company, L.P. 51

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!