Exemplo n.º 1
0
 def model(self):
     return read_file_entry(
         os.path.join("/sys/class/scsi_device/", self.scsi_id, "device/model"),
         "unkown").strip()
Exemplo n.º 2
0
 def _get_if_encap(self, name):
     type_path = os.path.join(SYSFS_NET_DEV, name, "type")
     return int(read_file_entry(type_path, 1))
Exemplo n.º 3
0
 def _get_if_encap(self, name):
     type_path = os.path.join(SYSFS_NET_DEV, name, "type")
     return int(read_file_entry(type_path, 1))
Exemplo n.º 4
0
 def mode(self):
     """return mode"""
     path = os.path.join(SYSFS_NET_DEV, self.name, "bonding/mode")
     mode = read_file_entry(path).split()[1]
     return int(mode)
Exemplo n.º 5
0
 def slaves(self):
     path = os.path.join(SYSFS_NET_DEV, self.name, "bonding/slaves")
     return read_file_entry(path).split()
Exemplo n.º 6
0
 def group_name_list(self):
     return read_file_entry(BONDING_MASTERS, "").split()
Exemplo n.º 7
0
 def miimon(self):
     """return miimon in ms"""
     path = os.path.join(SYSFS_NET_DEV, self.name, "bonding/miimon")
     return int(read_file_entry(path))
Exemplo n.º 8
0
 def state(self):
     return read_file_entry(
         os.path.join("/sys/class/scsi_device/", self.scsi_id,
                      "device/state"), "running").strip()
Exemplo n.º 9
0
 def get_group_list(self):
     group_list = []
     name_list = read_file_entry(BONDING_MASTERS, "").split()
     for group_name in name_list:
         group_list.append(BondGroup(group_name))
     return group_list
Exemplo n.º 10
0
 def model(self):
     return read_file_entry(
         os.path.join("/sys/class/scsi_device/", self.scsi_id,
                      "device/model"), "unkown").strip()
Exemplo n.º 11
0
 def rev(self):
     return read_file_entry(
         os.path.join("/sys/class/scsi_device/", self.scsi_id,
                      "device/rev"), "1.0").strip()
Exemplo n.º 12
0
 def slaves(self):
     path = os.path.join(SYSFS_NET_DEV, self.name, "bonding/slaves")
     return read_file_entry(path).split()
Exemplo n.º 13
0
 def mode(self):
     """return mode"""
     path = os.path.join(SYSFS_NET_DEV, self.name, "bonding/mode")
     mode = read_file_entry(path).split()[1]
     return int(mode)
Exemplo n.º 14
0
 def miimon(self):
     """return miimon in ms"""
     path = os.path.join(SYSFS_NET_DEV, self.name, "bonding/miimon")
     return int(read_file_entry(path))
Exemplo n.º 15
0
 def rev(self):
     return read_file_entry(
         os.path.join("/sys/class/scsi_device/", self.scsi_id, "device/rev"),
         "1.0").strip()
Exemplo n.º 16
0
 def group_name_list(self):
     return read_file_entry(BONDING_MASTERS, "").split()
Exemplo n.º 17
0
 def state(self):
     return read_file_entry(
         os.path.join("/sys/class/scsi_device/", self.scsi_id, "device/state"),
         "running").strip()
Exemplo n.º 18
0
 def get_group_list(self):
     group_list = []
     name_list = read_file_entry(BONDING_MASTERS, "").split()
     for group_name in name_list:
         group_list.append(BondGroup(group_name))
     return group_list