the module works as expected when running "show" commands, but when running "set" commands it throws an error like below:
The full traceback is:
Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandevice/base.py", line 3085, in method
super_method(self, *args, **kwargs)
File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pan/xapi.py", line 951, in op
self.__type_op(cmd, vsys, extra_qs)
File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pan/xapi.py", line 974, in __type_op
raise PanXapiError(self.status_detail)
pan.xapi.PanXapiError: set -> deviceconfig is unexpected
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/folders/zj/j2h7f63x3kv7wh3fnn_zmc680000gp/T/ansible_l3jx_z2_/ansible_module_panos_op.py", line 128, in main
xml_output = device.op(cmd, xml=True)
File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandevice/firewall.py", line 179, in op
return super(Firewall, self).op(cmd, vsys, xml, cmd_xml, extra_qs, retry_on_peer)
File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandevice/base.py", line 3223, in op
element = self.xapi.op(cmd, vsys, cmd_xml, extra_qs, retry_on_peer=retry_on_peer)
File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandevice/base.py", line 3102, in method
raise the_exception
pandevice.errors.PanDeviceXapiError: set -> deviceconfig is unexpected
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/folders/zj/j2h7f63x3kv7wh3fnn_zmc680000gp/T/ansible_l3jx_z2_/ansible_module_panos_op.py", line 153, in
main()
File "/var/folders/zj/j2h7f63x3kv7wh3fnn_zmc680000gp/T/ansible_l3jx_z2_/ansible_module_panos_op.py", line 133, in main
if 'non NULL value' in exc.message:
AttributeError: 'PanDeviceXapiError' object has no attribute 'message'
failed: [DJPSAIKAWP52E1] (item=set deviceconfig system hostname test) => {
"changed": false,
"failed": true,
"item": "set deviceconfig system hostname test",
"module_stderr": "Traceback (most recent call last):\n File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandevice/base.py", line 3085, in method\n super_method(self, *args, **kwargs)\n File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pan/xapi.py", line 951, in op\n self._type_op(cmd, vsys, extra_qs)\n File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pan/xapi.py", line 974, in type_op\n raise PanXapiError(self.status_detail)\npan.xapi.PanXapiError: set -> deviceconfig is unexpected\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "/var/folders/zj/j2h7f63x3kv7wh3fnn_zmc680000gp/T/ansible_l3jx_z2/ansible_module_panos_op.py", line 128, in main\n xml_output = device.op(cmd, xml=True)\n File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandevice/firewall.py", line 179, in op\n return super(Firewall, self).op(cmd, vsys, xml, cmd_xml, extra_qs, retry_on_peer)\n File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandevice/base.py", line 3223, in op\n element = self.xapi.op(cmd, vsys, cmd_xml, extra_qs, retry_on_peer=retry_on_peer)\n File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandevice/base.py", line 3102, in method\n raise the_exception\npandevice.errors.PanDeviceXapiError: set -> deviceconfig is unexpected\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "/var/folders/zj/j2h7f63x3kv7wh3fnn_zmc680000gp/T/ansible_l3jx_z2/ansible_module_panos_op.py", line 153, in \n main()\n File "/var/folders/zj/j2h7f63x3kv7wh3fnn_zmc680000gp/T/ansible_l3jx_z2/ansible_module_panos_op.py", line 133, in main\n if 'non NULL value' in exc.message:\nAttributeError: 'PanDeviceXapiError' object has no attribute 'message'\n",
"module_stdout": "",
"msg": "MODULE FAILURE",
"rc": 0
}