예제 #1
0
파일: scsimgr.py 프로젝트: ntvis/StorLever
 def model(self):
     return read_file_entry(
         os.path.join("/sys/class/scsi_device/", self.scsi_id, "device/model"),
         "unkown").strip()
예제 #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))
예제 #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))
예제 #4
0
파일: bond.py 프로젝트: ntvis/StorLever
 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)
예제 #5
0
파일: bond.py 프로젝트: ntvis/StorLever
 def slaves(self):
     path = os.path.join(SYSFS_NET_DEV, self.name, "bonding/slaves")
     return read_file_entry(path).split()
예제 #6
0
파일: bond.py 프로젝트: linuxmap/StorLever
 def group_name_list(self):
     return read_file_entry(BONDING_MASTERS, "").split()
예제 #7
0
파일: bond.py 프로젝트: ntvis/StorLever
 def miimon(self):
     """return miimon in ms"""
     path = os.path.join(SYSFS_NET_DEV, self.name, "bonding/miimon")
     return int(read_file_entry(path))
예제 #8
0
 def state(self):
     return read_file_entry(
         os.path.join("/sys/class/scsi_device/", self.scsi_id,
                      "device/state"), "running").strip()
예제 #9
0
파일: bond.py 프로젝트: ntvis/StorLever
 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
예제 #10
0
 def model(self):
     return read_file_entry(
         os.path.join("/sys/class/scsi_device/", self.scsi_id,
                      "device/model"), "unkown").strip()
예제 #11
0
 def rev(self):
     return read_file_entry(
         os.path.join("/sys/class/scsi_device/", self.scsi_id,
                      "device/rev"), "1.0").strip()
예제 #12
0
파일: bond.py 프로젝트: linuxmap/StorLever
 def slaves(self):
     path = os.path.join(SYSFS_NET_DEV, self.name, "bonding/slaves")
     return read_file_entry(path).split()
예제 #13
0
파일: bond.py 프로젝트: linuxmap/StorLever
 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)
예제 #14
0
파일: bond.py 프로젝트: linuxmap/StorLever
 def miimon(self):
     """return miimon in ms"""
     path = os.path.join(SYSFS_NET_DEV, self.name, "bonding/miimon")
     return int(read_file_entry(path))
예제 #15
0
파일: scsimgr.py 프로젝트: ntvis/StorLever
 def rev(self):
     return read_file_entry(
         os.path.join("/sys/class/scsi_device/", self.scsi_id, "device/rev"),
         "1.0").strip()
예제 #16
0
파일: bond.py 프로젝트: ntvis/StorLever
 def group_name_list(self):
     return read_file_entry(BONDING_MASTERS, "").split()
예제 #17
0
파일: scsimgr.py 프로젝트: ntvis/StorLever
 def state(self):
     return read_file_entry(
         os.path.join("/sys/class/scsi_device/", self.scsi_id, "device/state"),
         "running").strip()
예제 #18
0
파일: bond.py 프로젝트: linuxmap/StorLever
 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