File tree Expand file tree Collapse file tree 3 files changed +33
-0
lines changed
integration/targets/cs_vlan_ip_range/tasks Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 105105 VLAN range to the Physical Network with a Public traffic type.
106106 type: bool
107107 default: no
108+ for_system_vms:
109+ description:
110+ - C(yes) if IP range is set to system vms, C(no) if not
111+ type: bool
112+ default: no
108113extends_documentation_fragment:
109114- ngine_io.cloudstack.cloudstack
110115'''
@@ -306,6 +311,7 @@ def create_vlan_ip_range(self):
306311 'vlan' : self .get_network (key = 'vlan' ) if not vlan else vlan ,
307312 'networkid' : self .get_network (key = 'id' ),
308313 'forvirtualnetwork' : self .module .params .get ('for_virtual_network' ),
314+ 'forsystemvms' : self .module .params .get ('for_system_vms' ),
309315 }
310316 if self .module .params .get ('physical_network' ):
311317 args ['physicalnetworkid' ] = self .get_physical_network (key = 'id' )
@@ -353,6 +359,7 @@ def main():
353359 account = dict (type = 'str' ),
354360 project = dict (type = 'str' ),
355361 for_virtual_network = dict (type = 'bool' , default = False ),
362+ for_system_vms = dict (type = 'bool' , default = False ),
356363 ))
357364
358365 module = AnsibleModule (
Original file line number Diff line number Diff line change 422422 - public_range.zone == cszone.name
423423 - public_range.start_ip == '10.0.3.10'
424424 - public_range.end_ip == '10.0.3.250'
425+ - public_range.for_systemvms == false
426+
427+ - name : test adding a public IP range for System VMs
428+ cs_vlan_ip_range :
429+ end_ip : 10.0.4.250
430+ start_ip : 10.0.4.10
431+ zone : " {{ cszone.name }}"
432+ netmask : 255.255.255.0
433+ for_virtual_network : ' yes'
434+ for_system_vms : ' yes'
435+ gateway : 10.0.4.2
436+ vlan : untagged
437+ register : public_range
438+ - name : verify test adding a public IP range for System VMs
439+ assert :
440+ that :
441+ - public_range is successful
442+ - public_range is changed
443+ - public_range.physical_network == public_network.id
444+ - public_range.vlan == 'vlan://untagged'
445+ - public_range.gateway == '10.0.4.2'
446+ - public_range.netmask == '255.255.255.0'
447+ - public_range.zone == cszone.name
448+ - public_range.start_ip == '10.0.4.10'
449+ - public_range.end_ip == '10.0.4.250'
450+ - public_range.for_systemvms == true
425451
426452- name : cleanup the network
427453 cs_physical_network :
File renamed without changes.
You can’t perform that action at this time.
0 commit comments