示例#1
0
 def test_lun_read_iops(self):
     lun = t_unity().get_lun(_id='sv_2')
     assert_that(lun.read_iops, equal_to(1.5))
示例#2
0
 def test_get_nfs_share(self):
     unity = t_unity()
     shares = unity.get_nfs_share()
     assert_that(shares, instance_of(UnityNfsShareList))
     assert_that(len(shares), equal_to(2))
示例#3
0
 def test_get_host_by_address_not_found(self):
     unity = t_unity()
     hosts = unity.get_host(address='8.8.8.9')
     assert_that(len(hosts), equal_to(0))
示例#4
0
 def test_get_file_interface(self):
     unity = t_unity()
     fi_list = unity.get_file_interface()
     assert_that(fi_list, instance_of(UnityFileInterfaceList))
     assert_that(len(fi_list), equal_to(1))
示例#5
0
 def test_get_dns_server(self):
     unity = t_unity()
     dns_servers = unity.get_dns_server()
     assert_that(dns_servers, instance_of(UnityFileDnsServerList))
     assert_that(len(dns_servers), equal_to(1))
示例#6
0
 def test_get_nas_servers(self):
     unity = t_unity()
     nas_servers = unity.get_nas_server()
     assert_that(nas_servers, instance_of(UnityNasServerList))
     assert_that(len(nas_servers), equal_to(3))
示例#7
0
 def test_auto_balance_sp_to_spb(self):
     unity = t_unity()
     sp = unity._auto_balance_sp()
     assert_that(sp.get_id(), equal_to('spb'))
示例#8
0
 def test_get_sp_by_name(self):
     unity = t_unity()
     sp = unity.get_sp(name='SP A')
     assert_that(sp, instance_of(UnityStorageProcessor))
     assert_that(sp.id, equal_to('spa'))
示例#9
0
 def test_get_lun_list(self):
     unity = t_unity()
     lun_list = unity.get_lun()
     assert_that(lun_list, instance_of(UnityLunList))
     assert_that(len(lun_list), equal_to(5))
示例#10
0
 def test_get_spa(self):
     unity = t_unity()
     sp = unity.get_sp('spa')
     assert_that(sp, instance_of(UnityStorageProcessor))
     assert_that(sp.get_id(), equal_to('spa'))
示例#11
0
 def test_get_capability_profile_not_found(self):
     unity = t_unity()
     cp = unity.get_capability_profile(service_levels=[5])
     assert_that(cp, instance_of(UnityCapabilityProfileList))
     assert_that(len(cp), equal_to(0))
示例#12
0
 def test_get_sp_all(self):
     unity = t_unity()
     sps = unity.get_sp()
     assert_that(sps, instance_of(UnityStorageProcessorList))
     assert_that(len(sps), equal_to(2))
示例#13
0
 def sp_list(self):
     return t_unity().get_sp()
示例#14
0
 def test_lun_write_iops(self):
     lun = t_unity().get_lun(_id='sv_2')
     assert_that(lun.write_iops, equal_to(3.0))
示例#15
0
 def test_get_snaps_all(self):
     unity = t_unity()
     snaps = unity.get_snap()
     assert_that(snaps, instance_of(UnitySnapList))
     assert_that(len(snaps), equal_to(3))
示例#16
0
 def test_create_host(self):
     unity = t_unity()
     host = unity.create_host("Hello")
     assert_that(host, instance_of(UnityHost))
     assert_that(host.id, equal_to('Host_11'))
示例#17
0
 def test_get_snap_by_name(self):
     unity = t_unity()
     snap = unity.get_snap(name='2016-03-15_10:56:08')
     assert_that(snap.name, equal_to('2016-03-15_10:56:08'))
     assert_that(snap.existed, equal_to(True))
示例#18
0
 def test_get_portal_list(self):
     unity = t_unity()
     portals = unity.get_iscsi_portal()
     assert_that(portals, instance_of(UnityIscsiPortalList))
示例#19
0
 def test_create_nas_server(self):
     unity = t_unity()
     sp = unity.get_sp(_id='spa')
     pool = unity.get_pool(_id='pool_1')
     nas_server = unity.create_nas_server('nas3', sp, pool)
     assert_that(nas_server.existed, equal_to(True))
示例#20
0
 def test_get_ethernet_list(self):
     unity = t_unity()
     ports = unity.get_ethernet_port()
     assert_that(ports, instance_of(UnityEthernetPortList))
     assert_that(len(ports), equal_to(8))
示例#21
0
 def test_get_ip_ports(self):
     unity = t_unity()
     ip_ports = unity.get_ip_port()
     assert_that(ip_ports, instance_of(UnityIpPortList))
     assert_that(len(ip_ports), equal_to(8))
示例#22
0
 def test_get_host_list(self):
     unity = t_unity()
     hosts = unity.get_host()
     assert_that(hosts, instance_of(UnityHostList))
     assert_that(len(hosts), equal_to(7))
示例#23
0
 def test_get_nfs_server(self):
     unity = t_unity()
     nfs_servers = unity.get_nfs_server()
     assert_that(nfs_servers, instance_of(UnityNfsServerList))
     assert_that(len(nfs_servers), equal_to(1))
示例#24
0
 def test_get_initiators(self):
     unity = t_unity()
     initiators = unity.get_initiator()
     assert_that(initiators, instance_of(UnityHostInitiatorList))
     assert_that(len(initiators), equal_to(4))
示例#25
0
 def test_get_file_system(self):
     unity = t_unity()
     filesystems = unity.get_filesystem()
     assert_that(filesystems, instance_of(UnityFileSystemList))
     assert_that(len(filesystems), equal_to(3))
示例#26
0
 def test_get_initiator_by_id(self):
     unity = t_unity()
     initiator = unity.get_initiator(_id="HostInitiator_2")
     assert_that(initiator, instance_of(UnityHostInitiator))
     assert_that(initiator.id, equal_to("HostInitiator_2"))
示例#27
0
 def test_get_host_by_address_found(self):
     unity = t_unity()
     host = unity.get_host(address='8.8.8.8')
     assert_that(host.type, equal_to(HostTypeEnum.SUBNET))
示例#28
0
 def test_get_pools(self):
     unity = t_unity()
     pools = unity.get_pool()
     assert_that(pools, instance_of(UnityPoolList))
     assert_that(len(pools), equal_to(2))
示例#29
0
 def test_system_info(self):
     unity = t_unity()
     assert_that(unity.info, instance_of(UnityBasicSystemInfo))
示例#30
0
    def test_get_properties(self):
        sscs = t_unity().get_ssc()

        assert_that(len(sscs), equal_to(0))