diff --git a/rally-jobs/plugins/clusters.py b/rally-jobs/plugins/clusters.py index 8bfdae7c..abb17aab 100644 --- a/rally-jobs/plugins/clusters.py +++ b/rally-jobs/plugins/clusters.py @@ -130,13 +130,17 @@ class CueClusters(cue_utils.CueScenario): test_network = self._create_network(neutron_client, network_name) network_id = test_network[1]["network"]["id"] + rabbitmq_username = "rabbitmq" + rabbitmq_password = "passowrd" # create cue_cluster cluster = self._create_cue_cluster(cluster_name, size, network_id, cluster_flavor, cluster_volume_size, cluster_timeout, - cluster_check_interval) + cluster_check_interval, + 'plain', rabbitmq_username, + rabbitmq_password) # assign network_id argument kwargs["nics"] = [{"net-id": network_id}] @@ -156,8 +160,6 @@ class CueClusters(cue_utils.CueScenario): # run rabbitmq_test script endpoint = cluster.endpoints[0] uri = endpoint['uri'].split(':') - rabbitmq_username = "rabbitmq" - rabbitmq_password = cluster['id'] rabbitmq_file = "/opt/rabbitmq_test.py" LOG.info("Running rabbitmq-test script") diff --git a/rally-jobs/plugins/cue_utils.py b/rally-jobs/plugins/cue_utils.py index f7366802..4b16c084 100644 --- a/rally-jobs/plugins/cue_utils.py +++ b/rally-jobs/plugins/cue_utils.py @@ -41,7 +41,8 @@ class CueScenario(scenario.OpenStackScenario): @atomic.action_timer("cue.clusters.create") def _create_cluster(self, name, flavor, size, network_id, - volume_size=0, cueclient=None): + volume_size=0, cueclient=None, auth_type='plain', + username='rabbitmq', password='rabbitmq'): """Submit request to create cue cluster. Will return immediate response from Cue, does not wait until "ACTIVE" @@ -58,7 +59,9 @@ class CueScenario(scenario.OpenStackScenario): cue_client = cueclient or self._get_cue_client() return cue_client.clusters.create(name=cluster_name, nic=network_id, flavor=flavor, size=size, - volume_size=volume_size) + volume_size=volume_size, + auth_type=auth_type, + username=username, password=password) @atomic.action_timer("cue.clusters.get") def _get_cluster(self, id, cueclient=None): @@ -225,7 +228,8 @@ class CueScenario(scenario.OpenStackScenario): def _create_cue_cluster(self, cluster_name, size, network_id, cluster_flavor, cluster_volume_size, - cluster_timeout, cluster_check_interval): + cluster_timeout, cluster_check_interval, + auth_type, username, password): """Create cue cluster Will wait until the cluster goes "ACTIVE" and returns the cue object. @@ -245,7 +249,10 @@ class CueScenario(scenario.OpenStackScenario): 'flavor': cluster_flavor, 'size': size, 'network_id': network_id, - 'volume_size': cluster_volume_size} + 'volume_size': cluster_volume_size, + 'auth_type': auth_type, + 'username': username, + 'password': password} # Submit request to create cluster and wait for ACTIVE status LOG.info("Creating cue cluster") diff --git a/rally-jobs/rabbitmq-scenarios.yaml b/rally-jobs/rabbitmq-scenarios.yaml index 5a502df2..124a91cf 100644 --- a/rally-jobs/rabbitmq-scenarios.yaml +++ b/rally-jobs/rabbitmq-scenarios.yaml @@ -6,8 +6,8 @@ timeout: 800 runner: type: "constant" - times: 2 - concurrency: 2 + times: 1 + concurrency: 1 context: users: tenants: 1