The relative path for the "ucs_inventory.ini" file has been fixed
Change-Id: I38053df8b398e3fadcc6820c1118b3685ccd4174
This commit is contained in:
parent
d2bb51ca25
commit
87dbc61c34
plugins/cisco-plugin/lib/quantum/plugins/cisco/ucs
@ -98,8 +98,8 @@ class UCSInventory(L2NetworkDeviceInventoryBase):
|
|||||||
def _load_inventory(self):
|
def _load_inventory(self):
|
||||||
"""Load the inventory from a config file"""
|
"""Load the inventory from a config file"""
|
||||||
inventory = deepcopy(conf.INVENTORY)
|
inventory = deepcopy(conf.INVENTORY)
|
||||||
#LOG.info("Loaded UCS inventory: %s\n" % inventory)
|
LOG.info("Loaded UCS inventory: %s\n" % inventory)
|
||||||
#LOG.info("Building UCS inventory state (this may take a while)...")
|
LOG.info("Building UCS inventory state (this may take a while)...")
|
||||||
|
|
||||||
for ucsm in inventory.keys():
|
for ucsm in inventory.keys():
|
||||||
ucsm_ip = inventory[ucsm][const.IP_ADDRESS]
|
ucsm_ip = inventory[ucsm][const.IP_ADDRESS]
|
||||||
@ -142,7 +142,7 @@ class UCSInventory(L2NetworkDeviceInventoryBase):
|
|||||||
ucsm_password)
|
ucsm_password)
|
||||||
blades_dict[blade_id] = blade_data
|
blades_dict[blade_id] = blade_data
|
||||||
|
|
||||||
#LOG.debug("UCS Inventory state is: %s\n" % self._inventory_state)
|
LOG.debug("UCS Inventory state is: %s\n" % self._inventory_state)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _get_host_name(self, ucsm_ip, chassis_id, blade_id):
|
def _get_host_name(self, ucsm_ip, chassis_id, blade_id):
|
||||||
|
@ -23,7 +23,7 @@ import os
|
|||||||
from quantum.common.config import find_config_file
|
from quantum.common.config import find_config_file
|
||||||
from quantum.plugins.cisco.common import cisco_configparser as confp
|
from quantum.plugins.cisco.common import cisco_configparser as confp
|
||||||
|
|
||||||
CP = confp.CiscoConfigParser(find_config_file({}, [],
|
CONF_FILE = find_config_file({}, None, "ucs_inventory.ini")
|
||||||
'plugins/cisco/ucs_inventory.ini'))
|
CP = confp.CiscoConfigParser(CONF_FILE)
|
||||||
|
|
||||||
INVENTORY = CP.walk(CP.dummy)
|
INVENTORY = CP.walk(CP.dummy)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user