def test_get_host_in_tenant_with_ip(self): host = UnityHost.get_host(t_rest(), '192.168.112.23', tenant='tenant_1') assert_that(host.tenant.id, equal_to('tenant_1')) host = UnityHost.get_host(t_rest(), '192.168.112.23') assert_that(host.tenant, equal_to(None))
def test_get_host_ipv6_with_mask(self): host = UnityHost.get_host(t_rest(), '2001:db8:a0b:12f0::/64', tenant='tenant_1', force_create=True) assert_that(host, not_none()) assert_that(host.ip_list, only_contains('2001:db8:a0b:12f0:0:0:0:0'))
def test_create_subset_host(self): host = UnityHost.get_host(t_rest(), '7.7.7.7/8', force_create=True) assert_that(host.ip_list, only_contains('7.7.7.7')) assert_that(host.type, equal_to(HostTypeEnum.SUBNET))
def test_get_host_with_ip(self, version): host = UnityHost.get_host(t_rest(version), '10.244.209.90') assert_that(host.ip_list, only_contains('10.244.209.90'))
def test_get_host_with_force_create(self): host = UnityHost.get_host(t_rest(), '192.168.112.24', tenant='tenant_1', force_create=True) assert_that(host._id, equal_to('Host_15'))
def do(): UnityHost.get_host(t_rest('3.1.0'), '192.168.112.23', tenant='tenant_1')
def test_get_host_ip_with_mask(self): host = UnityHost.get_host(t_rest(), '10.244.209.90/32') assert_that(host.ip_list, only_contains('10.244.209.90'))
def test_get_host_ip_with_mask(self): host = UnityHost.get_host(t_rest(), '10.244.209.90/32') assert_that(host.ip_list, only_contains('10.244.209.90'))
def test_create_subset_host(self): host = UnityHost.get_host(t_rest(), '7.7.7.7/8', force_create=True) assert_that(host.ip_list, only_contains('7.7.7.7')) assert_that(host.type, equal_to(HostTypeEnum.SUBNET))