예제 #1
0
 def test_get_all(self):
     disks = VNXDisk.get(t_cli())
     assert_that(len(disks), equal_to(180))
     for disk in disks:
         if disk.index == '4_0_e8':
             verify_disk_4_0_e8(disk)
             break
예제 #2
0
 def get_disk(self, disk_index=None):
     return VNXDisk.get(self._cli, disk_index)
예제 #3
0
 def disk_001(self):
     return VNXDisk('0_0_1', t_cli())
예제 #4
0
 def test_get_disk(self):
     disk = VNXDisk.get(t_cli(), '4_0_e8')
     verify_disk_4_0_e8(disk)
예제 #5
0
 def f():
     VNXDisk.parse_index('abcdefg')
예제 #6
0
 def test_parse_index(self):
     bus, enc, disk = VNXDisk.parse_index('1_10_A4')
     assert_that(bus, equal_to("1"))
     assert_that(enc, equal_to("10"))
     assert_that(disk, equal_to("A4"))
예제 #7
0
 def f():
     VNXDisk('abcde')
예제 #8
0
 def test_parse_index(self):
     bus, enc, disk = VNXDisk.parse_index('1_10_A4')
     assert_that(bus, equal_to("1"))
     assert_that(enc, equal_to("10"))
     assert_that(disk, equal_to("A4"))
예제 #9
0
 def delete_disk(self, disk_index):
     self._delete_resource(VNXDisk(disk_index, self._cli))
예제 #10
0
 def _update_disk_capacity(self):
     disks = VNXDisk.get(self._cli)
     self._total = mb_to_gb(
         sum([cap for cap in disks.capacity if cap is not None]))
     self._free_raw_disk = mb_to_gb(
         sum([disk.capacity for disk in disks if disk.state == 'Unbound']))
예제 #11
0
 def test_install_disk(self):
     disk = VNXDisk('0_0_1', t_cli())
     ret = disk.install()
     assert_that(ret, has_items(''))
예제 #12
0
 def test_remove_disk(self):
     disk = VNXDisk('0_0_1', t_cli())
     ret = disk.remove()
     assert_that(ret, has_items(''))
예제 #13
0
 def test_get_disk(self):
     disk = VNXDisk.get(t_cli(), '4_0_e8')
     verify_disk_4_0_e8(disk)
예제 #14
0
 def f():
     VNXDisk.parse_index('abcdefg')
예제 #15
0
 def remove_disk(self, disk_index):
     self._remove_resource(VNXDisk(disk_index, self._cli))
예제 #16
0
def get_disks():
    return VNXDisk.get(t_cli())
예제 #17
0
 def install_disk(self, disk_index):
     disk = VNXDisk(disk_index, self._cli)
     disk.install()
예제 #18
0
 def test_delete_disk(self):
     disk = VNXDisk('0_0_1', t_cli())
     ret = disk.delete()
     assert_that(ret, has_items(''))