예제 #1
0
 def test_picklable(self):
     cli = t_rest()
     lun = UnityLun(_id='sv_16455', cli=cli)
     lun.update()
     lun_new = pickle.loads(pickle.dumps(lun))
     assert_that(lun_new.name, equal_to(lun.name))
예제 #2
0
 def test_delete_portal(self):
     portal = UnityIscsiPortal.get(cli=t_rest(), _id='if_4')
     portal.delete()
예제 #3
0
 def test_get_list(self):
     rule_list = UnityIoLimitPolicyList.get(cli=t_rest())
     assert_that(len(rule_list), equal_to(6))
예제 #4
0
 def test_modify_when_peer_not_exist(self):
     port = UnityEthernetPort(cli=t_rest(), _id='spa_eth4')
     port.modify(mtu=1500)
예제 #5
0
 def f():
     UnityIscsiPortal.create(cli=t_rest(),
                             ethernet_port='spa_eth2',
                             ip='10.244.213.244',
                             netmask="255.255.255.0",
                             gateway="10.244.213.1")
예제 #6
0
 def test_modify_mtu_to_same_value(self):
     port = UnityEthernetPort(cli=t_rest(), _id='spb_eth3')
     port.modify(mtu=1500)
예제 #7
0
 def test_modify_speed_to_same_value(self):
     port = UnityEthernetPort(cli=t_rest(), _id='spb_eth3')
     port.modify(speed=EPSpeedValuesEnum.AUTO)
예제 #8
0
    def test_get_all(self):
        pools = UnityPoolList(cli=t_rest())
        assert_that(len(pools), equal_to(2))

        pool = next(pool for pool in pools if pool.id == 'pool_1')
        self.verify_pool_1(pool)
예제 #9
0
 def test_get_nested_resource_filter_by_non_id(self):
     pools = UnityPoolList(cli=t_rest())
     pool = next(pool for pool in pools if pool.id == 'pool_1')
     tier = next(t for t in pool.tiers if t.name == 'Performance')
     unit = next(u for u in tier.pool_units if u.description == '123')
     assert_that(unit.id, equal_to('rg_2'))
예제 #10
0
 def test_get_all_and_property_query(self):
     sp_list = UnityStorageProcessorList(cli=t_rest())
     assert_that(len(sp_list), equal_to(2))
     assert_that(sp_list.name, only_contains('SP A', 'SP B'))
예제 #11
0
 def f():
     sp_list = UnityStorageProcessorList(cli=t_rest())
     return sp_list.not_found
예제 #12
0
 def test_thinclone_of_thick_lun_not_allowed(self):
     lun = UnityLun(cli=t_rest(version='4.3'), _id='sv_59')
     assert_that(
         calling(lun.thin_clone).with_args('not-allowed'),
         raises(UnityThinCloneNotAllowedError))
예제 #13
0
 def test_thinclone_of_member_snap_not_support(self):
     lun = UnityLun(cli=t_rest(version='4.3'), _id='sv_58')
     assert_that(
         calling(lun.thin_clone).with_args('not-support'),
         raises(UnityCGMemberActionNotSupportError))
예제 #14
0
 def test_create_snap_of_member_snap_not_support(self):
     lun = UnityLun(cli=t_rest(), _id='sv_58')
     assert_that(
         calling(lun.create_snap).with_args(name='not-support'),
         raises(UnityCGMemberActionNotSupportError))
예제 #15
0
 def test_properties(self):
     pool = UnityPool(_id='pool_1', cli=t_rest())
     self.verify_pool_1(pool)
예제 #16
0
 def test_delete_pool(self):
     cli = t_rest()
     pool = UnityPool.get(cli=cli, _id='pool_4')
     resp = pool.delete()
     assert_that(resp.is_ok(), equal_to(True))
예제 #17
0
 def test_modify_mtu(self):
     port = UnityEthernetPort(cli=t_rest(), _id='spa_eth3')
     port.modify(mtu=9000)
예제 #18
0
 def test_create_lun(self):
     pool = UnityPool(_id='pool_1', cli=t_rest())
     lun = pool.create_lun("LunName", 100)
     assert_that(lun, instance_of(UnityLun))
예제 #19
0
 def test_modify_speed(self):
     port = UnityEthernetPort(cli=t_rest(), _id='spa_eth3')
     port.modify(speed=100)
예제 #20
0
 def test_create_lun_on_spb(self):
     pool = UnityPool(_id='pool_1', cli=t_rest())
     sp = UnityStorageProcessor(_id='spb', cli=t_rest())
     lun = pool.create_lun("LunName", 100, sp=sp)
     assert_that(lun, instance_of(UnityLun))
예제 #21
0
 def do():
     port = UnityEthernetPort(cli=t_rest(), _id='spb_eth3')
     port.modify(speed=40000)
예제 #22
0
 def test_create_lun_with_compression_enabled_v4_2(self):
     pool = UnityPool(_id='pool_1', cli=t_rest(version='4.2'))
     lun = pool.create_lun("LunName", 100,
                           is_compression=True)
     assert_that(lun, instance_of(UnityLun))
예제 #23
0
 def test_get_peer(self, port_id, peer_id):
     port = UnityEthernetPort(cli=t_rest(), _id=port_id)
     peer = port.get_peer()
     assert_that(peer.get_id(), equal_to(peer_id))
예제 #24
0
 def test_create_lun_with_dedup_enabled(self):
     pool = UnityPool(_id='pool_1', cli=t_rest(version='5.0'))
     lun = pool.create_lun("LunName", 100,
                           is_compression=True,
                           is_advanced_dedup_enabled=True)
     assert_that(lun, instance_of(UnityLun))
예제 #25
0
 def test_modify_portal(self):
     portal = UnityIscsiPortal(cli=t_rest(), _id='if_4')
     portal.modify(ip="10.244.21.11",
                   netmask="255.255.252.0",
                   vlan=111,
                   gateway="10.244.21.1")
예제 #26
0
 def test_create_vmfs(self):
     pool = UnityPool(_id='pool_1', cli=t_rest())
     vmfs = pool.create_vmfs(vmfs_name="VMFS datastore", size_gb=100)
     assert_that(vmfs, instance_of(UnityLun))
예제 #27
0
 def test_get_properties(self):
     rule = UnityIoLimitRule('qr_1', cli=t_rest())
     assert_that(rule.get_id(), equal_to('qr_1'))
     assert_that(rule.max_iops, equal_to(1000))
     assert_that(rule.io_limit_policy.get_id(), equal_to('qp_1'))
     assert_that(rule.name, equal_to('Limit_1000_IOPS_rule'))
예제 #28
0
 def test_is_compression_supported(self, unity_version, pool_id,
                                   is_all_flash, expected):
     cli = t_rest(unity_version)
     pool = UnityPool(_id=pool_id, cli=cli)
     pool.is_all_flash = is_all_flash
     assert_that(pool.is_compression_supported(), equal_to(expected))
예제 #29
0
 def f():
     UnityIoLimitPolicy.create(t_rest(), 'test1', max_kbps=1)
예제 #30
0
 def test_remove_snap_schedule(self):
     cli = t_rest()
     lun = UnityLun(_id='sv_16455', cli=cli)
     resp = lun.remove_snap_schedule()
     assert_that(resp.is_ok(), equal_to(True))