No, I didn't change anything in the network property. Here's what I currently have:
Original Message:
Sent: Feb 11, 2025 04:48 AM
From: Alvaro Leon Murillo
Subject: Cloud Template with a dynamic number of networks in Aria Automation 8.18.1
Thanks, that removed the warning from my Cloud Template, but I still get the same "cannot deserialize" error when trying to deploy a VM...
Did you change anything on the "networks" property of the VM resource? After the upgrade it transformed into an array, same as the picture you included in your original post
EDIT: I changed the "networks" property back to how it was previous to the upgrade and now it works, thank you very much!!
Original Message:
Sent: Feb 11, 2025 04:23 AM
From: DizzyMurloc
Subject: Cloud Template with a dynamic number of networks in Aria Automation 8.18.1
Hi Alvaro,
You need to add count atribute set to 1 in all networks objects that will always be present. Here is an example:
Cloud_vSphere_Network_0:
type: Cloud.vSphere.Network
properties:
networkType: existing
deviceIndex: 0
count: 1
constraints:
- tag: network:${input.network-1}
Cloud_vSphere_Network_1:
type: Cloud.vSphere.Network
properties:
networkType: existing
deviceIndex: 1
count: ${to_lower(input.network-2) == 'none' ? 0:1}
constraints:
- tag: network:${input.network-2}
Cloud_vSphere_Network_2:
type: Cloud.vSphere.Network
properties:
networkType: existing
deviceIndex: 2
count: ${to_lower(input.network-3) == 'none' ? 0:1}
constraints:
- tag: network:${input.network-3}
This solution worked for me.
Regards,
Original Message:
Sent: Feb 10, 2025 10:49 AM
From: Alvaro Leon Murillo
Subject: Cloud Template with a dynamic number of networks in Aria Automation 8.18.1
Hi, I'm on the same situation as you. Did you find any solution to the problem?
Original Message:
Sent: Dec 11, 2024 11:21 AM
From: DizzyMurloc
Subject: Cloud Template with a dynamic number of networks in Aria Automation 8.18.1
Hi everyone,
This cloud template worked in Aria Automation 8.14 and 8.16.2; however, after upgrading to 8.18.1, it stopped working.
The Cloud_vSphere_Machine object in the canvas now shows the following warning:
Cloud_vSphere_Machine_1.properties.networks: The entries under the networks array must reference either clustered or non-clustered resources only. You can either use the map_to_object expression or add count: 1 to convert a non-clustered to a clustered resource, or you can remove the count to convert a clustered resource to non-clustered.
When I attempt to deploy using the cloud template, I receive the following error:
Cannot deserialize value of type ArrayList<string> from Array value (token JsonToken.START_ARRAY) at [source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: com.vmware.admiral.compute.content.TemplateComputeDescription["networks"]->ArrayList[0])
Additionally, when I edit the cloud template after the failed deployment, I see that the networks attribute is now an array like the one in the following image:
Has anyone encountered this issue? Is there another way to implement dynamic network creation?
Best regards, and thanks.