Ejemplo n.º 1
0
    def unpack(self, u: xdrlib.Unpacker):
        self.needs_attention = u.unpack_bool()
        self.fixing = u.unpack_bool()
        self.wwn = u.unpack_opaque()
        self.management_class_name = u.unpack_string()
        self.storage_array_label = u.unpack_string().decode('utf-16be')
        self.boot_time = struct.unpack('>Q', u.unpack_fopaque(8))[0]
        self.fw_version = u.unpack_fopaque(4)
        self.app_version = u.unpack_fopaque(4)
        self.boot_version = u.unpack_fopaque(4)
        self.nvsram_version = u.unpack_string()
        self.fw_prefix = u.unpack_string()
        self.chassis_serial_number = u.unpack_string()
        self.event_configuration_data_version = u.unpack_string()

        self.array_attributes = []
        nb = u.unpack_uint()
        for i in range(nb):
            self.array_attributes.append(u.unpack_uint())
        self.res4 = []
        nb = u.unpack_uint()
        for i in range(nb):
            self.res4.append(u.unpack_uint())
        self.res5 = []
        nb = u.unpack_uint()
        for i in range(nb):
            self.res5.append(u.unpack_uint())
        self.res6 = []
        nb = u.unpack_uint()
        for i in range(nb):
            self.res6.append(u.unpack_uint())
        self.res7 = u.unpack_opaque()

        last = u.unpack_int()
        if last > 0:
            this.reserved1 = u.get_opaque()
            u.set_position(u.get_position() + last)
Ejemplo n.º 2
0
    def unpack(self, u: xdrlib.Unpacker):
        self.response_from_agent = u.unpack_bool()
        self.agent_id = u.unpack_opaque()

        n = u.unpack_uint()
        self.controllers = []
        for i in range(n):
            c = AccessibleController()
            c.trayId = u.unpack_uint()
            c.slot = u.unpack_uint()
            c.wwn = u.unpack_opaque()
            c.token = u.unpack_fopaque(12)
            c.controller_refs = []

            m = u.unpack_uint()
            for j in range(m):
                c.controller_refs.append(u.unpack_fopaque(12))

            self.controllers.append(c)
Ejemplo n.º 3
0
 def unpack(unpacker: Unpacker) -> "bool":
     return unpacker.unpack_bool()