How to assign network ID for scenario boot-and-delete-server-with-keypairs.json

Asked by Rajeev

{% set flavor_name = flavor_name or "m1.tiny" %}
{
    "NovaKeypair.boot_and_delete_server_with_keypair": [
        {
            "args": {
                "flavor": {
                    "name": "{{flavor_name}}"
                },
                "image": {
                    "name": "^cirros$"
                },
                "nics":[{"net-id": "d5aa699f-2563-41f8-a2fb-80f7da935fd2"}],
                "boot_server_kwargs": {},
            },
            "runner": {
                "type": "constant",
                "times": 5,
                "concurrency": 2
            },
            "context": {
                "users": {
                    "tenants": 2,
                    "users_per_tenant": 1
                },
                "network": {
                    "start_cidr": "100.1.0.0/26"
                }
            }
        }
    ]
}

Error message: --------------------------------------------------------------------------------
 Task 75cf0947-69e7-4ac5-9ddf-f38a42a4f8f5 has 5 error(s)
--------------------------------------------------------------------------------

TypeError: create() got an unexpected keyword argument 'nics'

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/rally/task/runner.py", line 68, in _run_scenario_once
    getattr(scenario_inst, method_name)(**scenario_kwargs)
  File "/usr/lib/python2.7/site-packages/rally/common/logging.py", line 266, in wrapper
    result = f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/rally/plugins/openstack/scenarios/nova/keypairs.py", line 86, in boot_and_delete_server_with_keypair
    keypair = self._create_keypair(**kwargs)
  File "/usr/lib/python2.7/site-packages/rally/task/atomic.py", line 84, in func_atomic_actions
    f = func(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/rally/plugins/openstack/scenarios/nova/utils.py", line 523, in _create_keypair
    keypair = self.clients("nova").keypairs.create(keypair_name, **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/api_versions.py", line 402, in substitution
    return methods[-1].func(obj, *args, **kwargs)
TypeError: create() got an unexpected keyword argument 'nics'

openstack version:

[root@localhost ~]# openstack --version
openstack 1.0.3

How should I pass the network ID information to it?

i tried giving "auto_assign_nic": true under args in json and it errored out with:

TypeError: create() got an unexpected keyword argument 'auto_assign_nic'

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/rally/task/runner.py", line 68, in _run_scenario_once
    getattr(scenario_inst, method_name)(**scenario_kwargs)
  File "/usr/lib/python2.7/site-packages/rally/common/logging.py", line 266, in wrapper
    result = f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/rally/plugins/openstack/scenarios/nova/keypairs.py", line 86, in boot_and_delete_server_with_keypair
    keypair = self._create_keypair(**kwargs)
  File "/usr/lib/python2.7/site-packages/rally/task/atomic.py", line 84, in func_atomic_actions
    f = func(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/rally/plugins/openstack/scenarios/nova/utils.py", line 523, in _create_keypair
    keypair = self.clients("nova").keypairs.create(keypair_name, **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/api_versions.py", line 402, in substitution
    return methods[-1].func(obj, *args, **kwargs)
TypeError: create() got an unexpected keyword argument 'auto_assign_nic'

Question information

Language:
English Edit question
Status:
Expired
For:
Rally Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.