-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong data type for fmgr_dvmdb_device_vdom #54
Comments
Hi, Can't reproduce with That's my playbook: ---
- hosts: 10.210.35.112
connection: httpapi
collections:
- fortinet.fortimanager
gather_facts: false
vars:
adom: dc_emea
device: dut_fgt_01
vdom: vd_001
tasks:
- name: Add VDOM {{ adom }}/{{ device }}[{{ vdom }}]
fmgr_dvmdb_device_vdom:
adom: "{{ adom }}"
device: "{{ device }}"
state: present
dvmdb_device_vdom:
name: "{{ vdom }}"
comments: Created with fortinet.fortimananager collection
opmode: nat That's the debug output from FMG: diagnose debug service dvmdb 255
diagnose debug timestamp enable
diagnose enable
[...]
2022-12-28 08:18:14 { "client": "\/usr\/local\/apache2\/bin\/httpd:29562", "id": 7, "method": "set", "params": [{ "data": { "comments": "Created with fortinet.fortimananager collection", "name": "vd_001", "opmode": "nat"}, "target start": 1, "url": "\/dvmdb\/adom\/dc_emea\/device\/dut_fgt_01\/vdom"}], "session": "BbCFuzVn04adnXoEc9eCLzsiXiWknz3aHYaM7+oLINOk8h04RAYvK624WsZEw\/riiFE0QCUmxGr+b3zjp1n8K00jR8BZmWU5", "src": "172.26.139.195", "verbose": 1}
[...] Once pretty formatted the JSON payload is: {
"client": "/usr/local/apache2/bin/httpd:29562",
"id": 7,
"method": "set",
"params": [
{
"data": {
"comments": "Created with fortinet.fortimananager collection",
"name": "vd_001",
"opmode": "nat"
},
"target start": 1,
"url": "/dvmdb/adom/dc_emea/device/dut_fgt_01/vdom"
}
],
"session": "BbCFuzVn04adnXoEc9eCLzsiXiWknz3aHYaM7+oLINOk8h04RAYvK624WsZEw/riiFE0QCUmxGr+b3zjp1n8K00jR8BZmWU5",
"src": "172.26.139.195",
"verbose": 1
} We can see the (Also checked in FNDN and the specs for the Would you mind explaining how you got that conclusion that Best Regards. |
And I just realized that you passed: "status": "present" in your
BR |
Using ansible fmgr_dvmdb_device_vdom.py module to create a FGT vdom in FMG ADOM.
The query sent by ansible is the using a dictionary for the data :
But the FMG API is waiting for a list of dict:
So FMG refuses with the following error:
{ "status": { "code": 1, "message": "runtime error 0: invalid value"}}
Maybe replacing the :
by
The text was updated successfully, but these errors were encountered: