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

Error on creating ethernet network with sample playbook #491

Closed DungKHoang closed 4 years ago

DungKHoang commented 4 years ago

Scenario/Intent

Create ethenert network with ansible using example

Environment Details

Steps to Reproduce

Use the sample ethernetnetwork.yml in the examples folder

Actual Result

Error is: An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: Value of unknown type: <class 'hpOneView.resources.networking.ethernet_networks.EthernetNetworks'>, <hpOneView.resources.networking.ethernet_networks.EthernetNetworks object at 0x7f4e2681d0f0> fatal: [localhost -> localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/home/dung/.ansible/tmp/ansible-tmp-1585619989.570344-44450120699480/AnsiballZ_oneview_ethernet_network.py\", line 102, in \n _ansiballz_main()\n File \"/home/dung/.ansible/tmp/ansible-tmp-1585619989.570344-44450120699480/AnsiballZ_oneview_ethernet_network.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/dung/.ansible/tmp/ansible-tmp-1585619989.570344-44450120699480/AnsiballZ_oneview_ethernet_network.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.remote_management.oneview.oneview_ethernet_network', init_globals=None, run_name='main', alter_sys=True)\n File \"/usr/lib/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_oneview_ethernet_network_payload_8_2u2jso/ansible_oneview_ethernet_network_payload.zip/ansible/modules/remote_management/oneview/oneview_ethernet_network.py\", line 251, in \n File \"/tmp/ansible_oneview_ethernet_network_payload_8_2u2jso/ansible_oneview_ethernet_network_payload.zip/ansible/modules/remote_management/oneview/oneview_ethernet_network.py\", line 247, in main\n File \"/tmp/ansible_oneview_ethernet_network_payload_8_2u2jso/ansible_oneview_ethernet_network_payload.zip/ansible/module_utils/oneview.py\", line 306, in run\n File \"/tmp/ansible_oneview_ethernet_network_payload_8_2u2jso/ansible_oneview_ethernet_network_payload.zip/ansible/module_utils/basic.py\", line 2071, in exit_json\n self._return_formatted(kwargs)\n File \"/tmp/ansible_oneview_ethernet_network_payload_8_2u2jso/ansible_oneview_ethernet_network_payload.zip/ansible/module_utils/basic.py\", line 2064, in _return_formatted\n kwargs = remove_values(kwargs, self.no_log_values)\n File \"/tmp/ansible_oneview_ethernet_network_payload_8_2u2jso/ansible_oneview_ethernet_network_payload.zip/ansible/module_utils/basic.py\", line 418, in remove_values\n new_elem = _remove_values_conditions(old_elem, no_log_strings, deferred_removals)\n File \"/tmp/ansible_oneview_ethernet_network_payload_8_2u2jso/ansible_oneview_ethernet_network_payload.zip/ansible/module_utils/basic.py\", line 401, in _remove_values_conditions\n raise TypeError('Value of unknown type: %s, %s' % (type(value), value))\nTypeError: Value of unknown type: <class 'hpOneView.resources.networking.ethernet_networks.EthernetNetworks'>, <hpOneView.resources.networking.ethernet_networks.EthernetNetworks object at 0x7f4e2681d0f0>\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

yuvirani commented 4 years ago

@DungKHoang I reran the playbook and I'm not able to reproduce the error, the playbook is working fine for me with the EV details given and it created the network in OV appliance without any error. Please make sure you are using the latest ansible and python SDK version.

yuvirani commented 4 years ago

Given playbook is running without any error and informed the user as well. Hence, closing it.