def addHost(self, ucsmHost, hostName, inMacAddr, inIpAddr, inLsServer):

                # check if node exists, then remove
                self.removeHost(hostName)
		pnDn = inLsServer.getattr(LsServer.PN_DN)
		powerAddr = inLsServer.getattr(LsServer.DN)
		powerAddrStartIndex = powerAddr.index('org-root') + len('org-root/')
		powerAddrEndIndex = powerAddr.index('/ls-')
		if 'org-root/ls-' not in powerAddr:
        	        powerAddr = ucsmHost.hostname + ":" + powerAddr[powerAddrStartIndex:powerAddrEndIndex]
	        else:
			powerAddr = inLsServer.getattr(LsServer.NAME)
		pass

		logging.debug('powerAddr:' + powerAddr)
		in_ls_name = inLsServer.getattr(LsServer.NAME)

            	self.update_node(pnDn, in_ls_name, ucsmHost.hostname, powerAddr, in_ls_name, ucsmHost.username, ucsmHost.password, 'ucs', inMacAddr)
Writes the nodes info to confi file in yaml format.
dataset/ETHPy150Open Havate/havate-openstack/proto-build/gui/horizon/Horizon_GUI/openstack_dashboard/static-raw/scripts/SPConsumer.py/Openstack.addHost