mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 04:11:25 -07:00
Cloudstack: fix support for some VPC service capabilities (#45727)
* Fix support for VPC capabilities such as redundant routers or region level VPC * Add integration test cases for "region level VPC" and "distributed router" capabilities
This commit is contained in:
parent
78e9f452a5
commit
05328ebf21
2 changed files with 66 additions and 2 deletions
|
@ -65,8 +65,36 @@ EXAMPLES = '''
|
|||
state: enabled
|
||||
supported_services: [ Dns, Dhcp ]
|
||||
service_providers:
|
||||
- {service: 'dns', provider: 'virtualrouter'}
|
||||
- {service: 'dhcp', provider: 'virtualrouter'}
|
||||
- {service: 'dns', provider: 'VpcVirtualRouter'}
|
||||
- {service: 'dhcp', provider: 'VpcVirtualRouter'}
|
||||
|
||||
# Create a vpc offering with redundant router
|
||||
- local_action:
|
||||
module: cs_vpc_offering
|
||||
name: "my_vpc_offering"
|
||||
display_text: "vpc offering description"
|
||||
supported_services: [ Dns, Dhcp, SourceNat ]
|
||||
service_providers:
|
||||
- {service: 'dns', provider: 'VpcVirtualRouter'}
|
||||
- {service: 'dhcp', provider: 'VpcVirtualRouter'}
|
||||
- {service: 'SourceNat', provider: 'VpcVirtualRouter'}
|
||||
service_capabilities:
|
||||
- {service: 'SourceNat', capabilitytype: 'RedundantRouter', capabilityvalue: true}
|
||||
|
||||
# Create a region level vpc offering with distributed router
|
||||
- local_action:
|
||||
module: cs_vpc_offering
|
||||
name: "my_vpc_offering"
|
||||
display_text: "vpc offering description"
|
||||
state: present
|
||||
supported_services: [ Dns, Dhcp, SourceNat ]
|
||||
service_providers:
|
||||
- {service: 'dns', provider: 'VpcVirtualRouter'}
|
||||
- {service: 'dhcp', provider: 'VpcVirtualRouter'}
|
||||
- {service: 'SourceNat', provider: 'VpcVirtualRouter'}
|
||||
service_capabilities:
|
||||
- {service: 'Connectivity', capabilitytype: 'DistributedRouter', capabilityvalue: true}
|
||||
- {service: 'Connectivity', capabilitytype: 'RegionLevelVPC', capabilityvalue: true}
|
||||
|
||||
# Remove a vpc offering
|
||||
- local_action:
|
||||
|
@ -189,6 +217,7 @@ class AnsibleCloudStackVPCOffering(AnsibleCloudStack):
|
|||
'supportedservices': self.module.params.get('supported_services'),
|
||||
'serviceproviderlist': self.module.params.get('service_providers'),
|
||||
'serviceofferingid': self.get_service_offering_id(),
|
||||
'servicecapabilitylist': self.module.params.get('service_capabilities'),
|
||||
}
|
||||
|
||||
required_params = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue