Esempio n. 1
0
    def set_fields(cls, compute_system, data, context=None):
        loc = kernelparams.read_location()
        compute_system.location = int(loc.blade)

        for node in data:
            if type(node) != dict:
                continue
            if node == LSHW_FIRMWARE:
                break

        return compute_system
    def set_fields(cls, compute_system, data, context=None):
        loc = kernelparams.read_location()
        compute_system.location = int(loc.blade)

        for node in data:
            if type(node) != dict:
                continue
            if node == LSHW_FIRMWARE:
                break

        return compute_system
Esempio n. 3
0
 def set_fields(cls, compute_module, data, context=None):
     loc = kernelparams.read_location()
     compute_module.chassis.locationOffset = int(loc.module)
     compute_module.chassis.parentId = int(loc.drawer)
     return compute_module
Esempio n. 4
0
 def set_fields(cls, compute_module, data, context=None):
     loc = kernelparams.read_location()
     compute_module.chassis.locationOffset = int(loc.module)
     compute_module.chassis.parentId = int(loc.drawer)
     return compute_module
Esempio n. 5
0
 def set_fields(cls, drawer, data, context=None):
     loc = kernelparams.read_location()
     drawer.chassis.locationOffset = int(loc.drawer)
     drawer.chassis.parentId = int(loc.rack)
     return drawer
Esempio n. 6
0
 def set_fields(cls, drawer, data, context=None):
     loc = kernelparams.read_location()
     drawer.chassis.locationOffset = int(loc.drawer)
     drawer.chassis.parentId = int(loc.rack)
     return drawer