HewlettPackard / oneview-ansible

This project is no longer being developed and has limited support. Please use the newer Ansible Collection project: https://github.com/HewlettPackard/oneview-ansible-collection
Apache License 2.0
104 stars 65 forks source link

Rename an enclosure - Missing ETag #442

Closed DungKHoang closed 5 years ago

DungKHoang commented 5 years ago

Scenario/Intent

[What you are trying to achieve but can't?]

Environment Details

Steps to Reproduce

Create ansible playbook to rename an enclosure

Actual Result

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: HPOneViewException: (u'This operation requires an ETag value and none was specified.', {u'errorSource': None, u'recommendedActions': [u'Specify an ETag value in the If-Match header or the eTag attribute of the request body.'], u'data': {}, u'errorCode': u'MISSING_ETAG_IN_REQUEST', u'details': u'', u'message': u'This operation requires an ETag value and none was specified.', u'nestedErrors': []}) fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/home/dung/.ansible/tmp/ansible-tmp-1566877061.34-18250074689104/AnsiballZ_oneview_enclosure.py\", line 114, in \n _ansiballz_main()\n File \"/home/dung/.ansible/tmp/ansible-tmp-1566877061.34-18250074689104/AnsiballZ_oneview_enclosure.py\", line 106, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/dung/.ansible/tmp/ansible-tmp-1566877061.34-18250074689104/AnsiballZ_oneview_enclosure.py\", line 49, in invoke_module\n imp.load_module('main', mod, module, MOD_DESC)\n File \"/tmp/ansible_oneview_enclosure_payload_WFviaL/main.py\", line 711, in \n File \"/tmp/ansible_oneview_enclosure_payload_WFviaL/main.py\", line 707, in main\n File \"/tmp/ansible_oneview_enclosure_payload_WFviaL/ansible_oneview_enclosure_payload.zip/ansible/module_utils/oneview.py\", line 445, in run\n File \"/tmp/ansible_oneview_enclosure_payload_WFviaL/main.py\", line 506, in execute_module\n File \"/tmp/ansible_oneview_enclosure_payload_WFviaL/main.py\", line 555, in present\n File \"/tmp/ansible_oneview_enclosure_payload_WFviaL/main.py\", line 679, in replace_enclosure_name\n File \"/home/dung/.local/lib/python2.7/site-packages/hpOneView/resources/resource.py\", line 69, in call\n return self.method(obj, args, **kwargs)\n File \"/home/dung/.local/lib/python2.7/site-packages/hpOneView/resources/resource.py\", line 805, in patch\n timeout=timeout)\n File \"/home/dung/.local/lib/python2.7/site-packages/hpOneView/resources/resource.py\", line 830, in patch_request\n task, entity = self._connection.patch(uri, body, custom_headers=custom_headers)\n File \"/home/dung/.local/lib/python2.7/site-packages/hpOneView/connection.py\", line 379, in patch\n return self.do_rest_call('PATCH', uri, body, custom_headers=custom_headers)\n File \"/home/dung/.local/lib/python2.7/site-packages/hpOneView/connection.py\", line 403, in do_rest_call\n raise HPOneViewException(body)\nHPOneViewException: (u'This operation requires an ETag value and none was specified.', {u'errorSource': None, u'recommendedActions': [u'Specify an ETag value in the If-Match header or the eTag attribute of the request body.'], u'data': {}, u'errorCode': u'MISSING_ETAG_IN_REQUEST', u'details': u'', u'message': u'This operation requires an ETag value and none was specified.', u'nestedErrors': []})\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

DungKHoang commented 5 years ago

duplicated