vmware-archive / ansible-module-vcloud-director

ansible-module-vcloud-director
Other
112 stars 85 forks source link

Add the Flex model in the Allocation Model #179

Closed nakasix closed 3 years ago

nakasix commented 3 years ago

Hello,

At this time, the models 'AllocationVApp', 'AllocationPool' and 'ReservationPool' are supported, but I would like to know if it is possible to add support for the 'Flex' model?

image

Currently the error is : "value of allocation_model must be one of: AllocationVApp, AllocationPool, ReservationPool, got: Flex"

Regards,

nakasix commented 3 years ago

Hello,

After research, just add the allocation in the file "vcd_org_vdc.py".

diff --git a/modules/vcd_org_vdc.py b/modules/vcd_org_vdc.py
index 56cf059..7a823de 100644
--- a/modules/vcd_org_vdc.py
+++ b/modules/vcd_org_vdc.py
@@ -257,7 +257,8 @@ ORG_VDC_OPERATIONS = ['add_storage_profile',
                       'list_storage_profiles']
 ORG_VDC_ALLOCATION_MODELS = ['AllocationVApp',
                              'AllocationPool',
-                             'ReservationPool']
+                             'ReservationPool',
+                             'Flex']

Regards,