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 f(): UnityLinkAggregation.get(t_rest("4.0.0"))
def test_modify(self): la = UnityLinkAggregation.get(t_rest(), 'spa_la_2') la.modify(mtu=1500, remove_ports=[UnityEthernetPort.get(t_rest(), "spa_eth2")], add_ports=[UnityEthernetPort.get(t_rest(), "spa_eth4")])
def do(): eth_2 = UnityEthernetPort.get(t_rest(), 'spa_eth2') eth_4 = UnityEthernetPort.get(t_rest(), 'spa_eth4') UnityLinkAggregation.create(t_rest(), [eth_2, eth_4], 1500)
def test_create(self): eth_2 = UnityEthernetPort.get(t_rest(), 'spa_eth2') eth_3 = UnityEthernetPort.get(t_rest(), 'spa_eth3') la = UnityLinkAggregation.create(t_rest(), [eth_2, eth_3], 9000) assert_that(la.get_id(), equal_to('spa_la_2'))