Can not no more add strategy parameters on audit creation

Bug #1617320 reported by David TARDIVEL
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-watcherclient
Fix Released
High
David TARDIVEL

Bug Description

stack@vdev-indeed0005:~/python-watcherclient$ openstack --debug optimize audit create -a at2 -p para2='hellu'
START with options: ['--debug', 'optimize', 'audit', 'create', '-a', 'at2', '-p', 'para2=hellu']
options: Namespace(access_token_endpoint='', auth_type='', auth_url='http://10.50.0.223:5000/v2.0', cacert='', client_id='', client_secret='***', cloud='', debug=True, default_domain='default', deferred_help=False, domain_id='', domain_name='', endpoint='', identity_provider='', identity_provider_url='', insecure=None, interface='', log_file=None, os_baremetal_api_version='1.6', os_compute_api_version='', os_data_processing_api_version='1.1', os_dns_api_version='2', os_identity_api_version='2.0', os_image_api_version='', os_infra_optim_api_version='1', os_key_manager_api_version='1', os_network_api_version='', os_object_api_version='', os_orchestration_api_version='1', os_project_id=None, os_project_name=None, os_volume_api_version='2', password='***', profile=None, project_domain_id='', project_domain_name='', project_id='', project_name='demo', protocol='', region_name='RegionOne', scope='', service_provider_endpoint='', timing=False, token='***', trust_id='', url='', user_domain_id='', user_domain_name='', user_id='', username='admin', verbose_level=3, verify=None)
defaults: {u'auth_type': 'password', u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'api_timeout': None, u'baremetal_api_version': u'1', u'image_api_version': u'2', 'cacert': None, u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', u'interface': None, u'network_api_version': u'2', u'image_format': u'qcow2', u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'verify': True, u'identity_api_version': u'2.0', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', u'container_api_version': u'1', u'dns_api_version': u'2', u'object_store_api_version': u'1', u'disable_vendor_agent': {}}
cloud cfg: {'auth_type': 'password', u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'data_processing_api_version': '1.1', u'network_api_version': u'2', u'image_format': u'qcow2', u'image_api_version': u'2', 'verify': True, u'dns_api_version': '2', u'object_store_api_version': u'1', 'verbose_level': 3, 'region_name': 'RegionOne', 'api_timeout': None, u'baremetal_api_version': '1.6', 'auth': {'username': 'admin', 'project_name': 'demo', 'password': '***', 'auth_url': 'http://10.50.0.223:5000/v2.0'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': '1', 'timing': False, 'cacert': None, u'key_manager_api_version': '1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': '2.0', u'volume_api_version': '2', 'infra_optim_api_version': '1', 'cert': None, u'secgroup_source': u'neutron', 'debug': True, u'interface': None, u'disable_vendor_agent': {}}
compute API version 2, cmd group openstack.compute.v2
network API version 2, cmd group openstack.network.v2
image API version 2, cmd group openstack.image.v2
volume API version 2, cmd group openstack.volume.v2
identity API version 2.0, cmd group openstack.identity.v2
object_store API version 1, cmd group openstack.object_store.v1
infra-optim API version 1, cmd group openstack.infra_optim.v1
data_processing API version 1.1, cmd group openstack.data_processing.v1
dns API version 2, cmd group openstack.dns.v2
orchestration API version 1, cmd group openstack.orchestration.v1
neutronclient API version 2, cmd group openstack.neutronclient.v2
key_manager API version 1, cmd group openstack.key_manager.v1
baremetal API version 1.6, cmd group openstack.baremetal.v1
command: optimize audit create -> watcherclient.v1.audit_shell.CreateAudit
Auth plugin password selected
auth_type: password
Using auth plugin: password
Using parameters {'username': 'admin', 'password': '***', 'project_name': 'demo', 'auth_url': 'http://10.50.0.223:5000/v2.0'}
Get auth_ref
REQ: curl -g -i -X GET http://10.50.0.223:5000/v2.0 -H "Accept: application/json" -H "User-Agent: python-openstackclient keystoneauth1/2.11.1 python-requests/2.11.1 CPython/2.7.6"
Starting new HTTP connection (1): 10.50.0.223
"GET /v2.0 HTTP/1.1" 200 337
RESP: [200] Date: Fri, 26 Aug 2016 13:28:03 GMT Server: Apache/2.4.7 (Ubuntu) Vary: X-Auth-Token x-openstack-request-id: req-a481a92a-ec90-41a9-a009-3f68913a4e9f Content-Length: 337 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "http://10.50.0.223:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}

Making authentication request to http://10.50.0.223:5000/v2.0/tokens
"POST /v2.0/tokens HTTP/1.1" 200 3448
run(Namespace(audit_template_uuid='at2', audit_type='ONESHOT', columns=[], deadline=None, formatter='table', goal=None, host_aggregate=None, interval=None, max_width=0, noindent=False, parameters=['para2=hellu'], prefix='', strategy=None, variables=[]))
Instantiating infra-optim client: <class 'watcherclient.v1.client.Client'>
Making authentication request to http://10.50.0.223:5000/v2.0/tokens
"POST /v2.0/tokens HTTP/1.1" 200 3448
REQ: curl -g -i -X GET http://10.50.0.223:9322/v1/audit_templates/at2 -H "User-Agent: python-watcherclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}b04bae68fde49fda4565c79d6435e8e96ab288a3"
Starting new HTTP connection (1): 10.50.0.223
"GET /v1/audit_templates/at2 HTTP/1.1" 200 607
RESP: [200] Content-Length: 607 Content-Type: application/json; charset=UTF-8 Date: Fri, 26 Aug 2016 13:28:03 GMT Connection: keep-alive
RESP BODY: {"description": null, "links": [{"href": "http://10.50.0.223:9322/v1/audit_templates/ad45e9c3-aab2-4f0d-a005-9a60d115c126", "rel": "self"}, {"href": "http://10.50.0.223:9322/audit_templates/ad45e9c3-aab2-4f0d-a005-9a60d115c126", "rel": "bookmark"}], "extra": {}, "goal_name": "dummy", "created_at": "2016-08-26T13:07:23+00:00", "goal_uuid": "fa10c8c7-e1d0-4148-8a29-58b9da5f6437", "updated_at": null, "name": "at2", "strategy_name": "dummy", "version": null, "strategy_uuid": "9ed5bc04-3957-4413-abf2-f5647601479a", "deleted_at": null, "host_aggregate": null, "uuid": "ad45e9c3-aab2-4f0d-a005-9a60d115c126"}

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 346, in run_subcommand
    result = cmd.run(parsed_args)
  File "/opt/stack/python-watcherclient/watcherclient/common/command.py", line 38, in run
    return super(Command, self).run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/cliff/display.py", line 79, in run
    column_names, data = self.take_action(parsed_args)
  File "/opt/stack/python-watcherclient/watcherclient/v1/audit_shell.py", line 202, in take_action
    audit = client.audit.create(**fields)
  File "/opt/stack/python-watcherclient/watcherclient/v1/audit.py", line 90, in create
    raise exc.InvalidAttribute()
InvalidAttribute
clean_up CreateAudit:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/openstackclient/shell.py", line 118, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 226, in run
    result = self.run_subcommand(remainder)
  File "/usr/local/lib/python2.7/dist-packages/openstackclient/shell.py", line 153, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 346, in run_subcommand
    result = cmd.run(parsed_args)
  File "/opt/stack/python-watcherclient/watcherclient/common/command.py", line 38, in run
    return super(Command, self).run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/cliff/display.py", line 79, in run
    column_names, data = self.take_action(parsed_args)
  File "/opt/stack/python-watcherclient/watcherclient/v1/audit_shell.py", line 202, in take_action
    audit = client.audit.create(**fields)
  File "/opt/stack/python-watcherclient/watcherclient/v1/audit.py", line 90, in create
    raise exc.InvalidAttribute()
InvalidAttribute

END return value: 1
stack@vdev-indeed0005:~/python-watcherclient$

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-watcherclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/361230

Changed in python-watcherclient:
status: Confirmed → In Progress
Changed in python-watcherclient:
status: In Progress → Fix Committed
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-watcherclient (master)

Reviewed: https://review.openstack.org/361230
Committed: https://git.openstack.org/cgit/openstack/python-watcherclient/commit/?id=6e858233dc4e9ff34bdb83c6caceaa5e45c7aae9
Submitter: Jenkins
Branch: master

commit 6e858233dc4e9ff34bdb83c6caceaa5e45c7aae9
Author: David.T <email address hidden>
Date: Fri Aug 26 16:02:42 2016 +0200

    Add again parameters as Audit creation attributes

    'parameters' option for audit creation was removed due to
    a bad merge conflict resolution.

    Change-Id: I37848ca7c1e8d6cd03996a5a81471edd9802b673
    Closes-Bug: #1617320

Changed in python-watcherclient:
status: Fix Committed → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/python-watcherclient 0.25.0

This issue was fixed in the openstack/python-watcherclient 0.25.0 release.

Changed in python-watcherclient:
milestone: newton-3 → ocata-1
status: Fix Released → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-watcherclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/382505

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-watcherclient (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/382509

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-watcherclient (master)

Reviewed: https://review.openstack.org/382505
Committed: https://git.openstack.org/cgit/openstack/python-watcherclient/commit/?id=466131e788a962b2d960a2438ba4233b83bbe03d
Submitter: Jenkins
Branch: master

commit 466131e788a962b2d960a2438ba4233b83bbe03d
Author: David.T <email address hidden>
Date: Wed Oct 5 17:18:20 2016 +0200

    Add parameters in Audit creation attributes list

    Change-Id: Ib4371223af76d20de2f6d019b73164058f1b4e89
    Closes-Bug: #1617320

Changed in python-watcherclient:
status: In Progress → Fix Released
tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-watcherclient (stable/newton)

Reviewed: https://review.openstack.org/382509
Committed: https://git.openstack.org/cgit/openstack/python-watcherclient/commit/?id=6082163049065351c6f56b44fc90cb0ade9ce8d5
Submitter: Jenkins
Branch: stable/newton

commit 6082163049065351c6f56b44fc90cb0ade9ce8d5
Author: David.T <email address hidden>
Date: Wed Oct 5 17:18:20 2016 +0200

    Add parameters in Audit creation attributes list

    Change-Id: Ib4371223af76d20de2f6d019b73164058f1b4e89
    Closes-Bug: #1617320

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-watcherclient 0.26.0

This issue was fixed in the openstack/python-watcherclient 0.26.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.