mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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 modules
This commit is contained in:
parent
10a8c6bc25
commit
585862e4d0
5 changed files with 31 additions and 18 deletions
|
@ -48,7 +48,7 @@ options:
|
|||
vm_provider:
|
||||
description:
|
||||
- The VM platform for VMM Domains.
|
||||
choices: [ microsoft, openstack, vmware ]
|
||||
choices: [ cloudfoundry, kubernetes, microsoft, openshift, openstack, redhat, vmware ]
|
||||
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
|
||||
|
||||
VM_PROVIDER_MAPPING = dict(
|
||||
cloudfoundry='CloudFoundry',
|
||||
kubernetes='Kubernetes',
|
||||
microsoft='Microsoft',
|
||||
openshift='OpenShift',
|
||||
openstack='OpenStack',
|
||||
redhat='Redhat',
|
||||
vmware='VMware',
|
||||
|
@ -74,7 +77,7 @@ def main():
|
|||
domain=dict(type='str', aliases=['domain_name', 'domain_profile']),
|
||||
domain_type=dict(type='str', choices=['fc', 'l2dom', 'l3dom', 'phys', 'vmm'], aliases=['type']),
|
||||
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(
|
||||
|
|
|
@ -59,7 +59,7 @@ options:
|
|||
vm_provider:
|
||||
description:
|
||||
- The VM platform for VMM Domains.
|
||||
choices: [ microsoft, openstack, redhat, vmware ]
|
||||
choices: [ cloudfoundry, kubernetes, microsoft, openshift, openstack, redhat, vmware ]
|
||||
vswitch:
|
||||
description:
|
||||
- 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
|
||||
|
||||
VM_PROVIDER_MAPPING = dict(
|
||||
microsoft="Microsoft",
|
||||
openstack="OpenStack",
|
||||
redhat="Redhat",
|
||||
vmware="VMware",
|
||||
cloudfoundry='CloudFoundry',
|
||||
kubernetes='Kubernetes',
|
||||
microsoft='Microsoft',
|
||||
openshift='OpenShift',
|
||||
openstack='OpenStack',
|
||||
redhat='Redhat',
|
||||
vmware='VMware',
|
||||
)
|
||||
VSWITCH_MAPPING = dict(
|
||||
avs='n1kv',
|
||||
|
@ -155,7 +158,7 @@ def main():
|
|||
encap_mode=dict(type='str', choices=['unknown', 'vlan', 'vxlan']),
|
||||
multicast_address=dict(type='str'),
|
||||
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']),
|
||||
)
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ options:
|
|||
vm_provider:
|
||||
description:
|
||||
- The VM platform for VMM Domains.
|
||||
choices: [ microsoft, openstack, redhat, vmware ]
|
||||
choices: [ cloudfoundry, kubernetes, microsoft, openshift, openstack, redhat, vmware ]
|
||||
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
|
||||
|
||||
VM_PROVIDER_MAPPING = dict(
|
||||
cloudfoundry='CloudFoundry',
|
||||
kubernetes='Kubernetes',
|
||||
microsoft='Microsoft',
|
||||
openshift='OpenShift',
|
||||
openstack='OpenStack',
|
||||
redhat='Redhat',
|
||||
vmware='VMware',
|
||||
|
@ -98,7 +101,7 @@ def main():
|
|||
pool_allocation_mode=dict(type='str', aliases=['allocation_mode', 'mode'], choices=['dynamic', 'static']),
|
||||
pool_type=dict(type='str', required=True, choices=['vlan', 'vsan', 'vxlan']),
|
||||
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(
|
||||
|
|
|
@ -53,7 +53,7 @@ options:
|
|||
vm_provider:
|
||||
description:
|
||||
- The VM platform for VMM Domains.
|
||||
choices: [ microsoft, openstack, redhat, vmware ]
|
||||
choices: [ cloudfoundry, kubernetes, microsoft, openshift, openstack, redhat, vmware ]
|
||||
extends_documentation_fragment: aci
|
||||
'''
|
||||
|
||||
|
@ -144,7 +144,7 @@ def main():
|
|||
pool=dict(type='str', aliases=['pool_name', 'vlan_pool']),
|
||||
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']),
|
||||
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(
|
||||
|
|
|
@ -94,7 +94,7 @@ options:
|
|||
vm_provider:
|
||||
description:
|
||||
- The VM platform for VMM Domains.
|
||||
choices: [ microsoft, openstack, vmware ]
|
||||
choices: [ cloudfoundry, kubernetes, microsoft, openshift, openstack, redhat, vmware ]
|
||||
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
|
||||
|
||||
VM_PROVIDER_MAPPING = dict(
|
||||
microsoft="uni/vmmp-Microsoft/dom-",
|
||||
openstack="uni/vmmp-OpenStack/dom-",
|
||||
vmware="uni/vmmp-VMware/dom-",
|
||||
cloudfoundry='CloudFoundry',
|
||||
kubernetes='Kubernetes',
|
||||
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']),
|
||||
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
||||
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
|
||||
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
|
||||
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:
|
||||
epg_domain = 'uni/phys-{0}'.format(domain)
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue