Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- re_line2 = re.compile(
- r"\s+Vendor: (?P<vendor>\S+)\s+Model: (?P<model>.+) " +
- r"Rev: (?P<disk_revision>.+)")
- re_line3 = re.compile(
- r"\s+Type:\s+(?P<type>.*)\s+SCSI revision: (?P<scsi_revision>.+)")
- [...]
- m = re_line2.match(line)
- if m is not None:
- data[index]["vendor"] = m.group("vendor"),
- data[index]["model"] = m.group("model"),
- data[index]["revision-disk"] = m.group("disk_revision"),
- continue
- m = re_line3.match(line)
- if m is not None:
- data[index]["type"] = m.group("type")
- data[index]["revision-scsi"] = m.group("scsi_revision")
- continue
- :
- {
- "channel": "00",
- "host": "scsi6",
- "id": "00",
- "lun": "00",
- "model": [
- "ATP eUSB "
- ],
- "revision-disk": [
- "1100"
- ],
- "revision-scsi": "00",
- "type": "Direct-Access ANSI ",
- "vendor": [
- "ATP"
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement