Add more options to enable ansible testing feature

1. Specified volume size for boot from volume server scenario.
2. Create port in default security group or no security group.

Change-Id: If2ccf726f518a5d6ba72bece09504c0f005a08f1
Related-Patch: https://review.openstack.org/#/c/582459/
This commit is contained in:
Rui Chen 2018-08-09 10:53:59 +08:00
parent 8c2eac3ccf
commit 7590beafa0
4 changed files with 7 additions and 5 deletions

View File

@ -3,3 +3,4 @@ network_external: true
subnet_name: ansible_port_subnet
port_name: ansible_port
secgroup_name: ansible_port_secgroup
no_security_groups: True

View File

@ -14,20 +14,20 @@
network_name: "{{ network_name }}"
cidr: 10.5.5.0/24
- name: Create port (no security group)
- name: Create port (no security group or default security group)
os_port:
cloud: "{{ cloud }}"
state: present
name: "{{ port_name }}"
network: "{{ network_name }}"
no_security_groups: True
no_security_groups: "{{ no_security_groups }}"
fixed_ips:
- ip_address: 10.5.5.69
register: port
- debug: var=port
- name: Delete port (no security group)
- name: Delete port (no security group or default security group)
os_port:
cloud: "{{ cloud }}"
state: absent
@ -66,7 +66,7 @@
state: present
name: "{{ port_name }}"
network: "{{ network_name }}"
no_security_groups: True
no_security_groups: "{{ no_security_groups }}"
allowed_address_pairs:
- ip_address: 10.6.7.0/24
extra_dhcp_opts:

View File

@ -2,3 +2,4 @@ server_network: private
server_name: ansible_server
flavor: m1.tiny
floating_ip_pool_name: public
boot_volume_size: 5

View File

@ -77,7 +77,7 @@
network: "{{ server_network }}"
auto_floating_ip: false
boot_from_volume: true
volume_size: 5
volume_size: "{{ boot_volume_size }}"
terminate_volume: true
wait: true
register: server