def model(self): return read_file_entry( os.path.join("/sys/class/scsi_device/", self.scsi_id, "device/model"), "unkown").strip()
def _get_if_encap(self, name): type_path = os.path.join(SYSFS_NET_DEV, name, "type") return int(read_file_entry(type_path, 1))
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)
def slaves(self): path = os.path.join(SYSFS_NET_DEV, self.name, "bonding/slaves") return read_file_entry(path).split()
def group_name_list(self): return read_file_entry(BONDING_MASTERS, "").split()
def miimon(self): """return miimon in ms""" path = os.path.join(SYSFS_NET_DEV, self.name, "bonding/miimon") return int(read_file_entry(path))
def state(self): return read_file_entry( os.path.join("/sys/class/scsi_device/", self.scsi_id, "device/state"), "running").strip()
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
def rev(self): return read_file_entry( os.path.join("/sys/class/scsi_device/", self.scsi_id, "device/rev"), "1.0").strip()