The relative path for the "ucs_inventory.ini" file has been fixed

Change-Id: I38053df8b398e3fadcc6820c1118b3685ccd4174
This commit is contained in:
Edgar Magana 2011-11-16 14:52:40 -08:00
parent d2bb51ca25
commit 87dbc61c34
2 changed files with 5 additions and 5 deletions

View File

@ -98,8 +98,8 @@ class UCSInventory(L2NetworkDeviceInventoryBase):
def _load_inventory(self):
"""Load the inventory from a config file"""
inventory = deepcopy(conf.INVENTORY)
#LOG.info("Loaded UCS inventory: %s\n" % inventory)
#LOG.info("Building UCS inventory state (this may take a while)...")
LOG.info("Loaded UCS inventory: %s\n" % inventory)
LOG.info("Building UCS inventory state (this may take a while)...")
for ucsm in inventory.keys():
ucsm_ip = inventory[ucsm][const.IP_ADDRESS]
@ -142,7 +142,7 @@ class UCSInventory(L2NetworkDeviceInventoryBase):
ucsm_password)
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
def _get_host_name(self, ucsm_ip, chassis_id, blade_id):

View File

@ -23,7 +23,7 @@ import os
from quantum.common.config import find_config_file
from quantum.plugins.cisco.common import cisco_configparser as confp
CP = confp.CiscoConfigParser(find_config_file({}, [],
'plugins/cisco/ucs_inventory.ini'))
CONF_FILE = find_config_file({}, None, "ucs_inventory.ini")
CP = confp.CiscoConfigParser(CONF_FILE)
INVENTORY = CP.walk(CP.dummy)