302
302
from ansible .module_utils .basic import AnsibleModule
303
303
from ansible_collections .cisco .aci .plugins .module_utils .aci import ACIModule , aci_argument_spec , enhanced_lag_spec , netflow_spec
304
304
from ansible_collections .cisco .aci .plugins .module_utils .aci import aci_annotation_spec , aci_owner_spec
305
+ from ansible_collections .cisco .aci .plugins .module_utils .constants import VM_PROVIDER_MAPPING
305
306
306
307
# via UI vSwitch Policy can only be added for VMware and Microsoft vmm domains
307
308
# behavior for other domains is currently untested.
308
- VM_PROVIDER_MAPPING = dict (
309
- cloudfoundry = "CloudFoundry" ,
310
- kubernetes = "Kubernetes" ,
311
- microsoft = "Microsoft" ,
312
- openshift = "OpenShift" ,
313
- openstack = "OpenStack" ,
314
- redhat = "Redhat" ,
315
- vmware = "VMware" ,
316
- )
317
309
318
310
# enhanced_lag_spec = dict(
319
311
# name=dict(type='str', required=True),
336
328
337
329
338
330
def main ():
331
+ # Remove nutanix from VM_PROVIDER_MAPPING as it is not supported
332
+ VM_PROVIDER_MAPPING .pop ("nutanix" )
333
+
339
334
argument_spec = aci_argument_spec ()
340
335
argument_spec .update (aci_annotation_spec ())
341
336
argument_spec .update (aci_owner_spec ())
@@ -349,7 +344,7 @@ def main():
349
344
netflow_exporter = dict (type = "dict" , options = netflow_spec ()),
350
345
domain = dict (type = "str" , aliases = ["domain_name" , "domain_profile" ]),
351
346
state = dict (type = "str" , default = "present" , choices = ["absent" , "present" , "query" ]),
352
- vm_provider = dict (type = "str" , choices = list (VM_PROVIDER_MAPPING . keys () )),
347
+ vm_provider = dict (type = "str" , choices = list (VM_PROVIDER_MAPPING )),
353
348
)
354
349
355
350
module = AnsibleModule (
0 commit comments