Exemplo n.º 1
0
 def test_get_properties(self):
     port = UnityIpPort('spa_eth2', cli=t_rest())
     assert_that(port.name, equal_to('SP A Ethernet Port 2'))
     assert_that(port.short_name, equal_to('Ethernet Port 2'))
     assert_that(port.sp, instance_of(UnityStorageProcessor))
     assert_that(port.is_link_up, equal_to(True))
     assert_that(port.mac_address, equal_to('00:60:16:5C:08:E1'))
Exemplo n.º 2
0
    def create(cls,
               cli,
               nas_server,
               ip_port,
               ip,
               netmask=None,
               gateway=None,
               vlan_id=None,
               role=None,
               v6_prefix_length=None):
        clz = storops.unity.resource.nas_server.UnityNasServer
        nas_server = clz.get(cli, nas_server)
        ip_port = UnityIpPort.get(cli, ip_port)

        resp = cli.post(cls().resource_class,
                        nasServer=nas_server,
                        ipPort=ip_port,
                        ipAddress=ip,
                        netmask=netmask,
                        v6PrefixLength=v6_prefix_length,
                        gateway=gateway,
                        vlanId=vlan_id,
                        role=role)
        resp.raise_if_err()
        return cls(_id=resp.resource_id, cli=cli)
Exemplo n.º 3
0
    def create(cls, cli, nas_server, ip_port, ip, netmask=None,
               gateway=None, vlan_id=None, role=None):
        clz = storops.unity.resource.nas_server.UnityNasServer
        nas_server = clz.get(cli, nas_server)
        ip_port = UnityIpPort.get(cli, ip_port)

        resp = cli.post(cls().resource_class,
                        nasServer=nas_server,
                        ipPort=ip_port,
                        ipAddress=ip,
                        netmask=netmask,
                        gateway=gateway,
                        vlanId=vlan_id,
                        role=role)
        resp.raise_if_err()
        return cls(_id=resp.resource_id, cli=cli)
Exemplo n.º 4
0
 def test_mtu_of_eth_port(self):
     port = UnityIpPort('spa_eth3', cli=t_rest())
     assert_that(port.mtu, equal_to(1500))
Exemplo n.º 5
0
 def test_mtu_of_link_aggregation(self):
     la = UnityIpPort('spa_la_2', cli=t_rest())
     assert_that(la.mtu, equal_to(9000))
Exemplo n.º 6
0
 def test_set_mtu_on_link_aggregation(self):
     la = UnityIpPort('spa_la_2', cli=t_rest())
     la.set_mtu(1500)
Exemplo n.º 7
0
 def test_set_mtu_on_eth_port(self):
     port = UnityIpPort('spa_eth3', cli=t_rest())
     port.set_mtu(1500)
Exemplo n.º 8
0
 def test_is_link_aggregation_not_supported(self):
     port = UnityIpPort('spa_eth6', cli=t_rest("4.0"))
     assert_that(port.is_link_aggregation(), equal_to(False))
Exemplo n.º 9
0
 def test_is_link_aggregation(self):
     port = UnityIpPort('spa_eth3', cli=t_rest())
     assert_that(port.is_link_aggregation(), equal_to(False))
     port = UnityIpPort('spa_la_2', cli=t_rest())
     assert_that(port.is_link_aggregation(), equal_to(True))