Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 2434 Fixed - Disabling/Enabling Virtual Server does not require… #2446

Open
wants to merge 3 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- bigip_virtual_server - Fixed issue - Disabling/Enabling Virtual Server does not require profiles, type in Update
Original file line number Diff line number Diff line change
Expand Up @@ -3450,6 +3450,10 @@ def metadata(self):

@property
def type(self):
if self.want.state in ["disabled", "enabled"] and self.want.type in [None, "standard"]:
# when type is missing
self.want.type = self.have.type

if self.want.type != self.have.type:
raise F5ModuleError(
"Changing the 'type' parameter is not supported."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
- name: Issue 01519 - Create standard virtual server with sip profile
bigip_virtual_server:
name: sip-profile-test
destination: '10.1.1.1%0'
destination: "10.1.1.1%0"
port: 5060
type: standard
provider: "{{ provider }}"
profiles: ['/Common/foo2','/Common/tcp']
register: result
profiles: ["/Common/foo2", "/Common/tcp"]
register: result

- name: Issue 01519 - Create standard virtual server with sip profile
assert:
Expand All @@ -18,12 +18,12 @@
- name: Issue 01519 - Create standard virtual server with sip profile - Idempotent check
bigip_virtual_server:
name: sip-profile-test
destination: '10.1.1.1%0'
destination: "10.1.1.1%0"
port: 5060
type: standard
provider: "{{ provider }}"
profiles: ['/Common/foo2','/Common/tcp']
register: result
profiles: ["/Common/foo2", "/Common/tcp"]
register: result

- name: Issue 01519 - Create standard virtual server with sip profile - Idempotent check
assert:
Expand All @@ -34,10 +34,10 @@
- name: Issue 01813 - Remove bigip_virtual_server with sip profile- Idempotent check
bigip_virtual_server:
name: sip-profile-test
destination: '10.1.1.1%0'
destination: "10.1.1.1%0"
state: absent
port: 5060
type: standard
provider: "{{ provider }}"
profiles: ['/Common/foo2','/Common/tcp']
register: result
profiles: ["/Common/foo2", "/Common/tcp"]
register: result
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
destination: "0.0.0.0/0"
port: "443"
type: "performance-l4"
profiles: ['/Common/fastL4']
# profiles:
# - {name: fastL4, partition: Common}
profiles: ["/Common/fastL4"]
# profiles:
# - {name: fastL4, partition: Common}
source: "0.0.0.0/0"
snat: none
address_translation: True
port_translation: True
register: result
register: result

- name: Issue 01813 - Test bigip_virtual_server using profile fastL4 with partition name
assert:
Expand All @@ -37,22 +37,21 @@
destination: "0.0.0.0/0"
port: "443"
type: "performance-l4"
profiles: ['/Common/fastL4']
# profiles:
# - {name: fastL4, partition: Common}
profiles: ["/Common/fastL4"]
# profiles:
# - {name: fastL4, partition: Common}
source: "0.0.0.0/0"
snat: none
address_translation: True
port_translation: True
register: result
register: result

- name: Issue 01813 - Test bigip_virtual_server using profile fastL4 with partition name - Idempotent check
assert:
that:
- result is not changed
- result is success


- name: Issue 01813 - Remove bigip_virtual_server - Idempotent check
bigip_virtual_server:
name: ANSIBLE_CREATED_THIS_VIRTUAL_SERVER
Expand All @@ -63,12 +62,12 @@
destination: "0.0.0.0/0"
port: "443"
type: "performance-l4"
profiles: ['/Common/fastL4']
profiles: ["/Common/fastL4"]
source: "0.0.0.0/0"
snat: none
address_translation: True
port_translation: True
register: result
register: result

- name: Issue 01813 - Test bigip_virtual_server using profile fastL4 with partition name as dict
bigip_virtual_server:
Expand All @@ -80,14 +79,14 @@
destination: "0.0.0.0/0"
port: "443"
type: "performance-l4"
# profiles: ['/Common/fastL4']
# profiles: ['/Common/fastL4']
profiles:
- {name: fastL4, partition: Common}
- { name: fastL4, partition: Common }
source: "0.0.0.0/0"
snat: none
address_translation: True
port_translation: True
register: result
register: result

- name: Issue 01813 - Test bigip_virtual_server using profile fastL4 with partition name as dict
assert:
Expand All @@ -106,21 +105,20 @@
port: "443"
type: "performance-l4"
profiles:
- {name: fastL4, partition: Common}
# profiles: ['/Common/fastL4']
- { name: fastL4, partition: Common }
# profiles: ['/Common/fastL4']
source: "0.0.0.0/0"
snat: none
address_translation: True
port_translation: True
register: result
register: result

- name: Issue 01813 - Test bigip_virtual_server using profile fastL4 with partition name as dict - Idempotent check
assert:
that:
- result is not changed
- result is success


- name: Issue 01813 - Remove bigip_virtual_server - Idempotent check
bigip_virtual_server:
name: ANSIBLE_CREATED_THIS_VIRTUAL_SERVER
Expand All @@ -132,12 +130,12 @@
port: "443"
type: "performance-l4"
profiles:
- {name: fastL4, partition: Common}
- { name: fastL4, partition: Common }
source: "0.0.0.0/0"
snat: none
address_translation: True
port_translation: True
register: result
register: result

- name: Issue 01813 - Test bigip_virtual_server using profile fastL4 without partition name
bigip_virtual_server:
Expand All @@ -149,12 +147,12 @@
destination: "0.0.0.0/0"
port: "443"
type: "performance-l4"
profiles: ['fastL4']
profiles: ["fastL4"]
source: "0.0.0.0/0"
snat: none
address_translation: True
port_translation: True
register: result
register: result

- name: Issue 01813 - Test bigip_virtual_server using profile fastL4 without partition name
assert:
Expand All @@ -172,20 +170,19 @@
destination: "0.0.0.0/0"
port: "443"
type: "performance-l4"
profiles: ['fastL4']
profiles: ["fastL4"]
source: "0.0.0.0/0"
snat: none
address_translation: True
port_translation: True
register: result
register: result

- name: Issue 01813 - Test bigip_virtual_server using profile fastL4 without partition name - Idempotent check
assert:
that:
- result is not changed
- result is success


- name: Issue 01813 - Remove bigip_virtual_server - Idempotent check
bigip_virtual_server:
name: ANSIBLE_CREATED_THIS_VIRTUAL_SERVER
Expand All @@ -196,9 +193,9 @@
destination: "0.0.0.0/0"
port: "443"
type: "performance-l4"
profiles: ['fastL4']
profiles: ["fastL4"]
source: "0.0.0.0/0"
snat: none
address_translation: True
port_translation: True
register: result
register: result
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
- name: Issue 02434 - Create IPV4 network virtual server, mask specified - Provider
bigip_virtual_server:
name: bs_fastl4
port: 443
profiles:
- fastL4
type: performance-l4
state: enabled
provider: "{{ provider }}"

- name: Issue 02434 - Disable IPV4 network virtual server, mask specified - Provider
bigip_virtual_server:
name: bs_fastl4
port: 443
state: disabled
provider: "{{ provider }}"

- name: Issue 02434 - Delete IPV4 network virtual server, mask specified - Provider
bigip_virtual_server:
name: bs_fastl4
port: 443
state: absent
provider: "{{ provider }}"
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,12 @@

- import_tasks: sr-00458196.yaml
tags: sr-00458196

- import_tasks: issue-02434.yaml
tags: issue-02434

- import_tasks: issue-01813.yaml
tags: issue-01813

- import_tasks: issue-01519.yaml
tags: issue-01519