From e41dabb10ce09fca4d34cc22487f9f2dbe305177 Mon Sep 17 00:00:00 2001 From: David Shrewsbury Date: Tue, 22 Mar 2016 08:33:30 -0400 Subject: [PATCH] Add new tasks to os_port playbook The allowed_address_pairs and extra_dhcp_opts parameters were broken in Ansible. We should make sure those are tested. NOTE: This will not pass tests until this merges and gets released: https://github.com/ansible/ansible-modules-core/pull/3303 Change-Id: I51ceb5305109f6f1c4f1890903f117a9ed250d56 --- shade/tests/ansible/roles/port/tasks/main.yml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/shade/tests/ansible/roles/port/tasks/main.yml b/shade/tests/ansible/roles/port/tasks/main.yml index 5f3040be9..05ce1e20f 100644 --- a/shade/tests/ansible/roles/port/tasks/main.yml +++ b/shade/tests/ansible/roles/port/tasks/main.yml @@ -60,6 +60,28 @@ state: absent name: "{{ port_name }}" +- name: Create port (with allowed_address_pairs and extra_dhcp_opts) + os_port: + cloud: "{{ cloud }}" + state: present + name: "{{ port_name }}" + network: "{{ network_name }}" + no_security_groups: True + allowed_address_pairs: + - ip_address: 10.6.7.0/24 + extra_dhcp_opts: + - opt_name: "bootfile-name" + opt_value: "testfile.1" + register: port + +- debug: var=port + +- name: Delete port (with allowed_address_pairs and extra_dhcp_opts) + os_port: + cloud: "{{ cloud }}" + state: absent + name: "{{ port_name }}" + - name: Delete security group os_security_group: cloud: "{{ cloud }}"