def test_non_mgmt_display_network_over_ipv6(system, default_data_center, default_cluster, host_0_up, host0_eth1_ipv6, host0_eth2_ipv6, engine_storage_ipv6): """ This test verifies that: * it is possible to create a display role over an ipv6 only network * it is possible to connect with a graphic display to a VM over this network Note: host0_eth1_ipv6 fixture is mandatory because if there is no ipv6 address on eth1 of the host, connection with the storage server cannot be maintained """ assert host0_eth1_ipv6 != '' with netlib.new_network('ipv6-disp_net', default_data_center) as net: with clusterlib.network_assignment(default_cluster, net) as cl_net: cl_net.set_usages((netlib.NetworkUsage.DISPLAY, )) no_v4 = netattachlib.NoIpAssignment() v6_no_gw = netattachlib.StaticIpAssignment( version=netattachlib.IpVersion.V6, addr=host0_eth2_ipv6, mask='64', ) attach_data = netattachlib.NetworkAttachmentData( net, 'eth2', (no_v4, v6_no_gw)) with hostlib.setup_networks(host_0_up, (attach_data, )): host_0_up.wait_for_networks_in_sync() VM0 = 'vm_non_mgmt_display_net_over_ipv6' DSK = 'disk_non_mgmt_display_net_over_ipv6' with vm_powering_up(system, default_data_center, default_cluster, host_0_up, engine_storage_ipv6, VM0, DSK) as vm: _try_spice_console_connect(vm)
def test_sync_across_cluster(default_data_center, default_cluster, host_0_up, host_1_up): cluster_hosts_up = (host_0_up, host_1_up) with netlib.new_network('sync-net', default_data_center) as sync_net: with clusterlib.network_assignment(default_cluster, sync_net): with contextlib2.ExitStack() as stack: for i, host in enumerate(cluster_hosts_up): att_datum = create_attachment(sync_net, i) stack.enter_context( hostlib.setup_networks(host, (att_datum, ))) stack.enter_context(unsynced_host_network(host)) default_cluster.sync_all_networks() for host in cluster_hosts_up: host.wait_for_networks_in_sync()
def test_sync_across_cluster(default_data_center, default_cluster, host_0_up, host_1_up): cluster_hosts_up = (host_0_up, host_1_up) with netlib.new_network('sync-net', default_data_center) as sync_net: with clusterlib.network_assignment(default_cluster, sync_net): with contextlib2.ExitStack() as stack: for i, host in enumerate(cluster_hosts_up): att_datum = create_attachment(sync_net, i) stack.enter_context( hostlib.setup_networks(host, (att_datum,)) ) stack.enter_context(unsynced_host_network(host)) default_cluster.sync_all_networks() for host in cluster_hosts_up: host.wait_for_networks_in_sync()
def test_setup_net_with_qos(system, default_data_center, default_cluster, default_storage_domain, cluster_host_up, qos_net, vm_qos): qos_configs = default_data_center.list_qos() assert len([qos for qos in qos_configs if qos.name in QOS_NAMES]) == 2 with clusterlib.network_assignment(default_cluster, qos_net): attach_data = _create_net_attachment_data(qos_net) with hostlib.setup_networks(cluster_host_up, (attach_data,)): with netlib.create_vnic_profile( system, QOS_VP, qos_net, vm_qos) as profile: with vm_down( system, default_cluster, default_storage_domain) as vm: vm.create_vnic(NIC2, profile) vm.run() vm.wait_for_powering_up_status()
def test_setup_net_with_qos(system, default_data_center, default_cluster, default_storage_domain, cluster_host_up, qos_net, vm_qos): qos_configs = default_data_center.list_qos() assert len([qos for qos in qos_configs if qos.name in QOS_NAMES]) == 2 with clusterlib.network_assignment(default_cluster, qos_net): attach_data = _create_net_attachment_data(qos_net) with hostlib.setup_networks(cluster_host_up, (attach_data,)): with netlib.create_vnic_profile( system, QOS_VP, qos_net, vm_qos) as profile: with vm_down( system, default_cluster, default_storage_domain) as vm: vm.create_vnic(NIC2, profile) vm.run() vm.wait_for_powering_up_status()