def test_get_properties(self): la = UnityLinkAggregation('spa_la_2', cli=t_rest()) assert_that(la.is_link_up, equal_to(False)) assert_that(la.mac_address, equal_to('00:60:16:5C:08:E1')) assert_that(la.master_port.get_id(), "spa_eth2") assert_that(la.mtu, equal_to(9000)) assert_that(la.parent_storage_processor, equal_to(UnityStorageProcessor.get(t_rest(), 'spa'))) assert_that(len(la.ports), equal_to(2)) assert_that(la.supported_mtus, only_contains(1500, 9000))
def create(cls, cli, name, sp, pool, is_repl_dst=None, multi_proto=None): sp = UnityStorageProcessor.get(cli, sp) pool_clz = storops.unity.resource.pool.UnityPool pool = pool_clz.get(cli, pool) resp = cli.post(cls().resource_class, name=name, homeSP=sp, pool=pool, isReplicationDestination=is_repl_dst, isMultiProtocolEnabled=multi_proto) resp.raise_if_err() return cls(_id=resp.resource_id, cli=cli)