Hi all,
Is there any way to create a Property Dictionary (with its Property Attributes) using the REST API? In vRA 6.x or 7.x.
Thanks a lot,
D.
bump ==============
also been trying to find this.
If I am not mistaken there is a workflow that comes with the plugin for creating values in the property dictionary. I do not have a computer in front of me to tell you the exact name but look in the vcac workflows and I believe you should find it. Now if this is any help, what I would do is say get all values for what you need and store it in a configuration item and then pull from there to populate the dictionary.
Steve
In 7 you can do it with the API, as Property Groups have now moved to the vRA Appliance. In 6.x it was handled by IaaS, so may be achievable with vRO, but not through direct interaction with the public API.
Grant
I was able to do REST with the new vRA 7 Property Group / Property Definitions.
I started with this: Postman Collection for the vRA7 API -
In vRO, this was pretty easy:
// cafeHost is a vCACCAFE:VCACHost
var restClient = cafeHost.createRestClient("com.vmware.csp.core.properties.service.api");
// get a property group
var propertyGroupId = "myPropertyGroupsId";
var resp = restClient.get("propertygroups/" + propertyGroupId);
var propertyGroupFound = resp.getBodyAsJson();
// create a property group
var propertyGroup = {
id: "myUniqueId",
tenantId: cafeHost.tenant,
label: "my Property Group label,
description: "my description",
properties:{}
};
var data = JSON.stringify(propertyGroup);
restClient.post("propertygroups", data);
Hopefully in the next release the vRA plugin will support this a little better though by adding PropertyGroup and PropertyDefinition objects and a wrapper to the properties service.