According to the documentation I should be able to do a PUT to the vAppTemplate /productSections
Doing this results in a "Method Not Allowed" error though. I'm doing this as a System Admin.
Well, actually it seems that vAppTemplates are immutable.
That's why you cannot update the product section of a template.
You could try to add that section upon vAppTemplate creation.
Have you checked the media type you are using upon request? It should be application/vnd.vmware.vcloud.productSections+xml.
I'm setting the content type correctly, I'm able to do the PUT update on both vApps and VMs just not vAppTemplates.
Well, actually it seems that vAppTemplates are immutable.
That's why you cannot update the product section of a template.
You could try to add that section upon vAppTemplate creation.
ProductSections for vApp templates are defined in the OVF which is used to create a vApp template. Once uploaded as a vApp template, the ProductSection cannot be changed for the template - only for the vApps and their VMs.
Below is a sample product section inside an OVF file. It could be placed under <VirtualSystemCollection> element in order to be global for the whole vApp template or inside individual <VirtualSystem> elements in order to be associated with a VM.
<ProductSection>
<Info>Information about the installed software</Info>
<Category>Static Properties</Category>
<Property ovf:key="choice" ovf:type="boolean" ovf:userConfigurable="true" ovf:value="false">
<Label>Boolean Type</Label>
<Description>Boolean description</Description>
</Property>
<Property ovf:key="num_int" ovf:qualifiers="MinValue(-10), MaxValue(100)" ovf:type="int8" ovf:userConfigurable="true" ovf:value="32">
<Label>Number Integer</Label>
</Property>
<Property ovf:key="num_real" ovf:qualifiers="MinValue(-20.5), MaxValue(45.6)" ovf:type="real32" ovf:userConfigurable="true" ovf:value="21.4">
<Label>Real Type</Label>
</Property>
<Property ovf:key="str" ovf:qualifiers="MinLen(5), MaxLen(20)" ovf:type="string" ovf:userConfigurable="true" ovf:value="defaultStr">
<Label>String</Label>
</Property>
<Property ovf:key="str_choice" ovf:qualifiers="ValueMap{"A","B","C"}" ovf:type="string" ovf:userConfigurable="true" ovf:value="B">
<Label>String Choice</Label>
</Property>
<Property ovf:key="vmPassword" ovf:password="true" ovf:type="string" ovf:userConfigurable="true" ovf:value="pass1234">
<Label>VM Password</Label>
</Property>
<Property ovf:key="externalIP" ovf:type="string" ovf:userConfigurable="true" vmw:qualifiers="Ip" ovf:value="192.168.0.1">
<Label>External IP</Label>
</Property>
</ProductSection>
Thats what I was expecting, the documentation is incorrect and template aren't editable.