Add ci parameter to get_ci() and push_ci() methods.

This commit is contained in:
uggla 2015-07-10 11:38:15 +02:00
parent 370cff7c6b
commit ad8908753e
1 changed files with 16 additions and 7 deletions

View File

@ -14,16 +14,16 @@ class Driver(object):
def get_driver_type(self):
return self.driver_type
def get_ci(self):
def get_ci(self,ci):
pass
def push_ci(self):
def push_ci(self,ci):
pass
class Itop(Driver):
def get_ci(self):
def get_ci(self,ci):
print "Get from itop"
return True
@ -32,12 +32,10 @@ class Itop(Driver):
class Redfish(Driver):
def get_ci(self):
def get_ci(self,ci):
print "Get from redfish"
return True
pass
class Ironic(Driver):
pass
@ -48,7 +46,18 @@ class Fakecmdb(Driver):
pass
class Fakeprovider(Driver):
pass
def get_ci(self,ci):
import app
# Simulate a driver that will provide Manager data.
# TODO a connect method must be implemented as
# Assuming the connection is ok.
# Now create a manager model from reference model.
ci.ci_type = "Manager"
ci.data = config.alexandria.model.Manager
class DriverCollection(list):