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
 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
 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
 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
 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