ACI: Added more VMM providers, doc improvements (#34879)
* Added more VMM providers, doc improvements This fixes #34211 and others * Add all VMM providers to other domain-related modulespull/4420/head
parent
10a8c6bc25
commit
585862e4d0
|
@ -48,7 +48,7 @@ options:
|
||||||
vm_provider:
|
vm_provider:
|
||||||
description:
|
description:
|
||||||
- The VM platform for VMM Domains.
|
- The VM platform for VMM Domains.
|
||||||
choices: [ microsoft, openstack, vmware ]
|
choices: [ cloudfoundry, kubernetes, microsoft, openshift, openstack, redhat, vmware ]
|
||||||
extends_documentation_fragment: aci
|
extends_documentation_fragment: aci
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -60,7 +60,10 @@ from ansible.module_utils.network.aci.aci import ACIModule, aci_argument_spec
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
||||||
VM_PROVIDER_MAPPING = dict(
|
VM_PROVIDER_MAPPING = dict(
|
||||||
|
cloudfoundry='CloudFoundry',
|
||||||
|
kubernetes='Kubernetes',
|
||||||
microsoft='Microsoft',
|
microsoft='Microsoft',
|
||||||
|
openshift='OpenShift',
|
||||||
openstack='OpenStack',
|
openstack='OpenStack',
|
||||||
redhat='Redhat',
|
redhat='Redhat',
|
||||||
vmware='VMware',
|
vmware='VMware',
|
||||||
|
@ -74,7 +77,7 @@ def main():
|
||||||
domain=dict(type='str', aliases=['domain_name', 'domain_profile']),
|
domain=dict(type='str', aliases=['domain_name', 'domain_profile']),
|
||||||
domain_type=dict(type='str', choices=['fc', 'l2dom', 'l3dom', 'phys', 'vmm'], aliases=['type']),
|
domain_type=dict(type='str', choices=['fc', 'l2dom', 'l3dom', 'phys', 'vmm'], aliases=['type']),
|
||||||
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
||||||
vm_provider=dict(type='str', choices=['microsoft', 'openstack', 'redhat', 'vmware']),
|
vm_provider=dict(type='str', choices=['cloudfoundry', 'kubernetes', 'microsoft', 'openshift', 'openstack', 'redhat', 'vmware']),
|
||||||
)
|
)
|
||||||
|
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
|
|
|
@ -59,7 +59,7 @@ options:
|
||||||
vm_provider:
|
vm_provider:
|
||||||
description:
|
description:
|
||||||
- The VM platform for VMM Domains.
|
- The VM platform for VMM Domains.
|
||||||
choices: [ microsoft, openstack, redhat, vmware ]
|
choices: [ cloudfoundry, kubernetes, microsoft, openshift, openstack, redhat, vmware ]
|
||||||
vswitch:
|
vswitch:
|
||||||
description:
|
description:
|
||||||
- The virtual switch to use for vmm domains.
|
- The virtual switch to use for vmm domains.
|
||||||
|
@ -130,10 +130,13 @@ from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.network.aci.aci import ACIModule, aci_argument_spec
|
from ansible.module_utils.network.aci.aci import ACIModule, aci_argument_spec
|
||||||
|
|
||||||
VM_PROVIDER_MAPPING = dict(
|
VM_PROVIDER_MAPPING = dict(
|
||||||
microsoft="Microsoft",
|
cloudfoundry='CloudFoundry',
|
||||||
openstack="OpenStack",
|
kubernetes='Kubernetes',
|
||||||
redhat="Redhat",
|
microsoft='Microsoft',
|
||||||
vmware="VMware",
|
openshift='OpenShift',
|
||||||
|
openstack='OpenStack',
|
||||||
|
redhat='Redhat',
|
||||||
|
vmware='VMware',
|
||||||
)
|
)
|
||||||
VSWITCH_MAPPING = dict(
|
VSWITCH_MAPPING = dict(
|
||||||
avs='n1kv',
|
avs='n1kv',
|
||||||
|
@ -155,7 +158,7 @@ def main():
|
||||||
encap_mode=dict(type='str', choices=['unknown', 'vlan', 'vxlan']),
|
encap_mode=dict(type='str', choices=['unknown', 'vlan', 'vxlan']),
|
||||||
multicast_address=dict(type='str'),
|
multicast_address=dict(type='str'),
|
||||||
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
||||||
vm_provider=dict(type='str', choices=['microsoft', 'openstack', 'redhat', 'vmware']),
|
vm_provider=dict(type='str', choices=['cloudfoundry', 'kubernetes', 'microsoft', 'openshift', 'openstack', 'redhat', 'vmware']),
|
||||||
vswitch=dict(type='str', choices=['avs', 'default', 'dvs', 'unknown']),
|
vswitch=dict(type='str', choices=['avs', 'default', 'dvs', 'unknown']),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ options:
|
||||||
vm_provider:
|
vm_provider:
|
||||||
description:
|
description:
|
||||||
- The VM platform for VMM Domains.
|
- The VM platform for VMM Domains.
|
||||||
choices: [ microsoft, openstack, redhat, vmware ]
|
choices: [ cloudfoundry, kubernetes, microsoft, openshift, openstack, redhat, vmware ]
|
||||||
extends_documentation_fragment: aci
|
extends_documentation_fragment: aci
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -70,7 +70,10 @@ from ansible.module_utils.network.aci.aci import ACIModule, aci_argument_spec
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
||||||
VM_PROVIDER_MAPPING = dict(
|
VM_PROVIDER_MAPPING = dict(
|
||||||
|
cloudfoundry='CloudFoundry',
|
||||||
|
kubernetes='Kubernetes',
|
||||||
microsoft='Microsoft',
|
microsoft='Microsoft',
|
||||||
|
openshift='OpenShift',
|
||||||
openstack='OpenStack',
|
openstack='OpenStack',
|
||||||
redhat='Redhat',
|
redhat='Redhat',
|
||||||
vmware='VMware',
|
vmware='VMware',
|
||||||
|
@ -98,7 +101,7 @@ def main():
|
||||||
pool_allocation_mode=dict(type='str', aliases=['allocation_mode', 'mode'], choices=['dynamic', 'static']),
|
pool_allocation_mode=dict(type='str', aliases=['allocation_mode', 'mode'], choices=['dynamic', 'static']),
|
||||||
pool_type=dict(type='str', required=True, choices=['vlan', 'vsan', 'vxlan']),
|
pool_type=dict(type='str', required=True, choices=['vlan', 'vsan', 'vxlan']),
|
||||||
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
||||||
vm_provider=dict(type='str', choices=['microsoft', 'openstack', 'redhat', 'vmware']),
|
vm_provider=dict(type='str', choices=['cloudfoundry', 'kubernetes', 'microsoft', 'openshift', 'openstack', 'redhat', 'vmware']),
|
||||||
)
|
)
|
||||||
|
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
|
|
|
@ -53,7 +53,7 @@ options:
|
||||||
vm_provider:
|
vm_provider:
|
||||||
description:
|
description:
|
||||||
- The VM platform for VMM Domains.
|
- The VM platform for VMM Domains.
|
||||||
choices: [ microsoft, openstack, redhat, vmware ]
|
choices: [ cloudfoundry, kubernetes, microsoft, openshift, openstack, redhat, vmware ]
|
||||||
extends_documentation_fragment: aci
|
extends_documentation_fragment: aci
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ def main():
|
||||||
pool=dict(type='str', aliases=['pool_name', 'vlan_pool']),
|
pool=dict(type='str', aliases=['pool_name', 'vlan_pool']),
|
||||||
pool_allocation_mode=dict(type='str', required=True, aliases=['allocation_mode', 'mode'], choices=['dynamic', 'static']),
|
pool_allocation_mode=dict(type='str', required=True, aliases=['allocation_mode', 'mode'], choices=['dynamic', 'static']),
|
||||||
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
||||||
vm_provider=dict(type='str', choices=['microsoft', 'openstack', 'redhat', 'vmware']),
|
vm_provider=dict(type='str', choices=['cloudfoundry', 'kubernetes', 'microsoft', 'openshift', 'openstack', 'redhat', 'vmware']),
|
||||||
)
|
)
|
||||||
|
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
|
|
|
@ -94,7 +94,7 @@ options:
|
||||||
vm_provider:
|
vm_provider:
|
||||||
description:
|
description:
|
||||||
- The VM platform for VMM Domains.
|
- The VM platform for VMM Domains.
|
||||||
choices: [ microsoft, openstack, vmware ]
|
choices: [ cloudfoundry, kubernetes, microsoft, openshift, openstack, redhat, vmware ]
|
||||||
extends_documentation_fragment: aci
|
extends_documentation_fragment: aci
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -106,9 +106,13 @@ from ansible.module_utils.network.aci.aci import ACIModule, aci_argument_spec
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
||||||
VM_PROVIDER_MAPPING = dict(
|
VM_PROVIDER_MAPPING = dict(
|
||||||
microsoft="uni/vmmp-Microsoft/dom-",
|
cloudfoundry='CloudFoundry',
|
||||||
openstack="uni/vmmp-OpenStack/dom-",
|
kubernetes='Kubernetes',
|
||||||
vmware="uni/vmmp-VMware/dom-",
|
microsoft='Microsoft',
|
||||||
|
openshift='OpenShift',
|
||||||
|
openstack='OpenStack',
|
||||||
|
redhat='Redhat',
|
||||||
|
vmware='VMware',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,7 +132,7 @@ def main():
|
||||||
resolution_immediacy=dict(type='str', choices=['immediate', 'lazy', 'pre-provision']),
|
resolution_immediacy=dict(type='str', choices=['immediate', 'lazy', 'pre-provision']),
|
||||||
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
||||||
tenant=dict(type='str', aliases=['tenant_name']),
|
tenant=dict(type='str', aliases=['tenant_name']),
|
||||||
vm_provider=dict(type='str', choices=['microsoft', 'openstack', 'vmware']),
|
vm_provider=dict(type='str', choices=['cloudfoundry', 'kubernetes', 'microsoft', 'openshift', 'openstack', 'redhat', 'vmware']),
|
||||||
method=dict(type='str', choices=['delete', 'get', 'post'], aliases=['action'], removed_in_version='2.6'), # Deprecated starting from v2.6
|
method=dict(type='str', choices=['delete', 'get', 'post'], aliases=['action'], removed_in_version='2.6'), # Deprecated starting from v2.6
|
||||||
protocol=dict(type='str', removed_in_version='2.6'), # Deprecated in v2.6
|
protocol=dict(type='str', removed_in_version='2.6'), # Deprecated in v2.6
|
||||||
)
|
)
|
||||||
|
@ -173,7 +177,7 @@ def main():
|
||||||
|
|
||||||
# Compile the full domain for URL building
|
# Compile the full domain for URL building
|
||||||
if domain_type == 'vmm':
|
if domain_type == 'vmm':
|
||||||
epg_domain = '{0}{1}'.format(VM_PROVIDER_MAPPING[vm_provider], domain)
|
epg_domain = 'uni/vmmp-{0}/dom-{1}'.format(VM_PROVIDER_MAPPING[vm_provider], domain)
|
||||||
elif domain_type is not None:
|
elif domain_type is not None:
|
||||||
epg_domain = 'uni/phys-{0}'.format(domain)
|
epg_domain = 'uni/phys-{0}'.format(domain)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue