diff --git a/alexandria/app.py b/alexandria/app.py index b6073c9..20e4468 100644 --- a/alexandria/app.py +++ b/alexandria/app.py @@ -94,7 +94,7 @@ def synchronize_ci(ci): # Push the data provided above to all our drivers for driver in config.alexandria.drivers: app.logger.info("Push information to {} driver.".format(driver.get_driver_type())) - driver.push_ci(ci) + driver.set_ci(ci) @app.route('/ci', methods=['PUT']) @@ -162,4 +162,3 @@ if __name__ == "__main__": #pp.pprint(models.Manager) # debugging example. app.logger.info("Starting %s...", config.alexandria.NAME) app.run(port=int(config.alexandria.conf_file.get_alexandria_port())) - \ No newline at end of file diff --git a/alexandria/drivers.py b/alexandria/drivers.py index 4581a91..51019d0 100644 --- a/alexandria/drivers.py +++ b/alexandria/drivers.py @@ -20,7 +20,7 @@ class Driver(object): def get_ci(self, ci): pass - def push_ci(self, ci): + def set_ci(self, ci): pass @@ -30,7 +30,7 @@ class Itop(Driver): print("Get from itop") return True - def push_ci(self, ci): + def set_ci(self, ci): username = config.alexandria.conf_file.get_driver_parameters("itop", "loginItop") password = config.alexandria.conf_file.get_driver_parameters("itop", "passwordItop") config.logger.debug("login : {}, password : {}".format( @@ -87,6 +87,9 @@ class Redfish(Driver): #print("Redfish API version : {} \n".format(remote_mgmt.get_api_version())) return True + def set_ci(self, ci): + print "Push to Redfish" + return True class Ironic(Driver): pass @@ -97,7 +100,7 @@ class Mondorescue(Driver): class Fakecmdb(Driver): - def push_ci(self, ci): + def set_ci(self, ci): # Determine ci type so we can do the proper action. pp = pprint.PrettyPrinter(indent=4) if ci.ci_type == "Manager":