Ejemplo n.º 1
0
    def __init__(self, component_index=0,
                 is_module=False, iom_index=0, i2c_line=0, dependency=None):

        ComponentBase.__init__(self)
        self.is_module_component = is_module
        self.dependency = dependency

        if self.is_module_component:
            self.index = iom_index
            self.name = self.MODULE_COMPONENT[0].format(self.index)
            self.description = self.MODULE_COMPONENT[1].format(
                               ((self.index - 1) * 16) + 1, self.index * 16)
            self.cpld_version_file = ("/sys/class/i2c-adapter/i2c-{0}/{0}-003e"
                                      "/iom_cpld_vers").format(i2c_line)
        else:
            self.index = component_index
            self.name = self.CHASSIS_COMPONENTS[self.index][0]
            self.description = self.CHASSIS_COMPONENTS[self.index][1]
Ejemplo n.º 2
0
 def __init__(self, component_index):
     ComponentBase.__init__(self)
     self.index = component_index
     #self._api_helper = APIHelper()
     self.name = self.get_name()
Ejemplo n.º 3
0
 def __init__(self, component_index = 0):
     ComponentBase.__init__(self)
     self.index = component_index
     self.name = self.CHASSIS_COMPONENTS[self.index][0]
     self.description = self.CHASSIS_COMPONENTS[self.index][1]
     self.version = self.CHASSIS_COMPONENTS[self.index][2]()
Ejemplo n.º 4
0
 def __init__(self, component_index):
     ComponentBase.__init__(self)
     self.index = component_index
     self.name = self.get_name()
Ejemplo n.º 5
0
    def __init__(self, component_index, conf):
        ComponentBase.__init__(self)

        self._index = component_index
        self._config = conf
        self._api_common = Common(self._config)