I am working on some uri calls with netbackup and with swagger shows that
it only works with [] but the uri modual is using {}. Any thoughts or
tricks to get that to format correctly?
For example i am sending a body uri body of:
- name: Create MSDP Disk Pool
uri:
url: "{{baseurl}}storage/disk-pools"
method: POST
body_format: json
status_code: 201
headers:
authorization: "{{login.json.token}}"
content-type: application/vnd.netbackup+json;version=3.0
body:
data:
type: diskPool
attributes:
name: server_dpm
diskVolumes:
[name: PureDiskVolume]
maximumIoStreams:
limitIoStreams: true
streamsPerVolume: 75
relationships:
storageServers:
data:
type: storageServer
id: 'PureDisk:server.domain'
validate_certs: no
return_content: yes
register: dp_create
Which produces this:
"body": {
"data": {
"attributes": {
"diskVolumes": [
{
"name": "PureDiskVolume"
}
],
"maximumIoStreams": {
"limitIoStreams": true,
"streamsPerVolume": 75
},
"name": "server_dpm"
},
"relationships": {
"storageServers": {
"data": {
"id": "PureDisk:server.domain",
"type": "storageServer"
}
}
},
"type": "diskPool"
}
},
While swagger produces it as this:
working:
{
"data": {
"type": "diskPool",
"attributes": {
"name": "server_dpm",
"diskVolumes": [
{
"name": "PureDiskVolume"
}
],
"maximumIoStreams": {
"limitIoStreams": true,
"streamsPerVolume": 75
}
},
"relationships": {
"storageServers": {
"data": [
{
"type": "storageServer",
"id": "PureDisk:server.domain"
}
]
}
}
}
}
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/d248f94f-431a-43d7-8ab3-08d9ae619796%40googlegroups.com.