We want to provision namespaces using an operator.
We're using govmomi for that and implemented the VMClassAssigment object in crossplane that assigns a VMClass to a vsphere namespace.
This works quite well so far, except when it comes to deleting the VMClass and only one VMClass is assigned.
With an empty VMClass Object in the UpdateSpec's VMServiceSpec the vcenter API returns success but the VMClass remains assigned.
Similar behaviour as described in #4007
link to api-doc:
https://developer.broadcom.com/xapis/vsphere-automation-api/v7.0U3/vcenter/api/vcenter/namespaces/instances/namespace/patch/
Is this behaviour intended? how is it able to remove the last storage policy from the namespace?
I Suggest to remove the omitempty as well.
To Reproduce
Steps to reproduce the behavior:
- Create Namespace with VMClass
- Update Namespace with Empty VMClass Object (using govmomi)
Expected behavior
Empty stroage Spec is Respected and the Plicies are removed from the object.
Affected version
latest@main
We want to provision namespaces using an operator.
We're using govmomi for that and implemented the VMClassAssigment object in crossplane that assigns a VMClass to a vsphere namespace.
This works quite well so far, except when it comes to deleting the VMClass and only one VMClass is assigned.
With an empty VMClass Object in the UpdateSpec's VMServiceSpec the vcenter API returns success but the VMClass remains assigned.
Similar behaviour as described in #4007
link to api-doc:
https://developer.broadcom.com/xapis/vsphere-automation-api/v7.0U3/vcenter/api/vcenter/namespaces/instances/namespace/patch/
Is this behaviour intended? how is it able to remove the last storage policy from the namespace?
I Suggest to remove the omitempty as well.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Empty stroage Spec is Respected and the Plicies are removed from the object.
Affected version
latest@main