From 00315cbac45bdffe0cfd3174a4b0871ccb610b97 Mon Sep 17 00:00:00 2001 From: soumaya Date: Tue, 12 Sep 2017 22:49:21 +0530 Subject: vEPC tests with juju as an VNF manager juju_epc testcase validate EPC setup with the help of ABoT which acting as test executor. Functest-abot-epc-bundle deploys OAI charms alongwith mysql and ABoT. JUJU is acting as a VNF manager. Change-Id: I45d7b37f21f6b8c7049ab2bf42a4678e30b67a72 Signed-off-by: soumaya --- docker/restapi/Dockerfile | 9 +- docker/vnf/Dockerfile | 16 +- docker/vnf/testcases.yaml | 16 + functest/ci/config_functest.yaml | 11 +- functest/ci/testcases.yaml | 16 + functest/opnfv_tests/vnf/epc/__init__.py | 0 .../epc/featureFiles/000-local-commands.feature | 12 + .../Attach_Procedure_AttachWithIMSI.feature | 39 ++ ...tach_Procedure_AttachWithIMSI_Wrong_MCC.feature | 32 ++ ...tach_Procedure_AttachWithIMSI_Wrong_MNC.feature | 33 ++ ...tach_Procedure_AttachWithIMSI_Wrong_TAC.feature | 33 ++ .../Attach_Procedure_Attach_With_GUTI.feature | 36 ++ ..._Procedure_With_DNS_Server_Addr_Request.feature | 44 ++ ..._Procedure_With_DSMIPv6_HA_Addr_Request.feature | 44 ++ ...rocedure_With_DSMIPv6_HN_Prefix_Request.feature | 44 ++ ...edure_With_DSMIPv6_IPv4_HA_Addr_Request.feature | 44 ++ ...Procedure_With_IM_CN_SS_Signalling_Flag.feature | 44 ++ ...ach_Procedure_With_IP_Addr_Alloc_DHCPv4.feature | 44 ++ ...edure_With_IP_Addr_Alloc_NAS_Signalling.feature | 44 ++ ..._With_MS_Support_Bearer_Ctrl_Indication.feature | 44 ++ ...tach_Procedure_With_P_CSCF_Addr_Request.feature | 44 ++ .../vnf/epc/featureFiles/Auth_Accept.feature | 45 ++ ...y_Network_GUTIattach_AuthReject_re_Auth.feature | 47 ++ ..._GUTIattach_IMSIdiff_AuthReject_re_Auth.feature | 38 ++ ...y_Network_IMSIattach_AuthReject_re_Auth.feature | 62 +++ ...ccept_by_UE_GUTIattach_MAC_code_failure.feature | 45 ++ ...ccept_by_UE_IMSIattach_MAC_code_failure.feature | 42 ++ .../Auth_NotAccept_by_UE_SQN_failure.feature | 46 ++ ...uth_NotAccept_by_UE_non_EPS_AuthUnaccpt.feature | 45 ++ .../vnf/epc/featureFiles/ResourceBundle.xml | 4 + functest/opnfv_tests/vnf/epc/juju_epc.py | 502 +++++++++++++++++++++ functest/opnfv_tests/vnf/epc/juju_epc.yaml | 32 ++ functest/tests/unit/vnf/epc/test_juju_epc.py | 95 ++++ 33 files changed, 1645 insertions(+), 7 deletions(-) create mode 100644 functest/opnfv_tests/vnf/epc/__init__.py create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/000-local-commands.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_AttachWithIMSI.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_AttachWithIMSI_Wrong_MCC.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_AttachWithIMSI_Wrong_MNC.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_AttachWithIMSI_Wrong_TAC.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_Attach_With_GUTI.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_DNS_Server_Addr_Request.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_DSMIPv6_HA_Addr_Request.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_DSMIPv6_HN_Prefix_Request.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_DSMIPv6_IPv4_HA_Addr_Request.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_IM_CN_SS_Signalling_Flag.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_IP_Addr_Alloc_DHCPv4.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_IP_Addr_Alloc_NAS_Signalling.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_MS_Support_Bearer_Ctrl_Indication.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_P_CSCF_Addr_Request.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Auth_Accept.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_Network_GUTIattach_AuthReject_re_Auth.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_Network_GUTIattach_IMSIdiff_AuthReject_re_Auth.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_Network_IMSIattach_AuthReject_re_Auth.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_UE_GUTIattach_MAC_code_failure.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_UE_IMSIattach_MAC_code_failure.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_UE_SQN_failure.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_UE_non_EPS_AuthUnaccpt.feature create mode 100644 functest/opnfv_tests/vnf/epc/featureFiles/ResourceBundle.xml create mode 100644 functest/opnfv_tests/vnf/epc/juju_epc.py create mode 100644 functest/opnfv_tests/vnf/epc/juju_epc.yaml create mode 100644 functest/tests/unit/vnf/epc/test_juju_epc.py diff --git a/docker/restapi/Dockerfile b/docker/restapi/Dockerfile index 81b79fd86..b36525f95 100644 --- a/docker/restapi/Dockerfile +++ b/docker/restapi/Dockerfile @@ -12,7 +12,7 @@ ARG VIMS_TAG=stable COPY thirdparty-requirements.txt thirdparty-requirements.txt RUN apk --no-cache add --update python3 sshpass \ ruby ruby-bundler ruby-irb ruby-rdoc dnsmasq \ - procps libxslt libxml2 zlib libffi && \ + procps libxslt libxml2 zlib libffi go musl-dev && \ apk --no-cache add --virtual .build-deps --update \ python-dev python3-dev build-base linux-headers libffi-dev \ openssl-dev libjpeg-turbo-dev \ @@ -45,9 +45,14 @@ RUN apk --no-cache add --update python3 sshpass \ git clone --depth 1 -b $VIMS_TAG https://github.com/boucherv-orange/clearwater-live-test /src/vims-test && \ ln -s /src/tempest /src/refstack-client/.tempest && \ virtualenv --system-site-packages /src/tempest/.venv --python=python2.7 && \ + git clone https://github.com/RebacaInc/abot_charm.git /src/epc-requirements/abot_charm && \ + python3 -m pip install --no-cache-dir --src /src -cupper-constraints.txt \ + -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \ + juju-wait && \ + go get github.com/rogpeppe/godeps && \ (cd /src/vims-test && bundle config build.nokogiri --use-system-libraries && bundle install --system) && \ rm -r upper-constraints.txt thirdparty-requirements.txt /src/refstack-client/.git /src/odl_test/.git \ - /src/os-faults /src/rally /src/fds/.git /src/vims-test/.git && \ + /src/os-faults /src/rally /src/fds/.git /src/vims-test/.git /src/epc-requirements/abot_charm/.git && \ mkdir -p /etc/rally && \ printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \ mkdir -p /var/lib/rally/database && rally db create && \ diff --git a/docker/vnf/Dockerfile b/docker/vnf/Dockerfile index ac3b8dab0..6d96d98a5 100644 --- a/docker/vnf/Dockerfile +++ b/docker/vnf/Dockerfile @@ -1,15 +1,25 @@ FROM opnfv/functest-core +ARG BRANCH=master +ARG OPENSTACK_TAG=stable/pike ARG VIMS_TAG=stable RUN apk --no-cache add --update \ ruby ruby-bundler ruby-irb ruby-rdoc dnsmasq \ - procps libxslt libxml2 zlib libffi && \ + procps libxslt libxml2 zlib libffi python3 go musl-dev && \ apk --no-cache add --virtual .build-deps --update \ ruby-dev g++ make libxslt-dev libxml2-dev zlib-dev libffi-dev && \ + wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG | \ + sed -E s/^tempest==+\(.*\)$/-e\ git+https:\\/\\/github.com\\/openstack\\/tempest@\\1#egg=tempest/ | \ + > upper-constraints.txt && \ git clone --depth 1 -b $VIMS_TAG https://github.com/boucherv-orange/clearwater-live-test /src/vims-test && \ - rm -r /src/vims-test/.git && \ - cd /src/vims-test && bundle config build.nokogiri --use-system-libraries && bundle install --system && \ + git clone https://github.com/RebacaInc/abot_charm.git /src/epc-requirements/abot_charm && \ + python3 -m pip install --no-cache-dir --src /src -cupper-constraints.txt \ + -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \ + juju-wait && \ + go get github.com/rogpeppe/godeps && \ + (cd /src/vims-test && bundle config build.nokogiri --use-system-libraries && bundle install --system) && \ + rm -r upper-constraints.txt /src/vims-test/.git /src/epc-requirements/abot_charm/.git && \ apk del .build-deps COPY testcases.yaml /usr/lib/python2.7/site-packages/functest/ci/testcases.yaml CMD ["run_tests", "-t", "all"] diff --git a/docker/vnf/testcases.yaml b/docker/vnf/testcases.yaml index d235c1df9..f4318d780 100644 --- a/docker/vnf/testcases.yaml +++ b/docker/vnf/testcases.yaml @@ -65,3 +65,19 @@ tiers: module: 'functest.opnfv_tests.vnf.ims.orchestra_clearwaterims' class: 'ClearwaterImsVnf' + + - + case_name: juju_epc + enabled: true + project_name: functest + criteria: 100 + blocking: false + description: >- + vEPC validation with Juju as VNF manager and ABoT as test + executor. + dependencies: + installer: '' + scenario: 'os-nosdn-nofeature-ha' + run: + module: 'functest.opnfv_tests.vnf.epc.juju_epc' + class: 'JujuEpc' diff --git a/functest/ci/config_functest.yaml b/functest/ci/config_functest.yaml index 8f9bd0d3a..315c6c9c3 100644 --- a/functest/ci/config_functest.yaml +++ b/functest/ci/config_functest.yaml @@ -141,9 +141,16 @@ rally: vnf: juju_epc: - tenant_name: epc + config: juju_epc.yaml tenant_description: OAI EPC deployed with Juju - tenant_images: {} + tenant_name: abotepc + private_net_name: abot-net + private_subnet_cidr: 172.16.0.0/24 + private_subnet_name: abot-subnet + external_router: abot-router + external_network_name: ext-net + dns_nameserver: ['8.8.8.8'] + cloudify_ims: tenant_name: cloudify_ims tenant_description: vIMS diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml index 7ea03e159..5245079e6 100644 --- a/functest/ci/testcases.yaml +++ b/functest/ci/testcases.yaml @@ -405,3 +405,19 @@ tiers: module: 'functest.opnfv_tests.vnf.ims.orchestra_clearwaterims' class: 'ClearwaterImsVnf' + + - + case_name: juju_epc + enabled: true + project_name: functest + criteria: 100 + blocking: false + description: >- + vEPC validation with Juju as VNF manager and ABoT as test + executor. + dependencies: + installer: '' + scenario: 'os-nosdn-nofeature-ha' + run: + module: 'functest.opnfv_tests.vnf.epc.juju_epc' + class: 'JujuEpc' diff --git a/functest/opnfv_tests/vnf/epc/__init__.py b/functest/opnfv_tests/vnf/epc/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/000-local-commands.feature b/functest/opnfv_tests/vnf/epc/featureFiles/000-local-commands.feature new file mode 100644 index 000000000..438e2c0e7 --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/000-local-commands.feature @@ -0,0 +1,12 @@ + Feature: Local_Commands_Testing + + @local-commands + Scenario: Local Commands testing + Given all configured endpoints for SSH are connected successfully + When I execute the command ifconfig in this system and check the presence of following strings in the response: + | responseResult | existence | + | inet | {string:nocase:present} | + | UP | {string:nocase:present} | + | BROADCAST | {string:nocase:present} | + | RUNNING | {string:nocase:present} | + | MULTICAST | {string:nocase:present} | diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_AttachWithIMSI.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_AttachWithIMSI.feature new file mode 100644 index 000000000..678315804 --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_AttachWithIMSI.feature @@ -0,0 +1,39 @@ +############################################################################################################################ +# Date: <22/08/2016> Version: <1.1> # +############################################################################################################################ + +Feature:Attach_Procedure_AttachWithIMSI + +@attach-procedure @Attach_Procedure_AttachWithIMSI @TS_24_301 @24_301_5_5 @24_301_5_5_1_2_2 @TS_24_368 @24_368_4 @24_368-5_4 @Series-0000 + +Scenario: Attach Procedure Success configured with AttachWithIMSI when Selected PLMN is neither the registered PLMN nor in the list of equivalent PLMNs + +Given all configured endpoints for SSH are connected successfully + +Given the steps below will be executed at the end +When I stop S1AP simulator on node ABOT +When I run the SSH command "sudo service mme_gw restart" on node MME +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds +Then the ending steps are complete + +# Set ABOT configuration +Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT +Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=true" on node ABOT + +# Execute ABOT S1AP Simulator +When I run S1AP simulator on node ABOT with 1 UE + +# Wait for execution to complete before checking results +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + +# Validate Test Case Execution at Simulator +Then I receive S1AP response on node ABOT and verify the presence of all the following values: +| responseResult | existence | +| Send Attach Request message with IMSI | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Security Mode Command message | {string:nocase:present} | +| Send Security Mode Complete message | {string:nocase:present} | +| Received Attach Accept message | {string:nocase:present} | diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_AttachWithIMSI_Wrong_MCC.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_AttachWithIMSI_Wrong_MCC.feature new file mode 100644 index 000000000..4e3cfd7b6 --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_AttachWithIMSI_Wrong_MCC.feature @@ -0,0 +1,32 @@ +############################################################################################################################ +# Date: <31/08/2016> Version: <1.1> # +############################################################################################################################ + +Feature:Attach_Procedure_AttachWithIMSI_Wrong_MCC + +@attach-procedure @Attach_Procedure_AttachWithIMSI_Wrong_MCC @TS_24_301 @24_301_5_5 @24_301_5_5_1_2_2 @TS_24_368 @24_368_4 @24_368-5_4 @Series-0000 + +Scenario: Attach Procedure Failure due to wrong MCC. + +Given all configured endpoints for SSH are connected successfully + +Given the steps below will be executed at the end +When I stop S1AP simulator on node ABOT +When I run the SSH command "sudo service mme_gw restart" on node MME +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds +Then the ending steps are complete + +# set ABOT configuration +Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT +Given that I setup S1AP Simulator with EPC parameter "ABOT.ENB.mobile_country_code=201" on node ABOT + +# Execute ABOT S1AP Simulator +When I run S1AP simulator on node ABOT with 1 UE + +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + +# Validate Test Case Execution at Simulator +Then I receive S1AP response on node ABOT and verify the presence of all the following values: +| responseResult | existence | +| Received s1 setup failure for MME | {string:nocase:present} | + diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_AttachWithIMSI_Wrong_MNC.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_AttachWithIMSI_Wrong_MNC.feature new file mode 100644 index 000000000..6082db06f --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_AttachWithIMSI_Wrong_MNC.feature @@ -0,0 +1,33 @@ +############################################################################################################################ +# Date: <31/08/2016> Version: <1.1> # +############################################################################################################################ + +Feature:Attach_Procedure_AttachWithIMSI_Wrong_MNC + +@attach-procedure @Attach_Procedure_AttachWithIMSI_Wrong_MNC @TS_24_301 @24_301_5_5 @24_301_5_5_1_2_2 @TS_24_368 @24_368_4 @24_368-5_4 @Series-0000 + +Scenario: Attach Procedure Failure due to wrong MNC. + +Given all configured endpoints for SSH are connected successfully + +Given the steps below will be executed at the end +When I stop S1AP simulator on node ABOT +When I run the SSH command "sudo service mme_gw restart" on node MME +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds +Then the ending steps are complete + +# set ABOT configuration +Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT +Given that I setup S1AP Simulator with EPC parameter "ABOT.ENB.mobile_network_code=95" on node ABOT + +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + +# Execute ABOT S1AP Simulator +When I run S1AP simulator on node ABOT with 1 UE + +# Validate Test Case Execution at Simulator +Then I receive S1AP response on node ABOT and verify the presence of all the following values: +| responseResult | existence | +| Received s1 setup failure for MME | {string:nocase:present} | + + diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_AttachWithIMSI_Wrong_TAC.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_AttachWithIMSI_Wrong_TAC.feature new file mode 100644 index 000000000..855ffd632 --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_AttachWithIMSI_Wrong_TAC.feature @@ -0,0 +1,33 @@ +############################################################################################################################ +# Date: <31/08/2016> Version: <1.1> # +############################################################################################################################ + +Feature:Attach_Procedure_AttachWithIMSI_Wrong_TAC + +@attach-procedure @Attach_Procedure_AttachWithIMSI_Wrong_TAC @TS_24_301 @24_301_5_5 @24_301_5_5_1_2_2 @TS_24_368 @24_368_4 @24_368-5_4 @Series-0000 + +Scenario: Attach Procedure Failure due to wrong TAC + +Given all configured endpoints for SSH are connected successfully + +Given the steps below will be executed at the end +When I stop S1AP simulator on node ABOT +When I run the SSH command "sudo service mme_gw restart" on node MME +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds +Then the ending steps are complete + +# set ABOT configuration +Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT +Given that I setup S1AP Simulator with EPC parameter "ABOT.ENB.tracking_area_code=10" on node ABOT + +# Execute ABOT S1AP Simulator +When I run S1AP simulator on node ABOT with 1 UE + +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + +# Validate Test Case Execution at Simulator +Then I receive S1AP response on node ABOT and verify the presence of all the following values: +| responseResult | existence | +| Received s1 setup failure for MME | {string:nocase:present} | + + diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_Attach_With_GUTI.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_Attach_With_GUTI.feature new file mode 100644 index 000000000..d6ca03691 --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_Attach_With_GUTI.feature @@ -0,0 +1,36 @@ +############################################################################################################################ +# Date: <31/08/2016> Version: <1.1> # +############################################################################################################################ + +Feature:Attach_Procedure_Attach_With_GUTI + +@attach-procedure @Attach_Procedure_Attach_With_GUTI @TS_24_301 @24_301_5_5 @24_301_5_5_1_2_2 @TS_24_368 @24_368_4 @24_368-5_4 @Series-0000 +Scenario: Attach Procedure Success with right GUTI. + +Given all configured endpoints for SSH are connected successfully + +Given the steps below will be executed at the end +When I stop S1AP simulator on node ABOT +When I run the SSH command "sudo service mme_gw restart" on node MME +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds +Then the ending steps are complete + +# set ABOT configuration +Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT +Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=false" on node ABOT + +# Execute ABOT S1AP Simulator +When I run S1AP simulator on node ABOT with 1 UE + +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + +# Validate Test Case Execution at Simulator +Then I receive S1AP response on node ABOT and verify the presence of all the following values: +| responseResult | existence | +| Send Attach Request message with GUTI | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Security Mode Command message | {string:nocase:present} | +| Send Security Mode Complete message | {string:nocase:present} | +| Received Attach Accept message | {string:nocase:present} | + diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_DNS_Server_Addr_Request.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_DNS_Server_Addr_Request.feature new file mode 100644 index 000000000..f68e18124 --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_DNS_Server_Addr_Request.feature @@ -0,0 +1,44 @@ +############################################################################################################################ +# Date: <22/08/2016> Version: <1.1> # +############################################################################################################################ + +Feature: Attach Procedure With DNS Server Address Request Indication in PCO + +@attach-procedure @TS_24_301 @24_301_5_5 @24_301_5_5_1_2_2 @TS_24_368 @24_368_4 @24_368-5_4 @Series-0000 +@TS_36_523_9_2_1_1_3 @Attach_Procedure_DNS_Server_Address_Request @PCO + +Scenario: Attach Procedure indicating a request DNS Server Address in the protocol configuration options + +Given all configured endpoints for SSH are connected successfully + +Given the steps below will be executed at the end +When I stop S1AP simulator on node ABOT +When I run the SSH command "sudo service mme_gw restart" on node MME +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds +Then the ending steps are complete + +# Set ABOT configuration +Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT +Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=true" on node ABOT + +Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.PCO.IPV6_DNS_SERVER_ADDR_REQ=true" on node ABOT + +# Execute ABOT S1AP Simulator +When I run S1AP simulator on node ABOT with 1 UE + +# Wait for execution to complete before checking results +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + +# Validate Test Case Execution at Simulator +Then I receive S1AP response on node ABOT and verify the presence of all the following values: +| responseResult | existence | +| Send Attach Request message with IMSI | {string:nocase:present} | +| Send PDN Connectivity Request message with DNS Server Address Request | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Security Mode Command message | {string:nocase:present} | +| Send Security Mode Complete message | {string:nocase:present} | +| Received Attach Accept message | {string:nocase:present} | +| Received Activate Default EPS Bearer Context Request message with PCO contain Protocol ID 0003 | {string:nocase:present} | diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_DSMIPv6_HA_Addr_Request.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_DSMIPv6_HA_Addr_Request.feature new file mode 100644 index 000000000..92c38a2b1 --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_DSMIPv6_HA_Addr_Request.feature @@ -0,0 +1,44 @@ +############################################################################################################################ +# Date: <22/08/2016> Version: <1.1> # +############################################################################################################################ + +Feature: Attach Procedure with DSMIPv6 Home Agent Address Request Indication in PCO + +@attach-procedure @TS_24_301 @24_301_5_5 @24_301_5_5_1_2_2 @TS_24_368 @24_368_4 @24_368-5_4 @Series-0000 +@TS_36_523_9_2_1_1_3 @Attach_Procedure_DSMIPv6_Home_Agent_Address_Request @PCO + +Scenario: Attach Procedure indicating a request for DSMIPv6 Home Agent Address in the protocol configuration options + +Given all configured endpoints for SSH are connected successfully + +Given the steps below will be executed at the end +When I stop S1AP simulator on node ABOT +When I run the SSH command "sudo service mme_gw restart" on node MME +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds +Then the ending steps are complete + +# Set ABOT configuration +Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT +Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=true" on node ABOT + +Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.PCO.IPV6_HA_ADDR_REQ=true" on node ABOT + +# Execute ABOT S1AP Simulator +When I run S1AP simulator on node ABOT with 1 UE + +# Wait for execution to complete before checking results +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + +# Validate Test Case Execution at Simulator +Then I receive S1AP response on node ABOT and verify the presence of all the following values: +| responseResult | existence | +| Send Attach Request message with IMSI | {string:nocase:present} | +| Send PDN Connectivity Request message with DSMIPv6 Home Agent Address Request | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Security Mode Command message | {string:nocase:present} | +| Send Security Mode Complete message | {string:nocase:present} | +| Received Attach Accept message | {string:nocase:present} | +| Received Activate Default EPS Bearer Context Request message with PCO contain Protocol ID 0007 | {string:nocase:present} | diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_DSMIPv6_HN_Prefix_Request.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_DSMIPv6_HN_Prefix_Request.feature new file mode 100644 index 000000000..fe389028c --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_DSMIPv6_HN_Prefix_Request.feature @@ -0,0 +1,44 @@ +############################################################################################################################ +# Date: <22/08/2016> Version: <1.1> # +############################################################################################################################ + +Feature: Attach Procedure With DSMIPv6 Home Network Prefix Request Indication in PCO + +@attach-procedure @TS_24_301 @24_301_5_5 @24_301_5_5_1_2_2 @TS_24_368 @24_368_4 @24_368-5_4 @Series-0000 +@TS_36_523_9_2_1_1_3 @Attach_Procedure_DSMIPv6_Home_Network_Prefix_Request @PCO + +Scenario: Attach Procedure indicating a request for DSMIPv6 Home Network Prefix Request in the protocol configuration options + +Given all configured endpoints for SSH are connected successfully + +Given the steps below will be executed at the end +When I stop S1AP simulator on node ABOT +When I run the SSH command "sudo service mme_gw restart" on node MME +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds +Then the ending steps are complete + +# Set ABOT configuration +Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT +Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=true" on node ABOT + +Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.PCO.IPV6_HN_PREFIX_REQ=true" on node ABOT + +# Execute ABOT S1AP Simulator +When I run S1AP simulator on node ABOT with 1 UE + +# Wait for execution to complete before checking results +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + +# Validate Test Case Execution at Simulator +Then I receive S1AP response on node ABOT and verify the presence of all the following values: +| responseResult | existence | +| Send Attach Request message with IMSI | {string:nocase:present} | +| Send PDN Connectivity Request message with DSMIPv6 Home Network Prefix Request | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Security Mode Command message | {string:nocase:present} | +| Send Security Mode Complete message | {string:nocase:present} | +| Received Attach Accept message | {string:nocase:present} | +| Received Activate Default EPS Bearer Context Request message with PCO contain Protocol ID 0008 | {string:nocase:present} | diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_DSMIPv6_IPv4_HA_Addr_Request.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_DSMIPv6_IPv4_HA_Addr_Request.feature new file mode 100644 index 000000000..5821cd555 --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_DSMIPv6_IPv4_HA_Addr_Request.feature @@ -0,0 +1,44 @@ +############################################################################################################################ +# Date: <22/08/2016> Version: <1.1> # +############################################################################################################################ + +Feature: Attach Procedure With DSMIPv6 IPv4 Home Agent Address Request Indication in PCO + +@attach-procedure @TS_24_301 @24_301_5_5 @24_301_5_5_1_2_2 @TS_24_368 @24_368_4 @24_368-5_4 @Series-0000 +@TS_36_523_9_2_1_1_3 @Attach_Procedure_DSMIPv6_IPv4_Home_Agent_Address_Request @PCO + +Scenario: Attach Procedure indicating a request for DSMIPv6 IPv4 Home Agent Address in the protocol configuration options + +Given all configured endpoints for SSH are connected successfully + +Given the steps below will be executed at the end +When I stop S1AP simulator on node ABOT +When I run the SSH command "sudo service mme_gw restart" on node MME +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds +Then the ending steps are complete + +# Set ABOT configuration +Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT +Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=true" on node ABOT + +Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.PCO.IPV6_IPV4_HA_ADDR_REQ=true" on node ABOT + +# Execute ABOT S1AP Simulator +When I run S1AP simulator on node ABOT with 1 UE + +# Wait for execution to complete before checking results +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + +# Validate Test Case Execution at Simulator +Then I receive S1AP response on node ABOT and verify the presence of all the following values: +| responseResult | existence | +| Send Attach Request message with IMSI | {string:nocase:present} | +| Send PDN Connectivity Request message with DSMIPv6 IPv4 Home Agent Address Request | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Security Mode Command message | {string:nocase:present} | +| Send Security Mode Complete message | {string:nocase:present} | +| Received Attach Accept message | {string:nocase:present} | +| Received Activate Default EPS Bearer Context Request message with PCO contain Protocol ID 0009 | {string:nocase:present} | diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_IM_CN_SS_Signalling_Flag.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_IM_CN_SS_Signalling_Flag.feature new file mode 100644 index 000000000..81f4fbc4a --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_IM_CN_SS_Signalling_Flag.feature @@ -0,0 +1,44 @@ +############################################################################################################################ +# Date: <22/08/2016> Version: <1.1> # +############################################################################################################################ + +Feature: Attach Procedure With IM CN Subsystem Signalling Flag Indication in PCO + +@attach-procedure @TS_24_301 @24_301_5_5 @24_301_5_5_1_2_2 @TS_24_368 @24_368_4 @24_368-5_4 @Series-0000 +@TS_36_523_9_2_1_1_3 @Attach_Procedure_IM_CN_Subsystem_Signalling_Flag @PCO + +Scenario: Attach Procedure indicating IM CN Subsystem Signalling Flag in the protocol configuration options + +Given all configured endpoints for SSH are connected successfully + +Given the steps below will be executed at the end +When I stop S1AP simulator on node ABOT +When I run the SSH command "sudo service mme_gw restart" on node MME +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds +Then the ending steps are complete + +# Set ABOT configuration +Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT +Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=true" on node ABOT + +Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.PCO.IM_CN_SS_SIGNAL_FLAG=true" on node ABOT + +# Execute ABOT S1AP Simulator +When I run S1AP simulator on node ABOT with 1 UE + +# Wait for execution to complete before checking results +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + +# Validate Test Case Execution at Simulator +Then I receive S1AP response on node ABOT and verify the presence of all the following values: +| responseResult | existence | +| Send Attach Request message with IMSI | {string:nocase:present} | +| Send PDN Connectivity Request message with IM CN Subsystem Signalling Flag | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Security Mode Command message | {string:nocase:present} | +| Send Security Mode Complete message | {string:nocase:present} | +| Received Attach Accept message | {string:nocase:present} | +| Received Activate Default EPS Bearer Context Request message with PCO contain Protocol ID 0002 | {string:nocase:present} | diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_IP_Addr_Alloc_DHCPv4.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_IP_Addr_Alloc_DHCPv4.feature new file mode 100644 index 000000000..fba01f24d --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_IP_Addr_Alloc_DHCPv4.feature @@ -0,0 +1,44 @@ +############################################################################################################################ +# Date: <22/08/2016> Version: <1.1> # +############################################################################################################################ + +Feature: Attach Procedure with IPv4 Address Allocation Via DHCPv4 Indication in PCO + +@attach-procedure @TS_24_301 @24_301_5_5 @24_301_5_5_1_2_2 @TS_24_368 @24_368_4 @24_368-5_4 @Series-0000 +@TS_36_523_9_2_1_1_3 @Attach_Procedure_IPv4_Address_Allocation_Via_DHCPv4 @PCO + +Scenario: Attach Procedure indicating IPv4 address allocation via DHCPv4 in the protocol configuration options + +Given all configured endpoints for SSH are connected successfully + +Given the steps below will be executed at the end +When I stop S1AP simulator on node ABOT +When I run the SSH command "sudo service mme_gw restart" on node MME +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds +Then the ending steps are complete + +# Set ABOT configuration +Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT +Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=true" on node ABOT + +Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.PCO.IP_ADDR_ALLOC_DHCPV4=true" on node ABOT + +# Execute ABOT S1AP Simulator +When I run S1AP simulator on node ABOT with 1 UE + +# Wait for execution to complete before checking results +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + +# Validate Test Case Execution at Simulator +Then I receive S1AP response on node ABOT and verify the presence of all the following values: +| responseResult | existence | +| Send Attach Request message with IMSI | {string:nocase:present} | +| Send PDN Connectivity Request message with IPv4 address allocation via DHCPv4 | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Security Mode Command message | {string:nocase:present} | +| Send Security Mode Complete message | {string:nocase:present} | +| Received Attach Accept message | {string:nocase:present} | +| Received Activate Default EPS Bearer Context Request message with PCO contain Protocol ID 000B | {string:nocase:present} | diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_IP_Addr_Alloc_NAS_Signalling.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_IP_Addr_Alloc_NAS_Signalling.feature new file mode 100644 index 000000000..1cb869b4e --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_IP_Addr_Alloc_NAS_Signalling.feature @@ -0,0 +1,44 @@ +############################################################################################################################ +# Date: <22/08/2016> Version: <1.1> # +############################################################################################################################ + +Feature: Attach Procedure With IP Address Allocation Via NAS Signalling Indication in PCO + +@attach-procedure @TS_24_301 @24_301_5_5 @24_301_5_5_1_2_2 @TS_24_368 @24_368_4 @24_368-5_4 @Series-0000 +@TS_36_523_9_2_1_1_3 @Attach_Procedure_IP_Address_Allocation_Via_NAS_Signalling @PCO + +Scenario: Attach Procedure indicating IP address allocation via NAS signalling in the protocol configuration options + +Given all configured endpoints for SSH are connected successfully + +Given the steps below will be executed at the end +When I stop S1AP simulator on node ABOT +When I run the SSH command "sudo service mme_gw restart" on node MME +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds +Then the ending steps are complete + +# Set ABOT configuration +Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT +Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=true" on node ABOT + +Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.PCO.IP_ADDR_NAS_SIGNALING=true" on node ABOT + +# Execute ABOT S1AP Simulator +When I run S1AP simulator on node ABOT with 1 UE + +# Wait for execution to complete before checking results +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + +# Validate Test Case Execution at Simulator +Then I receive S1AP response on node ABOT and verify the presence of all the following values: +| responseResult | existence | +| Send Attach Request message with IMSI | {string:nocase:present} | +| Send PDN Connectivity Request message with IP address allocation via NAS signalling | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Security Mode Command message | {string:nocase:present} | +| Send Security Mode Complete message | {string:nocase:present} | +| Received Attach Accept message | {string:nocase:present} | +| Received Activate Default EPS Bearer Context Request message with PCO contain Protocol ID 000A | {string:nocase:present} | diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_MS_Support_Bearer_Ctrl_Indication.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_MS_Support_Bearer_Ctrl_Indication.feature new file mode 100644 index 000000000..bfc7515cd --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_MS_Support_Bearer_Ctrl_Indication.feature @@ -0,0 +1,44 @@ +############################################################################################################################ +# Date: <22/08/2016> Version: <1.1> # +############################################################################################################################ + +Feature: Attach Procedure With MS Support of Network Requested Bearer Control indicator in PCO + +@attach-procedure @TS_24_301 @24_301_5_5 @24_301_5_5_1_2_2 @TS_24_368 @24_368_4 @24_368-5_4 @Series-0000 +@TS_36_523_9_2_1_1_3 @Attach_Procedure_MS_Support_Network_Requested_Bearer_Control_Indicator @PCO + +Scenario: Attach Procedure indicating MS Support of Network Requested Bearer Control indicator + +Given all configured endpoints for SSH are connected successfully + +Given the steps below will be executed at the end +When I stop S1AP simulator on node ABOT +When I run the SSH command "sudo service mme_gw restart" on node MME +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds +Then the ending steps are complete + +# Set ABOT configuration +Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT +Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=true" on node ABOT + +Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.PCO.MS_SUPPORT_BEARER_CTRL_IND=true" on node ABOT + +# Execute ABOT S1AP Simulator +When I run S1AP simulator on node ABOT with 1 UE + +# Wait for execution to complete before checking results +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + +# Validate Test Case Execution at Simulator +Then I receive S1AP response on node ABOT and verify the presence of all the following values: +| responseResult | existence | +| Send Attach Request message with IMSI | {string:nocase:present} | +| Send PDN Connectivity Request message with MS Support of Network Requested Bearer Control indicator | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Security Mode Command message | {string:nocase:present} | +| Send Security Mode Complete message | {string:nocase:present} | +| Received Attach Accept message | {string:nocase:present} | +| Received Activate Default EPS Bearer Context Request message with PCO contain Protocol ID 0005 | {string:nocase:present} | diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_P_CSCF_Addr_Request.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_P_CSCF_Addr_Request.feature new file mode 100644 index 000000000..605bb934f --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Attach_Procedure_With_P_CSCF_Addr_Request.feature @@ -0,0 +1,44 @@ +############################################################################################################################ +# Date: <22/08/2016> Version: <1.1> # +############################################################################################################################ + +Feature: Attach Procedure With P-CSCF Address Request Indication in PCO + +@attach-procedure @TS_24_301 @24_301_5_5 @24_301_5_5_1_2_2 @TS_24_368 @24_368_4 @24_368-5_4 @Series-0000 +@TS_36_523_9_2_1_1_3 @Attach_Procedure_P-CSCF_Address_Request @PCO + +Scenario: Attach Procedure indicating a request for P-CSCF address in the protocol configuration options + +Given all configured endpoints for SSH are connected successfully + +Given the steps below will be executed at the end +When I stop S1AP simulator on node ABOT +When I run the SSH command "sudo service mme_gw restart" on node MME +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds +Then the ending steps are complete + +# Set ABOT configuration +Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT +Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=true" on node ABOT + +Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.PCO.IPV6_P_CSCF_ADDR_REQ=true" on node ABOT + +# Execute ABOT S1AP Simulator +When I run S1AP simulator on node ABOT with 1 UE + +# Wait for execution to complete before checking results +Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + +# Validate Test Case Execution at Simulator +Then I receive S1AP response on node ABOT and verify the presence of all the following values: +| responseResult | existence | +| Send Attach Request message with IMSI | {string:nocase:present} | +| Send PDN Connectivity Request message with P-CSCF Address Request | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Authentication Request message | {string:nocase:present} | +| Send Authentication Response message | {string:nocase:present} | +| Received Security Mode Command message | {string:nocase:present} | +| Send Security Mode Complete message | {string:nocase:present} | +| Received Attach Accept message | {string:nocase:present} | +| Received Activate Default EPS Bearer Context Request message with PCO contain Protocol ID 0001 | {string:nocase:present} | diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Auth_Accept.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Auth_Accept.feature new file mode 100644 index 000000000..3136dbdb7 --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Auth_Accept.feature @@ -0,0 +1,45 @@ + ############################################################################################################################ + # Date: <13/01/2017> Version: <1.1> # + ############################################################################################################################ + + + Feature:Auth_Accept + + @authentication-procedure @Auth_Accept @TS_24_301 @24_301_5_4_2_1 @24_301_5_4_2_3 @33_401_6_1_1 @Series-0004 + + Scenario: UE receives an AUTHENTICATION REQUEST message. UE responds with a correct AUTHENTICATION RESPONSE message and establishes correct + EPS security context. + + Given all configured endpoints for SSH are connected successfully + + Given the steps below will be executed at the end + When I stop S1AP simulator on node ABOT + When I run the SSH command "sudo service mme_gw restart" on node MME + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + Then the ending steps are complete + + # Set ABOT configuration + Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT + Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=false" on node ABOT + + # Execute ABOT S1AP Simulator + When I run S1AP simulator on node ABOT with 1 UE + + # Wait for execution to complete before checking results + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + + # Validate Test Case Execution at Simulator + Then I receive S1AP response on node ABOT and verify the presence of all the following values: + | responseResult | existence | + | Send Attach Request message with GUTI | {string:nocase:present} | + | Received Identity Request message | {string:nocase:present} | + | Identification requested type = IMSI | {string:nocase:present} | + | Send Identity Response message | {string:nocase:present} | + | Received Authentication Request message | {string:nocase:present} | + | Send Authentication Response message | {string:nocase:present} | + | Received Security Mode Command message | {string:nocase:present} | + | Send Security Mode Complete message | {string:nocase:present} | + | Received Attach Accept message | {string:nocase:present} | + + + diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_Network_GUTIattach_AuthReject_re_Auth.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_Network_GUTIattach_AuthReject_re_Auth.feature new file mode 100644 index 000000000..fa0d37643 --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_Network_GUTIattach_AuthReject_re_Auth.feature @@ -0,0 +1,47 @@ + ############################################################################################################################ + # Date: <22/11/2016> Version: <1.1> # + ############################################################################################################################ + + + Feature:Auth_NotAccept_by_Network_GUTIattach_AuthReject_re_Auth + + @authentication-procedure @Auth_NotAccept_by_Network_GUTIattach_AuthReject_re_Auth @TS_24_301 @24_301_5_3_3 @24_301_5_5_1_2_2 @24_301_5_5_1_2_4 @24_301_6_5_1_2 @24_301_9_9_3_33 @TS_36_304 @36_304_4_3 @negTCs @Series-0001 + + Scenario: Authentication not accepted by the network when attach with GUTI, Authentication reject when RES is different from UE and MME. IMSI given by the UE during the identification procedure is same from the IMSI the network had associated with the GUTI. + + Given all configured endpoints for SSH are connected successfully + + Given the steps below will be executed at the end + When I stop S1AP simulator on node ABOT + When I run the SSH command "sudo service mme_gw restart" on node MME + #RES is restored to 0x00 in teardown process + Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.SECURITY.RES=0x00" on node ABOT + Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=true" on node ABOT + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + Then the ending steps are complete + + # set ABOT configuration + Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT + Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=false" on node ABOT + # set the value of RES parameter (other than 0x00) manually in Authentication Response message which is sent from UE to MME + Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.SECURITY.RES=0xFF" on node ABOT + + + # Execute ABOT S1AP Simulator + When I run S1AP simulator on node ABOT with 1 UE + + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + + # Validate Test Case Execution at Simulator + Then I receive S1AP response on node ABOT and verify the presence of all the following values: + | responseResult | existence | + | Send Attach Request message with GUTI | {string:nocase:present} | + | Received Identity Request message | {string:nocase:present} | + | Identification requested type = IMSI | {string:nocase:present} | + | Send Identity Response message | {string:nocase:present} | + | Received Authentication Request message | {string:nocase:present} | + | Send Authentication Response message | {string:nocase:present} | + | Received Authentication Reject message | {string:nocase:present} | + | Authentication not accepted by the network | {string:nocase:present} | + diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_Network_GUTIattach_IMSIdiff_AuthReject_re_Auth.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_Network_GUTIattach_IMSIdiff_AuthReject_re_Auth.feature new file mode 100644 index 000000000..4c00c8787 --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_Network_GUTIattach_IMSIdiff_AuthReject_re_Auth.feature @@ -0,0 +1,38 @@ + ############################################################################################################################ + # Date: <22/11/2016> Version: <1.1> # + ############################################################################################################################ + + Feature:Auth_NotAccept_by_Network_GUTIattach_IMSIdiff_AuthReject_re_Auth + + @authentication-procedure @Auth_NotAccept_by_Network_GUTIattach_IMSIdiff_AuthReject_re_Auth @TS_24_301 @24_301_5_3_3 @24_301_5_5_1_2_2 @24_301_5_5_1_2_4 @24_301_6_5_1_2 @24_301_9_9_3_33 @TS_36_304 @36_304_4_3 @negTCs @Series-0001 + + Scenario: Authentication not accepted by the network when attach with GUTI, Authentication reject when RES is different from UE and MME. IMSI given by the UE during the identification procedure differs from the IMSI the network had associated with the GUTI + + Given all configured endpoints for SSH are connected successfully + + Given the steps below will be executed at the end + When I stop S1AP simulator on node ABOT + When I run the SSH command "sudo service mme_gw restart" on node MME + Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.SECURITY.RES=0x00" on node ABOT + Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.SECURITY.WRONGIMSI=false" on node ABOT + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + Then the ending steps are complete + + # set ABOT configuration + Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT + Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=false" on node ABOT + # set the value of RES parameter (other than 0x00) manually in Authentication Response message which is sent from UE to MME + Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.SECURITY.RES=0xFF" on node ABOT + Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.SECURITY.WRONGIMSI=true" on node ABOT + + # Execute ABOT S1AP Simulator + When I run S1AP simulator on node ABOT with 1 UE + + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + + # Validate Test Case Execution at Simulator + Then I receive S1AP response on node ABOT and verify the presence of all the following values: + | responseResult | existence | + | Send Attach Request message with GUTI | {string:nocase:present} | + | Received Authentication Request message | {string:nocase:present} | diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_Network_IMSIattach_AuthReject_re_Auth.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_Network_IMSIattach_AuthReject_re_Auth.feature new file mode 100644 index 000000000..cce93f426 --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_Network_IMSIattach_AuthReject_re_Auth.feature @@ -0,0 +1,62 @@ + ############################################################################################################################ + # Date: <22/11/2016> Version: <1.1> # + ############################################################################################################################ + + Feature:Auth_NotAccept_by_Network_IMSIattach_AuthReject_re_Auth + + @authentication-procedure @Auth_NotAccept_by_Network_IMSIattach_AuthReject_re_Auth @TS_24_301 @24_301_5_3_3 @24_301_5_5_1_2_2 @24_301_5_5_1_2_4 @24_301_6_5_1_2 @24_301_9_9_3_33 @TS_36_304 @36_304_4_3 @negTCs @Series-0001 + + Scenario: Authentication not accepted by the network when attach with IMSI, Authentication reject when RES is different from UE and MME + + Given all configured endpoints for SSH are connected successfully + + Given the steps below will be executed at the end + When I stop S1AP simulator on node ABOT + When I run the SSH command "sudo service mme_gw restart" on node MME + #RES is restore to 0x00 in teardown process + Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.SECURITY.RES=0x00" on node ABOT + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + Then the ending steps are complete + + # set ABOT configuration + Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT + Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=true" on node ABOT + # set the value of RES parameter (other than 0x00) manually in Authentication Response message which is sent from UE to MME + Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.SECURITY.RES=0xFF" on node ABOT + + # Execute ABOT S1AP Simulator + When I run S1AP simulator on node ABOT with 1 UE + + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + + # Validate Test Case Execution at Simulator + Then I receive S1AP response on node ABOT and verify the presence of all the following values: + | responseResult | existence | + | Send Attach Request message with IMSI | {string:nocase:present} | + | Received Authentication Request message | {string:nocase:present} | + | Send Authentication Response message | {string:nocase:present} | + | Received Authentication Reject message | {string:nocase:present} | + | Authentication not accepted by the network | {string:nocase:present} | + + + + + + + + + + + + + + + + + + + + + + diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_UE_GUTIattach_MAC_code_failure.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_UE_GUTIattach_MAC_code_failure.feature new file mode 100644 index 000000000..ca5b281f4 --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_UE_GUTIattach_MAC_code_failure.feature @@ -0,0 +1,45 @@ + ############################################################################################################################ + # Date: <13/12/2016> Version: <1.1> # + ############################################################################################################################ + + Feature:Auth_NotAccept_by_UE_GUTIattachMAC_code_failure + + @authentication-procedure @Auth_NotAccept_by_UE_GUTIattach_MAC_code_failure @TS_24_301 @24_301_5_4_2_6 @24_301_5_4_2_7 @negTCs @Series-0002 + + Scenario: UE received invalid MAC code in AUTN parameter in the AUTHENTICATION REQUEST message. Authentication not accepted by the UE when attach with GUTI. UE responds the Authentication failure message with EMM cause (reject cause) #20 "MAC failure". + + Given all configured endpoints for SSH are connected successfully + + Given the steps below will be executed at the end + When I stop S1AP simulator on node ABOT + When I run the SSH command "sudo service mme_gw restart" on node MME + Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=true" on node ABOT + Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.USIM_API_K=\"8BAF473F2F8FD09487CCCBD7097C6862\"" on node ABOT + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + Then the ending steps are complete + + # set ABOT configuration + Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT + Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=false" on node ABOT + + # CORRECT K_VALUE is 8BAF473F2F8FD09487CCCBD7097C6862 WRONG K_VALUE fec86ba6eb707ed08905757b1bb44b8f + Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.USIM_API_K=\"fec86ba6eb707ed08905757b1bb44b8f\"" on node ABOT + + # Execute ABOT S1AP Simulator + When I run S1AP simulator on node ABOT with 1 UE + + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + + # Validate Test Case Execution at Simulator + Then I receive S1AP response on node ABOT and verify the presence of all the following values: + | responseResult | existence | + | Send Attach Request message with GUTI | {string:nocase:present} | + | Received Identity Request message | {string:nocase:present} | + | Identification requested type = IMSI | {string:nocase:present} | + | Send Identity Response message | {string:nocase:present} | + | Received Authentication Request message | {string:nocase:present} | + | Send Authentication Failure message (cause=20) | {string:nocase:present} | + | Received Authentication Reject message | {string:nocase:present} | + | Authentication not accepted by the network | {string:nocase:present} | + diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_UE_IMSIattach_MAC_code_failure.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_UE_IMSIattach_MAC_code_failure.feature new file mode 100644 index 000000000..2b8cf401c --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_UE_IMSIattach_MAC_code_failure.feature @@ -0,0 +1,42 @@ + ############################################################################################################################ + # Date: <13/12/2016> Version: <1.1> # + ############################################################################################################################ + + Feature:Auth_NotAccept_by_UE_IMSIattach_MAC_code_failure + + @authentication-procedure @Auth_NotAccept_by_UE_IMSIattach_MAC_code_failure @TS_24_301 @24_301_5_4_2_6 @24_301_5_4_2_7 @negTCs @Series-0002 + + Scenario: UE received invalid MAC code in AUTN parameter in the AUTHENTICATION REQUEST message. Authentication not accepted by the UE when attach with IMSI. UE responds the Authentication failure message with EMM cause (reject cause) #20 "MAC failure". + + Given all configured endpoints for SSH are connected successfully + + Given the steps below will be executed at the end + When I stop S1AP simulator on node ABOT + When I run the SSH command "sudo service mme_gw restart" on node MME + # WRONGIMSI is restored to false in teardown process + Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.USIM_API_K_VALUE=\"8BAF473F2F8FD09487CCCBD7097C6862\"" on node ABOT + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + Then the ending steps are complete + + # set ABOT configuration + Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT + Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=true" on node ABOT + + # CORRECT K_VALUE is 8BAF473F2F8FD09487CCCBD7097C6862 WRONG K_VALUE fec86ba6eb707ed08905757b1bb44b8f + Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.USIM_API_K=\"fec86ba6eb707ed08905757b1bb44b8f\"" on node ABOT + + # Execute ABOT S1AP Simulator + When I run S1AP simulator on node ABOT with 1 UE + + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + + # Validate Test Case Execution at Simulator + Then I receive S1AP response on node ABOT and verify the presence of all the following values: + | responseResult | existence | + | Send Attach Request message with IMSI | {string:nocase:present} | + | Received Authentication Request message | {string:nocase:present} | + | Send Authentication Failure message (cause=20) | {string:nocase:present} | + | Received Authentication Reject message | {string:nocase:present} | + | Authentication not accepted by the network | {string:nocase:present} | + diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_UE_SQN_failure.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_UE_SQN_failure.feature new file mode 100644 index 000000000..ff2a2e20e --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_UE_SQN_failure.feature @@ -0,0 +1,46 @@ + ############################################################################################################################ + # Date: <13/01/2017> Version: <1.1> # + ############################################################################################################################ + + + Feature:Auth_NotAccept_by_UE_SQN_failure + + @authentication-procedure @Auth_NotAccept_by_UE_SQN_failure @TS_24_301 @24_301_5_4_2_6 @24_301_5_4_2_7 @negTCs @Series-0004 + + Scenario: UE receives an AUTHENTICATION REQUEST message with SQN out of range. UE sends an AUTHENTICATION FAILURE message to the network, with EMM cause "synch failure" and a re-synchronization token. Now UE receives a new correct AUTHENTICATION REQUEST message while T3420 is running. Finally UE sends a correct AUTHENTICATION RESPONSE message. + + Given all configured endpoints for SSH are connected successfully + + Given the steps below will be executed at the end + When I stop S1AP simulator on node ABOT + When I run the SSH command "sudo service mme_gw restart" on node MME + Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.SECURITY.SYNC_FAILURE=false" on node ABOT + Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=true" on node ABOT + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + Then the ending steps are complete + + # set ABOT configuration + Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT + Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.SECURITY.SYNC_FAILURE=true" on node ABOT + Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=false" on node ABOT + + # Execute ABOT S1AP Simulator + When I run S1AP simulator on node ABOT with 1 UE + + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + + # Validate Test Case Execution at Simulator + Then I receive S1AP response on node ABOT and verify the presence of all the following values: + | responseResult | existence | + | Send Attach Request message with GUTI | {string:nocase:present} | + | Received Identity Request message | {string:nocase:present} | + | Identification requested type = IMSI | {string:nocase:present} | + | Send Identity Response message | {string:nocase:present} | + | Received Authentication Request message | {string:nocase:present} | + | Send Authentication Failure message (cause=21) | {string:nocase:present} | + | Received Authentication Request message | {string:nocase:present} | + | Send Authentication Response message | {string:nocase:present} | + | Received Security Mode Command message | {string:nocase:present} | + | Send Security Mode Complete message | {string:nocase:present} | + | Received Attach Accept message | {string:nocase:present} | diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_UE_non_EPS_AuthUnaccpt.feature b/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_UE_non_EPS_AuthUnaccpt.feature new file mode 100644 index 000000000..372e6b793 --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/Auth_NotAccept_by_UE_non_EPS_AuthUnaccpt.feature @@ -0,0 +1,45 @@ + ############################################################################################################################ + # Date: <13/01/2017> Version: <1.1> # + ############################################################################################################################ + + + Feature:Auth_NotAccept_by_UE_non_EPS_AuthUnaccpt + + @authentication-procedure @Auth_NotAccept_by_UE_non_EPS_AuthUnaccpt @TS_24_301 @24_301_5_4_2_6 @24_301_5_4_2_7 @negTCs @Series-0004 @SS_changesReqd + + Scenario: UE receives an AUTHENTICATION REQUEST message with "separation bit" in the AMF field is 0. UE shall send an AUTHENTICATION FAILURE message to the network, with the reject cause #26 "non-EPS authentication unacceptable" + + # AuC system changes required. HSS should send Authentication request message with AMF=AMF_RESYNCH amf = {0xff 0xff} + # file name kdf.c line no: 156 uint8_t amf[] = { 0xFF, 0xFF }; + + Given all configured endpoints for SSH are connected successfully + + Given the steps below will be executed at the end + When I stop S1AP simulator on node ABOT + When I run the SSH command "sudo service mme_gw restart" on node MME + Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.SECURITY.SYNC_FAILURE=false" on node ABOT + Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=true" on node ABOT + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + Then the ending steps are complete + + # set ABOT configuration + Given that I setup S1AP Simulator with default parameters specified in {abotprop.ABOT.EPC.Defaults} on node ABOT + Given that I setup S1AP Simulator with UE parameter "ABOT.UE.CONFIG.SECURITY.SYNC_FAILURE=true" on node ABOT + Given that I setup S1AP Simulator with USIM parameter "ABOT.UE.USIM.AttachWithImsi=false" on node ABOT + + # Execute ABOT S1AP Simulator + When I run S1AP simulator on node ABOT with 1 UE + + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + Given the execution is paused for {abotprop.WAIT_10_SEC} seconds + + # Validate Test Case Execution at Simulator + Then I receive S1AP response on node ABOT and verify the presence of all the following values: + | responseResult | existence | + | Send Attach Request message with GUTI | {string:nocase:present} | + | Received Identity Request message | {string:nocase:present} | + | Identification requested type = IMSI | {string:nocase:present} | + | Send Identity Response message | {string:nocase:present} | + | Received Authentication Request message | {string:nocase:present} | + | Send Authentication Failure message (cause=26) | {string:nocase:present} | + diff --git a/functest/opnfv_tests/vnf/epc/featureFiles/ResourceBundle.xml b/functest/opnfv_tests/vnf/epc/featureFiles/ResourceBundle.xml new file mode 100644 index 000000000..642972209 --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/featureFiles/ResourceBundle.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/functest/opnfv_tests/vnf/epc/juju_epc.py b/functest/opnfv_tests/vnf/epc/juju_epc.py new file mode 100644 index 000000000..8e2bca22e --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/juju_epc.py @@ -0,0 +1,502 @@ +#!/usr/bin/env python + +# Copyright (c) 2016 Rebaca and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +"""Juju testcase implementation.""" + +import logging +import shutil +import os +import time +import json +import sys +from copy import deepcopy +import yaml +import functest.utils.openstack_utils as os_utils +import functest.core.vnf as vnf +import pkg_resources + +from functest.opnfv_tests.openstack.snaps import snaps_utils +from functest.utils.constants import CONST + +from snaps.openstack.os_credentials import OSCreds +from snaps.openstack.create_network import (NetworkSettings, + SubnetSettings, OpenStackNetwork) +from snaps.openstack.create_router import (RouterSettings, OpenStackRouter) +from snaps.openstack.create_flavor import (FlavorSettings, OpenStackFlavor) +from snaps.openstack.create_image import (ImageSettings, OpenStackImage) +from snaps.openstack.tests import openstack_tests +from snaps.openstack.utils import keystone_utils + +__author__ = "Amarendra Meher " +__author__ = "Soumaya K Nayek " + + +class JujuEpc(vnf.VnfOnBoarding): + """Abot EPC deployed with JUJU Orchestrator Case""" + + __logger = logging.getLogger(__name__) + + def __init__(self, **kwargs): + if "case_name" not in kwargs: + kwargs["case_name"] = "juju_epc" + super(JujuEpc, self).__init__(**kwargs) + + # Retrieve the configuration + self.case_dir = pkg_resources.resource_filename( + 'functest', 'opnfv_tests/vnf/epc') + try: + self.config = CONST.__getattribute__( + 'vnf_{}_config'.format(self.case_name)) + except Exception: + raise Exception("VNF config file not found") + config_file = os.path.join(self.case_dir, self.config) + self.orchestrator = dict( + requirements=get_config("orchestrator.requirements", config_file), + ) + + self.created_object = [] + self.snaps_creds = '' + + self.os_creds = openstack_tests.get_credentials( + os_env_file=CONST.__getattribute__('openstack_creds')) + + self.details['orchestrator'] = dict( + name=get_config("orchestrator.name", config_file), + version=get_config("orchestrator.version", config_file), + status='ERROR', + result='' + ) + + self.vnf = dict( + descriptor=get_config("vnf.descriptor", config_file), + requirements=get_config("vnf.requirements", config_file) + ) + self.details['vnf'] = dict( + descriptor_version=self.vnf['descriptor']['version'], + name=get_config("vnf.name", config_file), + version=get_config("vnf.version", config_file), + ) + self.__logger.debug("VNF configuration: %s", self.vnf) + + self.details['test_vnf'] = dict( + name=get_config("vnf_test_suite.name", config_file), + version=get_config("vnf_test_suite.version", config_file), + tag_name=get_config("vnf_test_suite.tag_name", config_file) + ) + self.images = get_config("tenant_images", config_file) + self.__logger.info("Images needed for vEPC: %s", self.images) + self.keystone_client = os_utils.get_keystone_client() + self.glance_client = os_utils.get_glance_client() + self.neutron_client = os_utils.get_neutron_client() + self.nova_client = os_utils.get_nova_client() + + def prepare(self): + """Prepare testcase (Additional pre-configuration steps).""" + self.__logger.debug("OS Credentials: %s", os_utils.get_credentials()) + + super(JujuEpc, self).prepare() + + self.__logger.info("Additional pre-configuration steps") + self.public_auth_url = keystone_utils.get_endpoint( + self.snaps_creds, 'identity') + + self.creds = { + "tenant": self.tenant_name, + "username": self.tenant_name, + "password": self.tenant_name, + "auth_url": os_utils.get_credentials()['auth_url'] + } + + self.snaps_creds = OSCreds( + username=self.creds['username'], + password=self.creds['password'], + auth_url=self.creds['auth_url'], + project_name=self.creds['tenant'], + identity_api_version=int(os_utils.get_keystone_client_version())) + + cloud_data = { + 'url': self.public_auth_url, + 'pass': self.tenant_name, + 'tenant_n': self.tenant_name, + 'user_n': self.tenant_name + } + self.__logger.info("Cloud DATA: %s", cloud_data) + self.filename = os.path.join(self.case_dir, 'abot-epc.yaml') + self.__logger.info("Cretae %s to add cloud info", self.filename) + write_config(self.filename, CLOUD_TEMPLATE, **cloud_data) + + if self.snaps_creds.identity_api_version == 3: + append_config(self.filename, '{}'.format( + os_utils.get_credentials()['project_domain_name']), + '{}'.format(os_utils.get_credentials() + ['user_domain_name'])) + + self.__logger.info("Upload some OS images if it doesn't exist") + for image_name, image_file in self.images.iteritems(): + self.__logger.info("image: %s, file: %s", image_name, image_file) + if image_file and image_name: + image_creator = OpenStackImage( + self.snaps_creds, + ImageSettings(name=image_name, + image_user='cloud', + img_format='qcow2', + image_file=image_file)) + image_creator.create() + self.created_object.append(image_creator) + + def deploy_orchestrator(self): + self.__logger.info("Deployed Orchestrator") + private_net_name = CONST.__getattribute__( + 'vnf_{}_private_net_name'.format(self.case_name)) + private_subnet_name = CONST.__getattribute__( + 'vnf_{}_private_subnet_name'.format(self.case_name)) + private_subnet_cidr = CONST.__getattribute__( + 'vnf_{}_private_subnet_cidr'.format(self.case_name)) + abot_router = CONST.__getattribute__( + 'vnf_{}_external_router'.format(self.case_name)) + dns_nameserver = CONST.__getattribute__( + 'vnf_{}_dns_nameserver'.format(self.case_name)) + ext_net_name = CONST.__getattribute__( + 'vnf_{}_external_network_name'.format(self.case_name)) + + self.__logger.info("Creating full network ...") + subnet_settings = SubnetSettings(name=private_subnet_name, + cidr=private_subnet_cidr, + dns_nameservers=dns_nameserver) + network_settings = NetworkSettings(name=private_net_name, + subnet_settings=[subnet_settings]) + network_creator = OpenStackNetwork(self.snaps_creds, network_settings) + network_creator.create() + self.created_object.append(network_creator) + + ext_net_name = snaps_utils.get_ext_net_name(self.snaps_creds) + self.__logger.info("Creating network Router ....") + router_creator = OpenStackRouter( + self.snaps_creds, + RouterSettings( + name=abot_router, + external_gateway=ext_net_name, + internal_subnets=[subnet_settings.name])) + router_creator.create() + self.created_object.append(router_creator) + self.__logger.info("Creating Flavor ....") + flavor_settings = FlavorSettings( + name=self.orchestrator['requirements']['flavor']['name'], + ram=self.orchestrator['requirements']['flavor']['ram_min'], + disk=10, + vcpus=1) + flavor_creator = OpenStackFlavor(self.snaps_creds, flavor_settings) + self.__logger.info("Juju Bootstrap: Skip creation of flavors") + flavor_creator.create() + self.created_object.append(flavor_creator) + self.__logger.info("Installing Dependency Packages .......") + source_dir = "/src/epc-requirements/juju_bin_build" + if os.path.exists(source_dir): + shutil.rmtree(source_dir) + os.makedirs(source_dir) + os.environ['GOPATH'] = str(source_dir) + os.environ['GOBIN'] = str(source_dir) + "/bin" + os.environ['PATH'] = ((os.path.expandvars('$GOPATH')) + ":" + + (os.path.expandvars('$GOBIN')) + ":" + + (os.path.expandvars('$PATH'))) + os.system('go get -d -v github.com/juju/juju/...') + os.chdir(source_dir + "/src" + "/github.com" + "/juju" + "/juju") + os.system('git checkout tags/juju-2.2.5') + os.system('go get github.com/rogpeppe/godeps') + os.system('godeps -u dependencies.tsv') + os.system('go install -v github.com/juju/juju/...') + self.__logger.info("Creating Cloud for Abot-epc .....") + os.system('juju add-cloud abot-epc -f {}'.format(self.filename)) + os.system('juju add-credential abot-epc -f {}'.format(self.filename)) + for image_name in self.images.keys(): + self.__logger.info("Generating Metadata for %s", image_name) + image_id = os_utils.get_image_id(self.glance_client, image_name) + os.system('juju metadata generate-image -d ~ -i {} -s {} -r ' + 'RegionOne -u {}'.format(image_id, + image_name, + self.public_auth_url)) + net_id = os_utils.get_network_id(self.neutron_client, private_net_name) + self.__logger.info("Credential information : %s", net_id) + juju_bootstrap_command = ('juju bootstrap abot-epc abot-controller ' + '--config network={} --metadata-source ~ ' + '--constraints mem=2G --bootstrap-series ' + 'trusty ' + '--config use-floating-ip=true --debug'. + format(net_id)) + os.system(juju_bootstrap_command) + return True + + def deploy_vnf(self): + """Deploy ABOT-OAI-EPC.""" + self.__logger.info("Upload VNFD") + descriptor = self.vnf['descriptor'] + self.__logger.info("Get or create flavor for all Abot-EPC") + flavor_settings = FlavorSettings( + name=self.vnf['requirements']['flavor']['name'], + ram=self.vnf['requirements']['flavor']['ram_min'], + disk=10, + vcpus=1) + flavor_creator = OpenStackFlavor(self.snaps_creds, flavor_settings) + flavor_creator.create() + self.created_object.append(flavor_creator) + self.__logger.info("Deploying Abot-epc bundle file ...") + os.system('juju deploy {}'.format('/' + descriptor.get('file_name'))) + self.__logger.info("Waiting for instances .....") + status = os.system('juju-wait') + self.__logger.info("juju wait completed: %s", status) + self.__logger.info("Deployed Abot-epc on Openstack") + if status == 0: + instances = os_utils.get_instances(self.nova_client) + for items in instances: + metadata = get_instance_metadata(self.nova_client, items) + if 'juju-units-deployed' in metadata: + sec_group = ('juju-' + metadata['juju-controller-uuid'] + + '-' + metadata['juju-model-uuid']) + self.sec_group_id = os_utils.get_security_group_id( + self.neutron_client, sec_group) + break + self.__logger.info("Adding Security group rule....") + os_utils.create_secgroup_rule(self.neutron_client, + self.sec_group_id, 'ingress', 132) + self.__logger.info("Copying the feature files to Abot_node ") + os.system('juju scp -- -r {}/featureFiles abot-' + 'epc-basic/0:~/'.format(self.case_dir)) + self.__logger.info("Copying the feature files in Abot_node ") + os.system("juju ssh abot-epc-basic/0 'sudo rsync -azvv " + "~/featureFiles /etc/rebaca-test-suite" + "/featureFiles'") + count = 0 + while count < 10: + epcstatus = os.system('juju status oai-epc | ' + 'grep {} | grep {} | grep {}' + .format('EPC', 'is', 'running')) + if epcstatus == 0: + break + else: + time.sleep(60) + count = count + 1 + os.system('juju-wait') + return True + else: + return False + + def test_vnf(self): + start_time = time.time() + self.__logger.info("Running VNF Test cases....") + os.system('juju run-action abot-epc-basic/0 run ' + 'tagnames={}'.format(self.details['test_vnf']['tag_name'])) + os.system('juju-wait') + duration = time.time() - start_time + self.__logger.info("Getting results from Abot node....") + os.system('juju scp abot-epc-basic/0:/var/lib/abot-' + 'epc-basic/artifacts/TestResults.json {}/.' + .format(self.case_dir)) + self.__logger.info("Parsing the Test results...") + res = (process_abot_test_result('{}/TestResults.' + 'json'.format(self.case_dir))) + short_result = sig_test_format(res) + self.__logger.info(short_result) + self.details['test_vnf'].update(status='PASS', + result=short_result, + full_result=res, + duration=duration) + + self.__logger.info("Test VNF result: Passed: %d, Failed:" + "%d, Skipped: %d", short_result['passed'], + short_result['failures'], short_result['skipped']) + return True + + def clean(self): + try: + if not self.orchestrator['requirements']['preserve_setup']: + self.__logger.info("Removing deployment files...") + testresult = os.path.join(self.case_dir, 'TestResults.json') + if os.path.exists(testresult): + os.remove(testresult) + self.__logger.info("Removing %s file ", self.filename) + if os.path.exists(self.filename): + os.remove(self.filename) + self.__logger.info("Destroying Orchestrator...") + os.system('juju destroy-controller -y abot-controller ' + '--destroy-all-models') + except: + self.__logger.warn("Some issue during the undeployment ..") + self.__logger.warn("Tenant clean continue ..") + + if not self.orchestrator['requirements']['preserve_setup']: + self.__logger.info('Remove the Abot_epc OS object ..') + for creator in reversed(self.created_object): + try: + creator.clean() + except Exception as exc: + self.__logger.error('Unexpected error cleaning - %s', exc) + + self.__logger.info("Releasing all the floating IPs") + # user_id = os_utils.get_user_id(self.keystone_client, + # self.tenant_name) + floating_ips = os_utils.get_floating_ips(self.neutron_client) + tenant_id = os_utils.get_tenant_id(self.keystone_client, + self.tenant_name) + self.__logger.info("TENANT ID : %s", tenant_id) + for item in floating_ips: + if item['tenant_id'] == tenant_id: + os_utils.delete_floating_ip(self.neutron_client, + item['id']) + self.__logger.info("Cleaning Projects and Users") + for creator in reversed(self.created_object): + try: + creator.clean() + except Exception as exc: # pylint: disable=broad-except + self.__logger.error('Unexpected error cleaning - %s', exc) + return True + + +# ---------------------------------------------------------- +# +# YAML UTILS +# +# ----------------------------------------------------------- +def get_config(parameter, file_path): + """ + Returns the value of a given parameter in file.yaml + parameter must be given in string format with dots + Example: general.openstack.image_name + """ + with open(file_path) as config_file: + file_yaml = yaml.safe_load(config_file) + config_file.close() + value = file_yaml + for element in parameter.split("."): + value = value.get(element) + if value is None: + raise ValueError("The parameter %s is not defined in" + " reporting.yaml" % parameter) + return value + + +def sig_test_format(sig_test): + """ + Process the signaling result to have a short result + """ + nb_passed = 0 + nb_failures = 0 + nb_skipped = 0 + for data_test in sig_test: + if data_test['result'] == "passed": + nb_passed += 1 + elif data_test['result'] == "failed": + nb_failures += 1 + elif data_test['result'] == "skipped": + nb_skipped += 1 + total_sig_test_result = {} + total_sig_test_result['passed'] = nb_passed + total_sig_test_result['failures'] = nb_failures + total_sig_test_result['skipped'] = nb_skipped + return total_sig_test_result + + +def process_abot_test_result(file_path): + """ Process ABoT Result """ + with open(file_path) as test_result: + data = json.load(test_result) + res = [] + for tests in data: + tests = update_data(tests) + try: + flatten_steps = tests['elements'][0].pop('flatten_steps') + for steps in flatten_steps: + steps['result'] = steps['step_status'] + res.append(steps) + except: + logging.error("Could not post data to ElasticSearch host") + raise + return res + + +def update_data(obj): + """ Update Result data""" + try: + obj['feature_file'] = os.path.splitext(os.path.basename(obj['uri']))[0] + + for element in obj['elements']: + element['final_result'] = "passed" + element['flatten_steps'] = [] + + for step in element['steps']: + temp_dict = {} + step['result'][step['result']['status']] = 1 + if step['result']['status'].lower() in ['fail', 'failed']: + element['final_result'] = "failed" + + temp_dict['feature_file'] = obj['feature_file'] + temp_dict['step_name'] = step['name'] + temp_dict['step_status'] = step['result']['status'] + temp_dict['step_duration'] = step['result'].get('duration', 0) + temp_dict['step_' + step['result']['status']] = 1 + element['flatten_steps'].append(deepcopy(temp_dict)) + + # Need to put the tag in OBJ and not ELEMENT + if 'tags' in obj: + element['tags'] = deepcopy(obj['tags']) + for tag in obj['tags']: + element[tag['name']] = 1 + else: + for tag in element['tags']: + element[tag['name']] = 1 + + except: + logging.error("Error in updating data, %s" % (sys.exc_info()[0])) + raise + + return obj + + +def get_instance_metadata(nova_client, instance): + """ Get instance Metadata - Instance ID """ + try: + instance = nova_client.servers.get(instance.id) + return instance.metadata + except Exception as e: + logging.error("Error [get_instance_status(nova_client)]: %s" % e) + return None + + +CLOUD_TEMPLATE = """clouds: + abot-epc: + type: openstack + auth-types: [userpass] + endpoint: {url} + regions: + RegionOne: + endpoint: {url} +credentials: + abot-epc: + abot-epc: + auth-type: userpass + password: {pass} + tenant-name: {tenant_n} + username: {user_n}""" + + +def write_config(fname, template, **kwargs): + """ Generate yaml from template for addinh cloud in juju """ + with open(fname, 'w') as yfile: + yfile.write(template.format(**kwargs)) + + +def append_config(file_name, p_domain, u_domain): + """ Append values into a yaml file """ + with open(file_name) as yfile: + doc = yaml.load(yfile) + doc['credentials']['abot-epc']['abot-epc']['project-domain-name'] = ( + p_domain) + doc['credentials']['abot-epc']['abot-epc']['user-domain-name'] = ( + u_domain) + + with open(file_name, 'w') as yfile: + yaml.safe_dump(doc, yfile, default_flow_style=False) diff --git a/functest/opnfv_tests/vnf/epc/juju_epc.yaml b/functest/opnfv_tests/vnf/epc/juju_epc.yaml new file mode 100644 index 000000000..33eeb2110 --- /dev/null +++ b/functest/opnfv_tests/vnf/epc/juju_epc.yaml @@ -0,0 +1,32 @@ +--- +tenant_images: + trusty: + /home/opnfv/functest/images/ubuntu-14.04-server-cloudimg-amd64-disk1.img + xenial: + /home/opnfv/functest/images/ubuntu-16.04-server-cloudimg-amd64-disk1.img + +orchestrator: + name: juju + version: '2.0' + requirements: + dep_package: 'software-properties-common' + flavor: + name: m1.small + ram_min: 2048 + preserve_setup: false +vnf: + name: juju_epc + version: '1' + descriptor: + name: abot-oai-epc + file_name: + /src/epc-requirements/abot_charm/functest-abot-epc-bundle/bundle.yaml + version: '1' + requirements: + flavor: + name: m1.medium + ram_min: 4096 +vnf_test_suite: + name: abot-epc-basic + version: "3.1.0" + tag_name: "TS_24_301" diff --git a/functest/tests/unit/vnf/epc/test_juju_epc.py b/functest/tests/unit/vnf/epc/test_juju_epc.py new file mode 100644 index 000000000..2b7453128 --- /dev/null +++ b/functest/tests/unit/vnf/epc/test_juju_epc.py @@ -0,0 +1,95 @@ +#!/usr/bin/env python + +# Copyright (c) 2017 Rebaca and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 + +""" Unit test testcase for JuJu EPC Implementation""" + +import logging +import unittest + +import mock + +from functest.opnfv_tests.vnf.epc import juju_epc + + +class JujuEpcTesting(unittest.TestCase): + + """Unittest for ABoT EPC with juju orchestrator""" + + def setUp(self): + + self.tenant = 'juju_epc' + self.creds = {'username': 'user', + 'password': 'pwd'} + self.orchestrator = {'name': 'juju', + 'version': '2.0', + 'object': 'foo', + 'requirements': {'flavor': {'name': 'm1.small', + 'ram_min': 2048}, + 'pip': 'python3-pip', + 'repo_link': 'ppa:juju/stable', + 'dep_package': 'software-' + 'properties' + '-common', + 'pip3_packages': 'juju-wait'}} + self.vnf = {'name': 'juju_epc', + 'descriptor': {'version': '1', + 'file_name': '/src/epc-test/' + 'abot_charm/' + 'functest-abot-' + 'epc-bundle/bundle.yaml', + 'name': 'abot-oai-epc', + 'requirements': {'flavor': + {'name': 'm1.medium', + 'ram_min': 4096}}}} + with mock.patch('functest.opnfv_tests.vnf.epc.juju_epc.os.makedirs'), \ + mock.patch('functest.opnfv_tests.vnf.epc.juju_epc.get_config', + return_value={'tenant_images': 'foo', + 'orchestrator': self.orchestrator, + 'vnf': self.vnf, 'vnf_test_suite': '', + 'version': 'whatever'}), \ + mock.patch('functest.utils.openstack_utils.get_keystone_client', + return_value='test'), \ + mock.patch('functest.utils.openstack_utils.get_glance_client', + return_value='test'), \ + mock.patch('functest.utils.openstack_utils.get_neutron_client', + return_value='test'), \ + mock.patch('functest.utils.openstack_utils.get_nova_client', + return_value='test'): + self.epc_vnf = juju_epc.JujuEpc() + + self.images = {'image1': 'url1', + 'image2': 'url2'} + self.details = {'orchestrator': {'status': 'PASS', 'duration': 120}, + 'vnf': {}, + 'test_vnf': {}} + + @mock.patch('functest.utils.openstack_utils.get_keystone_client', + return_value='test') + @mock.patch('functest.utils.openstack_utils.get_or_create_tenant_for_vnf', + return_value=True) + @mock.patch('functest.utils.openstack_utils.get_or_create_user_for_vnf', + return_value=True) + @mock.patch('functest.utils.openstack_utils.get_credentials', + return_value={'auth_url': 'test/v1', + 'project_name': 'test_tenant'}) + @mock.patch('snaps.openstack.create_image.OpenStackImage.create') + @mock.patch('os.system') + def test_prepare_default(self, *args): + """ Unittest for Prepare testcase """ + self.epc_vnf.orchestrator = self.orchestrator + self.assertIsNone(self.epc_vnf.prepare()) + args[4].assert_called_once_with('test', + 'debayan', + 'OAI EPC deployed ' + 'with Juju') + + +if __name__ == "__main__": + logging.disable(logging.CRITICAL) + unittest.main(verbosity=2) -- cgit 1.2.3-korg