|
|
|
@ -19,7 +19,7 @@ __metaclass__ = type
|
|
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
import json
|
|
|
|
|
from pyFMG.fortimgr import FortiManager
|
|
|
|
|
from ansible.module_utils.network.fortimanager.fortimanager import FortiManagerHandler
|
|
|
|
|
import pytest
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
@ -27,8 +27,6 @@ try:
|
|
|
|
|
except ImportError:
|
|
|
|
|
pytest.skip("Could not load required modules for testing", allow_module_level=True)
|
|
|
|
|
|
|
|
|
|
fmg_instance = FortiManager("1.1.1.1", "admin", "")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def load_fixtures():
|
|
|
|
|
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') + "/{filename}.json".format(
|
|
|
|
@ -41,16 +39,109 @@ def load_fixtures():
|
|
|
|
|
return [fixture_data]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
|
|
|
def module_mock(mocker):
|
|
|
|
|
connection_class_mock = mocker.patch('ansible.module_utils.basic.AnsibleModule')
|
|
|
|
|
return connection_class_mock
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
|
|
|
def connection_mock(mocker):
|
|
|
|
|
connection_class_mock = mocker.patch('ansible.modules.network.fortimanager.fmgr_fwobj_vip.Connection')
|
|
|
|
|
return connection_class_mock
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture(scope="function", params=load_fixtures())
|
|
|
|
|
def fixture_data(request):
|
|
|
|
|
func_name = request.function.__name__.replace("test_", "")
|
|
|
|
|
return request.param.get(func_name, None)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
mocker.patch("pyFMG.fortimgr.FortiManager._post_request", side_effect=fixture_data)
|
|
|
|
|
fmg_instance = FortiManagerHandler(connection_mock, module_mock)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_fmgr_firewall_vip_modify(fixture_data, mocker):
|
|
|
|
|
mocker.patch("ansible.module_utils.network.fortimanager.fortimanager.FortiManagerHandler.process_request",
|
|
|
|
|
side_effect=fixture_data)
|
|
|
|
|
# Fixture sets used:###########################
|
|
|
|
|
|
|
|
|
|
##################################################
|
|
|
|
|
# comment: Created by Ansible
|
|
|
|
|
# ssl-send-empty-frags: None
|
|
|
|
|
# srcintf-filter: None
|
|
|
|
|
# ssl-max-version: None
|
|
|
|
|
# ssl-server-session-state-max: None
|
|
|
|
|
# ssl-hpkp: None
|
|
|
|
|
# mapped-addr: None
|
|
|
|
|
# ssl-client-session-state-timeout: None
|
|
|
|
|
# src-filter: None
|
|
|
|
|
# server-type: None
|
|
|
|
|
# ssl-hpkp-include-subdomains: None
|
|
|
|
|
# ssl-http-location-conversion: None
|
|
|
|
|
# https-cookie-secure: None
|
|
|
|
|
# mappedip: 10.7.220.25
|
|
|
|
|
# ssl-server-cipher-suites: {'priority': None, 'cipher': None, 'versions': None}
|
|
|
|
|
# protocol: tcp
|
|
|
|
|
# ssl-hpkp-backup: None
|
|
|
|
|
# ssl-dh-bits: None
|
|
|
|
|
# dns-mapping-ttl: None
|
|
|
|
|
# ssl-hsts-age: None
|
|
|
|
|
# extaddr: None
|
|
|
|
|
# ssl-client-renegotiation: None
|
|
|
|
|
# monitor: None
|
|
|
|
|
# service: None
|
|
|
|
|
# ssl-hpkp-age: None
|
|
|
|
|
# http-cookie-age: None
|
|
|
|
|
# weblogic-server: None
|
|
|
|
|
# http-cookie-share: None
|
|
|
|
|
# color: 17
|
|
|
|
|
# ssl-mode: None
|
|
|
|
|
# portforward: enable
|
|
|
|
|
# http-multiplex: None
|
|
|
|
|
# http-cookie-generation: None
|
|
|
|
|
# ssl-client-fallback: None
|
|
|
|
|
# extip: 82.72.192.185
|
|
|
|
|
# extintf: any
|
|
|
|
|
# persistence: None
|
|
|
|
|
# websphere-server: None
|
|
|
|
|
# nat-source-vip: None
|
|
|
|
|
# portmapping-type: None
|
|
|
|
|
|
|
|
|
|
# adom: ansible
|
|
|
|
|
# ssl-client-session-state-max: None
|
|
|
|
|
# http-ip-header: None
|
|
|
|
|
# http-ip-header-name: None
|
|
|
|
|
# ssl-certificate: None
|
|
|
|
|
# ssl-hsts: None
|
|
|
|
|
# arp-reply: None
|
|
|
|
|
# ssl-hsts-include-subdomains: None
|
|
|
|
|
# ssl-min-version: None
|
|
|
|
|
# ldb-method: None
|
|
|
|
|
# ssl-server-session-state-timeout: None
|
|
|
|
|
# ssl-server-min-version: None
|
|
|
|
|
# http-cookie-domain: None
|
|
|
|
|
# mappedport: 443
|
|
|
|
|
# name: Basic PNAT Map Port 10443
|
|
|
|
|
# ssl-cipher-suites: {'cipher': None, 'versions': None}
|
|
|
|
|
# ssl-hpkp-primary: None
|
|
|
|
|
# outlook-web-access: None
|
|
|
|
|
# ssl-server-session-state-type: None
|
|
|
|
|
# ssl-client-session-state-type: None
|
|
|
|
|
|
|
|
|
|
# ssl-http-match-host: None
|
|
|
|
|
|
|
|
|
|
# ssl-server-max-version: None
|
|
|
|
|
# ssl-hpkp-report-uri: None
|
|
|
|
|
# http-cookie-domain-from-host: None
|
|
|
|
|
# ssl-algorithm: None
|
|
|
|
|
# gratuitous-arp-interval: None
|
|
|
|
|
# extport: 10443
|
|
|
|
|
# max-embryonic-connections: None
|
|
|
|
|
# mode: set
|
|
|
|
|
# http-cookie-path: None
|
|
|
|
|
# ssl-pfs: None
|
|
|
|
|
# ssl-server-algorithm: None
|
|
|
|
|
##################################################
|
|
|
|
|
##################################################
|
|
|
|
|
# comment: Created by Ansible
|
|
|
|
|
# ssl-send-empty-frags: None
|
|
|
|
@ -98,6 +189,7 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# weblogic-server: None
|
|
|
|
|
# ssl-client-session-state-max: None
|
|
|
|
|
# http-ip-header: None
|
|
|
|
|
|
|
|
|
|
# ssl-hsts: None
|
|
|
|
|
# arp-reply: None
|
|
|
|
|
# extaddr: None
|
|
|
|
@ -113,8 +205,9 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# name: Basic DNS Translation
|
|
|
|
|
# ssl-server-session-state-type: None
|
|
|
|
|
# ssl-client-session-state-type: None
|
|
|
|
|
# # type: "dns-translation"
|
|
|
|
|
|
|
|
|
|
# ssl-http-match-host: None
|
|
|
|
|
|
|
|
|
|
# ssl-pfs: None
|
|
|
|
|
# ssl-server-max-version: None
|
|
|
|
|
# ssl-client-session-state-timeout: None
|
|
|
|
@ -133,7 +226,7 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# ssl-max-version: None
|
|
|
|
|
# ssl-server-session-state-max: None
|
|
|
|
|
# ssl-hpkp: None
|
|
|
|
|
# mapped-addr: None
|
|
|
|
|
# mapped-addr: google-play
|
|
|
|
|
# ssl-client-session-state-timeout: None
|
|
|
|
|
# src-filter: None
|
|
|
|
|
# ldb-method: None
|
|
|
|
@ -142,7 +235,7 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# ssl-client-renegotiation: None
|
|
|
|
|
# ssl-http-location-conversion: None
|
|
|
|
|
# https-cookie-secure: None
|
|
|
|
|
# mappedip: 10.7.220.25
|
|
|
|
|
# mappedip: None
|
|
|
|
|
# ssl-server-cipher-suites: {'priority': None, 'cipher': None, 'versions': None}
|
|
|
|
|
# protocol: None
|
|
|
|
|
# ssl-hpkp-backup: None
|
|
|
|
@ -156,17 +249,18 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# http-cookie-age: None
|
|
|
|
|
# weblogic-server: None
|
|
|
|
|
# http-cookie-share: None
|
|
|
|
|
# color: 17
|
|
|
|
|
# color: 5
|
|
|
|
|
# ssl-mode: None
|
|
|
|
|
# portforward: None
|
|
|
|
|
# http-cookie-generation: None
|
|
|
|
|
# ssl-client-fallback: None
|
|
|
|
|
# extip: 82.72.192.185
|
|
|
|
|
# extintf: any
|
|
|
|
|
# extip: None
|
|
|
|
|
# extintf: None
|
|
|
|
|
# persistence: None
|
|
|
|
|
# websphere-server: None
|
|
|
|
|
# nat-source-vip: None
|
|
|
|
|
# portmapping-type: None
|
|
|
|
|
|
|
|
|
|
# adom: ansible
|
|
|
|
|
# ssl-client-session-state-max: None
|
|
|
|
|
# http-ip-header: None
|
|
|
|
@ -181,14 +275,15 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# ssl-server-min-version: None
|
|
|
|
|
# http-cookie-domain: None
|
|
|
|
|
# mappedport: None
|
|
|
|
|
# name: Basic StaticNAT Map
|
|
|
|
|
# name: Basic FQDN Translation
|
|
|
|
|
# ssl-cipher-suites: {'cipher': None, 'versions': None}
|
|
|
|
|
# ssl-hpkp-primary: None
|
|
|
|
|
# outlook-web-access: None
|
|
|
|
|
# ssl-server-session-state-type: None
|
|
|
|
|
# ssl-client-session-state-type: None
|
|
|
|
|
# # type: static-nat
|
|
|
|
|
|
|
|
|
|
# ssl-http-match-host: None
|
|
|
|
|
|
|
|
|
|
# ssl-server-max-version: None
|
|
|
|
|
# ssl-hpkp-report-uri: None
|
|
|
|
|
# http-cookie-domain-from-host: None
|
|
|
|
@ -213,12 +308,12 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# server-type: None
|
|
|
|
|
# mode: set
|
|
|
|
|
# ssl-hpkp-include-subdomains: None
|
|
|
|
|
# extport: 10443
|
|
|
|
|
# extport: None
|
|
|
|
|
# ssl-http-location-conversion: None
|
|
|
|
|
# https-cookie-secure: None
|
|
|
|
|
# mappedip: 10.7.220.25
|
|
|
|
|
# ssl-server-cipher-suites: {'priority': None, 'cipher': None, 'versions': None}
|
|
|
|
|
# protocol: tcp
|
|
|
|
|
# protocol: None
|
|
|
|
|
# ssl-hpkp-backup: None
|
|
|
|
|
# ssl-dh-bits: None
|
|
|
|
|
# dns-mapping-ttl: None
|
|
|
|
@ -234,7 +329,7 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# ssl-server-session-state-timeout: None
|
|
|
|
|
# color: 17
|
|
|
|
|
# ssl-mode: None
|
|
|
|
|
# portforward: enable
|
|
|
|
|
# portforward: None
|
|
|
|
|
# http-cookie-generation: None
|
|
|
|
|
# max-embryonic-connections: None
|
|
|
|
|
# ssl-client-fallback: None
|
|
|
|
@ -249,6 +344,7 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# weblogic-server: None
|
|
|
|
|
# ssl-client-session-state-max: None
|
|
|
|
|
# http-ip-header: None
|
|
|
|
|
|
|
|
|
|
# ssl-hsts: None
|
|
|
|
|
# arp-reply: None
|
|
|
|
|
# ssl-client-renegotiation: None
|
|
|
|
@ -257,15 +353,16 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# ssl-certificate: None
|
|
|
|
|
# ssl-server-min-version: None
|
|
|
|
|
# http-cookie-domain: None
|
|
|
|
|
# mappedport: 443
|
|
|
|
|
# mappedport: None
|
|
|
|
|
# outlook-web-access: None
|
|
|
|
|
# ssl-cipher-suites: {'cipher': None, 'versions': None}
|
|
|
|
|
# ssl-hpkp-primary: None
|
|
|
|
|
# name: Basic PNAT Map Port 10443
|
|
|
|
|
# name: Basic StaticNAT Map
|
|
|
|
|
# ssl-server-session-state-type: None
|
|
|
|
|
# ssl-client-session-state-type: None
|
|
|
|
|
# # type: static-nat
|
|
|
|
|
|
|
|
|
|
# ssl-http-match-host: None
|
|
|
|
|
|
|
|
|
|
# ssl-pfs: None
|
|
|
|
|
# ssl-client-session-state-timeout: None
|
|
|
|
|
# http-cookie-domain-from-host: None
|
|
|
|
@ -283,7 +380,7 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# ssl-max-version: None
|
|
|
|
|
# ssl-server-session-state-max: None
|
|
|
|
|
# ssl-hpkp: None
|
|
|
|
|
# mapped-addr: google-play
|
|
|
|
|
# mapped-addr: None
|
|
|
|
|
# ssl-client-session-state-timeout: None
|
|
|
|
|
# src-filter: None
|
|
|
|
|
# server-type: None
|
|
|
|
@ -291,9 +388,9 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# ssl-client-renegotiation: None
|
|
|
|
|
# ssl-http-location-conversion: None
|
|
|
|
|
# https-cookie-secure: None
|
|
|
|
|
# mappedip: None
|
|
|
|
|
# mappedip: 10.7.220.25
|
|
|
|
|
# ssl-server-cipher-suites: {'priority': None, 'cipher': None, 'versions': None}
|
|
|
|
|
# protocol: None
|
|
|
|
|
# protocol: tcp
|
|
|
|
|
# ssl-hpkp-backup: None
|
|
|
|
|
# ssl-dh-bits: None
|
|
|
|
|
# dns-mapping-ttl: None
|
|
|
|
@ -305,17 +402,18 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# http-cookie-age: None
|
|
|
|
|
# weblogic-server: None
|
|
|
|
|
# http-cookie-share: None
|
|
|
|
|
# color: 5
|
|
|
|
|
# color: 17
|
|
|
|
|
# ssl-mode: None
|
|
|
|
|
# portforward: None
|
|
|
|
|
# portforward: enable
|
|
|
|
|
# http-cookie-generation: None
|
|
|
|
|
# ssl-client-fallback: None
|
|
|
|
|
# extip: None
|
|
|
|
|
# extintf: None
|
|
|
|
|
# extip: 82.72.192.185
|
|
|
|
|
# extintf: any
|
|
|
|
|
# persistence: None
|
|
|
|
|
# websphere-server: None
|
|
|
|
|
# nat-source-vip: None
|
|
|
|
|
# portmapping-type: None
|
|
|
|
|
|
|
|
|
|
# adom: ansible
|
|
|
|
|
# ssl-client-session-state-max: None
|
|
|
|
|
# http-ip-header: None
|
|
|
|
@ -330,21 +428,22 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# ssl-server-session-state-timeout: None
|
|
|
|
|
# ssl-server-min-version: None
|
|
|
|
|
# http-cookie-domain: None
|
|
|
|
|
# mappedport: None
|
|
|
|
|
# name: Basic FQDN Translation
|
|
|
|
|
# mappedport: 443
|
|
|
|
|
# name: Basic PNAT Map Port 10443
|
|
|
|
|
# ssl-cipher-suites: {'cipher': None, 'versions': None}
|
|
|
|
|
# ssl-hpkp-primary: None
|
|
|
|
|
# outlook-web-access: None
|
|
|
|
|
# ssl-server-session-state-type: None
|
|
|
|
|
# ssl-client-session-state-type: None
|
|
|
|
|
# # type: fqdn
|
|
|
|
|
|
|
|
|
|
# ssl-http-match-host: None
|
|
|
|
|
|
|
|
|
|
# ssl-server-max-version: None
|
|
|
|
|
# ssl-hpkp-report-uri: None
|
|
|
|
|
# http-cookie-domain-from-host: None
|
|
|
|
|
# ssl-algorithm: None
|
|
|
|
|
# gratuitous-arp-interval: None
|
|
|
|
|
# extport: None
|
|
|
|
|
# extport: 10443
|
|
|
|
|
# max-embryonic-connections: None
|
|
|
|
|
# mode: set
|
|
|
|
|
# http-cookie-path: None
|
|
|
|
@ -398,6 +497,7 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# weblogic-server: None
|
|
|
|
|
# ssl-client-session-state-max: None
|
|
|
|
|
# http-ip-header: None
|
|
|
|
|
|
|
|
|
|
# ssl-hsts: None
|
|
|
|
|
# arp-reply: None
|
|
|
|
|
# ssl-client-renegotiation: None
|
|
|
|
@ -413,8 +513,9 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# name: Basic PNAT Map Port 10443
|
|
|
|
|
# ssl-server-session-state-type: None
|
|
|
|
|
# ssl-client-session-state-type: None
|
|
|
|
|
# # type: None
|
|
|
|
|
|
|
|
|
|
# ssl-http-match-host: None
|
|
|
|
|
|
|
|
|
|
# ssl-pfs: None
|
|
|
|
|
# ssl-server-max-version: None
|
|
|
|
|
# ssl-client-session-state-timeout: None
|
|
|
|
@ -467,6 +568,7 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# websphere-server: None
|
|
|
|
|
# nat-source-vip: None
|
|
|
|
|
# portmapping-type: None
|
|
|
|
|
|
|
|
|
|
# adom: ansible
|
|
|
|
|
# ssl-client-session-state-max: None
|
|
|
|
|
# http-ip-header: None
|
|
|
|
@ -487,8 +589,9 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# outlook-web-access: None
|
|
|
|
|
# ssl-server-session-state-type: None
|
|
|
|
|
# ssl-client-session-state-type: None
|
|
|
|
|
# # type: None
|
|
|
|
|
|
|
|
|
|
# ssl-http-match-host: None
|
|
|
|
|
|
|
|
|
|
# ssl-server-max-version: None
|
|
|
|
|
# ssl-hpkp-report-uri: None
|
|
|
|
|
# http-cookie-domain-from-host: None
|
|
|
|
@ -549,7 +652,8 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# http-ip-header-name: None
|
|
|
|
|
# weblogic-server: None
|
|
|
|
|
# ssl-client-session-state-max: None
|
|
|
|
|
# http-ip-header: None # ssl-hsts: None
|
|
|
|
|
# http-ip-header: None
|
|
|
|
|
# ssl-hsts: None
|
|
|
|
|
# arp-reply: None
|
|
|
|
|
# extaddr: None
|
|
|
|
|
# ssl-hpkp-primary: None
|
|
|
|
@ -563,7 +667,7 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# ssl-client-session-state-type: None
|
|
|
|
|
# name: Basic DNS Translation
|
|
|
|
|
# ssl-server-session-state-type: None
|
|
|
|
|
# # type: None
|
|
|
|
|
|
|
|
|
|
# ssl-http-match-host: None
|
|
|
|
|
# ssl-pfs: None
|
|
|
|
|
# ssl-client-session-state-timeout: None
|
|
|
|
@ -612,7 +716,7 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# portforward: None
|
|
|
|
|
# http-cookie-generation: None
|
|
|
|
|
# ssl-client-fallback: None
|
|
|
|
|
# # type: None
|
|
|
|
|
|
|
|
|
|
# http-ip-header: None
|
|
|
|
|
# persistence: None
|
|
|
|
|
# websphere-server: None
|
|
|
|
@ -637,6 +741,8 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
# ssl-cipher-suites: {'cipher': None, 'versions': None}
|
|
|
|
|
# ssl-client-session-state-type: None
|
|
|
|
|
# ssl-http-match-host: None
|
|
|
|
|
|
|
|
|
|
# ssl-client-session-state-timeout: None
|
|
|
|
|
# comment: None
|
|
|
|
|
# ssl-hpkp-report-uri: None
|
|
|
|
|
# http-cookie-domain-from-host: None
|
|
|
|
@ -651,26 +757,29 @@ def test_fmgr_firewall_vip_addsetdelete(fixture_data, mocker):
|
|
|
|
|
##################################################
|
|
|
|
|
|
|
|
|
|
# Test using fixture 1 #
|
|
|
|
|
output = fmgr_fwobj_vip.fmgr_firewall_vip_addsetdelete(fmg_instance, fixture_data[0]['paramgram_used'])
|
|
|
|
|
output = fmgr_fwobj_vip.fmgr_firewall_vip_modify(fmg_instance, fixture_data[0]['paramgram_used'])
|
|
|
|
|
assert output['raw_response']['status']['code'] == 0
|
|
|
|
|
# Test using fixture 2 #
|
|
|
|
|
output = fmgr_fwobj_vip.fmgr_firewall_vip_addsetdelete(fmg_instance, fixture_data[1]['paramgram_used'])
|
|
|
|
|
assert output['raw_response']['status']['code'] == 0
|
|
|
|
|
output = fmgr_fwobj_vip.fmgr_firewall_vip_modify(fmg_instance, fixture_data[1]['paramgram_used'])
|
|
|
|
|
assert output['raw_response']['status']['code'] == -10131
|
|
|
|
|
# Test using fixture 3 #
|
|
|
|
|
output = fmgr_fwobj_vip.fmgr_firewall_vip_addsetdelete(fmg_instance, fixture_data[2]['paramgram_used'])
|
|
|
|
|
output = fmgr_fwobj_vip.fmgr_firewall_vip_modify(fmg_instance, fixture_data[2]['paramgram_used'])
|
|
|
|
|
assert output['raw_response']['status']['code'] == 0
|
|
|
|
|
# Test using fixture 4 #
|
|
|
|
|
output = fmgr_fwobj_vip.fmgr_firewall_vip_addsetdelete(fmg_instance, fixture_data[3]['paramgram_used'])
|
|
|
|
|
output = fmgr_fwobj_vip.fmgr_firewall_vip_modify(fmg_instance, fixture_data[3]['paramgram_used'])
|
|
|
|
|
assert output['raw_response']['status']['code'] == 0
|
|
|
|
|
# Test using fixture 5 #
|
|
|
|
|
output = fmgr_fwobj_vip.fmgr_firewall_vip_addsetdelete(fmg_instance, fixture_data[4]['paramgram_used'])
|
|
|
|
|
output = fmgr_fwobj_vip.fmgr_firewall_vip_modify(fmg_instance, fixture_data[4]['paramgram_used'])
|
|
|
|
|
assert output['raw_response']['status']['code'] == 0
|
|
|
|
|
# Test using fixture 6 #
|
|
|
|
|
output = fmgr_fwobj_vip.fmgr_firewall_vip_addsetdelete(fmg_instance, fixture_data[5]['paramgram_used'])
|
|
|
|
|
output = fmgr_fwobj_vip.fmgr_firewall_vip_modify(fmg_instance, fixture_data[5]['paramgram_used'])
|
|
|
|
|
assert output['raw_response']['status']['code'] == 0
|
|
|
|
|
# Test using fixture 7 #
|
|
|
|
|
output = fmgr_fwobj_vip.fmgr_firewall_vip_addsetdelete(fmg_instance, fixture_data[6]['paramgram_used'])
|
|
|
|
|
output = fmgr_fwobj_vip.fmgr_firewall_vip_modify(fmg_instance, fixture_data[6]['paramgram_used'])
|
|
|
|
|
assert output['raw_response']['status']['code'] == 0
|
|
|
|
|
# Test using fixture 8 #
|
|
|
|
|
output = fmgr_fwobj_vip.fmgr_firewall_vip_addsetdelete(fmg_instance, fixture_data[7]['paramgram_used'])
|
|
|
|
|
output = fmgr_fwobj_vip.fmgr_firewall_vip_modify(fmg_instance, fixture_data[7]['paramgram_used'])
|
|
|
|
|
assert output['raw_response']['status']['code'] == -3
|
|
|
|
|
# Test using fixture 9 #
|
|
|
|
|
output = fmgr_fwobj_vip.fmgr_firewall_vip_modify(fmg_instance, fixture_data[8]['paramgram_used'])
|
|
|
|
|
assert output['raw_response']['status']['code'] == 0
|
|
|
|
|