From e1eedd410af7b2f731e87347e0432310017bee13 Mon Sep 17 00:00:00 2001 From: Dmitry Belyaninov Date: Mon, 26 Dec 2016 11:18:17 +0000 Subject: [PATCH] Allow public network assignment for all nodes By default settings public network can be assignment only to nodes with controller role. So tests should be updated to enable 'assign_to_all_nodes' paramater for clusters. For more info see: https://review.openstack.org/#/c/292356/ Change-Id: Ib3d8b48076a0597a08cd273d5be361ce4cbd902d Closes-Bug: 1632010 --- fuelweb_test/tests/test_cli.py | 67 +++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/fuelweb_test/tests/test_cli.py b/fuelweb_test/tests/test_cli.py index 851803f6e..94563a057 100644 --- a/fuelweb_test/tests/test_cli.py +++ b/fuelweb_test/tests/test_cli.py @@ -103,26 +103,27 @@ class CommandLineTest(test_cli_base.CommandLine): 1. Create environment using fuel-qa 2. Create a cluster using Fuel CLI 3. Add floating ranges for public network - 4. Get cluster settings - 5. Provision a controller node using Fuel CLI - 6. Provision two compute+cinder nodes using Fuel CLI - 7. Deploy the controller node using Fuel CLI - 8. Deploy the compute+cinder nodes using Fuel CLI - 9. Compare network settings after compute deployment task - 10. Verify network - 11. Check that all services work by 'https' - 12. Check that all services have domain name - 13. Find 'CN' value at the output: + 4. Allow public network assignment for all nodes + 5. Get cluster settings + 6. Provision a controller node using Fuel CLI + 7. Provision two compute+cinder nodes using Fuel CLI + 8. Deploy the controller node using Fuel CLI + 9. Deploy the compute+cinder nodes using Fuel CLI + 10. Compare network settings after compute deployment task + 11. Verify network + 12. Check that all services work by 'https' + 13. Check that all services have domain name + 14. Find 'CN' value at the output: CN value is equal to the value specified at certificate provided via Fuel UI - 14. Find keypair data at the output: + 15. Find keypair data at the output: Keypair data is equal to the value specified at certificate provided via Fuel UI - 15. Compare floating ranges - 16. Get deployment-info - 17. Get cluster settings after deployment task - 18. Compare cluster settings after deploy and before deploy - 19. Run OSTF + 16. Compare floating ranges + 17. Get deployment-info + 18. Get cluster settings after deployment task + 19. Compare cluster settings after deploy and before deploy + 20. Run OSTF Duration 50m @@ -166,10 +167,15 @@ class CommandLineTest(test_cli_base.CommandLine): # Update SSL configuration self.update_ssl_configuration(cluster_id) + # Allow public network assignment for all nodes # Get cluster settings before deploy self.show_step(4) - cluster_settings = self.download_settings(cluster_id) self.show_step(5) + cluster_settings = self.download_settings(cluster_id) + cluster_settings['editable']['public_network_assignment'][ + 'assign_to_all_nodes']['value'] = True + self.upload_settings(cluster_id, cluster_settings) + self.show_step(6) # Add and provision a controller node logger.info("Add to the cluster \ and start provisioning a controller node [{0}]".format(node_ids[0])) @@ -183,7 +189,7 @@ class CommandLineTest(test_cli_base.CommandLine): cmd, jsonify=True)['stdout_json'] self.assert_cli_task_success(task, timeout=30 * 60) - self.show_step(6) + self.show_step(7) # Add and provision 2 compute+cinder logger.info("Add to the cluster and start provisioning two " "compute+cinder nodes [{0},{1}]".format(node_ids[1], @@ -199,7 +205,7 @@ class CommandLineTest(test_cli_base.CommandLine): cmd, jsonify=True)['stdout_json'] self.assert_cli_task_success(task, timeout=10 * 60) - self.show_step(7) + self.show_step(8) # Deploy the controller node cmd = ('fuel --env-id={0} node --deploy --node {1} --json'.format( cluster_id, node_ids[0])) @@ -210,7 +216,7 @@ class CommandLineTest(test_cli_base.CommandLine): self.assert_all_tasks_completed(cluster_id=cluster_id) - self.show_step(8) + self.show_step(9) # Deploy the compute nodes cmd = ('fuel --env-id={0} node --deploy --node {1},{2} --json'.format( cluster_id, node_ids[1], node_ids[2])) @@ -226,13 +232,13 @@ class CommandLineTest(test_cli_base.CommandLine): self.assert_all_tasks_completed(cluster_id=cluster_id) # Verify networks - self.show_step(9) + self.show_step(10) network_configuration = self.get_net_config_cli() assert_equal(network_settings, network_configuration, message='Network settings are not equal before' ' and after deploy') - self.show_step(10) + self.show_step(11) self.fuel_web.verify_network(cluster_id) controller_nodes = self.fuel_web.get_nailgun_cluster_nodes_by_roles( cluster_id, ['controller']) @@ -242,8 +248,8 @@ class CommandLineTest(test_cli_base.CommandLine): endpoint_list = self.get_endpoints(controller_node) logger.info(endpoint_list) # Check protocol and domain names for endpoints - self.show_step(11) self.show_step(12) + self.show_step(13) for endpoint in endpoint_list: logger.debug(("Endpoint {0} use protocol {1}\ and have domain name {2}".format(endpoint['service_name'], @@ -255,12 +261,12 @@ class CommandLineTest(test_cli_base.CommandLine): assert_equal(endpoint['domain'], SSL_CN, message=( "{0} domain name not equal {1}.".format( endpoint['service_name'], SSL_CN))) - self.show_step(13) + self.show_step(14) current_ssl_cn = self.get_current_ssl_cn(controller_node) logger.info(("CN before cluster deploy {0} \ and after deploy {1}".format(SSL_CN, current_ssl_cn))) assert_equal(SSL_CN, current_ssl_cn, message="SSL CNs are not equal") - self.show_step(14) + self.show_step(15) with open(PATH_TO_PEM) as pem_file: old_ssl_keypair = pem_file.read().strip() current_ssl_keypair = self.get_current_ssl_keypair(controller_node) @@ -272,7 +278,7 @@ class CommandLineTest(test_cli_base.CommandLine): ) assert_equal(old_ssl_keypair, current_ssl_keypair, message="SSL keypairs are not equal") - self.show_step(15) + self.show_step(16) actual_floating_ranges = self.hiera_floating_ranges(controller_node) logger.info("Current floating ranges: {0}".format( actual_floating_ranges)) @@ -280,19 +286,19 @@ class CommandLineTest(test_cli_base.CommandLine): message="Floating ranges are not equal") # Get deployment task id task_id = self.get_first_task_id_by_name(cluster_id, 'deployment') - self.show_step(16) + self.show_step(17) # Get deployment info self.get_deployment_info_cli(task_id) - self.show_step(17) + self.show_step(18) # Get cluster settings after deploy cluster_config = self.get_cluster_config_cli(task_id) - self.show_step(18) + self.show_step(19) # Compare cluster settings assert_equal(cluster_settings, cluster_config, message='Cluster settings are not equal before' ' and after deploy') - self.show_step(19) + self.show_step(20) # Run OSTF self.fuel_web.run_ostf(cluster_id=cluster_id, test_sets=['ha', 'smoke', 'sanity']) @@ -444,6 +450,7 @@ class CommandLineTest(test_cli_base.CommandLine): 'osd_pool_size': '2', 'net_provider': 'neutron', 'net_segment_type': NEUTRON_SEGMENT['vlan'], + 'assign_to_all_nodes': True, 'tenant': 'huge_cli', 'user': 'huge_cli', 'password': 'huge_cli'