class EnclosureDescriptor(Buffer):
    enclosure_services_processes_num = be_int_field(where=bytes_ref[0].bits[0:3])
    relative_enclosure_services_process_identifier = be_int_field(where=bytes_ref[0].bits[4:7])
    subenclosure_identifier = be_int_field(where=bytes_ref[1])
    type_descriptor_headers_num = be_int_field(where=bytes_ref[2])
    enclosure_descriptor_length = be_int_field(where=bytes_ref[3])
    enclosure_logical_identifier = bytearray_field(where=bytes_ref[4:12])  # FIXME use NAA stuff
    enclosure_vendor_identification = str_field(where=bytes_ref[12:20])
    product_identification = str_field(where=bytes_ref[20:36])
    product_revision_level = str_field(where=bytes_ref[36:40])  # FIXME use INQUIRY stuff
    vendor_specific_enclosure_information = bytearray_field(where_when_pack=bytes_ref[40:],
                                                            where_when_unpack=bytes_ref[40:enclosure_descriptor_length + 4])
Beispiel #2
0
class T10VendorIDDesignator(DesignatorDescriptor):
    designator_length = be_uint_field(where=bytes_ref[3],
                                      set_before_pack=len_ref(
                                          self_ref.vendor_specific_identifier))
    t10_vendor_identification = str_field(where=bytes_ref[4:12])
    vendor_specific_identifier = bytearray_field(
        where=bytes_ref[12:4 + designator_length])
class Descriptor(Buffer):
    descriptor_length = be_int_field(where=bytes_ref[2:4])
    descriptor = bytearray_field(where_when_pack=bytes_ref[4:], where_when_unpack=bytes_ref[4:descriptor_length + 4])
Beispiel #4
0
class MD5LogicalUnitDesignator(DesignatorDescriptor):
    designator_length = be_uint_field(
        where=bytes_ref[3],
        set_before_pack=len_ref(self_ref.md5_logical_unit_identifier))
    md5_logical_unit_identifier = bytearray_field(
        where=bytes_ref[4:4 + designator_length])
Beispiel #5
0
class VendorSpecificDesignator(DesignatorDescriptor):
    designator_length = be_uint_field(where=bytes_ref[3],
                                      set_before_pack=len_ref(
                                          self_ref.vendor_specific_identifier))
    vendor_specific_identifier = bytearray_field(
        where=bytes_ref[4:4 + designator_length])
Beispiel #6
0
class SCSINameDesignator(DesignatorDescriptor):
    designator_length = be_uint_field(where=bytes_ref[3],
                                      set_before_pack=len_ref(
                                          self_ref.scsi_name_string))
    scsi_name_string = bytearray_field(where=bytes_ref[4:4 +
                                                       designator_length])