diff --git a/.gitmodules b/.gitmodules index a4742eac4482b9d860fc688ddfe176db368c2f1f..9e2e0ac5758ef545a9b0a22189230ff92e12c8c1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,7 @@ -[submodule "ttcn\\LibCommon"] - path = ttcn\\LibCommon +[submodule "ttcn/LibCommon"] + path = ttcn/LibCommon url = https://forge.etsi.org/rep/LIBS/LibCommon.git -[submodule "ttcn\\LibIts"] - path = ttcn\\LibIts - url = https://forge.etsi.org/rep/LIBS/LibIts +[submodule "titan-test-system-framework"] + path = titan-test-system-framework + url = https://labs.etsi.org/rep/cti-tools/titan-test-system-framework.git + branch = devel diff --git a/.jenkins.sh b/.jenkins.sh index 344abf1b5f044e385cfb14cae69a037b72af4ce2..260dfdf14eed7b6d525b5cb7c02352ef5b3b9f7a 100755 --- a/.jenkins.sh +++ b/.jenkins.sh @@ -10,13 +10,23 @@ cd $(dirname $0) run_dir=`pwd` # Docker version 2 -cd ./virtualization/docker +cd ./virtualization/docker-dev ./build.sh #--force-stfubuntu +ret_code=`echo $?` + +if [ $ret_code != 0 ] +then + cd $run_dir + exit -1 +fi + #./run.sh if [ "$1" == "--remove" ] then - docker rmi --force ttf_t012_mec:latest + docker rmi --force mec_devel:latest fi -cd - +cd $run_dir + +exit 0 diff --git a/Makefile b/Makefile index 747307182752d061d33d29583902faf86601d625..62e6da4f7698ae7d5d7a89ad85b275e7987e2698 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ $$(foreach I, $$(includes), $$(eval all_includes += $(1)/$$(I))) $$(foreach M, $$(modules), $$(eval $$(call IncludeModule, $$(if $$(filter /%, $$(M)), $$(M), $(1)/$$(M))))) endef -all_includes := $(TTCN3_DIR)/include $(TTCN3_DIR)/src $(TOPDIR)/ccsrc/Framework +all_includes := $(TTCN3_DIR)/include $(TTCN3_DIR)/src defines += TITAN_RUNTIME_2 _NO_SOFTLINKS_ $(ATS) AS_USE_SSL libs += $(TTCN3_DIR)/lib/libttcn3-rt2-parallel.a -lstdc++fs @@ -47,7 +47,7 @@ outdir := $(TOPDIR)/build/$(ATS) bindir := $(TOPDIR)/bin sources := $(sort $(all_sources)) -includes := $(outdir) $(outdir)/.. $(all_includes) $(NPCAP_INCLUDE) +includes := $(outdir) $(outdir)/.. $(all_includes) /usr/include/libxml2 $(NPCAP_INCLUDE) ifeq (Windows_NT,$(OS)) EXE=.exe @@ -108,14 +108,14 @@ $(outdir) $(bindir): mkdir -p $@ $(bindir)/$(ATS)$(EXE): $(gen_objects) $(cc_objects) - g++ -g -O0 -o $@ $(LDFLAGS) $(gen_objects) $(cc_objects) $(libs) + g++ -g -O0 -std=c++17 -o $@ $(LDFLAGS) $(gen_objects) $(cc_objects) $(libs) $(gen_objects) :%.o :%.cc - g++ -g -O0 -c $(addprefix -D, $(defines)) $(addprefix -I, $(includes)) -o $@ $< + g++ -g -O0 -std=c++17 -c $(addprefix -D, $(defines)) $(addprefix -I, $(includes)) -o $@ $< $(cc_objects) : $(outdir)/%.o : %.cc mkdir -p $(dir $@) - g++ -g -O0 -c $(addprefix -D, $(defines)) $(addprefix -I, $(includes)) -o $@ $< + g++ -g -O0 -std=c++17 -c $(addprefix -D, $(defines)) $(addprefix -I, $(includes)) -o $@ $< #$(gen_sources): # $(TTCN3_DIR)/bin/compiler -n -e -L -R -U none -o $(outdir) $(tt_sources) @@ -123,7 +123,7 @@ $(cc_objects) : $(outdir)/%.o : %.cc $(gen_sources): $(outdir)/.generate $(outdir)/.generate: Makefile $(tt_sources) - $(TTCN3_DIR)/bin/compiler -b -d -e -f -g -l -L -M -n -O -r -R -U none -x -X -o $(outdir) $(tt_sources) + $(TTCN3_DIR)/bin/compiler $(TTCN3_COMPILER_OPTIONS) -o $(outdir) $(tt_sources) touch $@ $(foreach S, $(ttcn_sources), $(eval $(outdir)/$(notdir $(patsubst %.ttcn, %.cc, $(S))): $(S))) diff --git a/README.md b/README.md index aa013afe94077ef99ff33fd4314b4e593e893c97..10188b71ccd2afe32a947447fb60528a1229fa72 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ # MEC Testing Framework in TTCN-3 - - GS 032-3 ## Introduction -This repositories contains the test specifications and test adapter code for MEC API Conformance Testing in TTCN-3, GS 032-3. -More information and dowload of the standard at https://portal.etsi.org/webapp/WorkProgram/Report_WorkItem.asp?WKI_ID=56776. +This repositories contains the test specifications and test adapter code for MEC API Conformance Testing in TTCN-3, GS 032-2/3. + +More information and download of the standard at https://portal.etsi.org/webapp/WorkProgram/Report_WorkItem.asp?WKI_ID=56776. For more information on ETSI ISG Multi-access Edge Computing (MEC), visit https://www.etsi.org/technologies/multi-access-edge-computing. @@ -17,25 +18,28 @@ Unless specified otherwise, the content of this repository and the files contain See the attached LICENSE file or visit https://forge.etsi.org/legal-matters. ## Standard links -- Multi-access Edge Computating standards, accessible [here](https://www.etsi.org/standards#page=1&search=MEC&title=1&etsiNumber=1&content=1&version=0&onApproval=1&published=1&historical=1&startDate=1988-01-15&endDate=2019-05-06&harmonized=0&keyword=&TB=&stdType=&frequency=&mandate=&collection=&sort=1). +- Multi-access Edge Computating standards, accessible [here](https://www.etsi.org/standards#page=1&search=MEC&title=1&etsiNumber=1&content=1&version=0&onApproval=1&published=1&withdrawn=0&historical=0&isCurrent=1&superseded=1&startDate=1988-01-15&endDate=2029-12-06&harmonized=0&keyword=&TB=&stdType=&frequency=&mandate=&collection=&sort=1). ## RFC links - RFC 7159 - The JavaScript Object Notation (JSON) Data Interchange Format, accessible [here](https://tools.ietf.org/html/rfc7159.html) NOTE All draft can be found in the 'IETF XML Registry', accessible [here](https://www.iana.org/assignments/xml-registry/xml-registry.xhtml) -## Download required libraries +## STFs/TTFs + +The following STFs were or are currently involved in the evolutions of the ETSI MEC protocols project: +- STF 569, STF 625, TTF T012 -This projects requires the LibCommon and LibIts libraries to compile. The libraries location are git submodules of the current repository. -Once you have cloned the present repository, in order to install the libraries you want to execute: +# Installation - git submodule init - git submodule update +The ETSI MEC protocols project builds and tests regularly on the following platforms: + + - Linux (Ubuntu) + - Windows ([Cygwin x64](https://cygwin.com/install.html), [Npcap SDK x64](https://nmap.org/npcap/#download) and [OpenSSL-Windows x64](https://www.openssl.org) are required) -Alternatively, you may clone the project together with the required libraries with the following command: +Note: The [OpenSSL](https://www.openssl.org) version >= 1.1.1 is also required. - git clone --recurse-submodules ## Installation @@ -45,6 +49,7 @@ The MEC Testing Framework project builds and tests regularly on the following pl Note: The [OpenSSL](https://www.openssl.org) version > 1.1.x is also required. + ### How to do it? They are two different methods: @@ -66,50 +71,82 @@ Vagrant requires a virtual machine. You can use either VirtualBox or WMware. Docker does not need a virtual machine, so it is the more efficant way. -### Using Vagrant +### Using TITAN compiler on a Docker image + +In this configuration, TITAN compiler is located on a Docker image and the sources and the outputs are located on the host. Pre-requisites on your host machine: -- Install [Virtualbox](https://www.virtualbox.org/manual/ch01.html) -- Install [Vagrant](https://www.vagrantup.com/intro/getting-started/) -- Install Vagrant plugin vagrant-vbguest -- Credentials to access [ETSI forge](https://forge.etsi.org/gitlab/users/sign_in) - - Set the environment variable USERNAME to your ETSI EOL account user name - - Set the environment variable PASSWORD to your ETSI EOL account password +- Install Docker -Procedure: -- On your host machine, open a command line session (PuTTY, DOS window...) -- From the ETSI MEC Testing Framework project, clone the Vagrant folder -- In the file Vagrantfile, modify the tag config.vm.provision replacing & strings by your ETSI credentials -- In the Vagrant folder, execute the following commands: +Procedure on the host machine: +- Open a Terminal +- Clone the ETSI MEC Test System ```sh -$ vagrant up --provider virtualbox --provision -... +$ git clone --recurse-submodules --branch devel https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git ``` -NOTE The creation and the installations will take some time to achieve -- Stop vagrant virtual machine +- Apply patches ```sh -$ vagrant halt -... +$ ./install.sh ``` -- Update the file 'Vagrantfile' to match with your networks configuration -- Re-start the vagrant virtual machine and log to to the machine +- From the ETSI MEC Test System root directory, build the Docker image executing the following commands: ```sh -$ vagrant up -... -$ vagrant ssh +$ cd ./virtualization/docker +$ docker build --no-cache --tag alpine-mec -f Dockerfile --force-rm . +$ docker images +REPOSITORY TAG IMAGE ID CREATED SIZE +alpine-mec latest dafa00e36515 23 seconds ago 623MB +alpine latest 49176f190c7e 13 days ago 7.05MB ``` -- Switch to the next clause (Usage) +To check that TITAN is well installed, execute the following command: + +```sh +$ ./docker-run.sh version +``` + +To build the MEC Test Suite, execute the following command: + +```sh +$ ./docker-run.sh build Mec_Location +``` + +Possble other options are 'clean' to remove all the build outputs or 'rebuild' to force a build of the Test Suite after a 'clean'. + +To retrieve the list of the available test cases, execute the following command: + +```sh +$ ./docker-run.sh list Mec_Location +``` + +Before to execute the MEC Test Suite, prepare, edit and update the configuration file: + +```sh +$ ln -sf ../../etc/AtsXxx/AtsXxx_yyy.cf_ ../../etc/AtsXxx/AtsXxx.cfg # e.g. ln -sf ../../etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ ../../etc/AtsMec_Location/AtsMec_Location.cfg +$ vi ../../etc/AtsXxx/AtsXxx.cfg # To update it, e.g. vi ../../etc/AtsMec_Location/AtsMec_Location.cfg +``` + +To execute the MEC Test Suite, execute the following command: + +```sh +$ ./docker-run.sh run Mec_Location +``` + +Notes: +- The MEC Test System is listening on port 30181 +- Updating the file etc/AtsXxx/AtsXxx.cfg is about (e.g. etc/AtsMec_Location/AtsMec_Location.cfg): +. Selecting the test(s) to be executed +. Updating value of PICs and PIXITs +. Updating HTTP port setting -NOTE The user password is vagrant. +### Using development Docker image -### Using Docker +In this configuration, the TITAN compiler, the sources and the outputs are located on the Docker image. Pre-requisites on your host machine: - Install Virtualbox @@ -136,6 +173,49 @@ $ ./docker/run-container.sh - Switch to the next clause (Usage) +### Using Vagrant + +Pre-requisites on your host machine: +- Install [Virtualbox](https://www.virtualbox.org/manual/ch01.html) +- Install [Vagrant](https://www.vagrantup.com/intro/getting-started/) +- Install Vagrant plugin vagrant-vbguest +- Credentials to access [ETSI forge](https://forge.etsi.org/gitlab/users/sign_in) + - Set the environment variable USERNAME to your ETSI EOL account user name + - Set the environment variable PASSWORD to your ETSI EOL account password + +Procedure: +- On your host machine, open a command line session (PuTTY, DOS window...) +- From the ETSI MEC Testing Framework project, clone the Vagrant folder +- In the file Vagrantfile, modify the tag config.vm.provision replacing & strings by your ETSI credentials +- In the Vagrant folder, execute the following commands: + +```sh +$ vagrant up --provider virtualbox --provision +... +``` + +NOTE The creation and the installations will take some time to achieve +- Stop vagrant virtual machine + +```sh +$ vagrant halt +... +``` + +- Update the file 'Vagrantfile' to match with your networks configuration +- Re-start the vagrant virtual machine and log to to the machine + +```sh +$ vagrant up +... +$ vagrant ssh +``` + +- Switch to the next clause (Usage) + +NOTE The user password is vagrant. + + ### From scratch Pre-requisites: @@ -203,28 +283,42 @@ Procedure: - Clone the ETSI MEC Testing Framework project into $HOME/dev folder ```sh -$ git clone --recurse-submodules --branch TTF012_Mec https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git ./TTF012_Mec -$ cd /home/etsi/dev/TTF012_Mec/ttcn/LibIts -$ rm -fr t3q -$ cd ttcn && rm -fr Common +$ git clone --recurse-submodules --branch devel https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git ./gs032p3-ttcn-test-suite ``` - Apply patches ```sh -$ cd /home/etsi/dev/TTF012_Mec -$ cp ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/ -$ cp ./ttcn/patch_lib_common_titan/*.ttcn ./ttcn/LibCommon/ -$ cp ./ttcn/patch_lib_http/*.ttcn ./ttcn/LibIts/ttcn/Http/ -$ cp ./ttcn/patch_lib_its/module.mk ./ttcn/LibIts/ +$ ./install.sh ``` -- Update your default environment with the content of the script $HOME/dev/TTF012_Mec/scripts/devenv.bash.ubuntu +- Update your default environment with the content of the script $HOME/dev/gs032p3-ttcn-test-suite/scripts/devenv.bash.ubuntu - Switch to the next clause (Usage) -## Usage +# Generate certificates for TLS and MEC security support + +This clause describes how generate certificates desrived from Let's encrypt certificate. These certificate will be used for TS mutual authentication and for MEC Security tests. +NOTE: +- Certficates shall be renewed every 3 months +- The port 80 shall be vailable for standalone validation + +Pre-requisites: +- You need to install python and [certbot](https://manpages.ubuntu.com/manpages/impish/en/man1/certbot.1.html). + +To generate certifcates, execute the following command: + +```sh +$ export REQUESTS_CA_BUNDLE=$(dirname `python -c "import certifi; print(certifi.where())"`) +$ mkdir -p $HOME/var/ssl +$ sudo certbot certonly --debug --mec-tls-cert --config-dir $HOME/var/ssl --work-dir $HOME/var/ssl --logs-dir $HOME/var/ssl --standalone --agree-tos --email -d -w $HOME/var/ssl/ +``` + +NOTE: For testing certificate generation and renewal, use the certbot's --dry-run option. + + +# Usage This clause describes how to compile and execute an Abstract Test Suite. @@ -237,16 +331,16 @@ Procedure using Eclipse TITAN: - Start eclipse using a new workspace, (e.g. with the name workspace_titan) - Download and follow the steps to install Eclipse plugins for TITAN, accessible [here]{https://www.eclipse.org/downloads/download.php?file=/titan/Eclipse_installationguide.pdf} - Open the workspace_titan -- Create a new TITAN project (e.g. TTF012_Mec) +- Create a new TITAN project (e.g. gs032p3-ttcn-test-suite) Procedure in TITAN command line: - Open several SSH session (PuTTY...) -- Change to the directory ~/dev/TTF012_Mec/src/AtsMec/objs +- Change to the directory ~/dev/gs032p3-ttcn-test-suite/src/AtsMec/objs - Build the test suite AtsMec ```sh -$ cd ~/dev/TTF012_Mec/ && export ATS=AtsMec +$ cd ~/dev/gs032p3-ttcn-test-suite/ && export ATS=AtsMec $ make ... ``` @@ -258,7 +352,7 @@ $ make - To run the test suite, execute the following command: ```sh -$ cd ~/dev/TTF012_Mec/scripts/ +$ cd ~/dev/gs032p3-ttcn-test-suite/scripts/ $ ./run-all.bash ... ``` @@ -266,7 +360,7 @@ $ ./run-all.bash - The log files are located in ../logs folder. You can edit them using any editor or using the Eclipse TITAN log plugins -## How to Report a Bug +# How to Report a Bug The ETSI MEC Testing Framework project is under constant development, so it is possible that you will encounter a bug while using it. Please report bugs at cti_support at etsi dot org. diff --git a/ccsrc/EncDec/LibHttp/LibItsHttp_Encdec.cc b/ccsrc/EncDec/LibHttp/LibItsHttp_Encdec.cc deleted file mode 100644 index 4eb83791b9dd3025633490a48c8bfd5989e369e6..0000000000000000000000000000000000000000 --- a/ccsrc/EncDec/LibHttp/LibItsHttp_Encdec.cc +++ /dev/null @@ -1,28 +0,0 @@ - -#include "LibItsHttp_MessageBodyTypes.hh" - -#include "http_codec.hh" - -#include "loggers.hh" - -namespace LibItsHttp__EncdecDeclarations { - - BITSTRING fx__enc__http__message(const LibItsHttp__TypesAndValues::HttpMessage& p) { - loggers::get_instance().log_msg(">>> fx__enc__http__message: ", (const Base_Type&)p); - - OCTETSTRING os; - http_codec codec; - codec.encode(p, os); - - return oct2bit(os); - } - INTEGER fx__dec__http__message(BITSTRING& pdu, LibItsHttp__TypesAndValues::HttpMessage& p) { - loggers::get_instance().log_msg(">>> fx__dec__http__message: ", pdu); - - OCTETSTRING os = bit2oct(pdu); - http_codec codec; - codec.decode(os, p); - - return 0; - } -} // End of namespace LibItsHttp__EncdecDeclarations diff --git a/ccsrc/EncDec/LibHttp/module.mk b/ccsrc/EncDec/LibHttp/module.mk deleted file mode 100644 index 5de93980b39cdb82d84984019f51ba86407b5d86..0000000000000000000000000000000000000000 --- a/ccsrc/EncDec/LibHttp/module.mk +++ /dev/null @@ -1 +0,0 @@ -sources := LibItsHttp_Encdec.cc diff --git a/ccsrc/Framework/include/base_time.hh b/ccsrc/Framework/include/base_time.hh deleted file mode 100644 index 78bf5f90e0516d3071de9c1313ac2107bed18843..0000000000000000000000000000000000000000 --- a/ccsrc/Framework/include/base_time.hh +++ /dev/null @@ -1,62 +0,0 @@ -/*! - * \file base_time.hh - * \brief Header file for the control port base_time functionality. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include - -/** - * \class base_time - * \brief This class provides time tools such as getting current time - */ -class base_time { - const unsigned long long its_base_time_ms = 1072915200000L; //! Base time 01/01/2004 12:00am in millseconds - - static base_time* _instance; -private: - base_time() { }; //! Can not be created manually -public: - static inline base_time& get_instance(); - - virtual ~base_time() { if (_instance != nullptr) delete _instance; }; - -public: - inline const unsigned long long get_current_time_ms() const; - inline const unsigned long long get_its_base_time_ms() const; - inline const unsigned long long get_its_current_time_ms() const; - inline const unsigned long long get_its_current_time_us() const; - inline const unsigned long long get_its_current_time_mod_ms() const; -}; // End of class base_time - -// static functions -base_time& base_time::get_instance() { - return (_instance != nullptr) ? *_instance : *(_instance = new base_time()); -} - -const unsigned long long base_time::get_current_time_ms() const { - return std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); -} - -const unsigned long long base_time::get_its_base_time_ms() const { - return base_time::its_base_time_ms; -} - -const unsigned long long base_time::get_its_current_time_ms() const { - return std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count() - base_time::its_base_time_ms; -} - -const unsigned long long base_time::get_its_current_time_us() const { - return std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count() - base_time::its_base_time_ms * 1000; -} - -const unsigned long long base_time::get_its_current_time_mod_ms() const { - return (std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count() - base_time::its_base_time_ms) % 65536; -} - diff --git a/ccsrc/Framework/include/codec.hh b/ccsrc/Framework/include/codec.hh deleted file mode 100644 index 9a6f4b5f8fd421de77de70eb4d0e9166cf634a7f..0000000000000000000000000000000000000000 --- a/ccsrc/Framework/include/codec.hh +++ /dev/null @@ -1,63 +0,0 @@ -/*! - * \file codec.hh - * \brief Header file for ITS abstract codec definition. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include "params.hh" - -class OCTETSTRING; //! Declare TITAN class -class CHARSTRING; //! Declare TITAN class -class BITSTRING; //! Declare TITAN class - -/*! - * \class codec - * \brief This class provides the interface for all ITS codecs, include UT and AC codecs - * \abstract - */ -template -class codec { -protected: - params* _params; //! Reference to params stack - // \todo Use smart pointer std::unique_ptr - -public: //! \publicsection - /*! - * \fn codec(); - * \brief Default constructor - * \todo Remove logs - */ - explicit codec() : _params(nullptr) { }; - /*! - * \fn ~codec(); - * \brief Default destructor - * \virtual - * \todo Remove logs - */ - virtual ~codec() { }; - /*! - * \fn int encode(const TPDUEnc& msg, OCTETSTRING& data); - * \brief Encode typed message into an octet string - * \param[in] p_message The typed message to be encoded - * \param[out] p_data The encoding result - * \return 0 on success, -1 otherwise - * \pure - */ - virtual int encode(const TPDUEnc& p_message, OCTETSTRING& p_data) = 0; - /*! - * \fn int decode(const OCTETSTRING& p_, TPDUDec& p_message, params* p_params = NULL); - * \brief Encode typed message into an octet string format - * \param[in] p_data The message in its octet string - * \param[out] p_message The decoded typed message - * \return 0 on success, -1 otherwise - * \pure - */ - virtual int decode(const OCTETSTRING& p_, TPDUDec& p_message, params* p_params = NULL) = 0; -}; // End of class codec - diff --git a/ccsrc/Framework/include/codec_factory.hh b/ccsrc/Framework/include/codec_factory.hh deleted file mode 100644 index cbded3be724a677707e837a0f89c22375d02b3cd..0000000000000000000000000000000000000000 --- a/ccsrc/Framework/include/codec_factory.hh +++ /dev/null @@ -1,46 +0,0 @@ -/*! - * \file codec_factory.hh - * \brief Header file for ITS abstract protocol codec definition. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include -#include -#include -#include - -#include "codec.hh" - -class Record_Type; //! TITAN forward declaration - -/*! - * \class codec_factory - * \brief This class provides a factory class to create codec class instances - * \abstract - */ -class codec_factory { -public: //! \publicsection - /*! - * \fn codec(); - * \brief Default constructor - */ - codec_factory() { }; - /*! - * \fn codec* create_codec(const std::string & type, const std::string & param); - * \brief Create the codecs stack based on the provided codecs stack description (cf. remark) - * \param[in] p_type The provided codecs stack description - * \param[in] p_params Optional parameters - * \return 0 on success, -1 otherwise - * \remark The description below introduces codecs stack in case of ITS project: - * HTTP(codecs=xml:held_codec;html:html_codec,json:json_codec)/TCP(debug=1,server=httpbin.org,port=80,use_ssl=0) - * \pure - */ - virtual codec* create_codec() = 0; -}; // End of class codec_factory - diff --git a/ccsrc/Framework/include/codec_stack_builder.hh b/ccsrc/Framework/include/codec_stack_builder.hh deleted file mode 100644 index 1a4d430c1e204cd77bcfa5c23834032296a1e2fa..0000000000000000000000000000000000000000 --- a/ccsrc/Framework/include/codec_stack_builder.hh +++ /dev/null @@ -1,74 +0,0 @@ -/*! - * \file codec_stack_builder.hh - * \brief Header file for ITS protocol stack builder. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include "codec_factory.hh" - -class Record_Type; //! TITAN forward declaration - -/*! - * \class codec_stack_builder - * \brief This class provides a factory class to create Codec class instances - */ -class codec_stack_builder { -private: //! \privatesection - static codec_stack_builder* _instance; //! Smart pointer to the unique instance of the logger framework - std::map _codecs; //! The list of the registered \see t_codec factories - - /*! - * \brief Default constructor - * Create a new instance of the codec_stack_builder class - * \private - */ - codec_stack_builder() { }; // can not be created manually -public: //! \publicsection - /*! - * \fn codec_stack_builder* get_instance(); - * \brief Accessor for the unique instance of the logger framework - * \static - */ - static codec_stack_builder* get_instance() { return _instance ? _instance : _instance = new codec_stack_builder(); }; - - /*! - * \fn void register_codec_factory(const std::string & p_type, codec_factory* p_codec_factory); - * \brief Add a new codec factory - * \param[in] p_type The codec identifier (e.g. GN for the GeoNetworking codec...) - * \param[in] p_codec_factory A reference to the \see codec_factory - * \static - */ - static void register_codec_factory(const std::string & p_type, codec_factory* p_codec_factory) { codec_stack_builder::get_instance()->_register_codec_factory(p_type, p_codec_factory); }; - -private: //! \privatesection - /*! - * \fn void _register_codec_factory(const std::string & p_type, codec_factory* p_codec_factory); - * \brief Add a new codec factory - * \param[in] p_type The codec identifier (e.g. GN for the GeoNetworking codec...) - * \param[in] p_codec_factory A reference to the \see codec_factory - */ - void _register_codec_factory(const std::string & p_type, codec_factory* p_codec_factory) { _codecs[p_type] = p_codec_factory; }; - -public: //! \publicsection - /*! - * \fn codec* get_codec(const char* p_codec_name); - * \brief Retrieve the specified codec name from the list of the registered codecs - * \param[in] p_codec_name The codec indentifier - * \return The pointer to the codec object on success, nullptr otherwise - */ - inline codec* get_codec(const char* p_codec_name) { // NOTE A virtual method cannot not be a template ==> polymorphism required here - typename std::map::const_iterator it = _codecs.find(p_codec_name); - if (it != _codecs.cend()) { - return it->second->create_codec(); - } - - return nullptr; - } -}; // End of class codec_stack_builder - diff --git a/ccsrc/Framework/include/converter.hh b/ccsrc/Framework/include/converter.hh deleted file mode 100644 index 77800b5511a5208c458fa2417e126a7457b4d116..0000000000000000000000000000000000000000 --- a/ccsrc/Framework/include/converter.hh +++ /dev/null @@ -1,406 +0,0 @@ -/*! - * \file converter.hh - * \brief Helper class for types converter. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include // LONG_MAX, LLONG_MAX -#include // time_t, struct tm, difftime, time, mktime - -/*! - * \class converter - * \brief This class provide a set of methods for types conversions - * \remark Singleton pattern - */ -class converter { - - /*! - * \brief Unique static object reference of this class - */ - static converter * instance; - - /*! - * \brief Default private ctor - */ - converter() {}; - /*! - * \brief Default private dtor - */ - ~converter() { - if (instance != NULL) { - delete instance; - instance = NULL; - } - }; - -public: /*! \publicsection */ - /*! - * \brief Public accessor to the single object reference - */ - inline static converter & get_instance() { - if (instance == NULL) instance = new converter(); - return *instance; - }; - -public: - /*! - * \enum endian_t - * \brief Endianess style - */ - typedef enum { - big_endian, - little_endian - } endian_t; - -public: - /*! - * \brief Convert a Binary Coded Decimal value into a binary value - * \param[in] p_value The BDC value - * \return The binary value - * \inline - */ - inline uint8_t bcd_to_bin(const uint8_t p_value) { - return ((p_value / 16 * 10) + (p_value % 16)); - }; - - /*! - * \brief Convert a binary value into a Binary Coded Decimal value - * \param[in] p_value The binary value - * \return The BCD value - * \inline - */ - inline uint8_t bin_to_bcd(const uint8_t p_value) { - return ((p_value / 10 * 16) + (p_value % 10)); - }; - - /*! - * \brief Swap two bytes length value (e.g. 0xCAFE becomes 0xFECA) - * \param[in] p_value The value to swap - * \return The swapped value - * \inline - */ - uint16_t swap(const uint16_t p_value); - inline int16_t swap(const int16_t p_value) { - return static_cast(swap(static_cast(p_value))); - }; - /*! - * \brief Swap four bytes length value (used for littel endian / big endian) - * \param[in] p_value The value to swap - * \return The swapped value - */ - uint32_t swap(const uint32_t p_value); - inline int32_t swap(const int32_t p_value) { - return static_cast(swap(static_cast(p_value))); - }; - - /*! - * \brief Convert a string into an hexadecimal string - * \param[in] p_value The string value - * \return The hexadecimal value - */ - std::string string_to_hexa(const std::string & p_value, const bool p_uppercase = false); - /*! - * \brief Convert a bytes array int32_t an hexadecimal string - * \param[in] p_value The bytes array value - * \return The hexadecimal value - */ - std::string bytes_to_hexa(const std::vector & p_value, const bool p_uppercase = false); - /*! - * \brief Convert an hexadecimal string into a bytes array - * \param[in] p_value The hexadecimal value - * \return The bytes array value - */ - std::vector hexa_to_bytes(const std::string & p_value); - - /*! - * \brief Convert a time in time_t format into a string formated according to RFC 822, 1036, 1123, 2822 - * \param[in] p_time The time to convert in time_t format - * \return The time string formated - * \see http://www.unixtimestamp.com/ - * @code - * std::string result = time_to_string(1489755780); - * result.compare("Fri, 17 Mar 2017 13:03:00 +0000") == 0 // When time zone is set to UTC - * @endcode - * \remark Use commands 1) timedatectl to change your machine timezone (e.g. sudo timedatectl set-timezone UTC to change machine timezone to UTC, 2) timedatectl list-timezones to get the list of the timezones) - */ - std::string time_to_string(const time_t p_time); - /*! - * \brief Convert a time in struct tm format into a string formated according to RFC 822, 1036, 1123, 2822 - * \param[in] p_time The time to convert in struct tm format - * \return The time string formated - * \see http://www.unixtimestamp.com/ - */ - std::string time_to_string(const struct tm & p_time); - - /*! - * \brief Convert a 16-bits integer (int16_t) into a bytes array - * \param[in] p_value The 16-bits integer value - * \param[in] p_endianess Endianess style. Default: big_endian - * \return The bytes array value - */ - inline std::vector short_to_bytes(const int16_t p_value, const endian_t p_endianess = big_endian) const { - std::vector result(sizeof(short), 0x00); - for (int i = sizeof(short) - 1; i >= 0; i--) { - int offset = (sizeof(short) - 1 - i) * 8; - result[i] = static_cast((p_value >> offset) & 0xFF); - } // End of 'for' statement - return result; - }; // End of short_to_bytes - - /*! - * \brief Convert a bytes array into a 16-bits integer (int16_t) - * \param[in] p_value The bytes array - * \param[in] p_endianess Endianess style. Default: big_endian - * \return The 16-bits integer on success, SHRT_MAX on error (wrong bytes array size) - */ - inline int16_t bytes_to_short(const std::vector & p_value, const endian_t p_endianess = big_endian) const { - // Sanity check - if (p_value.size() > sizeof(short)) { - return SHRT_MAX; - } - int16_t value = 0; - for (size_t i = 0; i < p_value.size(); i++) { - value = (value << 8) + (p_value[i] & 0xff); - } // End of 'for' statement - return value; - }; // End of bytes_to_short - - /*! - * \brief Convert a 32-bits integer (int32_t) into a bytes array - * \param[in] p_value The 32-bits integer value - * \param[in] p_endianess Endianess style. Default: big_endian - * \return The bytes array value - */ - inline std::vector int_to_bytes(const int32_t p_value, const endian_t p_endianess = big_endian) const { - /*uint8_t bytes[sizeof(p_value)]; - std::copy( - static_cast(static_cast(&p_value)), - static_cast(static_cast(&p_value)) + sizeof(p_value), - bytes - ); - std::vector result(bytes, bytes + sizeof(bytes) / sizeof(uint8_t));*/ - std::vector result(sizeof(int), 0x00); - for (int i = sizeof(int) - 1; i >= 0; i--) { - int offset = (sizeof(int) - 1 - i) * 8; - result[i] = static_cast((p_value >> offset) & 0xFF); - } // End of 'for' statement - return result; - }; // End of int_to_bytes - - /*! - * \brief Convert a bytes array into a 32-bits integer (int32_t) - * \param[in] p_value The bytes array - * \param[in] p_endianess Endianess style. Default: big_endian - * \return The 32-bits integer on success, LONG_MAX on error (wrong bytes array size) - */ - inline int32_t bytes_to_int(const std::vector & p_value, const endian_t p_endianess = big_endian) const { - // Sanity check - if (p_value.size() > sizeof(int)) { - return INT_MAX; - } - int32_t value = 0; - for (size_t i = 0; i < p_value.size(); i++) { - value = (value << 8) + (p_value[i] & 0xff); - } // End of 'for' statement - return value; - // return *((int *)(&p_value[0])); - }; // End of bytes_to_int - - /*! - * \brief Convert a 64-bits integer (int64_t) into a bytes array - * \param[in] p_value The 64-bits integer value - * \param[in] p_endianess Endianess style. Default: big_endian - * \return The bytes array value - */ - inline std::vector long_to_bytes(const int64_t p_value, const endian_t p_endianess = big_endian) const { - /*uint8_t bytes[sizeof(p_value)]; - std::copy( - static_cast(static_cast(&p_value)), - static_cast(static_cast(&p_value)) + sizeof(p_value), - bytes - ); - std::vector result(bytes, bytes + sizeof(bytes) / sizeof(uint8_t));*/ - std::vector result(sizeof(int64_t), 0x00); - for (int i = sizeof(int64_t) - 1; i >= 0; i--) { - int offset = (sizeof(int64_t) - 1 - i) * 8; - result[i] = static_cast((p_value >> offset) & 0xFF); - } // End of 'for' statement - return result; - }; // End of long_to_bytes - - /*! - * \brief Convert a bytes array into a 64-bits integer (int64_t) - * \param[in] p_value The bytes array - * \param[in] p_endianess Endianess style. Default: big_endian - * \return The 64-bits integer on success, LLONG_MAX on error (wrong bytes array size) - */ - inline int64_t bytes_to_long(const std::vector & p_value, const endian_t p_endianess = big_endian) const { - // Sanity check - if (p_value.size() > sizeof(int64_t)) { - return LLONG_MAX; - } - int64_t value = 0; - for (size_t i = 0; i < p_value.size(); i++) { - value = (value << 8) + (p_value[i] & 0xff); - } // End of 'for' statement - return value; - // return *((long *)(&p_value[0])); - }; // End of bytes_to_long - - /*! - * \brief Convert a float value into a bytes array - * \param[in] p_value The float value - * \return The bytes array value - */ - inline std::vector float_to_bytes(const float p_value) const { - uint8_t bytes[sizeof(p_value)]; - std::copy( - static_cast(static_cast(&p_value)), - static_cast(static_cast(&p_value)) + sizeof(p_value), - bytes - ); - std::vector result(bytes, bytes + sizeof(bytes) / sizeof(uint8_t)); - return result; - }; // End of float_to_long - - /*! - * \brief Convert a bytes array into a float - * \param[in] p_value The bytes array - * \return The float value - */ - inline float bytes_to_float(const std::vector & p_value) const { - return *((float *)(&p_value[0])); - }; // End of bytes_to_float - - /*! - * \brief Convert a string into a bytes array - * \param[in] p_value The string value - * \return The bytes array value - */ - inline std::vector string_to_bytes(const std::string & p_value) const { - return std::vector(p_value.begin(), p_value.end()); - }; // End of string_to_bytes - - /*! - * \brief Convert a bytes array into a string - * \param[in] p_value The bytes array value - * \return The string value - */ - inline std::string bytes_to_string(const std::vector & p_value) const { - return std::string(p_value.begin(), p_value.end()); - }; // End of bytes_to_string - -public: - /*! - * \brief Convert a string into an integer - * \param[in] p_value The string value - * \return The integer value - */ - inline int32_t string_to_int(const std::string & p_value) const { - return std::stoi(p_value); - //return atoi(p_value.c_str()); - }; // End of string_to_int - - /*! - * \brief Convert an integer into a string - * \param[in] p_value The integer value - * \return The string value - */ - inline std::string int_to_string(const int32_t & p_value) const { - std::ostringstream ss; - ss << p_value; - return ss.str(); - }; // End of string_to_bytes - - /*! - * \brief Convert a string in to lower case - * \param[in/out] p_value The string value to convert - */ - inline void to_lower(std::string& p_value) { - std::transform(p_value.begin(), p_value.end(), p_value.begin(), ::tolower); - } - - /*! - * \brief Convert a string in to upper case - * \param[in/out] p_value The string value to convert - */ - inline void to_upper(std::string& p_value) { - std::transform(p_value.begin(), p_value.end(), p_value.begin(), ::toupper); - } - -public: - - /*! - * \brief Returns a copy of the string, with leading and trailing special characters omitted - * \param[in] p_value The string value - * \param[in] p_trim_chars The special characters to be omitted. Default: ' ' and TAB - * \return The new string value - */ - std::string trim(const std::string& p_value, const std::string& p_trim_chars = " \t"); - - /*! - * \brief Convert the provided string into a list of arguments - * \param[in] p_value The string value - * \param[in] p_separator The separator sequence to use for the spliting process - * \return The item list - * \code{.cc} - * std::string str = "This is a test for spliting a string with a white spave"; - * std::vector tokens = converter::get_instance().split(str, " "); - * std::clog << "Tokens: " << std::endl; - * for (auto it = tokens.begin(); it != tokens.end(); ++it) { - * std::clog << " " << *it << std::endl; - * } - * \endcode - */ - std::vector split(const std::string & p_value, const std::string& p_separator); - - /*! - * \brief Convert the provided string into a list of arguments - * \param[in] p_value The string value - * \return The arguments list - * \code{.cc} - * std::string str = "--host localhost --port 12345 --duration -1"; - * std::vector tokens = converter::get_instance().split_arguments_line(str); - * std::clog << "Tokens: " << std::endl; - * for (auto it = tokens.begin(); it != tokens.end(); ++it) { - * std::clog << " " << *it << std::endl; - * } - * \endcode - */ - std::vector split_arguments_line(const std::string & p_value); - - /*! - * \brief Convert the provided buffer into a Base64 - * \param[in] p_value The buffer value - * \return The Base64 encoded buffert - */ - std::vector buffer_to_base64(const std::vector & p_value); - - /*! - * \brief Convert the provided Base64 buffer - * \param[in] p_value The buffer value - * \return The Base64 encoded buffert - */ - std::vector base64_to_buffer(const std::vector & p_value); - - static const std::string lut_u; - static const std::string lut_l; - static const std::string base64_enc_map; - -}; // End of class converter diff --git a/ccsrc/Framework/include/layer.hh b/ccsrc/Framework/include/layer.hh deleted file mode 100644 index abd4eae428e1ea02df86579dc72a996e2dd5970d..0000000000000000000000000000000000000000 --- a/ccsrc/Framework/include/layer.hh +++ /dev/null @@ -1,144 +0,0 @@ -/*! - * \file layer.hh - * \brief Header file for ITS abstract protocol layer definition. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include -#include -#include -#include - -#include "params.hh" - -class OCTETSTRING; //! Forward declaration of TITAN class -class BITSTRING; //! Forward declaration of TITAN class -class CHARSTRING; //! Forward declaration of TITAN class -class INTEGER; //! Forward declaration of TITAN class - -/*! - * \class layer - * \brief This class provides basic description of an ITS protocol layer - */ -class layer { - std::vector upperLayers; //! List of the upper protocol layers - std::vector lowerLayers; //! List of the lower protocol layers - -protected: - std::string type; //! Type description, it indicates the protocol type (e.g. CAM, DENM, GN, ETH, PCAP...) - -public: //! \publicsection - /*! - * \brief Default constructor - * Create a new instance of the layer class - */ - explicit layer() : upperLayers(), lowerLayers(), type(std::string("")) { }; - - /*! - * \brief Specialized constructor - * Create a new instance of the layer class with its type description - * \param[in] p_type The port type name (e.g. GN for the GeoNetworking layer) - * \remark This constructor is called by the layer factory - * \see layer_factory - */ - explicit layer(const std::string& p_type) : upperLayers(), lowerLayers(), type(std::string(p_type.begin(), p_type.end())) { }; - - /*! - * \brief Default destructor - * \todo Remove logs - */ - virtual ~layer() { - // Double linked list, only remove layers in lowerLayers from the lowest one - std::for_each(lowerLayers.rbegin(), lowerLayers.rend(), [](layer* it) { delete it; } ); - lowerLayers.clear(); - upperLayers.clear(); - }; - - /*! - * \fn void delete_layer(); - * \brief Delete this layer - * \todo To be implemented - */ - void delete_layer() { }; - -public: //! \publicsection - /*! - * \inline - * \fn void add_upper_layer(layer* p_layer); - * \brief Add a new layer in the list of the upper layer - * \param[in] p_layer The layer protocol to be removed - */ - inline void add_upper_layer(layer* p_layer) { - if (p_layer != NULL) { - upperLayers.push_back(p_layer); - p_layer->lowerLayers.push_back(this); - }; - }; - - /*! - * \fn void remove_upper_layer(layer* p_layer); - * \brief Remove the specified upper layer protocol from the list of the upper layer - * \param[in] p_layer The layer protocol to be removed - * \todo To be implemented - */ - void remove_upper_layer(layer* p_layer) { }; - - /*! - * \virtual - * \fn void send_data(OCTETSTRING& data, params& params); - * \brief Send bytes formated data to the lower layers - * \param[in] p_data The data to be sent - * \param[in] p_params Some parameters to overwrite default value of the lower layers parameters - * \todo Remove the logs - * \virtual - */ - virtual void send_data(OCTETSTRING& p_data, params& p_params) { }; - - /*! - * \virtual - * \fn void receive_data(OCTETSTRING& data, params& params); - * \brief Receive bytes formated data from the lower layers - * \param[in] p_data The bytes formated data received - * \param[in] p_params Some lower layers parameters values when data was received - * \todo Remove the logs - * \virtual - */ - virtual void receive_data(OCTETSTRING& p_data, params& p_params) { } - - /*! - * \inline - * \fn const std::string& to_string(); - * \brief Remove the specified upper layer protocol from the list of the upper layer - * \param[in] The layer protocol to be removed - */ - inline const std::string& to_string() const { return type; }; - -protected: //! \protectedsection - inline void to_all_layers(std::vector&layers, OCTETSTRING& data, params& params) { - for (std::vector::const_iterator it = layers.cbegin(); it != layers.cend(); ++it) { - layer* p = *it; - p->receive_data(data, params); // FIXME BUG I - } // End of 'for' statement - }; - - inline void receive_to_all_layers(OCTETSTRING& data, params& params) { - for (std::vector::const_iterator it = upperLayers.cbegin(); it != upperLayers.cend(); ++it) { - layer* p = *it; - p->receive_data(data, params); - } // End of 'for' statement - }; - - inline void send_to_all_layers(OCTETSTRING& data, params& params) { - for (std::vector::const_iterator it = lowerLayers.cbegin(); it != lowerLayers.cend(); ++it) { - layer* p = *it; - p->send_data(data, params); - } // End of 'for' statement - }; -}; // End of class layer - diff --git a/ccsrc/Framework/include/layer_factory.hh b/ccsrc/Framework/include/layer_factory.hh deleted file mode 100644 index c66fdc3c4b4590d439d6dd96ce8604df5c9344c9..0000000000000000000000000000000000000000 --- a/ccsrc/Framework/include/layer_factory.hh +++ /dev/null @@ -1,114 +0,0 @@ -/*! - * \file layer_factory.hh - * \brief Header file for ITS abstract protocol layer definition. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include -#include -#include -#include - -#include "layer.hh" - -/*! - * \class layer_factory - * \brief This class provides a factory class to create layer class instances - * \abstract - */ -class layer_factory { -public: //! \publicsection - /*! - * \fn codec(); - * \brief Default constructor - */ - layer_factory() {}; - /*! - * \fn layer* create_layer(const std::string & type, const std::string & param); - * \brief Create the layers stack based on the provided layers stack description (cf. remark) - * \param[in] p_type The provided layers stack description - * \param[in] p_params Optional parameters - * \return 0 on success, -1 otherwise - * \remark The description below introduces layers stack in case of ITS project: - * CAM layer - * next_header : btpA|btpB (overwrite BTP.type) - * header_type : tsb|gbc - * header_sub_type : sh (single hop) - * DENM layer - * next_header : btpA|btpB (overwrite BTP.type) - * header_type : tsb|gbc - * BTP layer - * type : btpA|btpB - * destination port: dst_port - * source port : src_port - * device_mode : Set to 1 if the layer shall encapsulate upper layer PDU - * GN layer - * its_aid : ITS AID as defined by ETSI TS 102 965 V1.2.1. Default: 141 - * ll_address : GeoNetworking address of the Test System - * latitude : latitude of the Test System - * longitude : longitude of the Test System - * beaconing : Set to 1 if GnLayer shall start beaconing - * Beaconing timer expiry : expiry (ms) - * device_mode : Set to 1 if the layer shall encapsulate upper layer PDU - * secured_mode : Set to 1 if message exchanges shall be signed - * encrypted_mode : Set to 1 if message exchanges shall be encrypted - * NOTE: For signed & encrypted message exchanges, both secured_mode and encrypted_mode shall be set to 1 - * certificate : Certificate identifier the Test Adapter shall use - * secure_db_path : Path to the certificates and keys storage location - * hash : Hash algorithm to be used when secured mode is set - * Authorized values are SHA-256 or SHA-384 - * Default: SHA-256 - * signature : Signature algorithm to be used when secured mode is set - * Authorized values are NISTP-256, BP-256 and BP-384 - * Default: NISTP-256 - * cypher : Cyphering algorithm to be used when secured mode is set - * Ethernet layer - * mac_src :Source MAC address - * mac_bc :Broadcast address - * eth_type : Ethernet type - * Commsignia layer - * mac_src : Device MAC address, used to discard packets - * To indicate no filering, use the value 000000000000 - * mac_bc : Broadcast address - * eth_type : Ethernet type, used to discard packets - * target_host : Device address - * target_port : Device port - * source_port : Test System port - * interface_id: Interface id, used to discard packets - * tx_power : TX power (dB) - * UDP layer (IP/UDP based on Pcap) - * dst_ip : destination IPv4 address (aa.bb.cc.dd) - * dst_port: destination port - * src_ip : source IPv4 address (aa.bb.cc.dd) - * src_port: source port - * Pcap layer - * mac_src : Source MAC address, used to exclude from capture the acket sent by the Test System - * filter : Pcap filter (compliant with tcpdump syntax) - * E.g. filter=and ether src 04e548000001 - * Online mode: - * nic: Local NIC - * If set, online mode is used - * Offline mode (nic is present but not set): - * file : File to read - * frame_offset: Frame offset, used to skip packets with frame number < frame_offset - * time_offset : Time offset, used to skip packets with time offset < time_offset - * save_mode : 1 to save sent packet, 0 otherwise - * Here are some examples: - * GeoNetworking multiple component case: - * NodeB.geoNetworkingPort.params := "GN(ll_address=04e548000001,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/COMMSIGNIA(mac_src=04e548000001,mac_bc=FFFFFFFFFFFF,eth_type=8947,target_host=10.200.1.101,target_port=7942,source_port=7943,its_aid=141,interface_id=2,tx_power=-32)/UDP(dst_ip=192.168.56.1,dst_port=12346,src_ip=192.168.156.4,src_port=12345)/ETH(mac_src=04e548000001,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=04e548000001,file=/home/vagrant/TriesAndDelete/etsi_its/testdata/TC_AUTO_IOT_DENM_RWW_BV_01_short.pcap,filter=and (udp port 30000 or udp port 7943))" -NodeC.geoNetworkingPort.params := "GN(ll_address=70b3d5791b48,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/COMMSIGNIA(mac_src=70b3d5791b48,mac_bc=FFFFFFFFFFFF,eth_type=8947,target_host=10.200.1.101,target_port=7942,source_port=7943,its_aid=141,interface_id=2,tx_power=-32)/UDP(dst_ip=192.168.56.1,dst_port=12346,src_ip=192.168.156.4,src_port=12345)/ETH(mac_src=70b3d5791b48,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=70b3d5791b48,file=/home/vagrant/TriesAndDelete/etsi_its/testdata/TC_AUTO_IOT_DENM_RWW_BV_01_short.pcap,filter=and (udp port 30000 or udp port 7943))" - * NodeB.geoNetworkingPort.params := "GN(ll_address=04e548000001,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/ETH(mac_src=04e548000001,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=04e548000001,file=/home/vagrant/TriesAndDelete/etsi_its/testdata/TC_AUTO_IOT_DENM_RWW_BV_01.pcap,filter=and ether src 04e548000001)" -#NodeC.geoNetworkingPort.params := "GN(ll_address=70b3d5791b48,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/ETH(mac_src=70b3d5791b48,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=70b3d5791b48,file=/home/vagrant/TriesAndDelete/etsi_its/testdata/TC_AUTO_IOT_DENM_RWW_BV_01.pcap,filter=and ether src 70b3d5791b48)" - * UpperTester port based on UDP - * system.utPort.params := "UT_GN/UDP(dst_ip=192.168.1.1,dst_port=12346,src_ip=192.168.156.4,src_port=12345)/ETH(mac_src=026f8338c1e5,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=0800275c4959,nic=enp0s8,filter=and udp port 12346)" - * \pure - */ - virtual layer* create_layer(const std::string & p_type, const std::string & p_params) = 0; -}; // End of class layer_factory - diff --git a/ccsrc/Framework/include/layer_stack_builder.hh b/ccsrc/Framework/include/layer_stack_builder.hh deleted file mode 100644 index af797a3a64b7a9cae8379ca46f77d266907ac2ce..0000000000000000000000000000000000000000 --- a/ccsrc/Framework/include/layer_stack_builder.hh +++ /dev/null @@ -1,67 +0,0 @@ -/*! - * \file layer_stack_builder.hh - * \brief Header file for ITS protocol stack builder. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include "layer_factory.hh" - -/*! - * \class layer_stack_builder - * \brief This class provides a factory class to create Layer class instances - */ -class layer_stack_builder { -private: //! \privatesection - typedef std::map LayerFactoryMap; - - static layer_stack_builder * _instance; //! Smart pointer to the unique instance of the logger framework - std::map _layer_factories; //! The list of the registered \see t_layer factories - - /*! - * \brief Default constructor - * Create a new instance of the layer_stack_builder class - * \private - */ - layer_stack_builder(); // can not be created manually -public: //! \publicsection - /*! - * \fn layer_stack_builder* get_instance(); - * \brief Accessor for the unique instance of the logger framework - * \static - */ - static layer_stack_builder* get_instance(); - - /*! - * \fn void register_layer_factory(const std::string & p_type, layer_factory* p_layer_factory); - * \brief Add a new layer factory - * \param[in] p_type The layer identifier (e.g. GN for the GeoNetworking layer...) - * \param[in] p_layer_factory A reference to the \see layer_factory - * \static - */ - static void register_layer_factory(const std::string & p_type, layer_factory* p_layer_factory); - -private: //! \privatesection - /*! - * \fn void _register_layer_factory(const std::string & p_type, layer_factory* p_layer_factory); - * \brief Add a new layer factory - * \param[in] p_type The layer identifier (e.g. GN for the GeoNetworking layer...) - * \param[in] p_layer_factory A reference to the \see layer_factory - */ - void _register_layer_factory(const std::string & p_type, layer_factory* p_layer_factory); - -public: //! \publicsection - /*! - * \fn layer* create_layer_stack(const char* p_layer_stack_description); - * \brief Add a new layer factory - * \param[in] p_layer_stack_description A textual description of the layer to create - * \return The created layer object on success, nullptr otherwise - */ - layer* create_layer_stack(const char* p_layer_stack_description); -}; // End of class layer_stack_builder - diff --git a/ccsrc/Framework/include/params.hh b/ccsrc/Framework/include/params.hh deleted file mode 100644 index 046fd725df301eb0db6ae9b4e48bda813b8f6a78..0000000000000000000000000000000000000000 --- a/ccsrc/Framework/include/params.hh +++ /dev/null @@ -1,137 +0,0 @@ -/*! - * \file params.hh - * \brief Header file for the parameter dictionary. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include -#include -#include - - /*! - * \class params - * \brief This class provides basic functionalities for an ITS dictionary - * \implements std::map - */ -class params : public std::map { -public: //! \publicsection - // TODO Use static constexpr (see commsignia_layer.hh) - static const std::string& debug; //! Set to 1 to enable the debug mode - - static const std::string& loopback; - - static const std::string& mac_src; //! Source MAC address parameter name - static const std::string& mac_dst; //! Destination MAC address parameter name - static const std::string& mac_bc; //! Broadcast MAC address parameter name - static const std::string& eth_type; //! Ethernet type parameter name - static const std::string& beaconing; //! Beaconing mode parameter name - static const std::string& timestamp; //! Packet reception timestamp - static const std::string& station_type; - static const std::string& country; - static const std::string& type_of_address; - static const std::string& ssp; //! SSP parameter name - static const std::string& its_aid; //! ITS-AID parameter name - static const std::string& gn_payload; //! GeoNetworking Payload parameter name - static const std::string& gn_next_header; //! GeoNetworking NextHeader parameter name - static const std::string& gn_header_type; //! GeoNetworking HeaderType parameter name - static const std::string& gn_header_sub_type; //! GeoNetworking HeaderSubType parameter name - static const std::string& gn_lifetime; //! GeoNetworking Lifetime parameter name - static const std::string& gn_traffic_class; //! GeoNetworking Traffic class parameter name - static const std::string& btp_type; //! BTP Type parameter name - static const std::string& btp_payload; //! BTP Payload parameter name - static const std::string& btp_destination_port; //! BTP DestinationPort parameter name - static const std::string& btp_info; //! BTP Info parameter name - - static const std::string& nic; //! Network Interface Card parameter name - static const std::string& ll_address; //! Test system GeoNetworking LL-Address parameter name - static const std::string& latitude; //! Test system Latitude parameter name - static const std::string& longitude; //! Test system Longitude parameter name - static const std::string& expiry; //! Test system GeoNetworking Lifetime parameter name (in ms) - - static const std::string& station_id; //! To indicate to the peer ITS_Container::stationID - - static const std::string& device_mode; //! To indicate to the lower layer to act as a standalone device - static const std::string& secured_mode; //! To indicate to the lower layer to apply signature on message exchanges as defined in IEEE 1609.2 & ETSI TS 102 965 - static const std::string& encrypted_mode; //! To indicate to the lower layer to apply encryption on message exchanges as defined in IEEE 1609.2 & ETSI TS 102 965 - static const std::string& enable_security_checks;//! To indicates if security check failures shall be treated as error or warning - static const std::string& sec_db_path; //! Path to the folder containing certificates - static const std::string& certificate; //! The certificate identifier the Test System shall use. E.g. CERT_TS_A - static const std::string& peer_certificate; //! The peer certificate identifier the Test System shall use for encryption. E.g. CERT_TS_A - static const std::string& hash; //! The digest algorithm the Test System shall use, authorised values are SHA-256 or SHA-384. Default: SHA-256 - static const std::string& signature; //! The signature algorithm the Test System shall use, authorised values are NISTP-256, BP-256 and BP-384. Default: NISTP-256 - static const std::string& cypher; //! The encryption algorithm the Test System shall use, authorised values are NISTP-256 and BP-256. Default: NISTP-256 - static const std::string& distanceA; //! Test system GeoNetworking DistanceA parameter name - static const std::string& distanceB; //! Test system GeoNetworking DistanceB parameter name - static const std::string& angle; //! Test system GeoNetworking Angle parameter name - - static const std::string& payload_type; //! Tyoe of payload, value is the ITS Conatainer message identifier or omitted in case of unknown payload - - static const std::string& next_header; //! Upper layer settings - static const std::string& header_type; //! Upper layer settings - static const std::string& header_sub_type; //! Upper layer settings - - static const std::string& interface_id; //! Commsignia antenna selector - - static const std::string& server; //! HTTP server address (e.g. www.etsi.org) - static const std::string& port; //! HTTP server port. Default: 80 - static const std::string& use_ssl; //! Set to 1 to use SSL to communicate with the HTTP server. Default: false - static const std::string& mutual_auth; //! Set to 1 to use mutual authentication. Default: false - static const std::string& trusted_ca_list; //! List of trusted CA certificates - static const std::string& server_mode; //! Does the test sytem acting as a server. Default: 0 - static const std::string& local_port; //! Local listener port. Default: 80 - - static const std::string& method; //! HTTP method type. Default: POST - static const std::string& uri; //! HTTP URI value. Default: / - static const std::string& host; //! HTTP Host value. Default: 127.0.0.1 - static const std::string& content_type; //! HTTP Content-type value. Default: application/text - - static const std::string& codecs; //! List of codecs to use for HTTP application layers - - /*! - * \brief Default constructor - * Create a new instance of the params class - */ - params() : std::map() {}; - /*! - * \brief Copy constructor - * Clone an existing instance of a params object - * \param[in] p_params An existing instance of a params object - */ - explicit params(const params& p_params) : std::map(p_params.begin(), p_params.end()) { }; - - /*! - * \brief Default destructor - */ - virtual ~params() { }; - - /*! - * \fn void log() const; - * \brief Provides a dump of the content of this instance - */ - void log() const; - /*! - * \fn void log() const; - * \brief Provides a dump of the content of this instance - */ - void log(); - /*! - * \fn void reset(); - * \brief Reset the content of this instance - */ - void reset(); - - /*! - * \static - * \fn void convert(params& p_param, const std::string p_parameters); - * \brief Create a new instance of a params object by converting a list of ITS parameters in string format (t1=v1,T2=(v0,v1v2)...) - * \return a new instance of a params object - */ - static void convert(params& p_param, const std::string p_parameters); -}; // End of class params - diff --git a/ccsrc/Framework/include/t_layer.hh b/ccsrc/Framework/include/t_layer.hh deleted file mode 100644 index 8e355a9138ef2ef3a9ca492e98edbce94bd4ef3d..0000000000000000000000000000000000000000 --- a/ccsrc/Framework/include/t_layer.hh +++ /dev/null @@ -1,72 +0,0 @@ -/*! - * \file t_layer.hh - * \brief Header file for ITS abstract protocol layer definition. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include "layer.hh" - -/*! - * \class t_layer - * \brief This class provides basic description of an ITS port protocol layer. - * A port protocol layer is the final layer which provides the access to the physical communication channel - * A port protocol layer derives from both a layer class and a template port class - */ -template class t_layer : public layer { - typedef std::vector TPortList; - typedef typename std::vector::iterator TPortListIterator; - - TPortList upperPorts; //! The list of the upper ports - -public: //! \publicsection - /*! - * \brief Default constructor - * Create a new instance of the t_layer class - * \todo Remove logs - */ - explicit t_layer() : layer(), upperPorts() { }; - - /*! - * \brief Specialized constructor - * Create a new instance of the layer class with its type description - * \param[in] p_type The port type name (e.g. TCP for the TCP sockect based layer) - * \remark This constructor is called by the layer factory - * \see layer_factory - */ - explicit t_layer(const std::string& p_type) : layer(p_type), upperPorts() { }; - /*! - * \inline - * \fn void add_upper_port(TPort * p_port); - * \brief Add a new upper port layer - * \todo To be done - */ - inline void add_upper_port(TPort * p_port) { upperPorts.push_back(p_port); }; - /*! - * \fn void remove_upper_port(TPort*); - * \brief Remove the specified upper layer port protocol from the list of the upper layers - * \param[in] p_layer The layer protocol to be removed - */ - void remove_upper_port(TPort*); - -protected: //! \protectedsection - /*! - * \inline - * \fn void to_all_upper_ports(const TMessage& m, const params& param); - * \brief Forward the message to all available upper port layers - * \param[in] p_message The message to be forwarded - * \param[in] p_params Some lower layers parameters values when data was received - */ - template - inline void to_all_upper_ports(const TMessage& p_message, const params& p_params) { - for(TPortListIterator it=upperPorts.begin(); itreceiveMsg(p_message, p_params); - } - } -}; // End of class t_layer - diff --git a/ccsrc/Framework/module.mk b/ccsrc/Framework/module.mk deleted file mode 100644 index b4ca0cee9292d804863078784f7ac461406cc9c2..0000000000000000000000000000000000000000 --- a/ccsrc/Framework/module.mk +++ /dev/null @@ -1,6 +0,0 @@ -sources := src/base_time.cc \ - src/codec_stack_builder.cc \ - src/converter.cc \ - src/layer_factory.cc \ - src/params.cc -includes += ./include diff --git a/ccsrc/Framework/src/base_time.cc b/ccsrc/Framework/src/base_time.cc deleted file mode 100644 index 79924f86464773a5cc399a63b13a7ffedefdb895..0000000000000000000000000000000000000000 --- a/ccsrc/Framework/src/base_time.cc +++ /dev/null @@ -1,13 +0,0 @@ -/*! - * \file base_time.cc - * \brief Source file for the control port base_time functionality. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#include "base_time.hh" - -base_time* base_time::_instance = nullptr; diff --git a/ccsrc/Framework/src/codec_stack_builder.cc b/ccsrc/Framework/src/codec_stack_builder.cc deleted file mode 100644 index 2bf087e4bb7d687b91ab1d1db54da361a2d24d0d..0000000000000000000000000000000000000000 --- a/ccsrc/Framework/src/codec_stack_builder.cc +++ /dev/null @@ -1,4 +0,0 @@ -#include "codec_stack_builder.hh" - -codec_stack_builder* codec_stack_builder::_instance = NULL; - diff --git a/ccsrc/Framework/src/converter.cc b/ccsrc/Framework/src/converter.cc deleted file mode 100644 index 44e9bb8c1bac4a22de24e2319827537fb767531e..0000000000000000000000000000000000000000 --- a/ccsrc/Framework/src/converter.cc +++ /dev/null @@ -1,202 +0,0 @@ -#include "converter.hh" -#include -converter * converter::instance = NULL; - -uint16_t converter::swap(const uint16_t p_value) { - uint8_t *ptr = (uint8_t *)&p_value; - return (ptr[0] << 8) | ptr[1]; -} - -uint32_t converter::swap(const uint32_t p_value) { - uint8_t *ptr = (uint8_t *)&p_value; - return (ptr[0] << 24) | (ptr[1] << 16) | (ptr[2] << 8) | ptr[3]; -} - -const std::string converter::lut_u = "0123456789ABCDEF"; -const std::string converter::lut_l = "0123456789abcdef"; -std::string converter::string_to_hexa(const std::string & p_value, const bool p_uppercase) { - - std::string input(p_value); - std::for_each( - input.begin(), - input.end(), - [](char & c) { - c = std::toupper(c); - } - ); - - std::string output; - uint32_t length = p_value.length(); - output.reserve(2 * length); - if (p_uppercase) { // TODO Use pointer to reduce code size - for (uint32_t i = 0; i < length; ++i) { - const uint8_t c = input[i]; - output.push_back(lut_u[c >> 4]); - output.push_back(lut_u[c & 15]); - } // End of 'for' statement - } else { - for (uint32_t i = 0; i < length; ++i) { - const uint8_t c = input[i]; - output.push_back(lut_l[c >> 4]); - output.push_back(lut_l[c & 15]); - } // End of 'for' statement - } - - return output; -} - -std::string converter::bytes_to_hexa(const std::vector & p_value, const bool p_uppercase) { - std::string ret; - ret.assign(p_value.size()*2, ' '); - if (p_uppercase) { // TODO Use pointer to reduce code size - for(size_t i=0; i>4]; - ret[i*2+1] = lut_u[c&0xF]; - } - } else { - for(size_t i=0; i>4]; - ret[i*2+1] = lut_l[c&0xF]; - } - } - return ret; -} - -inline uint8_t char2byte(const char p_ch) { - size_t s = converter::lut_l.find(p_ch); - if(s == std::string::npos) { - if ((s = converter::lut_u.find(p_ch)) == std::string::npos) { - throw (std::length_error("")); - } - } - return s; -} - -std::vector converter::hexa_to_bytes(const std::string & p_value) { - // Sanity check - std::vector output; - size_t i=0, idx = 0, outlen=(p_value.length()+1) / 2; - - output.assign(outlen, 0x00); - try{ - if (p_value.length() & 1) - output[idx++] = char2byte(p_value[i++]); - for(;idx converter::split(const std::string & p_value, const std::string& p_separator) { - std::vector output; - std::size_t current, previous = 0; - current = p_value.find(p_separator); - while (current != std::string::npos) { - output.push_back(p_value.substr(previous, current - previous)); - previous = current + 1; - current = p_value.find(p_separator, previous); - } - output.push_back(p_value.substr(previous, current - previous)); - - return output; -} - -std::vector converter::split_arguments_line(const std::string & p_value) { - std::vector output; - std::string line = trim(p_value); - if (!line.empty() && (line[0] == '-')) { // Valid command line - size_t current = 0; - size_t next = (size_t)-1; - size_t pos = 0; - do { - if (line[pos + 1] == '-') { // -- - current = pos + 2; - } else { - current = pos + 1; - } - next = line.find("-", current); - std::string str(line.substr(pos, next - pos)); - output.push_back(str); - pos = next; - } while (next != std::string::npos); - } // else, invalid command line - return output; -} - -const std::string converter::base64_enc_map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - -std::vector converter::buffer_to_base64(const std::vector & p_value) { - std::vector out; - - int val = 0, valb = -6; - for (unsigned char c : p_value) { - val = (val << 8) + c; - valb += 8; - while (valb >= 0) { - out.push_back(converter::base64_enc_map[(val >> valb) & 0x3F]); - valb -= 6; - } // End of 'while' statement - } // End of 'for' statement - if (valb > -6) { - out.push_back(converter::base64_enc_map[((val << 8) >> (valb + 8)) & 0x3F]); - } - while (out.size() % 4) { - out.push_back('='); - } // End of 'while' statement - - return out; -} - -std::vector converter::base64_to_buffer(const std::vector &p_value) { - std::vector out; - - std::vector T(256, -1); - for (int i = 0; i < 64; i++) { - T[converter::base64_enc_map[i]] = i; - } - - int val = 0, valb = -8; - for (unsigned char c : p_value) { - if (T[c] == -1) { - break; - } - val = (val << 6) + T[c]; - valb += 6; - if (valb >= 0) { - out.push_back((unsigned char)char((val >> valb) & 0xFF)); - valb -= 8; - } - } // End of 'for' statement - return out; -} diff --git a/ccsrc/Framework/src/layer_factory.cc b/ccsrc/Framework/src/layer_factory.cc deleted file mode 100644 index 33f24feff891385a58cf38e3515b4d498223ec1b..0000000000000000000000000000000000000000 --- a/ccsrc/Framework/src/layer_factory.cc +++ /dev/null @@ -1,71 +0,0 @@ -#include -#include - -#include "layer_stack_builder.hh" - -#include "loggers.hh" - -layer_stack_builder* layer_stack_builder::_instance = NULL; - -// static functions -layer_stack_builder * layer_stack_builder::get_instance() -{ - return _instance ? _instance : _instance = new layer_stack_builder(); -} - -void layer_stack_builder::register_layer_factory(const std::string & p_type, layer_factory* p_layer_factory) -{ - layer_stack_builder::get_instance()->_register_layer_factory(p_type, p_layer_factory); -} - -// member functions -layer_stack_builder::layer_stack_builder() -{ -} - -void layer_stack_builder::_register_layer_factory(const std::string & p_type, layer_factory* p_layer_factory) -{ - _layer_factories[p_type] = p_layer_factory; -} - -layer* layer_stack_builder::create_layer_stack(const char* p_layer_stack_description) -{ - loggers::get_instance().log(">>> layer_stack_builder::create_layer_stack: %s", p_layer_stack_description); - - layer* entry = NULL; // Initial layer (the first declared) - layer* up = NULL; // Upper layer - // Parse the layer description - try { - std::regex rgx ("(\\w+)(\\((.*?)\\))?(\\/|$)"); - std::string str = p_layer_stack_description; - std::sregex_iterator begin(str.cbegin(), str.cend(), rgx); - std::sregex_iterator end = std::sregex_iterator(); - for (std::sregex_iterator it = begin; it != end; ++it) { - std::smatch m = *it; - loggers::get_instance().log("layer_stack_builder::create_layer_stack: %d - %s - %s - %s - %s", m.size(), m[0].str().c_str(), m[1].str().c_str(), m[2].str().c_str(), m[3].str().c_str()); - LayerFactoryMap::iterator i = _layer_factories.find(m[1].str()); - if (i == _layer_factories.end()) { - loggers::get_instance().error("layer_stack_builder::create_layer_stack: %s: Unknown layer type", m[1].str().c_str()); - } - loggers::get_instance().log("layer_stack_builder::create_layer_stack: Create layer %s, %s", m[1].str().c_str(), m[3].str().c_str()); - layer* l = i->second->create_layer(m[1].str(), m[3].str()); - if (NULL == l) { - loggers::get_instance().error("layer_stack_builder::create_layer_stack: %s: Layer creation error", m[1].str().c_str()); - } - - loggers::get_instance().log("layer_stack_builder::create_layer_stack: Setup layers for %s", l->to_string().c_str()); - l->add_upper_layer(up); - if (entry == NULL) { // Set the first declared layer - entry = l; - } - up = l; // Build the linked list of layers - } // End of 'for' statement - } - catch(const std::logic_error& e){ - if(up){ // FIXME To be reviewed - up->delete_layer(); - up = NULL; - } - } - return entry; -} diff --git a/ccsrc/Framework/src/params.cc b/ccsrc/Framework/src/params.cc deleted file mode 100644 index d35f551f8194f0716325762543ca930fa01e1f13..0000000000000000000000000000000000000000 --- a/ccsrc/Framework/src/params.cc +++ /dev/null @@ -1,142 +0,0 @@ -/*! - * \file params.cc - * \brief Source file for the parameter dictionary. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#include -#include - -#include "params.hh" -#include "loggers.hh" - -const std::string& params::debug = std::string("debug"); - -const std::string& params::loopback = std::string("loopback"); - -const std::string& params::mac_src = std::string("mac_src"); -const std::string& params::mac_dst = std::string("mac_dst"); -const std::string& params::mac_bc = std::string("mac_bc"); -const std::string& params::eth_type = std::string("eth_type"); -const std::string& params::beaconing = std::string("beaconing"); -const std::string& params::timestamp = std::string("timestamp"); -const std::string& params::station_type = std::string("station_type"); -const std::string& params::country = std::string("country"); -const std::string& params::type_of_address = std::string("type_of_address"); -const std::string& params::its_aid = std::string("its_aid"); -const std::string& params::ssp = std::string("ssp"); -const std::string& params::gn_payload = std::string("gn_payload"); -const std::string& params::gn_next_header = std::string("gnNextHeader"); -const std::string& params::gn_header_type = std::string("gnHeaderType"); -const std::string& params::gn_header_sub_type = std::string("gnHeaderSubtype"); -const std::string& params::gn_lifetime = std::string("gnLifetime"); -const std::string& params::gn_traffic_class = std::string("gnTrafficClass"); -const std::string& params::btp_type = std::string("btp_type"); -const std::string& params::btp_payload = std::string("btp_payload"); -const std::string& params::btp_destination_port = std::string("dst_port"); -const std::string& params::btp_info = std::string("btp_info"); - -const std::string& params::nic = std::string("nic"); -const std::string& params::latitude = std::string("latitude"); -const std::string& params::longitude = std::string("longitude"); -const std::string& params::ll_address = std::string("ll_address"); -const std::string& params::expiry = std::string("expiry"); - -const std::string& params::station_id = std::string("station_id"); - -const std::string& params::device_mode = std::string("device_mode"); -const std::string& params::secured_mode = std::string("secured_mode"); -const std::string& params::encrypted_mode = std::string("encrypted_mode"); -const std::string& params::enable_security_checks = std::string("enable_security_checks"); -const std::string& params::certificate = std::string("certificate"); -const std::string& params::peer_certificate = std::string("peer_certificate"); -const std::string& params::sec_db_path = std::string("sec_db_path"); -const std::string& params::hash = std::string("hash"); -const std::string& params::signature = std::string("signature"); -const std::string& params::cypher = std::string("cypher"); -const std::string& params::distanceA = std::string("distanceA"); -const std::string& params::distanceB = std::string("distanceB"); -const std::string& params::angle = std::string("angle"); - -const std::string& params::payload_type = std::string("payload_type"); - -const std::string& params::next_header = std::string("next_header"); -const std::string& params::header_type = std::string("header_type"); -const std::string& params::header_sub_type = std::string("header_sub_type"); - -const std::string& params::interface_id = std::string("interface_id"); - -const std::string& params::server = std::string("server"); -const std::string& params::port = std::string("port"); -const std::string& params::use_ssl = std::string("use_ssl"); -const std::string& params::mutual_auth = std::string("mutual_auth"); -const std::string& params::trusted_ca_list = std::string("trusted_ca_list"); -const std::string& params::server_mode = std::string("server_mode"); -const std::string& params::local_port = std::string("local_port"); - -const std::string& params::method = std::string("method"); -const std::string& params::uri = std::string("uri"); -const std::string& params::host = std::string("host"); -const std::string& params::content_type = std::string("content_type"); - -//const std::string& params::sip_url = std::string("sip_url"); -//const std::string& params::sip_version = std::string("sip_version"); -//const std::string& params::payload = std::string("payload"); - -const std::string& params::codecs = std::string("codecs"); - -void params::convert(params& p_param, const std::string p_parameters) { - // Sanity checks - if (p_parameters.length() == 0) { - return; - } - loggers::get_instance().log(">>> params::convert: %s", p_parameters.c_str()); - // Extract parameters - try { - std::regex rgx ("(\\w+)=(.*?)(,|$)"); - std::sregex_iterator begin(p_parameters.cbegin(), p_parameters.cend(), rgx); - std::sregex_iterator end = std::sregex_iterator(); - for (std::sregex_iterator it = begin; it != end; ++it) { - std::smatch m = *it; - loggers::get_instance().log("params::convert: %d - %s - %s - %s - %s", m.size(), m[0].str().c_str(), m[1].str().c_str(), m[2].str().c_str(), m[3].str().c_str()); - p_param.insert(std::pair(m[1].str(), m[2].str())); - } // End of 'for' statement - } - catch(const std::logic_error& e){ - p_param.clear(); - } - loggers::get_instance().log("<<< params::convert"); -} - -void params::log() const { - loggers::get_instance().log("params::log"); - if (size() == 0) { - loggers::get_instance().log("\tEmpty"); - } else { - for (const_iterator it = cbegin(); it != cend(); ++it) { - loggers::get_instance().log("\t(%s, %s)", it->first.c_str(), it->second.c_str()); - } // End of 'for' statement - } -} - -void params::log() { - loggers::get_instance().log("params::log"); - if (size() == 0) { - loggers::get_instance().log("\tEmpty"); - } else { - for (const_iterator it = cbegin(); it != cend(); ++it) { - loggers::get_instance().log("\t(%s, %s)", it->first.c_str(), it->second.c_str()); - } // End of 'for' statement - } -} - -void params::reset() { - loggers::get_instance().log("params::reset"); - for (iterator it = begin(); it != end(); ++it) { - it->second.clear(); - } // End of 'for' statement -} diff --git a/ccsrc/Ports/LibHttp/HttpPort.cc b/ccsrc/Ports/LibHttp/HttpPort.cc index c20a2afddf7f4342b8c85da65bd868a7852eaab3..044f6b73b84e51680f6cc767e0fcc234da6a1511 100644 --- a/ccsrc/Ports/LibHttp/HttpPort.cc +++ b/ccsrc/Ports/LibHttp/HttpPort.cc @@ -1,10 +1,12 @@ #include "HttpPort.hh" #include "http_layer_factory.hh" +#include "http_layer.hh" +#include "http_codec_mec.hh" #include "loggers.hh" -#include "LibItsHttp_TypesAndValues.hh" +#include "LibHttp_TypesAndValues.hh" -namespace LibItsHttp__TestSystem { +namespace LibHttp__TestSystem { HttpPort::HttpPort(const char *par_port_name): HttpPort_BASE(par_port_name), _cfg_params(), _layer_params(), _layer(nullptr), _time_key("HttpPort::outgoing_send") { // Nothing to do @@ -55,11 +57,13 @@ namespace LibItsHttp__TestSystem { params::convert(_layer_params, it->second); // TODO This _layer_params seems to be useless // Create layer _layer = layer_stack_builder::get_instance()->create_layer_stack(it->second.c_str()); - if (static_cast(_layer) == nullptr) { + if (static_cast(_layer) == nullptr) { loggers::get_instance().error("HttpPort::user_map: Invalid stack configuration: %s", it->second.c_str()); } + if (!static_cast(_layer)->set_codec(new http_codec_mec())) { + loggers::get_instance().error("HttpPort::user_map: Null codec"); + } static_cast(_layer)->add_upper_port(this); - } else { loggers::get_instance().error("HttpPort::user_map: No layers defined in configuration file"); } @@ -88,7 +92,7 @@ namespace LibItsHttp__TestSystem { } // End of user_stop method - void HttpPort::outgoing_send(const LibItsHttp__TypesAndValues::HttpMessage& send_par) + void HttpPort::outgoing_send(const LibHttp__TypesAndValues::HttpMessage& send_par) { loggers::get_instance().log_msg(">>> HttpPort::outgoing_send: payload=", send_par); @@ -99,7 +103,7 @@ namespace LibItsHttp__TestSystem { loggers::get_instance().set_stop_time(_time_key, duration); } - void HttpPort::receiveMsg (const LibItsHttp__TypesAndValues::HttpMessage& p_ind, const params& p_params) { + void HttpPort::receiveMsg (const LibHttp__TypesAndValues::HttpMessage& p_ind, const params& p_params) { loggers::get_instance().log_msg(">>> HttpPort::receive_msg: ", p_ind); // Sanity check if (!p_ind.is_bound()) { diff --git a/ccsrc/Ports/LibHttp/HttpPort.hh b/ccsrc/Ports/LibHttp/HttpPort.hh index 63c70c5c15d22fa9854bec79f9a073532fe34654..5acb52071cbdb6e7324c39a7c4eaba6ec8041dca 100644 --- a/ccsrc/Ports/LibHttp/HttpPort.hh +++ b/ccsrc/Ports/LibHttp/HttpPort.hh @@ -1,15 +1,15 @@ #pragma once -#include "LibItsHttp_TestSystem.hh" +#include "LibHttp_TestSystem.hh" #include "layer.hh" #include "params.hh" -namespace LibItsHttp__TypesAndValues { +namespace LibHttp__TypesAndValues { class HttpMessage; } -namespace LibItsHttp__TestSystem { +namespace LibHttp__TestSystem { class HttpPort : public HttpPort_BASE { params _cfg_params; @@ -21,7 +21,7 @@ namespace LibItsHttp__TestSystem { ~HttpPort(); void set_parameter(const char *parameter_name, const char *parameter_value); - void receiveMsg (const LibItsHttp__TypesAndValues::HttpMessage& p_ind, const params& p_params); + void receiveMsg (const LibHttp__TypesAndValues::HttpMessage& p_ind, const params& p_params); private: /* void Handle_Fd_Event(int fd, boolean is_readable, @@ -39,7 +39,7 @@ namespace LibItsHttp__TestSystem { void user_stop(); protected: - void outgoing_send(const LibItsHttp__TypesAndValues::HttpMessage& send_par); + void outgoing_send(const LibHttp__TypesAndValues::HttpMessage& send_par); }; // End of class HttpPort } diff --git a/ccsrc/Protocols/ETH/ethernet_layer.cc b/ccsrc/Protocols/ETH/ethernet_layer.cc deleted file mode 100644 index d0ba32a00d25430551fe16cabda9ae914381a34a..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/ETH/ethernet_layer.cc +++ /dev/null @@ -1,82 +0,0 @@ -#include "ethernet_layer_factory.hh" - -#include "loggers.hh" - -ethernet_layer::ethernet_layer(const std::string & p_type, const std::string & param) : layer(p_type), _params() { - loggers::get_instance().log(">>> ethernet_layer::ethernet_layer: %s, %s", to_string().c_str(), param.c_str()); - // Setup parameters - params::convert(_params, param); - params::const_iterator it = _params.find("mac_src"); - if (it == _params.cend()) { - _params.insert(std::pair(std::string("mac_src"), "000000000000")); - } - it = _params.find("mac_bc"); - if (it == _params.cend()) { - _params.insert(std::pair(std::string("mac_bc"), "FFFFFFFFFFFF")); - } - it = _params.find("eth_type"); - if (it == _params.cend()) { - _params.insert(std::pair(std::string("eth_type"), "8947")); - } - //_params.log(); -} - -void ethernet_layer::send_data(OCTETSTRING& data, params& params) { - loggers::get_instance().log_msg(">>> ethernet_layer::send_data: ", data); - - OCTETSTRING eth; - // Destination MAC address - params::const_iterator it = params.find(params::mac_dst); // Find in provided parameters, params - if (it != params.cend()) { - eth = str2oct(CHARSTRING(it->second.c_str())); - } else { - it = _params.find(params::mac_dst); - if (it != _params.cend()) { - eth = str2oct(CHARSTRING(it->second.c_str())); - } else { - eth = str2oct(CHARSTRING(_params[params::mac_bc].c_str())); - } - } - // Source MAC address - it = params.find(params::mac_src); // Find in provided parameters, params - if (it != params.cend()) { - eth += str2oct(CHARSTRING(it->second.c_str())); - } else { - eth += str2oct(CHARSTRING(_params[params::mac_src].c_str())); - } - // Ethernet type - it = params.find(params::eth_type); // Find in layer parameters - if (it != params.cend()) { - eth += str2oct(CHARSTRING(it->second.c_str())); - } else { - eth += str2oct(CHARSTRING(_params[params::eth_type].c_str())); - } - - eth += data; - send_to_all_layers(eth, params); -} - -void ethernet_layer::receive_data(OCTETSTRING& data, params& params) { - loggers::get_instance().log_msg(">>> ethernet_layer::receive_data: ", data); - - // Extract dest MAC Address - OCTETSTRING dst = OCTETSTRING(6, static_cast(data)); - //loggers::get_instance().log_msg("ethernet_layer::receive_data: dst: ", dst); - // Extract source MAC Address - OCTETSTRING src = OCTETSTRING(6, 6 + static_cast(data)); - //loggers::get_instance().log_msg("ethernet_layer::receive_data: src: ", src); - // Extract ethertype - OCTETSTRING proto = OCTETSTRING(2, 2 + static_cast(data)); - //loggers::get_instance().log_msg("ethernet_layer::receive_data: proto: ", proto); - data = OCTETSTRING(data.lengthof() - 14, 14 + static_cast(data)); - // Update params - CHARSTRING s = oct2str(dst); - params.insert(std::pair(params::mac_dst, std::string(static_cast(s)))); - s = oct2str(src); - params.insert(std::pair(params::mac_src, std::string(static_cast(s)))); - //loggers::get_instance().log_msg("ethernet_layer::receive_data: payload for upper layer:", data); - - receive_to_all_layers(data, params); -} - -ethernet_layer_factory ethernet_layer_factory::_f; diff --git a/ccsrc/Protocols/ETH/ethernet_layer.hh b/ccsrc/Protocols/ETH/ethernet_layer.hh deleted file mode 100644 index 6f224a8e6ccfde54ec97fcd76389f76a0c29eb7c..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/ETH/ethernet_layer.hh +++ /dev/null @@ -1,48 +0,0 @@ -/*! - * \file udp_layer.hh - * \brief Header file for ITS UDP/IP protocol layer definition. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include "t_layer.hh" -#include "params.hh" - -class ethernet_layer : public layer { - params _params; //! Layer parameters - -public: //! \publicsection - /*! - * \brief Specialised constructor - * Create a new instance of the ethernet_layer class - * \param[in] p_type \todo - * \param[in] p_param \todo - */ - ethernet_layer(const std::string & p_type, const std::string & param); - /*! - * \brief Default destructor - */ - virtual ~ethernet_layer() {}; - - /*! - * \virtual - * \fn void send_data(OCTETSTRING& data, params& params); - * \brief Send bytes formated data to the lower layers - * \param[in] p_data The data to be sent - * \param[in] p_params Some parameters to overwrite default value of the lower layers parameters - */ - virtual void send_data(OCTETSTRING& data, params& params); - /*! - * \virtual - * \fn void receive_data(OCTETSTRING& data, params& params); - * \brief Receive bytes formated data from the lower layers - * \param[in] p_data The bytes formated data received - * \param[in] p_params Some lower layers parameters values when data was received - */ - virtual void receive_data(OCTETSTRING& data, params& info); -}; // End of class ethernet_layer diff --git a/ccsrc/Protocols/ETH/ethernet_layer_factory.hh b/ccsrc/Protocols/ETH/ethernet_layer_factory.hh deleted file mode 100644 index 099a925f023ec9631da15c92eb8870c909ec5d61..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/ETH/ethernet_layer_factory.hh +++ /dev/null @@ -1,45 +0,0 @@ -/*! - * \file ethernet_layer_factory.hh - * \brief Header file for ITS Ethernet protocol layer factory. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include "layer_stack_builder.hh" - -#include "ethernet_layer.hh" - -/*! - * \class ethernet_layer_factory - * \brief This class provides a factory class to create an ethernet_layer class instance - */ -class ethernet_layer_factory: public layer_factory { - static ethernet_layer_factory _f; //! Reference to the unique instance of this class -public: //! \publicsection - /*! - * \brief Default constructor - * Create a new instance of the ethernet_layer_factory class - * \remark The ETH layer identifier is ETH - */ - ethernet_layer_factory() { - // register factory - layer_stack_builder::register_layer_factory("ETH", this); - }; - /*! - * \fn layer* create_layer(const std::string & type, const std::string & param); - * \brief Create the layers stack based on the provided layers stack description - * \param[in] p_type The provided layers stack description - * \param[in] p_params Optional parameters - * \return 0 on success, -1 otherwise - * \inline - */ - inline virtual layer* create_layer(const std::string& p_type, const std::string& p_param) { - return new ethernet_layer(p_type, p_param); - }; -}; // End of class ethernet_layer_factory - diff --git a/ccsrc/Protocols/ETH/module.mk b/ccsrc/Protocols/ETH/module.mk deleted file mode 100644 index e81733a3181d060340ef98168c6c0ff6f2d77755..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/ETH/module.mk +++ /dev/null @@ -1,3 +0,0 @@ -sources := ethernet_layer.cc -includes := . - diff --git a/ccsrc/Protocols/Http/http_codec.cc b/ccsrc/Protocols/Http/http_codec.cc deleted file mode 100644 index 9e633bab88c9c3e529aa759f4c2380d9af46846d..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Http/http_codec.cc +++ /dev/null @@ -1,783 +0,0 @@ -#include -#include -#include - -#include "codec_stack_builder.hh" - -#include "http_codec.hh" - -#include "loggers.hh" - -#include "LibItsHttp_TypesAndValues.hh" -#include "LibItsHttp_MessageBodyTypes.hh" -#include "LibItsHttp_XmlMessageBodyTypes.hh" -#include "LibItsHttp_JsonMessageBodyTypes.hh" - -int http_codec::encode (const LibItsHttp__TypesAndValues::HttpMessage& msg, OCTETSTRING& data) -{ - loggers::get_instance().log_msg(">>> http_codec::encode: ", (const Base_Type&)msg); - loggers::get_instance().log(">>> http_codec::encode: %p", this); - - TTCN_EncDec::clear_error(); - TTCN_Buffer encoding_buffer; - - _ec.reset(); - - int result; - if (msg.ischosen(LibItsHttp__TypesAndValues::HttpMessage::ALT_request)) { - result = encode_request(msg.request(), encoding_buffer); - } else if (msg.ischosen(LibItsHttp__TypesAndValues::HttpMessage::ALT_response)) { - result = encode_response(msg.response(), encoding_buffer); - } else { - loggers::get_instance().warning("http_codec::encode: Unbound HttpMessage"); - return -1; - } - - data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()); - - loggers::get_instance().log_msg("<<< http_codec::encode: data=", data); - return result; -} - -int http_codec::decode (const OCTETSTRING& data, LibItsHttp__TypesAndValues::HttpMessage& msg, params* params) -{ - loggers::get_instance().log_msg(">>> http_codec::decode: data=", data); - - TTCN_EncDec::clear_error(); - TTCN_Buffer decoding_buffer(data); - loggers::get_instance().log_to_hexa("http_codec::decode: decoding_buffer=", decoding_buffer); - - _dc.reset(); - - _params = params; - - // Get the first line (e.g. HTTP/1.1 302 Found or POST / HTTP/1.1) - CHARSTRING message_id; - if (get_line(decoding_buffer, message_id) == -1) { - return -1; - } - loggers::get_instance().log_msg("http_codec::decode: message_id: ", message_id); - - // Extract parameters - try { - std::string str(static_cast(message_id)); - std::regex rgx ("\\s*(\\w+)/"); - std::sregex_iterator begin(str.cbegin(), str.cend(), rgx); - std::smatch m = *begin; - loggers::get_instance().log("http_codec::decode: %d - %s", m.size(), m[0].str().c_str()); - if (m[0].str().compare("HTTP/") == 0) { // HTTP response - LibItsHttp__TypesAndValues::Response response; - std::regex rgx ("\\s*HTTP/(\\d+)\\.(\\d+)\\s+(\\d+)\\s+([\\w\\s\\t\\v\\f]+)*"); - std::sregex_iterator begin(str.cbegin(), str.cend(), rgx); - std::smatch m = *begin; - loggers::get_instance().log("http_codec::decode: Process response: %d", m.size()); - if (m.size() != 5) { - loggers::get_instance().error("http_codec::decode: Unsupported tag"); - return -1; - } - response.version__major() = std::stoi(m[1].str().c_str()); - response.version__minor() = std::stoi(m[2].str().c_str()); - response.statuscode() = std::stoi(m[3].str().c_str()); - response.statustext() = CHARSTRING(m[4].str().c_str()); - LibItsHttp__TypesAndValues::Headers headers; - std::string content_type; - decode_headers(decoding_buffer, headers, content_type); - response.header() = headers; - loggers::get_instance().log_to_hexa("Before decoding Body: ", decoding_buffer); - LibItsHttp__MessageBodyTypes::HttpMessageBody body; - if (decode_body(decoding_buffer, body, content_type) == -1) { - response.body().set_to_omit(); - } else { - response.body() = OPTIONAL(body); - } - msg.response() = response; - } else { // HTTP request - LibItsHttp__TypesAndValues::Request request; - std::regex rgx ("\\s*(\\w+)\\s+(.+)\\s+HTTP/(\\d)\\.(\\d)"); - std::sregex_iterator begin(str.cbegin(), str.cend(), rgx); - std::smatch m = *begin; - if (m.size() != 5) { - loggers::get_instance().error("http_codec::decode: Unsupported tag"); - return -1; - } - request.method() = CHARSTRING(m[1].str().c_str()); - request.uri() = CHARSTRING(m[2].str().c_str()); - request.version__major() = std::stoi(m[3].str().c_str()); - request.version__minor() = std::stoi(m[4].str().c_str()); - LibItsHttp__TypesAndValues::Headers headers; - std::string content_type; - decode_headers(decoding_buffer, headers, content_type); - request.header() = headers; - OPTIONAL body; - body.set_to_omit(); - if (decode_body(decoding_buffer, body, content_type) == -1) { - request.body().set_to_omit(); - } else { - request.body() = body; - } - msg.request() = request; - } - - loggers::get_instance().log_msg("<<< http_codec::decode: ", (const Base_Type&)msg); - return 0; - } - catch(const std::logic_error& e) { - return -1; - } -} - -int http_codec::encode_request(const LibItsHttp__TypesAndValues::Request& p_request, TTCN_Buffer& p_encoding_buffer) -{ - loggers::get_instance().log_msg(">>> http_codec::encode_request: ", (const Base_Type&)p_request); - - // Encode generic part - p_encoding_buffer.put_cs(p_request.method()); - p_encoding_buffer.put_c(' '); - p_encoding_buffer.put_cs(p_request.uri()); - p_encoding_buffer.put_cs(" HTTP/"); - p_encoding_buffer.put_cs(int2str(p_request.version__major())); - p_encoding_buffer.put_c('.'); - p_encoding_buffer.put_cs(int2str(p_request.version__minor())); - p_encoding_buffer.put_cs("\r\n"); - - // Encode headers excepeted the Content-Length - const LibItsHttp__TypesAndValues::Headers& headers = p_request.header(); - std::string content_type; - for (int i = 0; i < headers.size_of(); i++) { - const LibItsHttp__TypesAndValues::Header& header = headers[i]; - loggers::get_instance().log_msg("http_codec::encode_request: Processing header ", header.header__name()); - if (std::string(static_cast(header.header__name())).compare("Content-Length") == 0) { // Skip it, processed later - loggers::get_instance().log("http_codec::encode_request: Skip it"); - continue; - } else { - p_encoding_buffer.put_cs(header.header__name()); - p_encoding_buffer.put_cs(": "); - const OPTIONAL& o = header.header__value(); - if (o.ispresent()) { - const LibItsHttp__TypesAndValues::charstring__list& v = dynamic_cast &>(o); - if (v.size_of() > 0) { - loggers::get_instance().log_msg("http_codec::encode_request: Processing value ", v[0]); - if (std::string(static_cast(header.header__name())).compare("Content-Type") == 0) { // Store it for HTTP body payload encoding - loggers::get_instance().log("http_codec::encode_request: Storing Content-Type"); - int j = 0; - while (j < v.size_of()) { - content_type += v[j++]; - } // End of 'while' statement - } - p_encoding_buffer.put_cs(v[0]); - int j = 1; - while (j < v.size_of()) { - p_encoding_buffer.put_cs(", "); - loggers::get_instance().log_msg("http_codec::encode_request: Processing value ", v[j]); - p_encoding_buffer.put_cs(v[j++]); - } // End of 'while' statement - } - } // else, do not include it - } - p_encoding_buffer.put_cs("\r\n"); - } // End of 'for' statement - - // Encode message body - const OPTIONAL& v = p_request.body(); - OCTETSTRING os; - if (v.ispresent()) { - const LibItsHttp__MessageBodyTypes::HttpMessageBody& body = static_cast(*v.get_opt_value()); - loggers::get_instance().log_msg("http_codec::encode_request: body: ", body); - if (encode_body(body, os, content_type) == -1) { - loggers::get_instance().warning("http_codec::encode_request: Failed to encode HTTP body"); - _ec.length = 0; - _ec.is_content_length_present = 0x00; - } else { - _ec.length = os.lengthof(); - _ec.is_content_length_present = 0x01; - } - loggers::get_instance().log("http_codec::encode_request: length=%d", _ec.length); - } else { - loggers::get_instance().log("http_codec::encode_request: HTTP body field not present"); - _ec.length = 0; - _ec.is_content_length_present = 0x00; - } - - // Encode Content-Length header - p_encoding_buffer.put_cs("Content-Length: "); - if (_ec.length != 0) { - loggers::get_instance().log("http_codec::encode_request: Content-Length: %s", static_cast(int2str(_ec.length + 2/*Stand for the last CRLF*/))); - p_encoding_buffer.put_cs(static_cast(int2str(_ec.length))); - _ec.is_content_length_present = 0x01; - } else { - p_encoding_buffer.put_cs("0"); - _ec.is_content_length_present = 0x00; - } - loggers::get_instance().log("http_codec::encode_request: Content-Length: %d - %x", _ec.length, _ec.is_content_length_present); - p_encoding_buffer.put_cs("\r\n"); - - // Add message body - p_encoding_buffer.put_cs("\r\n"); - if (_ec.is_content_length_present == 0x01) { - loggers::get_instance().log_msg("http_codec::encode_request: Add body ", os); - p_encoding_buffer.put_os(os); - //p_encoding_buffer.put_cs("\r\n"); - } - - loggers::get_instance().log_to_hexa("<<< http_codec::encode_request: ", p_encoding_buffer); - return 0; -} - -int http_codec::encode_response (const LibItsHttp__TypesAndValues::Response& p_response, TTCN_Buffer& p_encoding_buffer) { - loggers::get_instance().log_msg(">>> http_codec::encode_response: ", (const Base_Type&)p_response); - - // Encode generic part - p_encoding_buffer.put_cs("HTTP/"); - p_encoding_buffer.put_cs(int2str(p_response.version__major())); - p_encoding_buffer.put_c('.'); - p_encoding_buffer.put_cs(int2str(p_response.version__minor())); - p_encoding_buffer.put_cs(" "); - p_encoding_buffer.put_cs(int2str(p_response.statuscode())); - p_encoding_buffer.put_cs(" "); - if (p_response.statustext().lengthof() != 0) { - p_encoding_buffer.put_cs(p_response.statustext()); - } - p_encoding_buffer.put_cs("\r\n"); - - // Encode headers excepeted the Content-Length - const LibItsHttp__TypesAndValues::Headers& headers = p_response.header(); - std::string content_type; - for (int i = 0; i < headers.size_of(); i++) { - const LibItsHttp__TypesAndValues::Header& header = headers[i]; - loggers::get_instance().log_msg("http_codec::encode_response: Processing header ", header.header__name()); - p_encoding_buffer.put_cs(header.header__name()); - p_encoding_buffer.put_cs(": "); - if (std::string(static_cast(header.header__name())).compare("Content-Length") == 0) { - continue; - } else { - const OPTIONAL& o = header.header__value(); - if (o.ispresent()) { - const LibItsHttp__TypesAndValues::charstring__list& v = dynamic_cast &>(o); - if (v.size_of() > 0) { - loggers::get_instance().log_msg("http_codec::encode_response: Processing value ", v[0]); - if (std::string(static_cast(header.header__name())).compare("Content-Type") == 0) { // Store it for HTTP body payload encoding - loggers::get_instance().log("http_codec::encode_response: Storing Content-Type"); - int j = 0; - while (j < v.size_of()) { - content_type += v[j++]; - } // End of 'while' statement - } - p_encoding_buffer.put_cs(v[0]); - int j = 1; - while (j < v.size_of()) { - p_encoding_buffer.put_cs(", "); - loggers::get_instance().log_msg("http_codec::encode_response: Processing value ", v[j]); - p_encoding_buffer.put_cs(v[j++]); - j += 1; - } // End of 'while' statement - } - } // else, do not include it - } - p_encoding_buffer.put_cs("\r\n"); - } // End of 'for' statement - - // Encode message body - const OPTIONAL& v = p_response.body(); - OCTETSTRING os; - if (v.ispresent()) { - const LibItsHttp__MessageBodyTypes::HttpMessageBody& body = static_cast(*v.get_opt_value()); - loggers::get_instance().log_msg("http_codec::encode_response: body: ", body); - if (encode_body(body, os, content_type) == -1) { - _ec.length = 0; - _ec.is_content_length_present = 0x00; - } else { - _ec.length = os.lengthof(); - _ec.is_content_length_present = 0x01; - } - loggers::get_instance().log("http_codec::encode_response: length=%d", _ec.length); - } else { - loggers::get_instance().log("http_codec::encode_response: HTTP body field not present"); - _ec.length = 0; - _ec.is_content_length_present = 0x00; - } - - // Encode Content-Length header - p_encoding_buffer.put_cs("Content-Length: "); - if (_ec.length != 0) { - loggers::get_instance().log("http_codec::encode_request: Content-Length: %s", static_cast(int2str(_ec.length + 2/*Stand for the last CRLF*/))); - p_encoding_buffer.put_cs(static_cast(int2str(_ec.length))); - _ec.is_content_length_present = 0x01; - } else { - p_encoding_buffer.put_cs("0"); - _ec.is_content_length_present = 0x00; - } - loggers::get_instance().log("http_codec::encode_request: Content-Length: %d - %x", _ec.length, _ec.is_content_length_present); - p_encoding_buffer.put_cs("\r\n"); - - // Add message body - p_encoding_buffer.put_cs("\r\n"); - if (_ec.is_content_length_present == 0x01) { - loggers::get_instance().log_msg("http_codec::encode_request: Add body ", os); - p_encoding_buffer.put_os(os); - // p_encoding_buffer.put_cs("\r\n"); - } - - loggers::get_instance().log_to_hexa("<<< http_codec::encode_response: ", p_encoding_buffer); - return 0; -} - -int http_codec::decode_headers(TTCN_Buffer& decoding_buffer, LibItsHttp__TypesAndValues::Headers& headers, std::string& p_content_type) { - loggers::get_instance().log(">>> http_codec::decode_headers"); - loggers::get_instance().log_to_hexa("http_codec::decode_headers", decoding_buffer); - - CHARSTRING cstr; - int i = 0; - while (true) { - switch(get_line(decoding_buffer, cstr, true)) { - case 0: { - loggers::get_instance().log_msg("http_codec::decode_headers: ", cstr); - LibItsHttp__TypesAndValues::Header header; - if (decode_header(cstr, header) == -1) { - loggers::get_instance().warning("http_codec::decode_headers: Failed to decode header %s", static_cast(cstr)); - return -1; - } - headers[i++] = header; - if (std::string(static_cast(header.header__name())).compare("Content-Type") == 0) { - if (header.header__value().is_present() != 0) { - const PreGenRecordOf::PREGEN__RECORD__OF__CHARSTRING& l = static_cast(*header.header__value().get_opt_value()); - p_content_type = static_cast(l[0]); - } else { - p_content_type = ""; - } - } - } - break; - case 1: - loggers::get_instance().log_msg("<<< http_codec::decode_headers: ", headers); - return 0; - case -1: - loggers::get_instance().warning("http_codec::decode_headers: Failed to decode headers"); - return -1; - } // End of 'switch' statement - } // End of 'while' statement -} - -int http_codec::decode_header(CHARSTRING& header_line, LibItsHttp__TypesAndValues::Header& header) { - loggers::get_instance().log_msg(">>> http_codec::decode_header", header_line); - - try { - std::string str(static_cast(header_line)); - std::regex rgx ("([0-9a-zA-Z-]+)\\:\\s+(.+)(,(.+))*"); - std::sregex_iterator begin(str.cbegin(), str.cend(), rgx); - std::smatch m = *begin; - if (m.size() < 5) { - loggers::get_instance().warning("http_codec::decode_header: Failed to decode header %s", str.c_str()); - return -1; - } - loggers::get_instance().log("http_codec::decode_header: %d", m.size()); - header.header__name() = CHARSTRING(m[1].str().c_str()); - LibItsHttp__TypesAndValues::charstring__list v; - for (unsigned int j = 0; j < m.size(); j++) { - if (m[j + 2].str().length() == 0) { - break; - } - v[j] = CHARSTRING(m[j + 2].str().c_str()); - } // End of 'for' statement - header.header__value() = OPTIONAL(v); - - if (m[1].str().compare("Content-Length") == 0) { - // Save the the body length - loggers::get_instance().log("http_codec::decode_header: decoded Content-Length %s", m[2].str().c_str()); - _dc.length = std::stoi(m[2].str()); - } else if (m[1].str().compare("Transfer-Encoding") == 0) { - if (m[2].str().find("chunked") != std::string::npos) { - _dc.chunked = true; - loggers::get_instance().log("http_codec::decode_header: decoded Transfer-Encoding %x", _dc.chunked); - } - } - - return 0; - } - catch(const std::logic_error& e) { - return -1; - } -} - -int http_codec::encode_body(const LibItsHttp__MessageBodyTypes::HttpMessageBody& p_message_body, OCTETSTRING& p_encoding_buffer, const std::string& p_content_type) { - loggers::get_instance().log_msg(">>> http_codec::encode_body: ", (const Base_Type&)p_message_body); - - // Sanity check - if (p_content_type.empty()) { - loggers::get_instance().warning("http_codec::encode_body: Failed to select a codec for HTTP body payload"); - return -1; - } - - if (p_message_body.ischosen(LibItsHttp__MessageBodyTypes::HttpMessageBody::ALT_binary__body)) { - const LibItsHttp__BinaryMessageBodyTypes::BinaryBody& binary_body = p_message_body.binary__body(); - if (binary_body.ischosen(LibItsHttp__BinaryMessageBodyTypes::BinaryBody::ALT_raw)) { - p_encoding_buffer = OCTETSTRING(binary_body.raw().lengthof(), (unsigned char*)static_cast(binary_body.raw())); - } else { - std::map > >::const_iterator it; - bool processed = false; - if (p_content_type.find("x-its") != std::string::npos) { - loggers::get_instance().log("http_codec::encode_body: Find x-its"); - it = _codecs.find("http_its"); // TODO Use params - if (it != _codecs.cend()) { - loggers::get_instance().log("http_codec::encode_body: Call '%s'", it->first.c_str()); - //_codecs["http_its"]->encode((Record_Type&)binary_body.ieee1609dot2__data(), p_encoding_buffer); // TODO Use params - processed = true; - } - } // TODO Add new HTTP message codec here - if (!processed) { - loggers::get_instance().warning("http_codec::encode_body: Unsupported HTTP codec, use raw field as default"); - p_encoding_buffer = OCTETSTRING(0, nullptr); - } - } - } else if (p_message_body.ischosen(LibItsHttp__MessageBodyTypes::HttpMessageBody::ALT_html__body)) { - p_encoding_buffer = OCTETSTRING(p_message_body.html__body().lengthof(), (unsigned char*)static_cast(p_message_body.html__body())); - } else if (p_message_body.ischosen(LibItsHttp__MessageBodyTypes::HttpMessageBody::ALT_text__body)) { - p_encoding_buffer = OCTETSTRING(p_message_body.text__body().lengthof(), (unsigned char*)static_cast(p_message_body.text__body())); - } else if (p_message_body.ischosen(LibItsHttp__MessageBodyTypes::HttpMessageBody::ALT_xml__body)) { - const LibItsHttp__XmlMessageBodyTypes::XmlBody& xml_body = p_message_body.xml__body(); - if (xml_body.ischosen(LibItsHttp__XmlMessageBodyTypes::XmlBody::ALT_raw)) { - p_encoding_buffer = OCTETSTRING(xml_body.raw().lengthof(), (unsigned char*)static_cast(xml_body.raw())); - } else { - std::map > >::const_iterator it; - bool processed = false; - loggers::get_instance().log("http_codec::encode_body: Content-Type:'%s'", p_content_type.c_str()); - if (p_content_type.find("held") != std::string::npos) { - it = _codecs.find("held"); // TODO Use params - if (it != _codecs.cend()) { - loggers::get_instance().log("http_codec::encode_body: Call 'held_codec'"); - _codecs["held"]->encode((Record_Type&)xml_body, p_encoding_buffer); // TODO Use params - processed = true; - } - } else if (p_content_type.find("lost") != std::string::npos) { - it = _codecs.find("lost"); // TODO Use params - if (it != _codecs.cend()) { - loggers::get_instance().log("http_codec::encode_body: Call 'lost_codec'"); - _codecs["lost"]->encode((Record_Type&)xml_body, p_encoding_buffer); // TODO Use params - processed = true; - } - } // TODO Add new HTTP message codec here - if (!processed) { - loggers::get_instance().warning("http_codec::encode_body: Unsupported HTTP codec, use raw field as default"); - p_encoding_buffer = OCTETSTRING(0, nullptr); - } - } - } else if (p_message_body.ischosen(LibItsHttp__MessageBodyTypes::HttpMessageBody::ALT_json__body)) { - const LibItsHttp__JsonMessageBodyTypes::JsonBody& json_body = p_message_body.json__body(); - if (json_body.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_raw)) { - p_encoding_buffer = unichar2oct(json_body.raw()); - } else { - std::map > >::const_iterator it; - bool processed = false; - loggers::get_instance().log("http_codec::encode_body: Content-Type:'%s'", p_content_type.c_str()); - if (p_content_type.find("json") != std::string::npos) { - it = _codecs.find("json"); // TODO Use params - if (it != _codecs.cend()) { - loggers::get_instance().log("http_codec::encode_body: Call 'json_codec'"); - _codecs["json"]->encode((Record_Type&)json_body, p_encoding_buffer); // TODO Use params - processed = true; - } - } // TODO Add new HTTP message codec here - if (!processed) { - loggers::get_instance().warning("http_codec::encode_body: Unsupported HTTP codec, use raw field as default"); - p_encoding_buffer = OCTETSTRING(0, nullptr); - } - } - } else { - loggers::get_instance().warning("http_codec::encode_body: Failed to encode HTTP message body"); - return -1; - } - loggers::get_instance().log_msg("http_codec::encode_body: HTTP message ", p_encoding_buffer); - _ec.length = p_encoding_buffer.lengthof(); - loggers::get_instance().log("http_codec::encode_body: HTTP message length: %d", _ec.length); - - return 0; -} - -int http_codec::decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBodyTypes::HttpMessageBody& message_body, const std::string& p_content_type) { - loggers::get_instance().log(">>> http_codec::decode_body"); - loggers::get_instance().log_to_hexa("http_codec::decode_body", decoding_buffer); - loggers::get_instance().log("http_codec::decode_body: # of codecs=%d - %p", _codecs.size(), this); - loggers::get_instance().log("http_codec::decode_body: Content-Type=%s", p_content_type.c_str()); - - // Sanity checks - if (decoding_buffer.get_len() - decoding_buffer.get_pos() <= 0) { - return -1; - } - /* TODO Uncomment if (p_content_type.empty()) { - loggers::get_instance().warning("http_codec::encode_body: Failed to select a codec for HTTP body payload"); - return -1; - }*/ - - OCTETSTRING s(decoding_buffer.get_len() - decoding_buffer.get_pos(), decoding_buffer.get_data() + decoding_buffer.get_pos()); - loggers::get_instance().log_msg("http_codec::decode_body: raw body=", s); - - // Align the payload length with the specified Content-Lenght value - loggers::get_instance().log("http_codec::decode_body: _dc.length=%d - body length=%d", _dc.length, s.lengthof()); - OCTETSTRING body; - if (_dc.length != 0) { - const unsigned char* p = static_cast(s); - if ((unsigned int)s.lengthof() <= _dc.length) { - body = OCTETSTRING(s.lengthof(), p); - } else { - body = OCTETSTRING(_dc.length, p); - } - } else { - loggers::get_instance().warning("http_codec::decode_body: No Conten-Length header, process all remaining bytes"); - body = s; - } - loggers::get_instance().log_msg("http_codec::decode_body: Aligned body=", body); - loggers::get_instance().log("http_codec::decode_body: body length=%d", body.lengthof()); - // Remove CRLF if any - int counter = 0; - if ((body[body.lengthof() - 1].get_octet() == 0x0d) || (body[body.lengthof() - 1].get_octet() == 0x0a)) { - counter += 1; - if ((body[body.lengthof() - 2].get_octet() == 0x0d) || (body[body.lengthof() - 2].get_octet() == 0x0a)) { - counter += 1; - } - } - loggers::get_instance().log("http_codec::decode_body: counter=%d", counter); - body = OCTETSTRING(body.lengthof() - counter, static_cast(body)); - if (_dc.chunked) { - int counter = 0; - int prev = 0; - OCTETSTRING os(0, nullptr); - do { - while (counter < body.lengthof()) { // Extract the size of the chunk \r[\n] - if ((body[counter].get_octet() == '\r') || (body[counter].get_octet() == '\n')) { - break; - } - counter += 1; - } // End of 'while' statement - loggers::get_instance().log("http_codec::decode_body: Chunked(0): prev = %d, counter=%d / %d", prev, counter, body.lengthof()); - if (counter < body.lengthof()) { - int idx = counter - prev; - OCTETSTRING trunk(idx, static_cast(body)); - loggers::get_instance().log_msg("http_codec::decode_body: trunk: ", trunk); - std::string str((const char*)static_cast(trunk), idx); - loggers::get_instance().log("http_codec::decode_body: str: '%s'", str.c_str()); - int len = std::stoi(str, nullptr, 16);//converter::get_instance().string_to_int(str); - loggers::get_instance().log("http_codec::decode_body: Chunk len: %d", len); - if (len > body.lengthof()) { // Missing data :( - loggers::get_instance().warning("http_codec::decode_body: Missing data and chunked mode"); - _params->insert(std::pair("missing_data", "1")); - _params->log(); - OCTETSTRING raw_trunk(len, idx + static_cast(body)); - loggers::get_instance().log_msg("http_codec::decode_body: raw_trunk: ", raw_trunk); - return -1; - } - while (counter < body.lengthof() && ((body[counter].get_octet() == '\r') || (body[counter].get_octet() == '\n'))) { // Skip additional \n - counter += 1; - } // End of 'while' statement - if (counter < body.lengthof()) { - loggers::get_instance().log("http_codec::decode_body: Chunked (1): prev = %d, counter=%d / %d", prev, counter, body.lengthof()); - os += OCTETSTRING(len, counter + static_cast(body)); - loggers::get_instance().log_msg("http_codec::decode_body: os=", os); - counter += len; - //loggers::get_instance().log("http_codec::decode_body: Chunked: %02x %02x %02x", body[counter].get_octet(), body[counter + 1].get_octet(), body[counter + 2].get_octet()); - loggers::get_instance().log("http_codec::decode_body: Chunked (2): prev = %d, counter=%d / %d", prev, counter, body.lengthof()); - while (counter < body.lengthof() && ((body[counter].get_octet() == '\r') || (body[counter].get_octet() == '\n'))) { // Skip additional \n - counter += 1; - } // End of 'while' statement - prev = counter; - loggers::get_instance().log("http_codec::decode_body: Chunked (3): prev = %d, counter=%d / %d", prev, counter, body.lengthof()); - } - } - } while (counter < body.lengthof()); // Process next chunk if any - body = os; - loggers::get_instance().log_msg("http_codec::decode_body: Finalised body=", body); - } - // Check if HTTP message body contains binary characters - for (int i = 0; i < body.lengthof(); i++) { - unsigned char c = body[i].get_octet(); - if (!std::isprint(c) && !std::isspace(c) && !std::ispunct(c)) { - loggers::get_instance().log("http_codec::decode_body: Byte #%d is not printable: 0x%02x", i, body[i].get_octet()); - _dc.is_binary = 0x01; - break; - } - } // End of 'for' statement - loggers::get_instance().log("http_codec::decode_body: Binary mode: %x", _dc.is_binary); - LibItsHttp__MessageBodyTypes::HttpMessageBody v; - if (_dc.is_binary == 0x01) { - LibItsHttp__BinaryMessageBodyTypes::BinaryBody binary_body; - std::map > >::const_iterator it; - bool processed = false; - // TODO To be refined adding a string identifier to check which codec to use. E.g. held_code.id() returns "xmlns=\"urn:ietf:params:xml:ns:geopriv:held\">" - if (p_content_type.find("x-its") != std::string::npos) { - loggers::get_instance().log("http_codec::decode_body: Find 'x-its'"); - it = _codecs.cbegin();//_codecs.find("http_its"); - if (it != _codecs.cend()) { - /*** - FIXME: - This code generate a codedump, I don't undertsand the reason. - The same code works file for Ng112 HELD & LOST codec. Ununderstandable!!!! - ==> Use a patch - if (_codecs["http_its"].get() != nullptr) { - loggers::get_instance().log("http_codec::decode_body: Call 'http_etsi_ieee1609dot2_codec'"); - if (_codecs["http_its"]->decode(body, (Record_Type&)binary_body) == 0) { - processed = true; - } - }*/ - loggers::get_instance().log("http_codec::decode_body: Call '%s'", it->first.c_str()); - /*http_etsi_ieee1609dot2_codec* codec = new http_etsi_ieee1609dot2_codec(); - if (codec->decode(body, binary_body.ieee1609dot2__data()) == 0) { - message_body.binary__body() = binary_body; - processed = true; - } - delete codec;*/ - } - } // TODO Add new HTTP message codec here - if (!processed) { - loggers::get_instance().warning("http_codec::decode_body: Unsupported HTTP codec, use raw field as default"); - binary_body.raw() = body; - message_body.binary__body() = binary_body; - } - } else { - // Convert into string - params p; - p["decode_str"] = std::string(static_cast(body), body.lengthof() + static_cast(body)); - loggers::get_instance().log("http_codec::decode_body: decode_str: %s", p["decode_str"].c_str()); - // Try to identify xml - if (p["decode_str"].find("" - if ( - (p["decode_str"].find("=\"urn:ietf:params:xml:ns:geopriv:held\"") != std::string::npos) || - (p["decode_str"].find("=\"urn:ietf:params:xml:ns:pidf\"") != std::string::npos) - ) { - loggers::get_instance().log("http_codec::decode_body: Find 'urn:ietf:params:xml:ns:geopriv:held'"); - if (_codecs["held"].get() != nullptr) { - loggers::get_instance().log("http_codec::decode_body: Call 'held_codec'"); - if (_codecs["held"]->decode(body, (Record_Type&)xml_body, &p) == -1) { - loggers::get_instance().warning("http_codec::decode_body: Failed to decode HELD message"); - xml_body.raw() = CHARSTRING(body.lengthof(), (char*)static_cast(body)); - } else { - loggers::get_instance().log_msg("http_codec::decode_body: Decoded message:", xml_body); - message_body.xml__body() = xml_body; - } - } else { - loggers::get_instance().warning("http_codec::decode_body: No codec for HELD"); - xml_body.raw() = CHARSTRING(body.lengthof(), (char*)static_cast(body)); - } - message_body.xml__body() = xml_body; - } else if (p["decode_str"].find("=\"urn:ietf:params:xml:ns:lost1\"") != std::string::npos) { - loggers::get_instance().log("http_codec::decode_body: Find 'urn:ietf:params:xml:ns:lost1'"); - if (_codecs["lost"].get() != nullptr) { - loggers::get_instance().log("http_codec::decode_body: Call 'lost_codec'"); - if (_codecs["lost"]->decode(body, (Record_Type&)xml_body, &p) == -1) { - loggers::get_instance().warning("http_codec::decode_body: Failed to decode LOST message"); - xml_body.raw() = CHARSTRING(body.lengthof(), (char*)static_cast(body)); - } else { - loggers::get_instance().log_msg("http_codec::decode_body: Decoded message:", xml_body); - message_body.xml__body() = xml_body; - } - } else { - loggers::get_instance().warning("http_codec::decode_body: No codec for LOST"); - xml_body.raw() = CHARSTRING(body.lengthof(), (char*)static_cast(body)); - } - message_body.xml__body() = xml_body; - } else { - loggers::get_instance().warning("http_codec::decode_body: No XML codec found"); - xml_body.raw() = CHARSTRING(body.lengthof(), (char*)static_cast(body)); - message_body.xml__body() = xml_body; - } - } else if (p_content_type.find("json") != std::string::npos) { // Try to identify JSON - loggers::get_instance().log("http_codec::decode_body: Find json message"); - LibItsHttp__JsonMessageBodyTypes::JsonBody json_body; - if (_codecs["json"].get() != nullptr) { - loggers::get_instance().log("http_codec::decode_body: Call 'json_codec'"); - if (_codecs["json"]->decode(body, (Record_Type&)json_body, &p) == -1) { - loggers::get_instance().warning("http_codec::decode_body: Failed to decode JSON message"); - json_body.raw() = CHARSTRING(body.lengthof(), (char*)static_cast(body)); - } else { - loggers::get_instance().log_msg("http_codec::decode_body: Decoded message:", json_body); - message_body.json__body() = json_body; - } - } else { - loggers::get_instance().warning("http_codec::decode_body: No JSON codec found"); - json_body.raw() = CHARSTRING(body.lengthof(), (char*)static_cast(body)); - message_body.json__body() = json_body; - } - } else if (p["decode_str"].find("") != std::string::npos) { // Try to identify HTML - loggers::get_instance().log("http_codec::decode_body: Find html message"); - LibItsHttp__MessageBodyTypes::HtmlBody html_body; - message_body.html__body() = CHARSTRING(body.lengthof(), (char*)static_cast(body)); - } else { - loggers::get_instance().log("http_codec::decode_body: Use textBdy as default"); - LibItsHttp__MessageBodyTypes::TextBody text_body; - message_body.text__body() = CHARSTRING(body.lengthof(), (char*)static_cast(body)); - } - } - - return 0; -} - -int http_codec::get_line(TTCN_Buffer& buffer, CHARSTRING& to, const bool concatenate_header_lines) { - unsigned int i = 0; - const unsigned char *cc_to = buffer.get_read_data(); - - // Sanity checks - if(buffer.get_read_len() == 0) { - return -1; - } - - while (true) { - // Skip spaces, and empty lines - for( ; i < buffer.get_read_len() && cc_to[i] != '\0' && cc_to[i] != '\r' && cc_to[i] != '\n'; i++); - if(i >= buffer.get_read_len()) { // No more characters to process - to = CHARSTRING(""); - return -1; - } else if(cc_to[i] == '\n') { // New line found, we don't care is '\r' is missing - if ((i > 0) && ((i + 1) < buffer.get_read_len()) && concatenate_header_lines && ((cc_to[i + 1] == ' ') || (cc_to[i + 1] == '\t'))) { - i += 1; // Skip it - } else { - to = CHARSTRING(i, (const char*)cc_to); - buffer.set_pos(buffer.get_pos() + i + 1); - return i == 0 ? 1 : 0; - } - } else { - if ((i + 1) < buffer.get_read_len() && cc_to[i + 1] != '\n') { - return -1; - } else if(i > 0 && (i + 2) < buffer.get_read_len() && concatenate_header_lines && (cc_to[i+2] == ' ' || cc_to[i+2] == '\t')) { - i += 2; - } else { - to = CHARSTRING(i, (const char*)cc_to); - buffer.set_pos(buffer.get_pos() + i + 2); - return i == 0 ? 1 : 0; - } - } - } // End of 'while' statement -} - -void http_codec::set_payload_codecs(const std::string& p_codecs) { - loggers::get_instance().log(">>> http_codec::set_payload_codecs: %s", p_codecs.c_str()); - - // Sanity check - if (p_codecs.length() == 0) { - return; - } - - // Extract codecs - try { - std::regex rgx("(\\w+):(\\w+)(;(\\w+):(\\w+))*"); - std::sregex_iterator begin(p_codecs.cbegin(), p_codecs.cend(), rgx); - std::sregex_iterator end = std::sregex_iterator(); - // E.g. 9 - xml - :held_codec - held_codec - ;html:html_codec - html:html_codec - html - :html_codec - html_codec - for (std::sregex_iterator it = begin; it != end; ++it) { - std::smatch m = *it; - loggers::get_instance().log("http_codec::set_payload_codecs: %d - %s - %s - %s - %s - %s - %s - %s - %s", m.size(), m[1].str().c_str(), m[2].str().c_str(), m[3].str().c_str(), m[4].str().c_str(), m[5].str().c_str(), m[6].str().c_str(), m[7].str().c_str(), m[8].str().c_str()); - for (unsigned int j = 1; j < m.size() - 1; j += 3) { // Exclude m[0] - loggers::get_instance().log("http_codec::set_payload_codecs: insert (%s, %s), j = %d", m[j].str().c_str(), m[j + 1].str().c_str(), j); - if (m[j].str().empty()) { - break; - } - std::string key(m[j].str()); - _codecs.insert(std::make_pair(key, std::unique_ptr >(codec_stack_builder::get_instance()->get_codec(m[j + 1].str().c_str())))); - } // End of 'for' statement - } // End of 'for' statement - loggers::get_instance().log("http_codec::set_payload_codecs: _codecs length=%d - %p", _codecs.size(), this); - } - catch(const std::logic_error& e){ - loggers::get_instance().warning("http_codec::set_payload_codecs: std::logic_error: %s", e.what()); - _codecs.clear(); - } -} diff --git a/ccsrc/Protocols/Http/http_codec.hh b/ccsrc/Protocols/Http/http_codec.hh deleted file mode 100644 index 5115c53065c2bcf7cc3b00973070432e24e236dd..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Http/http_codec.hh +++ /dev/null @@ -1,67 +0,0 @@ -#pragma once - -#include - -#include "codec.hh" -#include "params.hh" - -class Base_Type; -class Record_Type; -class TTCN_Typedescriptor_t; -class TTCN_Buffer; - -namespace LibItsHttp__TypesAndValues { - class HttpMessage; - class Request; - class Response; - class Headers; - class Header; -} -namespace LibItsHttp__MessageBodyTypes { - class HttpMessageBody; -} - -struct encoding_context { - unsigned int length; - unsigned char is_content_length_present; - - encoding_context() { reset(); }; - void reset() { length = -1; is_content_length_present = 0x00; }; -}; - -struct decoding_context { - unsigned int length; - unsigned char is_binary; - bool chunked; - - decoding_context() { reset(); }; - void reset() { length = -1; is_binary = 0x00; chunked = false; }; -}; - -class http_codec: public codec < -LibItsHttp__TypesAndValues::HttpMessage, -LibItsHttp__TypesAndValues::HttpMessage> -{ - encoding_context _ec; - decoding_context _dc; - std::map > > _codecs; -public: - explicit http_codec() : codec(), _ec(), _dc(), _codecs() { }; - virtual ~http_codec() { }; - - virtual int encode (const LibItsHttp__TypesAndValues::HttpMessage&, OCTETSTRING& data); - virtual int decode (const OCTETSTRING& data, LibItsHttp__TypesAndValues::HttpMessage&, params* params = NULL); - - void set_payload_codecs(const std::string& p_codecs); - -private: - int encode_request (const LibItsHttp__TypesAndValues::Request& p_request, TTCN_Buffer& p_encoding_buffer); - int encode_response (const LibItsHttp__TypesAndValues::Response& p_response, TTCN_Buffer& p_encoding_buffer); - int encode_body(const LibItsHttp__MessageBodyTypes::HttpMessageBody& p_message_body, OCTETSTRING& p_encoding_buffer, const std::string& p_content_type); - - int decode_headers(TTCN_Buffer& decoding_buffer, LibItsHttp__TypesAndValues::Headers& headers, std::string& p_content_type); - int decode_header(CHARSTRING& header_line, LibItsHttp__TypesAndValues::Header& header); - int decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBodyTypes::HttpMessageBody& message_body, const std::string& p_content_type); - int get_line(TTCN_Buffer& buffer, CHARSTRING& to, const bool concatenate_header_lines = false); - -}; // End of class http_codec diff --git a/ccsrc/Protocols/Http/http_codec_mec.cc b/ccsrc/Protocols/Http/http_codec_mec.cc new file mode 100644 index 0000000000000000000000000000000000000000..f66167357debf33dd19436b1feb3be929cfd3261 --- /dev/null +++ b/ccsrc/Protocols/Http/http_codec_mec.cc @@ -0,0 +1,50 @@ +#include "http_codec_mec.hh" + +#include "loggers.hh" + +bool http_codec_mec::encode_body_json(const LibHttp__JsonMessageBodyTypes::JsonBody &p_json_body, OCTETSTRING &p_encoding_buffer, const std::string &p_content_type) { + loggers::get_instance().log(">>> http_codec_mec::encode_body_json"); + + std::map > >::const_iterator it; + bool processed = false; + loggers::get_instance().log("http_codec_mec::encode_body_json: Content-Type:'%s'", p_content_type.c_str()); + if (p_content_type.find("json") != std::string::npos) { + it = _codecs.find("json"); // TODO Use params + if (it != _codecs.cend()) { + loggers::get_instance().log("http_codec_mec::encode_body_json: Call 'json_codec'"); + _codecs["json"]->encode((Record_Type&)p_json_body, p_encoding_buffer); // TODO Use params + processed = true; + } + } // TODO Add new HTTP message codec here + if (!processed) { + loggers::get_instance().warning("http_codec_mec::encode_body_json: Unsupported HTTP codec, use raw field as default"); + p_encoding_buffer = OCTETSTRING(0, nullptr); + } + + return true; +} + +bool http_codec_mec::decode_body_json(const OCTETSTRING &p_data, LibHttp__JsonMessageBodyTypes::JsonBody &p_json_body, const std::string &p_content_type, params* p_params) { + loggers::get_instance().log(">>> http_codec_mec::decode_body_json"); + + loggers::get_instance().log("http_codec_mec::decode_body_json: len=%d", _codecs.size()); + loggers::get_instance().log("http_codec_mec::decode_body_json: first=%s", _codecs.cbegin()->first.c_str()); + loggers::get_instance().log("http_codec_mec::decode_body_json: second=%p", _codecs.cbegin()->second.get()); + loggers::get_instance().log("http_codec_mec::decode_body_json: pointer=%p", _codecs["json"].get()); + + + if (_codecs["json"].get() != nullptr) { + loggers::get_instance().log("http_codec::decode_body_json: Call 'json_codec'"); + if (_codecs["json"]->decode(p_data, (Record_Type&)p_json_body, p_params) == -1) { + loggers::get_instance().warning("http_codec::decode_body_json: Failed to decode JSON message"); + p_json_body.raw() = CHARSTRING(p_data.lengthof(), (char*)static_cast(p_data)); + } else { + loggers::get_instance().log_msg("http_codec::decode_body_json: Decoded message:", p_json_body); + } + } else { + loggers::get_instance().error("http_codec::decode_body_json: Codec not found"); + return false; + } + + return true; +} diff --git a/ccsrc/Protocols/Http/http_codec_mec.hh b/ccsrc/Protocols/Http/http_codec_mec.hh new file mode 100644 index 0000000000000000000000000000000000000000..dd0f78386b0c58460d0bd4486476bc796da21fe1 --- /dev/null +++ b/ccsrc/Protocols/Http/http_codec_mec.hh @@ -0,0 +1,16 @@ +#pragma once + +#include "http_codec.hh" + +#include "LibHttp_MessageBodyTypes.hh" + +class http_codec_mec : public http_codec { + +public: + explicit http_codec_mec() : http_codec(){}; + virtual ~http_codec_mec(){}; + +protected: //! \protectedsection + bool encode_body_json(const LibHttp__JsonMessageBodyTypes::JsonBody &p_json_body, OCTETSTRING &p_encoding_buffer, const std::string &p_content_type); + bool decode_body_json(const OCTETSTRING &p_data, LibHttp__JsonMessageBodyTypes::JsonBody &p_json_body, const std::string &p_content_type, params* p_params); +}; \ No newline at end of file diff --git a/ccsrc/Protocols/Http/http_layer.cc b/ccsrc/Protocols/Http/http_layer.cc deleted file mode 100644 index 33c83512409ed55615397b4fd6641f780cdc8e5e..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Http/http_layer.cc +++ /dev/null @@ -1,154 +0,0 @@ -#include "LibItsHttp_TypesAndValues.hh" - -#include "http_layer_factory.hh" -#include "codec_stack_builder.hh" - -#include "loggers.hh" - -#include "converter.hh" - -using namespace std; // Required for isnan() -#include "LibItsHttp_TypesAndValues.hh" -#include "LibItsHttp_TestSystem.hh" - -http_layer::http_layer(const std::string & p_type, const std::string & param) : t_layer(p_type), _params(), _device_mode{false}, _stream_buffer(0, NULL) -{ - loggers::get_instance().log(">>> http_layer::http_layer: %s, %s", to_string().c_str(), param.c_str()); - // Setup parameters - params::convert(_params, param); - - params::const_iterator it = _params.find(params::codecs); - if (it != _params.cend()) { - _codec.set_payload_codecs(it->second); - } - it = _params.find(params::device_mode); - if (it != _params.cend()) { - _device_mode = (1 == converter::get_instance().string_to_int(it->second)); - } - it = _params.find(params::method); - if (it == _params.cend()) { - _params[params::method] = "POST"; - } - it = _params.find(params::uri); - if (it == _params.cend()) { - _params[params::uri] = "/"; - } - it = _params.find(params::host); - if (it == _params.cend()) { - _params[params::host] = "127.0.0.1"; - } - it = _params.find(params::content_type); - if (it == _params.cend()) { - _params[params::content_type] = "application/text"; - } -} - -void http_layer::sendMsg(const LibItsHttp__TypesAndValues::HttpMessage& p_http_message, params& p_param) { - loggers::get_instance().log_msg(">>> http_layer::sendMsg: ", p_http_message); - - // Encode HttpMessage - OCTETSTRING data; - _codec.encode(p_http_message, data); - send_data(data, _params); -} - -void http_layer::send_data(OCTETSTRING& data, params& params) { - loggers::get_instance().log_msg(">>> http_layer::send_data: ", data); - - if (_device_mode) { // Need to build an HTTP packet - loggers::get_instance().log("http_layer::send_data: Build http layer"); - TTCN_Buffer buffer; - buffer.put_cs(_params[params::method].c_str()); - buffer.put_c(' '); - buffer.put_cs(_params[params::uri].c_str()); - buffer.put_cs(" HTTP/1.1\r\n"); - buffer.put_cs("Host: "); - buffer.put_cs(_params[params::host].c_str()); - buffer.put_cs("\r\n"); - buffer.put_cs("Content-type: "); - buffer.put_cs(_params[params::content_type].c_str()); - buffer.put_cs("\r\n"); - buffer.put_cs("Content-length: "); - buffer.put_cs(static_cast(int2str(data.lengthof() + 2/*Stand for the last CRLF*/))); - buffer.put_cs("\r\n\r\n"); - buffer.put_os(data); - buffer.put_cs("\r\n"); - data = OCTETSTRING(buffer.get_len(), buffer.get_data()); - } - - loggers::get_instance().log_msg("http_layer::send_data: ", data); - send_to_all_layers(data, params); -} - -void http_layer::receive_data(OCTETSTRING& data, params& params) -{ - loggers::get_instance().log_msg(">>> http_layer::receive_data: ", data); - loggers::get_instance().log_msg(">>> http_layer::receive_data: _stream_buffer= ", _stream_buffer); - - // Decode HTTP message - LibItsHttp__TypesAndValues::HttpMessage http_message; - if (!_stream_buffer.is_bound() || (_stream_buffer.lengthof() == 0)) { - if (data.lengthof() < 6) { // 'HTTP/' or 'GET /' - loggers::get_instance().warning("http_layer::receive_data: Inconsistant buffer length"); - return; - } - if (_codec.decode(data, http_message, ¶ms) == -1) { - loggers::get_instance().warning("http_layer::receive_data (0): Failed to decode data"); - return; - } - } else { // First chunk is received - loggers::get_instance().warning("http_layer::receive_data: #######################################"); - _stream_buffer += data; - if (_codec.decode(_stream_buffer, http_message, ¶ms) == -1) { - loggers::get_instance().warning("http_layer::receive_data (1): Failed to decode data"); - return; - } - } - params::const_iterator it = params.find("missing_data"); - if (it != params.cend()) { // Transport layer didn't reassemble chunks, keep current state and wait for the next chunk - // Store data and wait for the next stream - loggers::get_instance().warning("http_layer::receive_data: Missing data, save current stream"); - _stream_buffer += data; - return; // Terminate here - } else { - // Reset stream buffer and continue - loggers::get_instance().log("http_layer::receive_data: Reset stream buffer"); - _stream_buffer.clean_up(); - } - if (_device_mode) { - OCTETSTRING os; - if (http_message.ischosen(LibItsHttp__TypesAndValues::HttpMessage::ALT_response)) { - if (http_message.response().body().ispresent()) { - LibItsHttp__MessageBodyTypes::HttpMessageBody& body = static_cast(*http_message.response().body().get_opt_value()); - if (body.ischosen(LibItsHttp__MessageBodyTypes::HttpMessageBody::ALT_binary__body)) { - LibItsHttp__BinaryMessageBodyTypes::BinaryBody& binary = body.binary__body(); - if (binary.ischosen(LibItsHttp__BinaryMessageBodyTypes::BinaryBody::ALT_raw)) { - os = binary.raw(); - } else { - loggers::get_instance().warning("http_layer::receive_data: A raw binary payload is expected"); - } - } else if (body.ischosen(LibItsHttp__MessageBodyTypes::HttpMessageBody::ALT_html__body)){ - // TODO To be done - loggers::get_instance().warning("http_layer::receive_data: Not implemented yet"); - } else if (body.ischosen(LibItsHttp__MessageBodyTypes::HttpMessageBody::ALT_xml__body)){ - // TODO To be done - loggers::get_instance().warning("http_layer::receive_data: Not implemented yet"); - } else if (body.ischosen(LibItsHttp__MessageBodyTypes::HttpMessageBody::ALT_text__body)){ - // TODO To be done - loggers::get_instance().warning("http_layer::receive_data: Not implemented yet"); - } - receive_to_all_layers(os, params); - } else { - loggers::get_instance().warning("http_layer::receive_data: No body present"); - } - } else { - loggers::get_instance().warning("http_layer::receive_data: An HTTP response is expected"); - } - } else { - // Pass it to the ports - to_all_upper_ports(http_message, params); - } -} - -http_layer_factory http_layer_factory::_f; - diff --git a/ccsrc/Protocols/Http/http_layer.hh b/ccsrc/Protocols/Http/http_layer.hh deleted file mode 100644 index d22dfea55ac340c93638363f9e5ace4359a35bb2..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Http/http_layer.hh +++ /dev/null @@ -1,84 +0,0 @@ -/*! - * \file http_layer.hh - * \brief Header file for ITS HTTP protocol layer. - * \author ETSI STF549 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include - -#include "t_layer.hh" - -#include "http_codec.hh" - -namespace LibItsHttp__TestSystem { - class HttpPort; -} - -namespace LibItsHttp__TypesAndValues { - class HttpMessage; //! Forward declaration of TITAN class -} - -class OCTETSTRING; //! Forward declaration of TITAN class - -/*! - * \class http_layer - * \brief This class provides a factory class to create an tcp_layer class instance - */ -class http_layer : public t_layer { - params _params; - http_codec _codec; - bool _device_mode; - OCTETSTRING _stream_buffer; - -public: //! \publicsection - /*! - * \brief Specialised constructor - * Create a new instance of the http_layer class - * \param[in] p_type \todo - * \param[in] p_param \todo - */ - http_layer() : t_layer(), _params(), _device_mode{false} { }; - /*! - * \brief Specialised constructor - * Create a new instance of the http_layer class - * \param[in] p_type \todo - * \param[in] p_param \todo - */ - http_layer(const std::string& p_type, const std::string& p_param); - /*! - * \brief Default destructor - */ - virtual ~http_layer() { }; - - /*! - * \fn void sendMsg(const LibItsHttp__TypesAndValues::HttpMessage& p_http_message, params& p_param); - * \brief Send HTTP message to the lower layers - * \param[in] p_http_message The GeoNetworking message to be sent - * \param[in] p_params Some parameters to overwrite default value of the lower layers parameters - */ - void sendMsg(const LibItsHttp__TypesAndValues::HttpMessage& p_http_message, params& p_param); - - /*! - * \virtual - * \fn void send_data(OCTETSTRING& data, params& params); - * \brief Send bytes formated data to the lower layers - * \param[in] p_data The data to be sent - * \param[in] p_params Some parameters to overwrite default value of the lower layers parameters - */ - virtual void send_data(OCTETSTRING& data, params& params); - /*! - * \virtual - * \fn void receive_data(OCTETSTRING& data, params& params); - * \brief Receive bytes formated data from the lower layers - * \param[in] p_data The bytes formated data received - * \param[in] p_params Some lower layers parameters values when data was received - */ - virtual void receive_data(OCTETSTRING& data, params& info); -}; // End of class http_layer - diff --git a/ccsrc/Protocols/Http/http_layer_factory.hh b/ccsrc/Protocols/Http/http_layer_factory.hh deleted file mode 100644 index b6ebebdf7e377825f63961f0f710fa372ee22d66..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Http/http_layer_factory.hh +++ /dev/null @@ -1,45 +0,0 @@ -/*! - * \file http_layer_factory.hh - * \brief Header file for ITS Http protocol layer factory. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include "layer_stack_builder.hh" - -#include "http_layer.hh" - -/*! - * \class http_layer_factory - * \brief This class provides a factory class to create an http_layer class instance - */ -class http_layer_factory : public layer_factory { - static http_layer_factory _f; //! Reference to the unique instance of this class -public: //! \publicsection - /*! - * \brief Default constructor - * Create a new instance of the http_layer_factory class - * \remark The HTTP layer identifier is HTTP - */ - http_layer_factory() { - // Register factory - layer_stack_builder::register_layer_factory("HTTP", this); - }; - /*! - * \fn layer* create_layer(const std::string & type, const std::string & param); - * \brief Create the layers stack based on the provided layers stack description - * \param[in] p_type The provided layers stack description - * \param[in] p_params Optional parameters - * \return 0 on success, -1 otherwise - * \inline - */ - inline virtual layer* create_layer(const std::string& p_type, const std::string& p_param){ - return new http_layer(p_type, p_param); - }; -}; // End of class http_layer_factory - diff --git a/ccsrc/Protocols/Http/module.mk b/ccsrc/Protocols/Http/module.mk index 12304eb0fb337dcd2ae01a6ec3c4c0b0de9483e9..c296975c2d7e4be8949848cd76b70051b36ff937 100644 --- a/ccsrc/Protocols/Http/module.mk +++ b/ccsrc/Protocols/Http/module.mk @@ -1,3 +1,3 @@ -sources := http_codec.cc http_layer.cc +sources := http_codec_mec.cc includes := . diff --git a/ccsrc/Protocols/Json/json_codec.cc b/ccsrc/Protocols/Json/json_codec.cc index 06ee679d464c9c42f807483e96bcc4b927d63d05..012788d12b36f00c2c14b832d00433a925eb027b 100644 --- a/ccsrc/Protocols/Json/json_codec.cc +++ b/ccsrc/Protocols/Json/json_codec.cc @@ -6,9 +6,9 @@ #include "loggers.hh" -#include "LibItsHttp_JsonMessageBodyTypes.hh" +#include "LibHttp_JsonMessageBodyTypes.hh" -int json_codec::encode (const LibItsHttp__JsonMessageBodyTypes::JsonBody& msg, OCTETSTRING& data) +int json_codec::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTETSTRING& data) { loggers::get_instance().log_msg(">>> json_codec::encode: ", (const Base_Type&)msg); @@ -16,78 +16,26 @@ int json_codec::encode (const LibItsHttp__JsonMessageBodyTypes::JsonBody& msg, O TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); TTCN_Buffer encoding_buffer; - if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_ueIdentityTagInfo)) { + if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_ueIdentityTagInfo)) { const UEidentityAPI__TypesAndValues::UeIdentityTagInfo& ue_identity_tag_info = msg.ueIdentityTagInfo(); ue_identity_tag_info.encode(UEidentityAPI__TypesAndValues::UeIdentityTagInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()); - } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_userTrackingSubscription)) { - const LocationAPI__TypesAndValues::UserTrackingSubscription& user_tracking_subscription = msg.userTrackingSubscription(); - user_tracking_subscription.encode(LocationAPI__TypesAndValues::UserTrackingSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = char2oct(CHARSTRING("{\"userTrackingSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); - } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_periodicNotificationSubscription)) { - const LocationAPI__TypesAndValues::PeriodicNotificationSubscription& periodic_notification_subscription = msg.periodicNotificationSubscription(); - periodic_notification_subscription.encode(LocationAPI__TypesAndValues::PeriodicNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = char2oct(CHARSTRING("{\"periodicNotificationSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); - } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_zonalTrafficSubscription)) { - const LocationAPI__TypesAndValues::ZonalTrafficSubscription& zonal_traffic_subscription = msg.zonalTrafficSubscription(); - zonal_traffic_subscription.encode(LocationAPI__TypesAndValues::ZonalTrafficSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = char2oct(CHARSTRING("{\"zonalTrafficSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); - } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_circleNotificationSubscription)) { - const LocationAPI__TypesAndValues::CircleNotificationSubscription& notif = msg.circleNotificationSubscription(); - notif.encode(LocationAPI__TypesAndValues::CircleNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = char2oct(CHARSTRING("{\"circleNotificationSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); - } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_distanceNotificationSubscription)) { - const LocationAPI__TypesAndValues::DistanceNotificationSubscription& notif = msg.distanceNotificationSubscription(); - notif.encode(LocationAPI__TypesAndValues::DistanceNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = char2oct(CHARSTRING("{\"distanceNotificationSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); - } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_cellChangeSubscription)) { + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_cellChangeSubscription)) { const RnisAPI__TypesAndValues::CellChangeSubscription& cell_change_subscription = msg.cellChangeSubscription(); cell_change_subscription.encode(RnisAPI__TypesAndValues::CellChangeSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = /*char2oct(CHARSTRING("{\"CellChangeSubscription\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; - } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_appContext)) { + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_appContext)) { const UEAppInterfaceAPI__TypesAndValues::AppContext& app_context = msg.appContext(); app_context.encode(UEAppInterfaceAPI__TypesAndValues::AppContext_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = char2oct(CHARSTRING("{\"AppContext\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); - } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_serviceInfo)) { - const EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfo& service_info = msg.serviceInfo(); - service_info.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"ServiceInfo\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; - } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_appTerminationNotificationSubscription)) { - const EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription& app = msg.appTerminationNotificationSubscription(); - app.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"AppTerminationNotificationSubscription\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; - } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_dnsRule)) { - const EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRule& dns_rule = msg.dnsRule(); - dns_rule.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRule_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"DnsRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; - } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_serAvailabilityNotificationSubscription)) { - const EdgePlatformApplicationEnablementAPI__TypesAndValues::SerAvailabilityNotificationSubscription& ser = msg.serAvailabilityNotificationSubscription(); - ser.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::SerAvailabilityNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"SerAvailabilityNotificationSubscription\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; - } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_trafficRule)) { - const EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule& traffic_rule = msg.trafficRule(); - traffic_rule.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; - } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_bwInfo)) { + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_bwInfo)) { const TrafficManagementAPI__TypesAndValues::BwInfo& bw_info = msg.bwInfo(); bw_info.encode(TrafficManagementAPI__TypesAndValues::BwInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; - } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_mtsSessionInfo)) { + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_mtsSessionInfo)) { const TrafficManagementAPI__TypesAndValues::MtsSessionInfo& mts_session_info = msg.mtsSessionInfo(); mts_session_info.encode(TrafficManagementAPI__TypesAndValues::MtsSessionInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; - } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_predictedQos)) { - const V2XInformationServiceAPI__TypesAndValues::PredictedQos& predicted_qos = msg.predictedQos(); - predicted_qos.encode(V2XInformationServiceAPI__TypesAndValues::PredictedQos_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; - } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_assocStaSubscription)) { - const WlanInformationAPI__TypesAndValues::AssocStaSubscription& assoc_sta_subscription = msg.assocStaSubscription(); - assoc_sta_subscription.encode(WlanInformationAPI__TypesAndValues::AssocStaSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; - } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_staDataRateSubscription)) { - const WlanInformationAPI__TypesAndValues::StaDataRateSubscription& sta_data_rate_subscription = msg.staDataRateSubscription(); - sta_data_rate_subscription.encode(WlanInformationAPI__TypesAndValues::StaDataRateSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else { loggers::get_instance().error("json_codec::encode: Not supported"); } @@ -96,7 +44,7 @@ int json_codec::encode (const LibItsHttp__JsonMessageBodyTypes::JsonBody& msg, O return 0; } -int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTypes::JsonBody& msg, params* p_params) +int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody& msg, params* p_params) { loggers::get_instance().log_msg(">>> json_codec::decode: p_data=", p_data); @@ -129,173 +77,10 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy loggers::get_instance().log("json_codec::decode: decoding_buffer='%c' / '%s'", str[0], str.c_str()); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - if (it->second.find("\"userList\"") != std::string::npos) { // Be careful to the order - // TODO To be refined, find("\"userList\"") is not optimal - int idx_begin = it->second.find(":"); - int idx_end = it->second.rfind("}") - 1; // Remove the last '}' - str = it->second.substr(idx_begin + 1, idx_end - idx_begin); - TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::UserList user_list; - user_list.decode(LocationAPI__TypesAndValues::UserList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.userList() = user_list; - } else if (it->second.find("\"accessPointList\"") != std::string::npos) { // Be careful to the order - int idx_begin = it->second.find(":"); - int idx_end = it->second.rfind("}") - 1; // Remove the last '}' - str = it->second.substr(idx_begin + 1, idx_end - idx_begin); - TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::AccessPointList access_point_list; - access_point_list.decode(LocationAPI__TypesAndValues::AccessPointList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.accessPointList() = access_point_list; - } else if (it->second.find("\"userTrackingSubscription\"") != std::string::npos) { - int idx_begin = it->second.find(":"); - int idx_end = it->second.rfind("}") - 1; // Remove the last '}' - str = it->second.substr(idx_begin + 1, idx_end - idx_begin); - TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::UserTrackingSubscription user_tracking_subscription; - user_tracking_subscription.decode(LocationAPI__TypesAndValues::UserTrackingSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.userTrackingSubscription() = user_tracking_subscription; - - - - - - - } else if (it->second.find("\"periodicNotificationSubscription\"") != std::string::npos) { - int idx_begin = it->second.find(":"); - int idx_end = it->second.rfind("}") - 1; // Remove the last '}' - str = it->second.substr(idx_begin + 1, idx_end - idx_begin); - TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::PeriodicNotificationSubscription periodic_notification_subscription; - periodic_notification_subscription.decode(LocationAPI__TypesAndValues::PeriodicNotificationSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.periodicNotificationSubscription() = periodic_notification_subscription; - } else if (it->second.find("\"zonalTrafficSubscription\"") != std::string::npos) { - int idx_begin = it->second.find(":"); - int idx_end = it->second.rfind("}") - 1; // Remove the last '}' - str = it->second.substr(idx_begin + 1, idx_end - idx_begin); - TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::ZonalTrafficSubscription zonal_traffic_subscription; - zonal_traffic_subscription.decode(LocationAPI__TypesAndValues::ZonalTrafficSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.zonalTrafficSubscription() = zonal_traffic_subscription; - } else if (it->second.find("\"periodicTrackingSubscription\"") != std::string::npos) { - int idx_begin = it->second.find(":"); - int idx_end = it->second.rfind("}") - 1; // Remove the last '}' - str = it->second.substr(idx_begin + 1, idx_end - idx_begin); - TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::PeriodicTrackingSubscription periodic_tracking_subscription; - periodic_tracking_subscription.decode(LocationAPI__TypesAndValues::PeriodicTrackingSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.periodicTrackingSubscription() = periodic_tracking_subscription; - } else if (it->second.find("\"accessPointId\"") != std::string::npos) { - LocationAPI__TypesAndValues::UserInfo user_info; - user_info.decode(LocationAPI__TypesAndValues::UserInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.userInfo() = user_info; - } else if (it->second.find("\"terminalDistance\"") != std::string::npos) { - int idx_begin = it->second.find(":"); - int idx_end = it->second.rfind("}") - 1; // Remove the last '}' - str = it->second.substr(idx_begin + 1, idx_end - idx_begin); - TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::TerminalDistance terminal_distance; - terminal_distance.decode(LocationAPI__TypesAndValues::TerminalDistance_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.terminalDistance() = terminal_distance; - } else if (it->second.find("\"enteringLeavingCriteria\"") != std::string::npos) { - int idx_begin = it->second.find(":"); - int idx_end = it->second.rfind("}") - 1; // Remove the last '}' - str = it->second.substr(idx_begin + 1, idx_end - idx_begin); - TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::CircleNotificationSubscription notif; - notif.decode(LocationAPI__TypesAndValues::CircleNotificationSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.circleNotificationSubscription() = notif; - } else if (it->second.find("\"distanceNotificationSubscription\"") != std::string::npos) { - int idx_begin = it->second.find(":"); - int idx_end = it->second.rfind("}") - 1; // Remove the last '}' - str = it->second.substr(idx_begin + 1, idx_end - idx_begin); - TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::DistanceNotificationSubscription notif; - notif.decode(LocationAPI__TypesAndValues::DistanceNotificationSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.distanceNotificationSubscription() = notif; - } else if (it->second.find("\"ueIdentityTagInfo\"") != std::string::npos) { + if (it->second.find("\"ueIdentityTagInfo\"") != std::string::npos) { UEidentityAPI__TypesAndValues::UeIdentityTagInfo ue_identity_tag_info; ue_identity_tag_info.decode(UEidentityAPI__TypesAndValues::UeIdentityTagInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.ueIdentityTagInfo() = ue_identity_tag_info; - } else if (it->second.find("\"serName\"") != std::string::npos) { // Be careful to the order - // TODO To be refined, find("\"accessPointList\"") is not optimal - if (it->second[0] == '[') { - std::size_t it_start; - while ((it_start = str.find("null")) != std::string::npos) { - loggers::get_instance().log("json_codec::decode: id_start=%d", it_start); - loggers::get_instance().log("json_codec::decode: Before, str=%s", str.c_str()); - std::size_t it_stop = it_start + 4; - loggers::get_instance().log("json_codec::decode: id_stop=%d", it_stop); - loggers::get_instance().log("json_codec::decode: segment=%s", str.substr(it_start, it_stop - it_start).c_str()); - str = str.substr(0, it_start) + "{}" + str.substr(it_stop); - loggers::get_instance().log("json_codec::decode: After, str=%s", str.c_str()); - } // End of 'while' statement - decoding_buffer.clear(); - decoding_buffer.put_os(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfoList service_info_list; - service_info_list.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfoList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.serviceInfoList() = service_info_list; - } else { - EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfo service_info; - service_info.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.serviceInfo() = service_info; - } - } else if (it->second.find("\"security\"") != std::string::npos) { // Be careful to the order - // TODO To be refined, find("\"accessPointList\"") is not optimal - std::size_t it_start; - while ((it_start = str.find("null")) != std::string::npos) { - loggers::get_instance().log("json_codec::decode: id_start=%d", it_start); - loggers::get_instance().log("json_codec::decode: Before, str=%s", str.c_str()); - std::size_t it_stop = it_start + 4; - loggers::get_instance().log("json_codec::decode: id_stop=%d", it_stop); - loggers::get_instance().log("json_codec::decode: segment=%s", str.substr(it_start, it_stop - it_start).c_str()); - str = str.substr(0, it_start) + "{}" + str.substr(it_stop); - loggers::get_instance().log("json_codec::decode: After, str=%s", str.c_str()); - } // End of 'while' statement - decoding_buffer.clear(); - decoding_buffer.put_os(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - EdgePlatformApplicationEnablementAPI__TypesAndValues::TransportInfoList transport_info_list; - transport_info_list.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TransportInfoList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.transportInfoList() = transport_info_list; - } else if (it->second.find("\"trafficRuleId\"") != std::string::npos) { - if (it->second[0] == '[') { - EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRuleList traffic_rule_list; - traffic_rule_list.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRuleList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.trafficRuleList() = traffic_rule_list; - } else { - EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule traffic_rule; - traffic_rule.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.trafficRule() = traffic_rule; - } - } else if (it->second.find("\"dnsRuleId\"") != std::string::npos) { - if (it->second[0] == '[') { - EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRuleList dns_rule_list; - dns_rule_list.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRuleList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.dnsRuleList() = dns_rule_list; - } else { - EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRule dns_rule; - dns_rule.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRule_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.dnsRule() = dns_rule; - } - } else if ((it->second.find("\"_links\"") != std::string::npos) && (it->second.find("\"subscriptions\"") != std::string::npos)) { - EdgePlatformApplicationEnablementAPI__TypesAndValues::SubscriptionLinkList sub_link_list; - sub_link_list.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.subscriptionLinkList__app__ens() = sub_link_list; - } else if (it->second.find("\"AppTerminationNotificationSubscription\"") != std::string::npos) { - EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription app_term; - app_term.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.appTerminationNotificationSubscription() = app_term; - } else if ((it->second.find("\"subscriptionType\"") != std::string::npos) && (it->second.find("\"SerAvailabilityNotificationSubscription\"") != std::string::npos)) { - EdgePlatformApplicationEnablementAPI__TypesAndValues::SerAvailabilityNotificationSubscription ser_av; - ser_av.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::SerAvailabilityNotificationSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.serAvailabilityNotificationSubscription() = ser_av; - } else if ((it->second.find("\"ntpServers\"") != std::string::npos) || (it->second.find("{\"timeStamp\"") == 0)) { - EdgePlatformApplicationEnablementAPI__TypesAndValues::TimingCaps timing_caps; - timing_caps.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TimingCaps_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.timingCaps() = timing_caps; - } else if (it->second.find("\"timeSourceStatus\"") != std::string::npos) { - EdgePlatformApplicationEnablementAPI__TypesAndValues::CurrentTime current_time; - current_time.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::CurrentTime_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.currentTime() = current_time; } else if (it->second.find("\"CellChangeSubscription\"") != std::string::npos) { RnisAPI__TypesAndValues::CellChangeSubscription cell_change_subscription; cell_change_subscription.decode(RnisAPI__TypesAndValues::CellChangeSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); @@ -329,16 +114,16 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy RnisAPI__TypesAndValues::RabRelSubscription rab_rel_subscription; rab_rel_subscription.decode(RnisAPI__TypesAndValues::RabRelSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.rabRelSubscription() = rab_rel_subscription; - } else if ((it->second.find("\"_links\"") != std::string::npos) && (it->second.find("subscriptions") != std::string::npos)) { // SubscriptionLinkList + } else if ((it->second.find("\"_links\"") != std::string::npos) && (it->second.find("subscriptions\"") != std::string::npos)) { // SubscriptionLinkList // FIXME Conflict with MEC-028 SubscriptionLinkList data type RnisAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; subscription_link_list.decode(RnisAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.subscriptionLinkList() = subscription_link_list; - } else if (it->second.find("\"AppContext\"") != std::string::npos) { + } else if (it->second.find("\"associateDevAppId\"") != std::string::npos) { UEAppInterfaceAPI__TypesAndValues::AppContext appContext; appContext.decode(UEAppInterfaceAPI__TypesAndValues::AppContext_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.appContext() = appContext; - } else if (it->second.find("\"AppInfo\"") != std::string::npos) { + } else if (it->second.find("\"appInfo\"") != std::string::npos) { UEAppInterfaceAPI__TypesAndValues::AppInfo appInfo; appInfo.decode(UEAppInterfaceAPI__TypesAndValues::AppInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.appInfo() = appInfo; @@ -378,108 +163,6 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); mts_session_info.decode(TrafficManagementAPI__TypesAndValues::MtsSessionInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.mtsSessionInfo() = mts_session_info; - } else if ((it->second.find("\"uuUnicastProvisioningInfo\"") != std::string::npos) || (it->second.find("\"proInfoUuUnicast\"") != std::string::npos)) { - V2XInformationServiceAPI__TypesAndValues::UuUnicastProvisioningInfo uu_unicast_provisioning_info; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - uu_unicast_provisioning_info.decode(V2XInformationServiceAPI__TypesAndValues::UuUnicastProvisioningInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.uuUnicastProvisioningInfo() = uu_unicast_provisioning_info; - } else if ((it->second.find("\"uuMbmsProvisioningInfo\"") != std::string::npos) || (it->second.find("\"proInfoUuMbms\"") != std::string::npos)) { - V2XInformationServiceAPI__TypesAndValues::UuMbmsProvisioningInfo uu_mbms_provisioning_info; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - uu_mbms_provisioning_info.decode(V2XInformationServiceAPI__TypesAndValues::UuMbmsProvisioningInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.uuMbmsProvisioningInfo() = uu_mbms_provisioning_info; - } else if ((it->second.find("\"pc5ProvisioningInfo\"") != std::string::npos) || (it->second.find("\"proInfoPc5\"") != std::string::npos)) { - V2XInformationServiceAPI__TypesAndValues::Pc5ProvisioningInfo pc5_provisioning_info; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - pc5_provisioning_info.decode(V2XInformationServiceAPI__TypesAndValues::Pc5ProvisioningInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.pc5ProvisioningInfo() = pc5_provisioning_info; - } else if ((it->second.find("\"predictedQos\"") != std::string::npos) || (it->second.find("\"locationGranularity\"") != std::string::npos)) { - V2XInformationServiceAPI__TypesAndValues::PredictedQos predicted_qos; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - predicted_qos.decode(V2XInformationServiceAPI__TypesAndValues::PredictedQos_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.predictedQos() = predicted_qos; - } else if (it->second.find("\"ProvChgUuUniSubscription\"") != std::string::npos) { - V2XInformationServiceAPI__TypesAndValues::ProvChgUuUniSubscription prov_chg_uu_uni_subscription; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - prov_chg_uu_uni_subscription.decode(V2XInformationServiceAPI__TypesAndValues::ProvChgUuUniSubscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.provChgUuUniSubscription() = prov_chg_uu_uni_subscription; - } else if (it->second.find("\"ProvChgUuMbmsSubscription\"") != std::string::npos) { - V2XInformationServiceAPI__TypesAndValues::ProvChgUuMbmsSubscription prov_chg_uu_mbms_subscription; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - prov_chg_uu_mbms_subscription.decode(V2XInformationServiceAPI__TypesAndValues::ProvChgUuMbmsSubscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.provChgUuMbmsSubscription() = prov_chg_uu_mbms_subscription; - } else if (it->second.find("\"ProvChgPc5Subscription\"") != std::string::npos) { - V2XInformationServiceAPI__TypesAndValues::ProvChgPc5Subscription prov_chg_pc5_subscription; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - prov_chg_pc5_subscription.decode(V2XInformationServiceAPI__TypesAndValues::ProvChgPc5Subscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.provChgPc5Subscription() = prov_chg_pc5_subscription; - - - } else if (it->second.find("\"ProvChgUuUniNotification\"") != std::string::npos) { - V2XInformationServiceAPI__TypesAndValues::ProvChgUuUniNotification prov_chg_uu_uni_notification; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - prov_chg_uu_uni_notification.decode(V2XInformationServiceAPI__TypesAndValues::ProvChgUuUniNotification_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.provChgUuUniNotification() = prov_chg_uu_uni_notification; - } else if (it->second.find("\"ProvChgUuMbmsNotification\"") != std::string::npos) { - V2XInformationServiceAPI__TypesAndValues::ProvChgUuMbmsNotification prov_chg_uu_mbms_notification; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - prov_chg_uu_mbms_notification.decode(V2XInformationServiceAPI__TypesAndValues::ProvChgUuMbmsNotification_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.provChgUuMbmsNotification() = prov_chg_uu_mbms_notification; - } else if (it->second.find("\"provChgPc5Notification\"") != std::string::npos) { - V2XInformationServiceAPI__TypesAndValues::ProvChgPc5Notification prov_chg_pc5_notification; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - prov_chg_pc5_notification.decode(V2XInformationServiceAPI__TypesAndValues::ProvChgPc5Notification_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.provChgPc5Notification() = prov_chg_pc5_notification; - - - } else if (it->second.find("\"AssocStaSubscription\"") != std::string::npos) { - if (it->second.find("\"subscription\"") != std::string::npos) { // SubscriptionLinkList - WlanInformationAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - subscription_link_list.decode(WlanInformationAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.subscriptionLinkList__wlan() = subscription_link_list; - } else { // AssocStaSubscription - WlanInformationAPI__TypesAndValues::AssocStaSubscription assoc_sta_subscription; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - assoc_sta_subscription.decode(WlanInformationAPI__TypesAndValues::AssocStaSubscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.assocStaSubscription() = assoc_sta_subscription; - } - } else if (it->second.find("\"StaDataRateSubscription\"") != std::string::npos) { - WlanInformationAPI__TypesAndValues::StaDataRateSubscription sta_data_rate_subscription; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - sta_data_rate_subscription.decode(WlanInformationAPI__TypesAndValues::StaDataRateSubscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.staDataRateSubscription() = sta_data_rate_subscription; - } else if ((it->second.find("\"_links\"") != std::string::npos) && (it->second.find("subscriptions") != std::string::npos)) { // SubscriptionLinkList - // decode_str: {"_links":{"self":{"href":"https://try-mec.etsi.org/sbxpb4c4k2/wai/v2/subscriptions"}}} - WlanInformationAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - subscription_link_list.decode(WlanInformationAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.subscriptionLinkList__wlan() = subscription_link_list; - } else if ((it->second.find("\"apInfo\"") != std::string::npos) || (it->second.find("\"apId\"") != std::string::npos)) { - WlanInformationAPI__TypesAndValues::ApInfoList ap_info_list; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - ap_info_list.decode(WlanInformationAPI__TypesAndValues::ApInfoList_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.apInfoList() = ap_info_list; - - } else if ((it->second.find("\"staInfo\"") != std::string::npos) || (it->second.find("\"rssi\"") != std::string::npos)) { - WlanInformationAPI__TypesAndValues::StaInfoList sta_info_list; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - sta_info_list.decode(WlanInformationAPI__TypesAndValues::StaInfoList_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.staInfoList() = sta_info_list; - } else if (it->second.find("\"AssocStaNotification\"") != std::string::npos) { - WlanInformationAPI__TypesAndValues::AssocStaNotification assoc_sta_notification; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - assoc_sta_notification.decode(WlanInformationAPI__TypesAndValues::AssocStaNotification_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.assocStaNotification() = assoc_sta_notification; - - - - - - - - - } else if (it->second.find("\"detail\"") != std::string::npos) { LibMec__TypesAndValues::ProblemDetails problem_details; problem_details.decode(LibMec__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); diff --git a/ccsrc/Protocols/Json/json_codec.hh b/ccsrc/Protocols/Json/json_codec.hh index 01073c52f5f82eb59d901c90f9f2699f5d6d17fa..a245e8261a7df3a7fb342e2b114e05bc510bc354 100644 --- a/ccsrc/Protocols/Json/json_codec.hh +++ b/ccsrc/Protocols/Json/json_codec.hh @@ -1,23 +1,23 @@ #pragma once -#include "codec.hh" +#include "codec_gen.hh" #include "params.hh" class Base_Type; class TTCN_Typedescriptor_t; class TTCN_Buffer; -namespace LibItsHttp__JsonMessageBodyTypes { +namespace LibHttp__JsonMessageBodyTypes { class JsonBody; } -class json_codec: public codec +class json_codec: public codec_gen { public: - explicit json_codec() : codec() { }; + explicit json_codec() : codec_gen() { }; virtual ~json_codec() { }; - virtual int encode (const LibItsHttp__JsonMessageBodyTypes::JsonBody&, OCTETSTRING& data); - virtual int decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTypes::JsonBody&, params* p_params = NULL); + virtual int encode (const LibHttp__JsonMessageBodyTypes::JsonBody&, OCTETSTRING& data); + virtual int decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody&, params* p_params = NULL); }; // End of class json_codec diff --git a/ccsrc/Protocols/Json/json_codec_factory.hh b/ccsrc/Protocols/Json/json_codec_factory.hh index 7cbd4f478cf03c278abeb13fda4666c44d84319e..7ac3454b491d7940d0993ec353d3689b15642bb2 100644 --- a/ccsrc/Protocols/Json/json_codec_factory.hh +++ b/ccsrc/Protocols/Json/json_codec_factory.hh @@ -1,7 +1,7 @@ /*! * \file json_codec_factory.hh * \brief Header file for ITS JSON/IP protocol codec factory. - * \author ETSI STF569 + * \author ETSI STF569 / TTF T027 * \copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. @@ -40,7 +40,7 @@ public: //! \publicsection * \return 0 on success, -1 otherwise * \inline */ - inline virtual codec* create_codec() { - return (codec*)new json_codec(); + inline virtual codec_gen* create_codec() { + return (codec_gen*)new json_codec(); }; }; // End of class json_codec_factory diff --git a/ccsrc/Protocols/Json/json_codec_factory_mec011.hh b/ccsrc/Protocols/Json/json_codec_factory_mec011.hh new file mode 100644 index 0000000000000000000000000000000000000000..7e8fa649c1be381cf2ac044ab9f5a9193398e561 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_factory_mec011.hh @@ -0,0 +1,46 @@ +/*! + * \file json_codec_factory_mec011.hh + * \brief Header file for ITS JSON/IP protocol codec factory. + * \author ETSI STF569 / TTF T027 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include "codec_stack_builder.hh" + +#include "json_codec_mec011.hh" + +class Record_Type; //! TITAN forward declaration + +/*! + * \class json_codec_factory_mec011 + * \brief This class provides a factory class to create an json_codec class instance + */ +class json_codec_factory_mec011: public codec_factory { + static json_codec_factory_mec011 _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the json_codec_factory_mec011 class + * \remark The HELD/IP codec identifier is HELD + */ + json_codec_factory_mec011() { + // register factory + codec_stack_builder::register_codec_factory("json_codec_mec011", this); + }; + /*! + * \fn codec* create_codec(const std::string & type, const std::string & param); + * \brief Create the codecs stack based on the provided codecs stack description + * \param[in] p_type The provided codecs stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual codec_gen* create_codec() { + return (codec_gen*)new json_codec_mec011(); + }; +}; // End of class json_codec_factory_mec011 diff --git a/ccsrc/Protocols/Json/json_codec_factory_mec013.hh b/ccsrc/Protocols/Json/json_codec_factory_mec013.hh new file mode 100644 index 0000000000000000000000000000000000000000..ad8d9a79bcbd035f35aec8d625d0c767235fff96 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_factory_mec013.hh @@ -0,0 +1,46 @@ +/*! + * \file json_codec_factory_mec013.hh + * \brief Header file for ITS JSON/IP protocol codec factory. + * \author ETSI STF569 / TTF T027 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include "codec_stack_builder.hh" + +#include "json_codec_mec013.hh" + +class Record_Type; //! TITAN forward declaration + +/*! + * \class json_codec_factory_mec013 + * \brief This class provides a factory class to create an json_codec class instance + */ +class json_codec_factory_mec013: public codec_factory { + static json_codec_factory_mec013 _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the json_codec_factory_mec013 class + * \remark The HELD/IP codec identifier is HELD + */ + json_codec_factory_mec013() { + // register factory + codec_stack_builder::register_codec_factory("json_codec_mec013", this); + }; + /*! + * \fn codec* create_codec(const std::string & type, const std::string & param); + * \brief Create the codecs stack based on the provided codecs stack description + * \param[in] p_type The provided codecs stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual codec_gen* create_codec() { + return (codec_gen*)new json_codec_mec013(); + }; +}; // End of class json_codec_factory_mec013 diff --git a/ccsrc/Protocols/Json/json_codec_factory_mec028.hh b/ccsrc/Protocols/Json/json_codec_factory_mec028.hh new file mode 100644 index 0000000000000000000000000000000000000000..bc989bd34e0b1f74eed11ab9e32fc05862778d3e --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_factory_mec028.hh @@ -0,0 +1,46 @@ +/*! + * \file json_codec_factory_mec028.hh + * \brief Header file for ITS JSON/IP protocol codec factory. + * \author ETSI STF569 / TTF T027 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include "codec_stack_builder.hh" + +#include "json_codec_mec028.hh" + +class Record_Type; //! TITAN forward declaration + +/*! + * \class json_codec_factory_mec028 + * \brief This class provides a factory class to create an json_codec class instance + */ +class json_codec_factory_mec028: public codec_factory { + static json_codec_factory_mec028 _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the json_codec_factory_mec028 class + * \remark The HELD/IP codec identifier is HELD + */ + json_codec_factory_mec028() { + // register factory + codec_stack_builder::register_codec_factory("json_codec_mec028", this); + }; + /*! + * \fn codec* create_codec(const std::string & type, const std::string & param); + * \brief Create the codecs stack based on the provided codecs stack description + * \param[in] p_type The provided codecs stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual codec_gen* create_codec() { + return (codec_gen*)new json_codec_mec028(); + }; +}; // End of class json_codec_factory_mec028 diff --git a/ccsrc/Protocols/Json/json_codec_factory_mec030.hh b/ccsrc/Protocols/Json/json_codec_factory_mec030.hh new file mode 100644 index 0000000000000000000000000000000000000000..7944d49a559aab77d2f8b6bdc8c6077cc318e97e --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_factory_mec030.hh @@ -0,0 +1,46 @@ +/*! + * \file json_codec_factory_mec030.hh + * \brief Header file for ITS JSON/IP protocol codec factory. + * \author ETSI STF569 / TTF T027 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include "codec_stack_builder.hh" + +#include "json_codec_mec030.hh" + +class Record_Type; //! TITAN forward declaration + +/*! + * \class json_codec_factory_mec030 + * \brief This class provides a factory class to create an json_codec_mec030 class instance + */ +class json_codec_factory_mec030: public codec_factory { + static json_codec_factory_mec030 _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the json_codec_factory_mec030 class + * \remark The HELD/IP codec identifier is HELD + */ + json_codec_factory_mec030() { + // register factory + codec_stack_builder::register_codec_factory("json_codec_mec030", this); + }; + /*! + * \fn codec* create_codec(const std::string & type, const std::string & param); + * \brief Create the codecs stack based on the provided codecs stack description + * \param[in] p_type The provided codecs stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual codec_gen* create_codec() { + return (codec_gen*)new json_codec_mec030(); + }; +}; // End of class json_codec_factory_mec030 diff --git a/ccsrc/Protocols/Json/json_codec_factory_mec040.hh b/ccsrc/Protocols/Json/json_codec_factory_mec040.hh new file mode 100644 index 0000000000000000000000000000000000000000..cf458d23a85fabaa580953a86ae926820f0e9523 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_factory_mec040.hh @@ -0,0 +1,46 @@ +/*! + * \file json_codec_factory_mec040.hh + * \brief Header file for ITS JSON/IP protocol codec factory. + * \author ETSI STF569 / TTF T027 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include "codec_stack_builder.hh" + +#include "json_codec_mec040.hh" + +class Record_Type; //! TITAN forward declaration + +/*! + * \class json_codec_factory_mec040 + * \brief This class provides a factory class to create an json_codec class instance + */ +class json_codec_factory_mec040: public codec_factory { + static json_codec_factory_mec040 _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the json_codec_factory_mec040 class + * \remark The HELD/IP codec identifier is HELD + */ + json_codec_factory_mec040() { + // register factory + codec_stack_builder::register_codec_factory("json_codec_mec040", this); + }; + /*! + * \fn codec* create_codec(const std::string & type, const std::string & param); + * \brief Create the codecs stack based on the provided codecs stack description + * \param[in] p_type The provided codecs stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual codec_gen* create_codec() { + return (codec_gen*)new json_codec_mec040(); + }; +}; // End of class json_codec_factory_mec040 diff --git a/ccsrc/Protocols/Json/json_codec_mec011.cc b/ccsrc/Protocols/Json/json_codec_mec011.cc new file mode 100644 index 0000000000000000000000000000000000000000..a885b51974036e289fdb6accd26b3f9947181dea --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec011.cc @@ -0,0 +1,196 @@ +#include +#include +#include + +#include "json_codec_factory_mec011.hh" + +#include "loggers.hh" + +#include "LibHttp_JsonMessageBodyTypes.hh" + +int json_codec_mec011::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTETSTRING& data) +{ + loggers::get_instance().log_msg(">>> json_codec_mec011::encode: ", (const Base_Type&)msg); + + TTCN_EncDec::clear_error(); + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_Buffer encoding_buffer; + + if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_serviceInfo)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfo& service_info = msg.serviceInfo(); + service_info.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"ServiceInfo\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_appInfo__regapps)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo& app_info = msg.appInfo__regapps(); + app_info.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"AppInfo\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_appTerminationNotificationSubscription)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription& app = msg.appTerminationNotificationSubscription(); + app.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"AppTerminationNotificationSubscription\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_appTerminationConfirmation)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationConfirmation& app = msg.appTerminationConfirmation(); + app.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationConfirmation_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"AppTerminationConfirmation\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_appReadyConfirmation)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::AppReadyConfirmation& app = msg.appReadyConfirmation(); + app.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppReadyConfirmation_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"AppTerminationConfirmation\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_dnsRule)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRule& dns_rule = msg.dnsRule(); + dns_rule.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRule_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"DnsRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_serAvailabilityNotificationSubscription)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::SerAvailabilityNotificationSubscription& ser = msg.serAvailabilityNotificationSubscription(); + ser.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::SerAvailabilityNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"SerAvailabilityNotificationSubscription\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_serviceLivenessUpdate)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceLivenessUpdate& service_liveness_update = msg.serviceLivenessUpdate(); + service_liveness_update.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceLivenessUpdate_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"serviceLivenessUpdate\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_trafficRule)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule& traffic_rule = msg.trafficRule(); + traffic_rule.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else { + return json_codec::encode(msg, data); + } + + loggers::get_instance().log("<<< json_codec_mec011::encode"); + return 0; +} + +int json_codec_mec011::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody& msg, params* p_params) +{ + loggers::get_instance().log_msg(">>> json_codec_mec011::decode: p_data=", p_data); + + // Sanity checks + params::const_iterator it; + if (p_params == nullptr) { + loggers::get_instance().warning("json_codec_mec011::decode: Failed to access p_params (null pointer)"); + return -1; // TODO Use p_data instead of return -1 + } else { + it = p_params->find("decode_str"); + if (it == p_params->cend()) { + loggers::get_instance().warning("json_codec_mec011::decode: Failed to access p_params item (decode_str)"); + return -1; // TODO Use p_data instead of return -1 + } + loggers::get_instance().log("json_codec_mec011::decode: it->second='%c' / '%s'", it->second.c_str()[0], it->second.c_str()); + } + + // Remove data structure name (if present) ... + std::string str; + if ((it->second[0] != '[') && (it->second[0] != '{')) { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + } else { + str = it->second; + } + // ..and create the decoding buffer + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_EncDec::clear_error(); + loggers::get_instance().log("json_codec_mec011::decode: decoding_buffer='%c' / '%s'", str[0], str.c_str()); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + + if (it->second.find("\"serName\"") != std::string::npos) { // Be careful to the order + // TODO To be refined, find("\"accessPointList\"") is not optimal + if (it->second[0] == '[') { + std::size_t it_start; + while ((it_start = str.find("null")) != std::string::npos) { + loggers::get_instance().log("json_codec_mec011::decode: id_start=%d", it_start); + loggers::get_instance().log("json_codec_mec011::decode: Before, str=%s", str.c_str()); + std::size_t it_stop = it_start + 4; + loggers::get_instance().log("json_codec_mec011::decode: id_stop=%d", it_stop); + loggers::get_instance().log("json_codec_mec011::decode: segment=%s", str.substr(it_start, it_stop - it_start).c_str()); + if ((str[it_start - 3] == 'n') || (str[it_start - 3] == 's')) { // fqdn or uris or addresses + str = str.substr(0, it_start) + "[]" + str.substr(it_stop); + } else { + str = str.substr(0, it_start) + "{}" + str.substr(it_stop); + } + loggers::get_instance().log("json_codec_mec011::decode: After, str=%s", str.c_str()); + } // End of 'while' statement + decoding_buffer.clear(); + decoding_buffer.put_os(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfoList service_info_list; + service_info_list.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfoList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.serviceInfoList() = service_info_list; + } else { + EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfo service_info; + service_info.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.serviceInfo() = service_info; + } + } else if (it->second.find("\"security\"") != std::string::npos) { // Be careful to the order + // TODO To be refined, find("\"accessPointList\"") is not optimal + std::size_t it_start; + while ((it_start = str.find("null")) != std::string::npos) { + loggers::get_instance().log("json_codec_mec011::decode: id_start=%d", it_start); + loggers::get_instance().log("json_codec_mec011::decode: Before, str=%s", str.c_str()); + std::size_t it_stop = it_start + 4; + loggers::get_instance().log("json_codec_mec011::decode: id_stop=%d", it_stop); + loggers::get_instance().log("json_codec_mec011::decode: segment=%s", str.substr(it_start, it_stop - it_start).c_str()); + str = str.substr(0, it_start) + "{}" + str.substr(it_stop); + loggers::get_instance().log("json_codec_mec011::decode: After, str=%s", str.c_str()); + } // End of 'while' statement + decoding_buffer.clear(); + decoding_buffer.put_os(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + EdgePlatformApplicationEnablementAPI__TypesAndValues::TransportInfoList transport_info_list; + transport_info_list.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TransportInfoList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.transportInfoList() = transport_info_list; + } else if (it->second.find("\"trafficRuleId\"") != std::string::npos) { + if (it->second[0] == '[') { + EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRuleList traffic_rule_list; + traffic_rule_list.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRuleList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.trafficRuleList() = traffic_rule_list; + } else { + EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule traffic_rule; + traffic_rule.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.trafficRule() = traffic_rule; + } + } else if (it->second.find("\"dnsRuleId\"") != std::string::npos) { + if (it->second[0] == '[') { + EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRuleList dns_rule_list; + dns_rule_list.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRuleList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.dnsRuleList() = dns_rule_list; + } else { + EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRule dns_rule; + dns_rule.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRule_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.dnsRule() = dns_rule; + } + } else if ((it->second.find("\"_links\"") != std::string::npos) && (it->second.find("\"subscriptions\"") != std::string::npos)) { + EdgePlatformApplicationEnablementAPI__TypesAndValues::SubscriptionLinkList sub_link_list; + sub_link_list.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.subscriptionLinkList__app__ens() = sub_link_list; + } else if ((it->second.find("\"SerAvailabilityNotificationSubscription\"") != std::string::npos) && (it->second.find("\"callbackReference\"") != std::string::npos)) { + EdgePlatformApplicationEnablementAPI__TypesAndValues::SerAvailabilityNotificationSubscription ser_av; + ser_av.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::SerAvailabilityNotificationSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.serAvailabilityNotificationSubscription() = ser_av; + } else if ((it->second.find("\"AppTerminationNotificationSubscription\"") != std::string::npos) && (it->second.find("\"callbackReference\"") != std::string::npos)) { + EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription app_term; + app_term.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.appTerminationNotificationSubscription() = app_term; + } else if ((it->second.find("\"state\"") != std::string::npos) && (it->second.find("\"interval\"") != std::string::npos)) { + EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceLivenessInfo service_liveness_info; + service_liveness_info.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceLivenessInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.serviceLivenessInfo() = service_liveness_info; + } else if ((it->second.find("\"ntpServers\"") != std::string::npos) || (it->second.find("{\"timeStamp\"") == 0)) { + EdgePlatformApplicationEnablementAPI__TypesAndValues::TimingCaps timing_caps; + timing_caps.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TimingCaps_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.timingCaps() = timing_caps; + } else if (it->second.find("\"timeSourceStatus\"") != std::string::npos) { + EdgePlatformApplicationEnablementAPI__TypesAndValues::CurrentTime current_time; + current_time.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::CurrentTime_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.currentTime() = current_time; + } else if (it->second.find("\"appName\"") != std::string::npos) { + EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo appInfo; + appInfo.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.appInfo__regapps() = appInfo; + } else { + return json_codec::decode(p_data, msg, p_params); + } + + loggers::get_instance().log_msg("<<< json_codec_mec011::decode: ", (const Base_Type&)msg); + return 0; +} + +json_codec_factory_mec011 json_codec_factory_mec011::_f; diff --git a/ccsrc/Protocols/Json/json_codec_mec011.hh b/ccsrc/Protocols/Json/json_codec_mec011.hh new file mode 100644 index 0000000000000000000000000000000000000000..8843d8bcc90e35877a54968df3320e97cc0a457c --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec011.hh @@ -0,0 +1,25 @@ +#pragma once + +#include "codec_gen.hh" +#include "params.hh" + +#include "json_codec.hh" + +class Base_Type; +class TTCN_Typedescriptor_t; +class TTCN_Buffer; + +namespace LibHttp__JsonMessageBodyTypes { + class JsonBody; +} + +class json_codec_mec011: public json_codec +{ +public: + explicit json_codec_mec011() : json_codec() { }; + virtual ~json_codec_mec011() { }; + + int encode (const LibHttp__JsonMessageBodyTypes::JsonBody&, OCTETSTRING& data); + int decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody&, params* p_params = NULL); + +}; // End of class json_codec_mec011 diff --git a/ccsrc/Protocols/Json/json_codec_mec013.cc b/ccsrc/Protocols/Json/json_codec_mec013.cc new file mode 100644 index 0000000000000000000000000000000000000000..edcf6a6b942c9399204772fb199f11d1c2374359 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec013.cc @@ -0,0 +1,246 @@ +#include +#include +#include + +#include "json_codec_factory_mec013.hh" + +#include "loggers.hh" + +#include "LibHttp_JsonMessageBodyTypes.hh" + +int json_codec_mec013::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTETSTRING& data) +{ + loggers::get_instance().log_msg(">>> json_codec_mec013::encode: ", (const Base_Type&)msg); + + TTCN_EncDec::clear_error(); + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_Buffer encoding_buffer; + + if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_userLocationEventSubscription)) { + const LocationAPI__TypesAndValues::UserLocationEventSubscription& user_location_event_subscription = msg.userLocationEventSubscription(); + user_location_event_subscription.encode(LocationAPI__TypesAndValues::UserLocationEventSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"userLocationEventSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_userLocationPeriodicSubscription)) { + const LocationAPI__TypesAndValues::UserLocationPeriodicSubscription& user_location_periodic_subscription = msg.userLocationPeriodicSubscription(); + user_location_periodic_subscription.encode(LocationAPI__TypesAndValues::UserLocationPeriodicSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"userLocationPeriodicSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_zoneLocationEventSubscription)) { + const LocationAPI__TypesAndValues::ZoneLocationEventSubscription& zone_location_event_subscription = msg.zoneLocationEventSubscription(); + zone_location_event_subscription.encode(LocationAPI__TypesAndValues::ZoneLocationEventSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"zoneLocationEventSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_userAreaSubscription)) { + const LocationAPI__TypesAndValues::UserAreaSubscription& notif = msg.userAreaSubscription(); + notif.encode(LocationAPI__TypesAndValues::UserAreaSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"userAreaSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_userDistanceSubscription)) { + const LocationAPI__TypesAndValues::UserDistanceSubscription& notif = msg.userDistanceSubscription(); + notif.encode(LocationAPI__TypesAndValues::UserDistanceSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"userDistanceSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else { + return json_codec::encode(msg, data); + } + + loggers::get_instance().log("<<< json_codec_mec013::encode"); + return 0; +} + +int json_codec_mec013::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody& msg, params* p_params) +{ + loggers::get_instance().log_msg(">>> json_codec_mec013::decode: p_data=", p_data); + + // Sanity checks + params::const_iterator it; + if (p_params == nullptr) { + loggers::get_instance().warning("json_codec_mec013::decode: Failed to access p_params (null pointer)"); + return -1; // TODO Use p_data instead of return -1 + } else { + it = p_params->find("decode_str"); + if (it == p_params->cend()) { + loggers::get_instance().warning("json_codec_mec013::decode: Failed to access p_params item (decode_str)"); + return -1; // TODO Use p_data instead of return -1 + } + loggers::get_instance().log("json_codec_mec013::decode: it->second='%c' / '%s'", it->second.c_str()[0], it->second.c_str()); + } + + // Remove data structure name (if present) ... + std::string str; + if ((it->second[0] != '[') && (it->second[0] != '{')) { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + } else { + str = it->second; + } + // ..and create the decoding buffer + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_EncDec::clear_error(); + loggers::get_instance().log("json_codec_mec013::decode: decoding_buffer='%c' / '%s'", str[0], str.c_str()); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + + if (it->second.find("\"userList\"") != std::string::npos) { // Be careful to the order + // TODO To be refined, find("\"userList\"") is not optimal + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + LocationAPI__TypesAndValues::UserList user_list; + user_list.decode(LocationAPI__TypesAndValues::UserList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userList() = user_list; + } else if (it->second.find("\"accessPointList\"") != std::string::npos) { // Be careful to the order + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + // Replace '5G NR' ConnectionType enumerated by FiveG_NR + if (str.find("5G NR") != std::string::npos) { + idx_begin = 0; + std::string search("5G NR"); + std::string replace("FiveG_NR"); + //loggers::get_instance().log("xml_codec::patch_encode_agent_derivations: Apply TITAN workaround: %s --> %s", search.c_str(), replace.c_str()); + while ((idx_begin = str.find(search, idx_begin)) != std::string::npos) { + str.replace(idx_begin, search.length(), replace); + idx_begin += replace.length(); + } // End of 'while' statement + } + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + LocationAPI__TypesAndValues::AccessPointList access_point_list; + access_point_list.decode(LocationAPI__TypesAndValues::AccessPointList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.accessPointList() = access_point_list; + } else if (it->second.find("\"notificationSubscriptionList\"") != std::string::npos) { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + LocationAPI__TypesAndValues::NotificationSubscriptionList notification_subscription_list; + notification_subscription_list.decode(LocationAPI__TypesAndValues::NotificationSubscriptionList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.notificationSubscriptionList() = notification_subscription_list; + } else if (it->second.find("\"userLocationEventSubscription\"") != std::string::npos) { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + LocationAPI__TypesAndValues::UserLocationEventSubscription user_location_event_subscription; + user_location_event_subscription.decode(LocationAPI__TypesAndValues::UserLocationEventSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userLocationEventSubscription() = user_location_event_subscription; + } else if (it->second.find("\"userLocationEventNotification\"") != std::string::npos) { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + LocationAPI__TypesAndValues::UserLocationEventNotification user_location_event_notification; + user_location_event_notification.decode(LocationAPI__TypesAndValues::UserLocationEventNotification_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userLocationEventNotification() = user_location_event_notification; + } else if (it->second.find("\"userLocationPeriodicSubscription\"") != std::string::npos) { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + LocationAPI__TypesAndValues::UserLocationPeriodicSubscription user_location_periodic_subscription; + user_location_periodic_subscription.decode(LocationAPI__TypesAndValues::UserLocationPeriodicSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userLocationPeriodicSubscription() = user_location_periodic_subscription; + } else if (it->second.find("\"userLocationPeriodicNotification\"") != std::string::npos) { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + LocationAPI__TypesAndValues::UserLocationPeriodicNotification user_location_periodic_notification; + user_location_periodic_notification.decode(LocationAPI__TypesAndValues::UserLocationPeriodicNotification_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userLocationPeriodicNotification() = user_location_periodic_notification; + } else if (it->second.find("\"zoneStatusSubscription\"") != std::string::npos) { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + LocationAPI__TypesAndValues::ZoneStatusSubscription zone_status_subscription; + zone_status_subscription.decode(LocationAPI__TypesAndValues::ZoneStatusSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.zoneStatusSubscription() = zone_status_subscription; + } else if (it->second.find("\"zoneStatusNotification\"") != std::string::npos) { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + LocationAPI__TypesAndValues::ZoneStatusNotification zone_status_notification; + zone_status_notification.decode(LocationAPI__TypesAndValues::ZoneStatusNotification_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.zoneStatusNotification() = zone_status_notification; + } else if (it->second.find("\"zoneLocationEventSubscription\"") != std::string::npos) { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + LocationAPI__TypesAndValues::ZoneLocationEventSubscription zone_location_event_subscription; + zone_location_event_subscription.decode(LocationAPI__TypesAndValues::ZoneLocationEventSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.zoneLocationEventSubscription() = zone_location_event_subscription; + } else if (it->second.find("\"zoneLocationEventNotification\"") != std::string::npos) { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + LocationAPI__TypesAndValues::ZoneLocationEventNotification zone_location_event_notification; + zone_location_event_notification.decode(LocationAPI__TypesAndValues::ZoneLocationEventNotification_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.zoneLocationEventNotification() = zone_location_event_notification; + } else if (it->second.find("\"userAreaSubscription\"") != std::string::npos) { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + LocationAPI__TypesAndValues::UserAreaSubscription user_area_subscription; + user_area_subscription.decode(LocationAPI__TypesAndValues::UserAreaSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userAreaSubscription() = user_area_subscription; + } else if (it->second.find("\"userAreaNotification\"") != std::string::npos) { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + LocationAPI__TypesAndValues::UserAreaNotification user_area_notification; + user_area_notification.decode(LocationAPI__TypesAndValues::UserAreaNotification_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userAreaNotification() = user_area_notification; + } else if (it->second.find("\"userDistanceSubscription\"") != std::string::npos) { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + LocationAPI__TypesAndValues::UserDistanceSubscription user_distance_subscription; + user_distance_subscription.decode(LocationAPI__TypesAndValues::UserDistanceSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userDistanceSubscription() = user_distance_subscription; + } else if (it->second.find("\"userDistanceNotification\"") != std::string::npos) { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + LocationAPI__TypesAndValues::UserDistanceNotification user_distance_notification; + user_distance_notification.decode(LocationAPI__TypesAndValues::UserDistanceNotification_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userDistanceNotification() = user_distance_notification; + } else if (it->second.find("\"accessPointId\"") != std::string::npos) { + if (it->second.find("\"address\"") != std::string::npos) { + LocationAPI__TypesAndValues::UserInfo user_info; + user_info.decode(LocationAPI__TypesAndValues::UserInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userInfo() = user_info; + } else { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + LocationAPI__TypesAndValues::AccessPointInfo access_point_info; + access_point_info.decode(LocationAPI__TypesAndValues::AccessPointInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.accessPointInfo() = access_point_info; + } + } else if (it->second.find("\"terminalDistance\"") != std::string::npos) { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + LocationAPI__TypesAndValues::TerminalDistance terminal_distance; + terminal_distance.decode(LocationAPI__TypesAndValues::TerminalDistance_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.terminalDistance() = terminal_distance; + } else if (it->second.find("\"detail\"") != std::string::npos) { + LibMec__TypesAndValues::ProblemDetails problem_details; + problem_details.decode(LibMec__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.problemDetails() = problem_details; + } else { + return json_codec::decode(p_data, msg, p_params); + } + + loggers::get_instance().log_msg("<<< json_codec_mec013::decode: ", (const Base_Type&)msg); + return 0; +} + +json_codec_factory_mec013 json_codec_factory_mec013::_f; diff --git a/ccsrc/Protocols/Json/json_codec_mec013.hh b/ccsrc/Protocols/Json/json_codec_mec013.hh new file mode 100644 index 0000000000000000000000000000000000000000..91d2220a8538ec33cddff8c515d24dbfdb6e3cd5 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec013.hh @@ -0,0 +1,22 @@ +#pragma once + +#include "json_codec.hh" + +class Base_Type; +class TTCN_Typedescriptor_t; +class TTCN_Buffer; + +namespace LibHttp__JsonMessageBodyTypes { + class JsonBody; +} + +class json_codec_mec013: public json_codec +{ +public: + explicit json_codec_mec013() : json_codec() { }; + virtual ~json_codec_mec013() { }; + + int encode (const LibHttp__JsonMessageBodyTypes::JsonBody&, OCTETSTRING& data); + int decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody&, params* p_params = NULL); + +}; // End of class json_codec_mec013 diff --git a/ccsrc/Protocols/Json/json_codec_mec028.cc b/ccsrc/Protocols/Json/json_codec_mec028.cc new file mode 100644 index 0000000000000000000000000000000000000000..720a379ec980efed81a11846f1eaec40b7881b16 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec028.cc @@ -0,0 +1,119 @@ +#include +#include +#include + +#include "json_codec_factory_mec028.hh" + +#include "loggers.hh" + +#include "LibHttp_JsonMessageBodyTypes.hh" + +int json_codec_mec028::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTETSTRING& data) +{ + loggers::get_instance().log_msg(">>> json_codec_mec028::encode: ", (const Base_Type&)msg); + + TTCN_EncDec::clear_error(); + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_Buffer encoding_buffer; + + if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_assocStaSubscription)) { + const WlanInformationAPI__TypesAndValues::AssocStaSubscription& assoc_sta_subscription = msg.assocStaSubscription(); + assoc_sta_subscription.encode(WlanInformationAPI__TypesAndValues::AssocStaSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_staDataRateSubscription)) { + const WlanInformationAPI__TypesAndValues::StaDataRateSubscription& sta_data_rate_subscription = msg.staDataRateSubscription(); + sta_data_rate_subscription.encode(WlanInformationAPI__TypesAndValues::StaDataRateSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else { + return json_codec::encode(msg, data); + } + + loggers::get_instance().log("<<< json_codec_mec028::encode"); + return 0; +} + +int json_codec_mec028::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody& msg, params* p_params) +{ + loggers::get_instance().log_msg(">>> json_codec_mec028::decode: p_data=", p_data); + + // Sanity checks + params::const_iterator it; + if (p_params == nullptr) { + loggers::get_instance().warning("json_codec_mec028::decode: Failed to access p_params (null pointer)"); + return -1; // TODO Use p_data instead of return -1 + } else { + it = p_params->find("decode_str"); + if (it == p_params->cend()) { + loggers::get_instance().warning("json_codec_mec028::decode: Failed to access p_params item (decode_str)"); + return -1; // TODO Use p_data instead of return -1 + } + loggers::get_instance().log("json_codec_mec028::decode: it->second='%c' / '%s'", it->second.c_str()[0], it->second.c_str()); + } + + // Remove data structure name (if present) ... + std::string str; + if ((it->second[0] != '[') && (it->second[0] != '{')) { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + } else { + str = it->second; + } + // ..and create the decoding buffer + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_EncDec::clear_error(); + loggers::get_instance().log("json_codec_mec028::decode: decoding_buffer='%c' / '%s'", str[0], str.c_str()); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + + if (it->second.find("\"AssocStaSubscription\"") != std::string::npos) { + if (it->second.find("\"subscription\"") != std::string::npos) { // SubscriptionLinkList + WlanInformationAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + subscription_link_list.decode(WlanInformationAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.subscriptionLinkList__wlan() = subscription_link_list; + } else { // AssocStaSubscription + WlanInformationAPI__TypesAndValues::AssocStaSubscription assoc_sta_subscription; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + assoc_sta_subscription.decode(WlanInformationAPI__TypesAndValues::AssocStaSubscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.assocStaSubscription() = assoc_sta_subscription; + } + } else if (it->second.find("\"AssocStaNotification\"") != std::string::npos) { + WlanInformationAPI__TypesAndValues::AssocStaNotification assoc_sta_notification; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + assoc_sta_notification.decode(WlanInformationAPI__TypesAndValues::AssocStaNotification_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.assocStaNotification() = assoc_sta_notification; + } else if (it->second.find("\"StaDataRateSubscription\"") != std::string::npos) { + WlanInformationAPI__TypesAndValues::StaDataRateSubscription sta_data_rate_subscription; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + sta_data_rate_subscription.decode(WlanInformationAPI__TypesAndValues::StaDataRateSubscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.staDataRateSubscription() = sta_data_rate_subscription; + // } else if (it->second.find("\"StaDataRateNotification\"") != std::string::npos) { + // WlanInformationAPI__TypesAndValues::StaDataRateNotification assoc_sta_data_rate_notification; + // TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + // assoc_sta_data_rate_notification.decode(WlanInformationAPI__TypesAndValues::StaDataRateNotification_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + // msg.assocStaDataRateNotification() = assoc_sta_data_rate_notification; + } else if ((it->second.find("\"_links\"") != std::string::npos) && (it->second.find("subscriptions") != std::string::npos)) { // SubscriptionLinkList + // decode_str: {"_links":{"self":{"href":"https://try-mec.etsi.org/sbxpb4c4k2/wai/v2/subscriptions"}}} + WlanInformationAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + subscription_link_list.decode(WlanInformationAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.subscriptionLinkList__wlan() = subscription_link_list; + } else if ((it->second.find("\"apInfo\"") != std::string::npos) || (it->second.find("\"apId\"") != std::string::npos)) { + WlanInformationAPI__TypesAndValues::ApInfoList ap_info_list; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + ap_info_list.decode(WlanInformationAPI__TypesAndValues::ApInfoList_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.apInfoList() = ap_info_list; + } else if ((it->second.find("\"staInfo\"") != std::string::npos) || (it->second.find("\"rssi\"") != std::string::npos)) { + WlanInformationAPI__TypesAndValues::StaInfoList sta_info_list; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + sta_info_list.decode(WlanInformationAPI__TypesAndValues::StaInfoList_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.staInfoList() = sta_info_list; + } else { + return json_codec::decode(p_data, msg, p_params); + } + + loggers::get_instance().log_msg("<<< json_codec_mec028::decode: ", (const Base_Type&)msg); + return 0; +} + +json_codec_factory_mec028 json_codec_factory_mec028::_f; diff --git a/ccsrc/Protocols/Json/json_codec_mec028.hh b/ccsrc/Protocols/Json/json_codec_mec028.hh new file mode 100644 index 0000000000000000000000000000000000000000..604f7ea9c91815ad4e4c4ac39059b7b3fa8c4282 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec028.hh @@ -0,0 +1,25 @@ +#pragma once + +#include "codec_gen.hh" +#include "params.hh" + +#include "json_codec.hh" + +class Base_Type; +class TTCN_Typedescriptor_t; +class TTCN_Buffer; + +namespace LibHttp__JsonMessageBodyTypes { + class JsonBody; +} + +class json_codec_mec028: public json_codec +{ +public: + explicit json_codec_mec028() : json_codec() { }; + virtual ~json_codec_mec028() { }; + + int encode (const LibHttp__JsonMessageBodyTypes::JsonBody&, OCTETSTRING& data); + int decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody&, params* p_params = NULL); + +}; // End of class json_codec_mec028 diff --git a/ccsrc/Protocols/Json/json_codec_mec030.cc b/ccsrc/Protocols/Json/json_codec_mec030.cc new file mode 100644 index 0000000000000000000000000000000000000000..49e7cbbce889f3df18767ed3eeb72daf55d74f32 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec030.cc @@ -0,0 +1,152 @@ +#include +#include +#include + +#include "json_codec_factory_mec030.hh" + +#include "loggers.hh" + +#include "LibHttp_JsonMessageBodyTypes.hh" + +int json_codec_mec030::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTETSTRING& data) +{ + loggers::get_instance().log_msg(">>> json_codec_mec030::encode: ", (const Base_Type&)msg); + + TTCN_EncDec::clear_error(); + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_Buffer encoding_buffer; + + if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_predictedQos)) { + const V2XInformationServiceAPI__TypesAndValues::PredictedQos& predicted_qos = msg.predictedQos(); + predicted_qos.encode(V2XInformationServiceAPI__TypesAndValues::PredictedQos_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_v2xMsgDistributionServerInfo)) { + const V2XInformationServiceAPI__TypesAndValues::V2xMsgDistributionServerInfo& v2x_msg_distribution_server_info = msg.v2xMsgDistributionServerInfo(); + v2x_msg_distribution_server_info.encode(V2XInformationServiceAPI__TypesAndValues::V2xMsgDistributionServerInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_provChgUuUniSubscription)) { + const V2XInformationServiceAPI__TypesAndValues::ProvChgUuUniSubscription& prov_chg_uu_uni_subscription = msg.provChgUuUniSubscription(); + prov_chg_uu_uni_subscription.encode(V2XInformationServiceAPI__TypesAndValues::ProvChgUuUniSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_provChgUuMbmsSubscription)) { + const V2XInformationServiceAPI__TypesAndValues::ProvChgUuMbmsSubscription& prov_chg_uu_mbms_subscription = msg.provChgUuMbmsSubscription(); + prov_chg_uu_mbms_subscription.encode(V2XInformationServiceAPI__TypesAndValues::ProvChgUuMbmsSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_provChgPc5Subscription)) { + const V2XInformationServiceAPI__TypesAndValues::ProvChgPc5Subscription& prov_chg_pc5_subscription = msg.provChgPc5Subscription(); + prov_chg_pc5_subscription.encode(V2XInformationServiceAPI__TypesAndValues::ProvChgPc5Subscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_v2xMsgSubscription)) { + const V2XInformationServiceAPI__TypesAndValues::V2xMsgSubscription& v2x_msg_subscription = msg.v2xMsgSubscription(); + v2x_msg_subscription.encode(V2XInformationServiceAPI__TypesAndValues::V2xMsgSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else { + return json_codec::encode(msg, data); + } + + loggers::get_instance().log("<<< json_codec_mec030::encode"); + return 0; +} + +int json_codec_mec030::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody& msg, params* p_params) +{ + loggers::get_instance().log_msg(">>> json_codec_mec030::decode: p_data=", p_data); + + // Sanity checks + params::const_iterator it; + if (p_params == nullptr) { + loggers::get_instance().warning("json_codec_mec030::decode: Failed to access p_params (null pointer)"); + return -1; // TODO Use p_data instead of return -1 + } else { + it = p_params->find("decode_str"); + if (it == p_params->cend()) { + loggers::get_instance().warning("json_codec_mec030::decode: Failed to access p_params item (decode_str)"); + return -1; // TODO Use p_data instead of return -1 + } + loggers::get_instance().log("json_codec_mec030::decode: it->second='%c' / '%s'", it->second.c_str()[0], it->second.c_str()); + } + + // Remove data structure name (if present) ... + std::string str; + if ((it->second[0] != '[') && (it->second[0] != '{')) { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + } else { + str = it->second; + } + // ..and create the decoding buffer + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_EncDec::clear_error(); + loggers::get_instance().log("json_codec_mec030::decode: decoding_buffer='%c' / '%s'", str[0], str.c_str()); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + + if ((it->second.find("\"uuUnicastProvisioningInfo\"") != std::string::npos) || (it->second.find("\"proInfoUuUnicast\"") != std::string::npos)) { + V2XInformationServiceAPI__TypesAndValues::UuUnicastProvisioningInfo uu_unicast_provisioning_info; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + uu_unicast_provisioning_info.decode(V2XInformationServiceAPI__TypesAndValues::UuUnicastProvisioningInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.uuUnicastProvisioningInfo() = uu_unicast_provisioning_info; + } else if ((it->second.find("\"uuMbmsProvisioningInfo\"") != std::string::npos) || (it->second.find("\"proInfoUuMbms\"") != std::string::npos)) { + V2XInformationServiceAPI__TypesAndValues::UuMbmsProvisioningInfo uu_mbms_provisioning_info; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + uu_mbms_provisioning_info.decode(V2XInformationServiceAPI__TypesAndValues::UuMbmsProvisioningInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.uuMbmsProvisioningInfo() = uu_mbms_provisioning_info; + } else if ((it->second.find("\"pc5ProvisioningInfo\"") != std::string::npos) || (it->second.find("\"proInfoPc5\"") != std::string::npos)) { + V2XInformationServiceAPI__TypesAndValues::Pc5ProvisioningInfo pc5_provisioning_info; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + pc5_provisioning_info.decode(V2XInformationServiceAPI__TypesAndValues::Pc5ProvisioningInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.pc5ProvisioningInfo() = pc5_provisioning_info; + } else if ((it->second.find("\"predictedQos\"") != std::string::npos) || (it->second.find("\"locationGranularity\"") != std::string::npos)) { + V2XInformationServiceAPI__TypesAndValues::PredictedQos predicted_qos; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + predicted_qos.decode(V2XInformationServiceAPI__TypesAndValues::PredictedQos_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.predictedQos() = predicted_qos; + } else if (it->second.find("\"ProvChgUuUniSubscription\"") != std::string::npos) { + V2XInformationServiceAPI__TypesAndValues::ProvChgUuUniSubscription prov_chg_uu_uni_subscription; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + prov_chg_uu_uni_subscription.decode(V2XInformationServiceAPI__TypesAndValues::ProvChgUuUniSubscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.provChgUuUniSubscription() = prov_chg_uu_uni_subscription; + } else if (it->second.find("\"ProvChgUuMbmsSubscription\"") != std::string::npos) { + V2XInformationServiceAPI__TypesAndValues::ProvChgUuMbmsSubscription prov_chg_uu_mbms_subscription; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + prov_chg_uu_mbms_subscription.decode(V2XInformationServiceAPI__TypesAndValues::ProvChgUuMbmsSubscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.provChgUuMbmsSubscription() = prov_chg_uu_mbms_subscription; + } else if (it->second.find("\"ProvChgPc5Subscription\"") != std::string::npos) { + V2XInformationServiceAPI__TypesAndValues::ProvChgPc5Subscription prov_chg_pc5_subscription; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + prov_chg_pc5_subscription.decode(V2XInformationServiceAPI__TypesAndValues::ProvChgPc5Subscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.provChgPc5Subscription() = prov_chg_pc5_subscription; + } else if (it->second.find("\"V2xMsgSubscription\"") != std::string::npos) { + V2XInformationServiceAPI__TypesAndValues::V2xMsgSubscription v2x_msg_subscription; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + v2x_msg_subscription.decode(V2XInformationServiceAPI__TypesAndValues::V2xMsgSubscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.v2xMsgSubscription() = v2x_msg_subscription; + } else if (it->second.find("\"ProvChgUuUniNotification\"") != std::string::npos) { + V2XInformationServiceAPI__TypesAndValues::ProvChgUuUniNotification prov_chg_uu_uni_notification; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + prov_chg_uu_uni_notification.decode(V2XInformationServiceAPI__TypesAndValues::ProvChgUuUniNotification_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.provChgUuUniNotification() = prov_chg_uu_uni_notification; + } else if (it->second.find("\"ProvChgUuMbmsNotification\"") != std::string::npos) { + V2XInformationServiceAPI__TypesAndValues::ProvChgUuMbmsNotification prov_chg_uu_mbms_notification; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + prov_chg_uu_mbms_notification.decode(V2XInformationServiceAPI__TypesAndValues::ProvChgUuMbmsNotification_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.provChgUuMbmsNotification() = prov_chg_uu_mbms_notification; + } else if (it->second.find("\"provChgPc5Notification\"") != std::string::npos) { + V2XInformationServiceAPI__TypesAndValues::ProvChgPc5Notification prov_chg_pc5_notification; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + prov_chg_pc5_notification.decode(V2XInformationServiceAPI__TypesAndValues::ProvChgPc5Notification_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.provChgPc5Notification() = prov_chg_pc5_notification; + } else if (it->second.find("\"v2xMsgDistributionServer\"") != std::string::npos) { + V2XInformationServiceAPI__TypesAndValues::V2xMsgDistributionServerInfo v2x_msg_distribution_server_info; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + v2x_msg_distribution_server_info.decode(V2XInformationServiceAPI__TypesAndValues::V2xMsgDistributionServerInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.v2xMsgDistributionServerInfo() = v2x_msg_distribution_server_info; + } else { + return json_codec::decode(p_data, msg, p_params); + } + + loggers::get_instance().log_msg("<<< json_codec_mec030::decode: ", (const Base_Type&)msg); + return 0; +} + +json_codec_factory_mec030 json_codec_factory_mec030::_f; diff --git a/ccsrc/Protocols/Json/json_codec_mec030.hh b/ccsrc/Protocols/Json/json_codec_mec030.hh new file mode 100644 index 0000000000000000000000000000000000000000..9b7dc7084f8d447e3db51a9b2373f76e4ca882bf --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec030.hh @@ -0,0 +1,25 @@ +#pragma once + +#include "codec_gen.hh" +#include "params.hh" + +#include "json_codec.hh" + +class Base_Type; +class TTCN_Typedescriptor_t; +class TTCN_Buffer; + +namespace LibHttp__JsonMessageBodyTypes { + class JsonBody; +} + +class json_codec_mec030: public json_codec +{ +public: + explicit json_codec_mec030() : json_codec() { }; + virtual ~json_codec_mec030() { }; + + virtual int encode (const LibHttp__JsonMessageBodyTypes::JsonBody&, OCTETSTRING& data); + virtual int decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody&, params* p_params = NULL); + +}; // End of class json_codec_mec030 diff --git a/ccsrc/Protocols/Json/json_codec_mec040.cc b/ccsrc/Protocols/Json/json_codec_mec040.cc new file mode 100644 index 0000000000000000000000000000000000000000..78ec67e15498b806bb786e2be712576dfc7e4451 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec040.cc @@ -0,0 +1,82 @@ +#include +#include +#include + +#include "json_codec_factory_mec040.hh" + +#include "loggers.hh" + +#include "LibHttp_JsonMessageBodyTypes.hh" + +int json_codec_mec040::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTETSTRING& data) +{ + loggers::get_instance().log_msg(">>> json_codec_mec040::encode: ", (const Base_Type&)msg); + + TTCN_EncDec::clear_error(); + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_Buffer encoding_buffer; + + if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_systemInfo)) { + const FederationEnablementAPI__TypesAndValues::SystemInfo& system_info = msg.systemInfo(); + system_info.encode(FederationEnablementAPI__TypesAndValues::SystemInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"SystemInfo\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else { + return json_codec::encode(msg, data); + } + + loggers::get_instance().log("<<< json_codec_mec040::encode"); + return 0; +} + +int json_codec_mec040::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody& msg, params* p_params) +{ + loggers::get_instance().log_msg(">>> json_codec_mec040::decode: p_data=", p_data); + + // Sanity checks + params::const_iterator it; + if (p_params == nullptr) { + loggers::get_instance().warning("json_codec_mec040::decode: Failed to access p_params (null pointer)"); + return -1; // TODO Use p_data instead of return -1 + } else { + it = p_params->find("decode_str"); + if (it == p_params->cend()) { + loggers::get_instance().warning("json_codec_mec040::decode: Failed to access p_params item (decode_str)"); + return -1; // TODO Use p_data instead of return -1 + } + loggers::get_instance().log("json_codec_mec040::decode: it->second='%c' / '%s'", it->second.c_str()[0], it->second.c_str()); + } + + // Remove data structure name (if present) ... + std::string str; + if ((it->second[0] != '[') && (it->second[0] != '{')) { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; // Remove the last '}' + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + } else { + str = it->second; + } + // ..and create the decoding buffer + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_EncDec::clear_error(); + loggers::get_instance().log("json_codec_mec040::decode: decoding_buffer='%c' / '%s'", str[0], str.c_str()); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + + if (it->second.find("\"systemId\"") != std::string::npos) { // Be careful to the order + if (it->second[0] == '[') { + FederationEnablementAPI__TypesAndValues::SystemInfoList system_info_list; + system_info_list.decode(FederationEnablementAPI__TypesAndValues::SystemInfoList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.systemInfoList() = system_info_list; + } else { + FederationEnablementAPI__TypesAndValues::SystemInfo system_info; + system_info.decode(FederationEnablementAPI__TypesAndValues::SystemInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.systemInfo() = system_info; + } + } else { + return json_codec::decode(p_data, msg, p_params); + } + + loggers::get_instance().log_msg("<<< json_codec_mec040::decode: ", (const Base_Type&)msg); + return 0; +} + +json_codec_factory_mec040 json_codec_factory_mec040::_f; diff --git a/ccsrc/Protocols/Json/json_codec_mec040.hh b/ccsrc/Protocols/Json/json_codec_mec040.hh new file mode 100644 index 0000000000000000000000000000000000000000..f25700091835a34369cbddf5d02727d8b8a55eca --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec040.hh @@ -0,0 +1,25 @@ +#pragma once + +#include "codec_gen.hh" +#include "params.hh" + +#include "json_codec.hh" + +class Base_Type; +class TTCN_Typedescriptor_t; +class TTCN_Buffer; + +namespace LibHttp__JsonMessageBodyTypes { + class JsonBody; +} + +class json_codec_mec040: public json_codec +{ +public: + explicit json_codec_mec040() : json_codec() { }; + virtual ~json_codec_mec040() { }; + + int encode (const LibHttp__JsonMessageBodyTypes::JsonBody&, OCTETSTRING& data); + int decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody&, params* p_params = NULL); + +}; // End of class json_codec_mec040 diff --git a/ccsrc/Protocols/Json/module.mk b/ccsrc/Protocols/Json/module.mk index d5376a47206e3eef78c4cfec11f9708d3bbac2f1..593ce97104801b3075622e463b180815dbfe1c11 100644 --- a/ccsrc/Protocols/Json/module.mk +++ b/ccsrc/Protocols/Json/module.mk @@ -1,3 +1,11 @@ -sources := json_codec.cc +sources := \ + json_codec.cc \ + json_codec_mec011.cc \ + json_codec_mec013.cc \ + json_codec_mec030.cc \ + json_codec_mec028.cc \ + json_codec_mec040.cc \ + + includes := . diff --git a/ccsrc/Protocols/Pcap/module.mk b/ccsrc/Protocols/Pcap/module.mk deleted file mode 100644 index 0f6495fd1f97d7dc021967cfb0ba521696060c50..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Pcap/module.mk +++ /dev/null @@ -1,3 +0,0 @@ -sources := pcap_cygwin_layer.cc pcap_layer.cc pcap_linux_layer.cc pcap_offline_layer.cc -includes := . - diff --git a/ccsrc/Protocols/Pcap/pcap_cygwin_layer.cc b/ccsrc/Protocols/Pcap/pcap_cygwin_layer.cc deleted file mode 100644 index 2e3cc7a26ddd957e62c4e9f21167166814fca79f..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Pcap/pcap_cygwin_layer.cc +++ /dev/null @@ -1,263 +0,0 @@ -#if defined (__CYGWIN__) - -#define _GNU_SOURCE - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "pcap_layer_factory.hh" - -#include "loggers.hh" - -#include - -typedef struct { - bpf_int32 tv_sec; /* seconds */ - bpf_int32 tv_usec; /* microseconds */ -}pcap_o_timeval; - -typedef struct pcap_o_pkthdr { - pcap_o_timeval ts; /* time stamp */ - bpf_u_int32 caplen; /* length of portion present */ - bpf_u_int32 len; /* length this packet (off wire) */ -}pcap_o_pkthdr; - -extern "C" int pcap_oid_get_request(pcap_t *p, bpf_u_int32 oid, void *data, size_t *lenp); - -static const char* _hexDigits = "0123456789ABCDEF"; -static char * _bin2hex(char * hex, size_t hlen, const char * bin, size_t blen) -{ - const unsigned char *b, *e; - char * s; - - // sanity check - if (hlen >= 0 && hlen < blen * 2) return NULL; - - b = (const unsigned char *)bin; - e = b + blen - 1; - s = hex + blen * 2; - if (s < hex + hlen) *s = 0; - for (; b <= e; e--){ - *(--s) = _hexDigits[(*e) & 0xF]; - *(--s) = _hexDigits[(*e) >> 4]; - } - return hex + blen * 2; -} - -pcap_layer::pcap_layer(const std::string& p_type, const std::string& param) : - layer(p_type), PORT(p_type.c_str()), _params(), _device(NULL), _running(FALSE), _time_key("pcap_layer::Handle_Fd_Event_Readable") { - loggers::get_instance().log(">>> pcap_layer::pcap_layer: %s, %s", p_type.c_str(), param.c_str()); - params::convert(_params, param); - - char error_buffer[PCAP_ERRBUF_SIZE]; - params::const_iterator it; - std::string nic; //network interface name - bpf_u_int32 mask; // subnet mask - bpf_u_int32 net; // ip address - - it = _params.find(params::nic); - if ((it == _params.end()) || it->second.empty()) { - loggers::get_instance().error("pcap_layer::pcap_layer: NIC must be specified"); - return; - } - - nic = std::string("\\Device\\NPF_{") + it->second + "}"; - - if (pcap_lookupnet(nic.c_str(), &net, &mask, error_buffer) != 0) { - loggers::get_instance().error("pcap_layer::pcap_layer: pcap_layer::pcap_layer: Failed to fetch newtork address for device %s", nic.c_str()); - } - loggers::get_instance().log("pcap_layer::pcap_layer: Device %s Network address: %d", nic.c_str(), net); - - // Open the device - _device = pcap_open_live(nic.c_str(), 65536/*64*1024*/, 1, 100, error_buffer); - if (_device == NULL) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to open device %s", nic.c_str()); - return; - } - - // Setup filter - std::string filter = ""; - std::string mac_src; - it = _params.find(params::mac_src); - if (it != _params.end() && !it->second.empty()) { - mac_src = it->second; - } else { - // Not found - // determine it automatically -#ifndef OID_802_3_CURRENT_ADDRESS -#define OID_802_3_CURRENT_ADDRESS 0x01010102 -#endif - char mac[6] = {0}; - size_t l = sizeof(mac); - pcap_oid_get_request(_device, OID_802_3_CURRENT_ADDRESS, mac, &l); - char buf[13]; - *_bin2hex(buf, sizeof(buf), mac, 6) = 0; - mac_src = buf; - loggers::get_instance().user("pcap_layer::pcap_layer: local MAC is %s", mac_src.c_str()); - _params[params::mac_src] = mac_src; - } - - std::string mac_bc; - it = _params.find(params::mac_bc); - if (it != _params.end() && !it->second.empty()) - mac_bc = it->second; - else - mac_bc = "ffffffffffff"; - - if(mac_bc == mac_src || mac_src.empty()) - filter = "ether dst " + mac_bc; - else - filter = "( ether dst " + mac_bc + " or ether dst " + mac_src + " )"; - - if(! mac_src.empty()) - // Reject ITS messages sent by this component - filter += " and not ether src " + mac_src; - - // Add user defined filter - it = _params.find(std::string("filter")); - if ((it != _params.end()) && !it->second.empty()) { - filter += std::string(" ") + it->second; - } - - // Log final PCAP filter - loggers::get_instance().user("pcap_layer::pcap_layer: Filter: %s", filter.c_str()); - - // setup filter - { - struct bpf_program f = {0}; - if (pcap_compile(_device, &f, filter.c_str(), 1, PCAP_NETMASK_UNKNOWN) != 0) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to compile PCAP filter"); - } else { - if (pcap_setfilter(_device, &f) != 0) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to set PCAP filter"); - } - } - pcap_freecode(&f); - } - - _o_params.insert(std::pair(std::string("timestamp"), std::string())); - - // create pipe and run thread - if (pipe2(_fd, O_NONBLOCK) == -1) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to create a pipe: %s", ::strerror(errno)); - } - // Pass the pipe handler to the polling procedure - loggers::get_instance().log("pcap_layer::pcap_layer: Call handler with descriptor %d", _fd[0]); - Handler_Add_Fd_Read(_fd[0]); - - // Create the reader thread - _thread = new std::thread(&pcap_layer::run, (void *)this); - if (_thread == NULL) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to start offline thread"); - } - while (_running == FALSE) { - std::this_thread::sleep_for(std::chrono::milliseconds(500)); - } - // Thread was started - loggers::get_instance().log("<<< pcap_layer::pcap_layer"); -} // End of ctor - -pcap_layer::~pcap_layer() { - loggers::get_instance().log(">>> pcap_layer::~pcap_layer"); - - if (_device != NULL) { - if (_thread != NULL) { - _running = FALSE; - // Wait for the working thread to terminate - _thread->join(); - loggers::get_instance().log("pcap_layer::~pcap_layer: Thread were stops"); - // Cleanup - delete _thread; - close(_fd[0]); - close(_fd[1]); - } - pcap_close(_device); - } -} // End of dtor - -void* pcap_layer::run(void* p_this) { - pcap_layer& p = *static_cast(p_this); - return p.thread(); -} - -void* pcap_layer::thread() { - pcap_o_pkthdr *pkt_header; - const u_char *pkt_data; - unsigned char pkt_count = 0; - -// loggers::get_instance().log(">>> pcap_layer::run"); - - _running = TRUE; - - // wait a bit before sending first packet - std::this_thread::sleep_for(std::chrono::milliseconds(500)); - - while (_running) { // Loop while _running flag is up - // get next frame - int result = pcap_next_ex(_device, (struct pcap_pkthdr**)&pkt_header, &pkt_data); - if(result == 0){ - continue; - } - if(result < 0){ -// loggers::get_instance().log("<<< pcap_layer::run: error %s", pcap_geterr(_device)); - break; - } - - while(_running && !_resume.try_lock()) { - std::this_thread::sleep_for(std::chrono::milliseconds(100)); - } -#if 0 - { - char buf[128]; - std::time_t t = pkt_header->ts.tv_sec; - std::tm * pt = std::localtime( &t ); - t = std::strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", pt); - std::sprintf(buf+t, "%ld", pkt_header->ts.tv_sec * 1000 + static_cast(pkt_header->ts.tv_usec / 1000)); // Use milliseconds - _o_params[params::timestamp] = std::string(buf); - } -#else - _o_params[params::timestamp] = std::to_string(pkt_header->ts.tv_sec * 1000 + static_cast(pkt_header->ts.tv_usec / 1000)); // Use milliseconds -#endif - _o_data = OCTETSTRING(pkt_header->len, pkt_data); - write(_fd[1], &pkt_count, 1);pkt_count++; - } - _running = FALSE; -// loggers::get_instance().log("<<< pcap_layer::run"); - return NULL; -} - -void pcap_layer::send_data(OCTETSTRING& data, params& params) { - loggers::get_instance().log_msg(">>> pcap_layer::send_data: ", data); - if (pcap_sendpacket(_device, static_cast(data), data.lengthof()) == -1) { - loggers::get_instance().error("pcap_layer::send_data: Failed to send packet: %s", pcap_geterr(_device)); - } -} - -void pcap_layer::receive_data(OCTETSTRING& data, params& params) { - loggers::get_instance().log(">>> pcap_layer::receive_data: Received %d bytes", data.lengthof()); - loggers::get_instance().log_to_hexa("Packet dump", data); - - // Pass the packet to the upper layers - receive_to_all_layers(data, params); -} - -void pcap_layer::Handle_Fd_Event_Readable(int fd) { - char c[2]; - float duration; - loggers::get_instance().set_start_time(_time_key); - this->receive_data(_o_data, _o_params); - loggers::get_instance().set_stop_time(_time_key, duration); - read(_fd[0], &c, 1); - _resume.unlock(); -} - -pcap_layer_factory pcap_layer_factory::_f; - -#endif //__CYGWIN__ diff --git a/ccsrc/Protocols/Pcap/pcap_cygwin_layer.hh b/ccsrc/Protocols/Pcap/pcap_cygwin_layer.hh deleted file mode 100644 index 37008f5197474d3e8a4679c7cda8616f3370abd3..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Pcap/pcap_cygwin_layer.hh +++ /dev/null @@ -1,78 +0,0 @@ -/*! - * \file pcap_layer.hh - * \brief Header file for ITS Offline Pcap port layer. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include -#include - -#include "t_layer.hh" -#include "params.hh" - -#include - -class PORT; //! Forward declaration of TITAN class - -typedef struct pcap pcap_t; - -/*! - * \class pcap_layer - * \brief This class provides description of ITS PCAP port protocol layer - */ -class pcap_layer : public layer, public PORT { - - params _params; //! Layer parameters - pcap_t* _device; //! Device handle - std::thread* _thread; //! Thread handle, used to read PCAP file instead of NIC, used in file mode - std::mutex _resume; - bool _running; //! Set to true when the thread is running, used in file mode - int _fd[2]; //! pipe to signal to Titan - - - OCTETSTRING _o_data; - params _o_params; - - std::string _time_key; - - static void* run(void* p_this); -public: - void* thread(void); -public: //! \publicsection - /*! - * \brief Specialised constructor - * Create a new instance of the pcap_layer class - * \param[in] p_type \todo - * \param[in] p_param \todo - */ - pcap_layer(const std::string& p_type, const std::string& param); - /*! - * \brief Default destructor - */ - virtual ~pcap_layer(); - - /*! - * \virtual - * \fn void send_data(OCTETSTRING& data, params& params); - * \brief Send bytes formated data to the lower layers - * \param[in] p_data The data to be sent - * \param[in] p_params Some parameters to overwrite default value of the lower layers parameters - */ - virtual void send_data(OCTETSTRING& data, params& params); - /*! - * \virtual - * \fn void receive_data(OCTETSTRING& data, params& params); - * \brief Receive bytes formated data from the lower layers - * \param[in] p_data The bytes formated data received - * \param[in] p_params Some lower layers parameters values when data was received - */ - virtual void receive_data(OCTETSTRING& data, params& info); - - void Handle_Fd_Event_Readable(int fd); -}; diff --git a/ccsrc/Protocols/Pcap/pcap_layer.cc b/ccsrc/Protocols/Pcap/pcap_layer.cc deleted file mode 100644 index 92fd09977c15008e6cb2163c7aaa8f18eecd2334..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Pcap/pcap_layer.cc +++ /dev/null @@ -1,276 +0,0 @@ -#if 0 -#include -#include -#include -#include -#include - -#include - -#include "pcap_layer_factory.hh" - -typedef struct pcap_pkthdr pcap_o_pkthdr; -typedef struct timeval pcap_o_timeval; - -#include "loggers.hh" - -pcap_layer::pcap_layer(const std::string& p_type, const std::string& param) : layer(p_type), PORT(p_type.c_str()), _params(), _device(NULL), _pcap_h(-1), _thread(NULL), _running(FALSE), _resume(), _sent_file(NULL), _time_key("pcap_layer::Handle_Fd_Event_Readable") { - bool online = false; - loggers::get_instance().log(">>> pcap_layer::pcap_layer: %s, %s", to_string().c_str(), param.c_str()); - _fd[0] = -1; _fd[1] = -1; - // Setup parameters - params::convert(_params, param); - //_params.log(); - // Prepare capture processing - char error_buffer[PCAP_ERRBUF_SIZE]; - params::const_iterator it = _params.find(params::nic); - if ((it != _params.end()) && !it->second.empty()) { // Use online capture - // Fetch the network address and network mask - bpf_u_int32 mask; // subnet mask - bpf_u_int32 net; // ip address - std::string nic; - online = true; - nic = _params[params::nic]; - if (pcap_lookupnet(nic.c_str(), &net, &mask, error_buffer) != 0) { - loggers::get_instance().error("pcap_layer::pcap_layer: pcap_layer::pcap_layer: Failed to fetch newtork address for device %s", nic.c_str()); - } - loggers::get_instance().log("pcap_layer::pcap_layer: Device %s Network address: %d", nic.c_str(), net); - // Open the device - _device = pcap_open_live(nic.c_str(), 65536, 1, 1000, error_buffer); // TODO Replace hard coded values by pcap_layer:: - if (_device == NULL) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to open device %s", nic.c_str()); - } // else, continue - // Set non-blocking flag for the polling procedure - if (pcap_setnonblock(_device, 1, error_buffer) != 0) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to set blocking mode: %s", error_buffer); - } - // Retrieve the device file handler - _pcap_h = pcap_get_selectable_fd(_device); - if (_pcap_h == -1) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to get device handler"); - } - } else { - // Check file name - it = _params.find(std::string("file")); - if ((it != _params.cend()) && !it->second.empty()) { // Use offline capture - struct stat s = {0}; - if ((stat(_params["file"].c_str(), &s) != 0) || !S_ISREG(s.st_mode)) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to acces PCAP file %s", _params["file"].c_str()); - } - // File exist, open it - _device = pcap_open_offline(_params["file"].c_str(), error_buffer); - if (_device == NULL) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to open PCAP file %s", error_buffer); - } // else, continue - // Create the dump file for the sent packet based on the openned file name and the current time in milliseconds - it = _params.find("save_mode"); - if ((it != _params.cend()) && (it->second.compare("1") == 0)) { - unsigned long ms = std::chrono::system_clock::now().time_since_epoch() / std::chrono::milliseconds(1); - std::string ext("_" + std::to_string(ms)); - int i = _params["file"].find(".pcap"); - if (i > 0) { - std::string f(_params["file"].substr(0, i) + ext + ".pcap"); - loggers::get_instance().log("pcap_layer::pcap_layer: Save file name: %s", f.c_str()); - if ((_sent_file = pcap_dump_open(_device, f.c_str())) == NULL) { - loggers::get_instance().warning("pcap_layer::pcap_layer: Failed to open save file %s", f.c_str()); - } - } - } // else, nothing to do - } else { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to open PCAP file %s", error_buffer); - } - } - - // Setup filter - std::string filter = ""; - it = _params.find(params::mac_src); - if (it == _params.end()) { // Not found - loggers::get_instance().error("pcap_layer::pcap_layer: mac_src parameter not found, cannot continue"); - } else { - // Reject ITS messages sent by this component - filter = "not ether src " + _params[params::mac_src]; - // Accept ITS broadcasted to this componenet - filter += " and (ether dst " + _params[params::mac_src]; - // Accept ITS broadcasted messages - it = _params.find(params::mac_bc); - if ((it != _params.end()) && !it->second.empty()) { - filter += " or ether dst " + it->second + ")"; - } else { - filter += " or ether dst ffffffffffff) "; - } - // Add user defined filter - it = _params.find(std::string("filter")); - if ((it != _params.end()) && !it->second.empty()) { - filter += _params["filter"]; - } // else nothing to do - } - // Log final PCAP filter - loggers::get_instance().user("pcap_layer::pcap_layer: Filter: %s", filter.c_str()); - if (!filter.empty()) { - struct bpf_program f = {0}; - if (pcap_compile(_device, &f, filter.c_str(), 1, PCAP_NETMASK_UNKNOWN) != 0) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to compile PCAP filter"); - } - if (pcap_setfilter(_device, &f) != 0) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to set PCAP filter"); - } - pcap_freecode(&f); - } - - // Pass the device file handler to the polling procedure - if (_pcap_h != -1) { // Live capture - Handler_Add_Fd_Read(_pcap_h); - } else { // Offline capture or cygwin - // Create a pipe - if (pipe2(_fd, O_NONBLOCK) == -1) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to create a pipe: %s", ::strerror(errno)); - } - if(online){ - _pcap_h = _fd[0]; - } - // Pass the pipe handler to the polling procedure - loggers::get_instance().log("pcap_layer::pcap_layer: Call handler with descriptor %d", _fd[0]); - Handler_Add_Fd_Read(_fd[0]); - // Create the offline reader thread - _thread = new std::thread(&pcap_layer::run, (void *)this); - if (_thread == NULL) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to start offline thread"); - } - // Start it to dispatch packet to a pipe - while (_running == FALSE) { - std::this_thread::sleep_for(std::chrono::milliseconds(500)); - } - // Thread was started - loggers::get_instance().log("<<< pcap_layer::pcap_layer"); - } -} // End of ctor - -pcap_layer::~pcap_layer() { - loggers::get_instance().log(">>> pcap_layer::~pcap_layer"); - - if (_device != NULL) { - if (_thread != NULL) { - _running = FALSE; - // Wait for the working thread to terminate - _thread->join(); - loggers::get_instance().log("pcap_layer::~pcap_layer: Thread were stops"); - // Cleanup - delete _thread; - close(_fd[0]); - close(_fd[1]); - } - if (_sent_file != NULL) { - pcap_dump_close(_sent_file); - } - pcap_close(_device); - } -} // End of dtor - -void* pcap_layer::run(void* p_this) { - pcap_layer& p = *static_cast(p_this); - return p.thread(); -} - -void* pcap_layer::thread() { - loggers::get_instance().log(">>> pcap_layer::run"); - - // Wait a little bit before to start sending packet - std::this_thread::sleep_for(std::chrono::milliseconds(500)); - params::const_iterator it = _params.find("frame_offset"); - if ((it != _params.cend()) && (it->second.compare("0") != 0)) { - // TODO Try t use PCAP filter to start directly to the correct frame offset - /*try { - unsigned int offset = std::stoul(str_dec, &s); - // Skip frames - struct pcap_pkthdr *pkt_header; - const u_char *pkt_data; - int result = pcap_next_ex(_device, &pkt_header, &pkt_data); - if (result == 1) { // Succeed - } - } - catch (invalid_argument& i) { - } - catch (out_of_range& o) { - }*/ - } - // Let's go - _running = TRUE; - while (_running) { // Loop while _running flag is up - if (_resume.try_lock() == TRUE) { // Previous packet was consumed, lock for the next one - write(_fd[1], "\n", 1); // Any character will do the job - } else { // not ready yet - std::this_thread::sleep_for(std::chrono::milliseconds(100)); - } - } - - loggers::get_instance().log("<<< pcap_layer::run"); - return NULL; -} - -void pcap_layer::send_data(OCTETSTRING& data, params& params) { - loggers::get_instance().log_msg(">>> pcap_layer::send_data: ", data); - - if (_pcap_h != -1) { // Check if offline mode is used - if (pcap_sendpacket(_device, static_cast(data), data.lengthof()) == -1) { - loggers::get_instance().error("pcap_layer::send_data: Failed to send packet: %s", pcap_geterr(_device)); - } - } else if (_sent_file != NULL) { - struct pcap_pkthdr hdr; - std::chrono::system_clock::time_point now = std::chrono::system_clock::now(); - std::chrono::milliseconds ms = std::chrono::duration_cast(now.time_since_epoch()); - hdr.ts.tv_sec = ms.count() / 1000; - hdr.ts.tv_usec = (ms.count() % 1000) * 1000; - hdr.caplen = data.lengthof(); - hdr.len = hdr.caplen; - pcap_dump((u_char *)_sent_file, &hdr, static_cast(data)); - } else { - loggers::get_instance().log("pcap_layer::send_data: Offline mode, operation was skipped"); - } -} - -void pcap_layer::receive_data(OCTETSTRING& data, params& params) { - loggers::get_instance().log(">>> pcap_layer::receive_data: Received %d bytes", data.lengthof()); - loggers::get_instance().log_to_hexa("Packet dump", data); - - // Pass the packet to the upper layers - receive_to_all_layers(data, params); -} - -void pcap_layer::Handle_Fd_Event_Readable(int fd) { - //loggers::get_instance().log(">>> pcap_layer::Handle_Fd_Event_Readable: %d", fd); - - pcap_o_pkthdr *pkt_header; - const u_char *pkt_data; - int result = pcap_next_ex(_device, (struct pcap_pkthdr**)&pkt_header, &pkt_data); - if (result == 1) { // Succeed - if (pkt_header->caplen > 14) { // Reject too small packet - //loggers::get_instance().log("pcap_layer::Handle_Fd_Event_Readable: %ld - % ld - %d", pkt_header->ts.tv_sec, pkt_header->ts.tv_usec, pkt_header->len); - // Fill parameters from PCAP layer - params params; - params.insert(std::pair(params::timestamp, std::to_string(pkt_header->ts.tv_sec * 1000 + static_cast(pkt_header->ts.tv_usec / 1000)))); // Use milliseconds - // Process the packet at this layer - OCTETSTRING os(pkt_header->caplen, pkt_data); - //loggers::get_instance().log_to_hexa("pcap_layer::Handle_Fd_Event_Readable: ", os); - // TODO Case of caplen != len !!! - float duration; - loggers::get_instance().set_start_time(_time_key); - this->receive_data(os, params); // TODO Check execution time for decoding operation - loggers::get_instance().set_stop_time(_time_key, duration); - } - } // else, skip the packet - // Specific to offline mode - if (_fd[0] != -1) { // Check if offline mode is used - //loggers::get_instance().log("pcap_layer::Handle_Fd_Event_Readable: Read pipe"); - char c[2]; - read(_fd[0], &c, 1); - if (result == -2) { // End of file, therminate worker thread - _running = FALSE; - } - //loggers::get_instance().log("pcap_layer::Handle_Fd_Event_Readable: pcap_next_ex failed: result=%d", result); - _resume.unlock(); - } // else, nothing to do -} - -pcap_layer_factory pcap_layer_factory::_f; - -#endif // !CYGWIN diff --git a/ccsrc/Protocols/Pcap/pcap_layer.hh b/ccsrc/Protocols/Pcap/pcap_layer.hh deleted file mode 100644 index 098e1de3392a63c3e9e364a3e560dac519491dae..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Pcap/pcap_layer.hh +++ /dev/null @@ -1,5 +0,0 @@ -#if defined (__CYGWIN__) - #include "pcap_cygwin_layer.hh" -#else - #include "pcap_linux_layer.hh" -#endif diff --git a/ccsrc/Protocols/Pcap/pcap_layer_factory.hh b/ccsrc/Protocols/Pcap/pcap_layer_factory.hh deleted file mode 100644 index 0c3c3cc6858a2349aefe6ea9dc0b7a28ff8288cb..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Pcap/pcap_layer_factory.hh +++ /dev/null @@ -1,45 +0,0 @@ -/*! - * \file pcap_layer_factory.hh - * \brief Header file for Pcap layer factory. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include "layer_stack_builder.hh" - -#include "pcap_layer.hh" - -/*! - * \class pcap_layer_factory - * \brief This class provides a factory class to create an pcap_layer class instance - */ -class pcap_layer_factory: public layer_factory { - static pcap_layer_factory _f; //! Reference to the unique instance of this class -public: //! \publicsection - /*! - * \brief Default constructor - * Create a new instance of the udp_layer_factory class - * \remark The PCAP layer identifier is PCAP - */ - pcap_layer_factory() { - // register factory - layer_stack_builder::register_layer_factory("PCAP", this); - }; - /*! - * \fn layer* create_layer(const std::string & type, const std::string & param); - * \brief Create the layers stack based on the provided layers stack description - * \param[in] p_type The provided layers stack description - * \param[in] p_params Optional parameters - * \return 0 on success, -1 otherwise - * \inline - */ - inline virtual layer* create_layer(const std::string& p_type, const std::string& p_param) { - return new pcap_layer(p_type, p_param); - }; -}; // End of class pcap_layer_factory - diff --git a/ccsrc/Protocols/Pcap/pcap_linux_layer.cc b/ccsrc/Protocols/Pcap/pcap_linux_layer.cc deleted file mode 100644 index 3190ce650b35b97a4126fe50b39394d3b8c02bb1..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Pcap/pcap_linux_layer.cc +++ /dev/null @@ -1,199 +0,0 @@ -#if !defined (__CYGWIN__) -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "pcap_layer_factory.hh" - -#include "loggers.hh" - -static const char* _hexDigits = "0123456789ABCDEF"; -static char * _bin2hex(char * hex, size_t hlen, const char * bin, size_t blen) -{ - const unsigned char *b, *e; - char * s; - - // sanity check - if (hlen >= 0 && hlen < blen * 2) return NULL; - - b = (const unsigned char *)bin; - e = b + blen - 1; - s = hex + blen * 2; - if (s < hex + hlen) *s = 0; - for (; b <= e; e--){ - *(--s) = _hexDigits[(*e) & 0xF]; - *(--s) = _hexDigits[(*e) >> 4]; - } - return hex + blen * 2; -} - - -pcap_layer::pcap_layer(const std::string& p_type, const std::string& param) -: layer(p_type), PORT(p_type.c_str()), _params(), _device(NULL), _pcap_h(-1), - _time_key("pcap_layer::Handle_Fd_Event_Readable") -{ - char error_buffer[PCAP_ERRBUF_SIZE]; - params::const_iterator it; - std::string nic; - - loggers::get_instance().log(">>> pcap_layer::pcap_layer: %s, %s", to_string().c_str(), param.c_str()); - // Setup parameters - params::convert(_params, param); - // Prepare capture processing - it = _params.find(params::nic); - if ((it == _params.end()) || it->second.empty()) { // Use online capture - loggers::get_instance().error("pcap_layer::pcap_layer: NIC name must be specified"); - return; - } - - nic = _params[params::nic]; - { - bpf_u_int32 net, mask; // ip address and subnet mask - if (pcap_lookupnet(nic.c_str(), &net, &mask, error_buffer) != 0) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to fetch newtork address for device %s", nic.c_str()); - } else { - loggers::get_instance().log("pcap_layer::pcap_layer: Device %s Network address: %d", nic.c_str(), net); - } - } - // Open the device in promiscuous mode - _device = pcap_open_live(nic.c_str(), 65536/*64*1024*/, 1, 100, error_buffer); // TODO Replace hard coded values by pcap_layer:: - if (_device == NULL) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to open device %s", nic.c_str()); - return; - } // else, continue - // Set non-blocking flag for the polling procedure - if (pcap_setnonblock(_device, 1, error_buffer) != 0) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to set blocking mode: %s", error_buffer); - } - // Retrieve the device file handler - _pcap_h = pcap_get_selectable_fd(_device); - if (_pcap_h == -1) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to get device handler"); - } - - // Setup filter - std::string filter = ""; - std::string mac_src; - it = _params.find(params::mac_src); - if (it != _params.end()) { // Use online capture - mac_src = it->second; - } else { - // Detect MAC address of NIC - struct ifreq ifr; - memset(&ifr, 0, sizeof(ifr)); - nic.copy(ifr.ifr_name, sizeof(ifr.ifr_name)); - if (ioctl(_pcap_h, SIOCGIFHWADDR, &ifr) == -1) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to get device MAC address"); - } else { - char buf[13]; - *_bin2hex(buf, sizeof(buf), ifr.ifr_hwaddr.sa_data, 6) = 0; - mac_src = buf; - loggers::get_instance().user("pcap_layer::pcap_layer: local MAC is %s", mac_src.c_str()); - _params[params::mac_src] = mac_src; - } - } - - // Accept ITS broadcasted messages - std::string mac_bc; - it = _params.find(params::mac_bc); - if (it != _params.end() && !it->second.empty()) { - mac_bc = it->second; - } else { - mac_bc = "ffffffffffff"; - } - - if ((mac_bc == mac_src) || mac_src.empty()) { - filter = "ether dst " + mac_bc; - } else { - filter = "( ether dst " + mac_bc + " or ether dst " + mac_src + " )"; - } - - if (!mac_src.empty()) { - // Reject ITS messages sent by this component - filter += " and not ether src " + mac_src; - } - - // Add user defined filter - it = _params.find(std::string("filter")); - if ((it != _params.end()) && !it->second.empty()) { - filter += std::string(" ") + it->second; - } - // Log final PCAP filter - loggers::get_instance().user("pcap_layer::pcap_layer: Filter: %s", filter.c_str()); - - { - struct bpf_program f = {0}; - if (pcap_compile(_device, &f, filter.c_str(), 1, PCAP_NETMASK_UNKNOWN) != 0) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to compile PCAP filter"); - }else{ - if (pcap_setfilter(_device, &f) != 0) { - loggers::get_instance().error("pcap_layer::pcap_layer: Failed to set PCAP filter"); - } - } - pcap_freecode(&f); - } - - // Pass the device file handler to the polling procedure - Handler_Add_Fd_Read(_pcap_h); -} // End of ctor - -pcap_layer::~pcap_layer() { - loggers::get_instance().log(">>> pcap_layer::~pcap_layer"); - - if (_device != NULL) { - pcap_close(_device); - } -} // End of dtor - - -void pcap_layer::send_data(OCTETSTRING& data, params& params) { - loggers::get_instance().log_msg(">>> pcap_layer::send_data: ", data); - - if (pcap_sendpacket(_device, static_cast(data), data.lengthof()) == -1) { - loggers::get_instance().error("pcap_layer::send_data: Failed to send packet: %s", pcap_geterr(_device)); - } -} - -void pcap_layer::receive_data(OCTETSTRING& data, params& params) { - loggers::get_instance().log(">>> pcap_layer::receive_data: Received %d bytes", data.lengthof()); - loggers::get_instance().log_to_hexa("Packet dump", data); - - // Pass the packet to the upper layers - receive_to_all_layers(data, params); -} - -void pcap_layer::Handle_Fd_Event_Readable(int fd) { - //loggers::get_instance().log(">>> pcap_layer::Handle_Fd_Event_Readable: %d", fd); - - pcap_pkthdr *pkt_header; - const u_char *pkt_data; - int result = pcap_next_ex(_device, &pkt_header, &pkt_data); - if (result == 1) { // Succeed - if (pkt_header->caplen > 14) { // Reject too small packet - loggers::get_instance().log("pcap_layer::Handle_Fd_Event_Readable: %ld - %ld - %ld - %d", pkt_header->ts.tv_sec, pkt_header->ts.tv_usec, pkt_header->ts.tv_sec * 1000 + static_cast(pkt_header->ts.tv_usec / 1000), pkt_header->len); - // Fill parameters from PCAP layer - params params; - params.insert(std::pair(params::timestamp, std::to_string(pkt_header->ts.tv_sec * 1000 + static_cast(pkt_header->ts.tv_usec / 1000)))); // Use milliseconds - // Process the packet at this layer - OCTETSTRING os(pkt_header->caplen, pkt_data); - //loggers::get_instance().log_to_hexa("pcap_layer::Handle_Fd_Event_Readable: ", os); - // TODO Case of caplen != len !!! - float duration; - loggers::get_instance().set_start_time(_time_key); - this->receive_data(os, params); // TODO Check execution time for decoding operation - loggers::get_instance().set_stop_time(_time_key, duration); - } - } // else, skip the packet -} - -pcap_layer_factory pcap_layer_factory::_f; - -#endif // !CYGWIN diff --git a/ccsrc/Protocols/Pcap/pcap_linux_layer.hh b/ccsrc/Protocols/Pcap/pcap_linux_layer.hh deleted file mode 100644 index f09fe59fffb618c4dfbd40b90ce4b3e05a6fea64..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Pcap/pcap_linux_layer.hh +++ /dev/null @@ -1,62 +0,0 @@ -/*! - * \file pcap_layer.hh - * \brief Header file for ITS Pcap port layer. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include - -#include "t_layer.hh" -#include "params.hh" - -class PORT; //! Forward declaration of TITAN class - -/*! - * \class pcap_layer - * \brief This class provides description of ITS PCAP port protocol layer - */ -class pcap_layer : public layer, public PORT { - params _params; //! Layer parameters - pcap_t* _device; //! Device handle - int _pcap_h; //! PCAP instance handle - pcap_dumper_t* _sent_file; //! Write file handle to save sent packet, used in file mode - std::string _time_key; //! \todo - -public: //! \publicsection - /*! - * \brief Specialised constructor - * Create a new instance of the pcap_layer class - * \param[in] p_type \todo - * \param[in] p_param \todo - */ - pcap_layer(const std::string& p_type, const std::string& param); - /*! - * \brief Default destructor - */ - virtual ~pcap_layer(); - - /*! - * \virtual - * \fn void send_data(OCTETSTRING& data, params& params); - * \brief Send bytes formated data to the lower layers - * \param[in] p_data The data to be sent - * \param[in] p_params Some parameters to overwrite default value of the lower layers parameters - */ - virtual void send_data(OCTETSTRING& data, params& params); - /*! - * \virtual - * \fn void receive_data(OCTETSTRING& data, params& params); - * \brief Receive bytes formated data from the lower layers - * \param[in] p_data The bytes formated data received - * \param[in] p_params Some lower layers parameters values when data was received - */ - virtual void receive_data(OCTETSTRING& data, params& info); - - void Handle_Fd_Event_Readable(int fd); -}; diff --git a/ccsrc/Protocols/Pcap/pcap_offline_layer.cc b/ccsrc/Protocols/Pcap/pcap_offline_layer.cc deleted file mode 100644 index e57a4b691ebd93f959d862bd86c59a2d964ef339..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Pcap/pcap_offline_layer.cc +++ /dev/null @@ -1,228 +0,0 @@ -#if defined (__CYGWIN__) -#define _GNU_SOURCE -#endif -#include -#include -#include -#include -#include - -#include - -#include "pcap_offline_layer_factory.hh" - -#include "loggers.hh" - -#include - -#ifdef __CYGWIN__ -typedef struct { - bpf_int32 tv_sec; /* seconds */ - bpf_int32 tv_usec; /* microseconds */ -}pcap_o_timeval; - -typedef struct pcap_o_pkthdr { - pcap_o_timeval ts; /* time stamp */ - bpf_u_int32 caplen; /* length of portion present */ - bpf_u_int32 len; /* length this packet (off wire) */ -}pcap_o_pkthdr; -#else -typedef struct pcap_pkthdr pcap_o_pkthdr; -typedef struct timeval pcap_o_timeval; -#endif - -pcap_offline_layer::pcap_offline_layer(const std::string& p_type, const std::string& param) : - layer(p_type), PORT(p_type.c_str()), _params(), _device(NULL), _running(FALSE), _time_key("pcap_offline_layer::Handle_Fd_Event_Readable") { - loggers::get_instance().log(">>> pcap_offline_layer::pcap_offline_layer: %s, %s", p_type.c_str(), param.c_str()); - params::convert(_params, param); - - _o_params.insert(std::pair(std::string("timestamp"), std::string())); - - char error_buffer[PCAP_ERRBUF_SIZE]; - params::const_iterator it; - - it = _params.find(std::string("realtime")); - _realtime = ((it != _params.end()) && !it->second.empty()); - - it = _params.find(std::string("loop")); - _loop = ((it != _params.end()) && !it->second.empty()); - - it = _params.find(std::string("file")); - if ((it != _params.end()) && !it->second.empty()) { - const std::string& file = it->second; - _device = pcap_open_offline(file.c_str(), error_buffer); - if (_device) { - - // Add user defined filter - it = _params.find(std::string("filter")); - if ((it != _params.end()) && !it->second.empty()) { - const std::string& filter = it->second; - // Log final PCAP filter - loggers::get_instance().user("pcap_offline_layer::pcap_offline_layer: Filter: %s", filter.c_str()); - struct bpf_program f = {0}; - if (pcap_compile(_device, &f, filter.c_str(), 1, PCAP_NETMASK_UNKNOWN) != 0) { - loggers::get_instance().error("pcap_offline_layer::pcap_offline_layer: Failed to compile PCAP filter"); - }else{ - if (pcap_setfilter(_device, &f) != 0) { - loggers::get_instance().error("pcap_offline_layer::pcap_offline_layer: Failed to set PCAP filter"); - } - } - pcap_freecode(&f); - } - - // create pipe and run thread - if (pipe2(_fd, O_NONBLOCK) == -1) { - loggers::get_instance().error("pcap_offline_layer::pcap_offline_layer: Failed to create a pipe: %s", ::strerror(errno)); - } - // Pass the pipe handler to the polling procedure - loggers::get_instance().log("pcap_offline_layer::pcap_offline_layer: Call handler with descriptor %d", _fd[0]); - Handler_Add_Fd_Read(_fd[0]); - // Create the offline reader thread - _thread = new std::thread(&pcap_offline_layer::run, (void *)this); - if (_thread == NULL) { - loggers::get_instance().error("pcap_offline_layer::pcap_offline_layer: Failed to start offline thread"); - } - while (_running == FALSE) { - std::this_thread::sleep_for(std::chrono::milliseconds(500)); - } - // Thread was started - loggers::get_instance().log("<<< pcap_offline_layer::pcap_offline_layer"); - } - } -} // End of ctor - -pcap_offline_layer::~pcap_offline_layer() { - loggers::get_instance().log(">>> pcap_offline_layer::~pcap_offline_layer"); - - if (_device != NULL) { - if (_thread != NULL) { - _running = FALSE; - // Wait for the working thread to terminate - _thread->join(); - loggers::get_instance().log("pcap_offline_layer::~pcap_offline_layer: Thread were stops"); - // Cleanup - delete _thread; - close(_fd[0]); - close(_fd[1]); - } - pcap_close(_device); - } -} // End of dtor - -void* pcap_offline_layer::run(void* p_this) { - pcap_offline_layer& p = *static_cast(p_this); - return p.thread(); -} - - -static long timeval_diff (const pcap_o_timeval &x, const pcap_o_timeval &y) -{ - pcap_o_timeval z = y; - /* Perform the carry for the later subtraction by updating y. */ - if (x.tv_usec < y.tv_usec) { - int nsec = (y.tv_usec - x.tv_usec) / 1000000 + 1; - z.tv_usec -= 1000000 * nsec; - z.tv_sec += nsec; - } - if (x.tv_usec - z.tv_usec > 1000000) { - int nsec = (x.tv_usec - z.tv_usec) / 1000000; - z.tv_usec += 1000000 * nsec; - z.tv_sec -= nsec; - } - - return (x.tv_sec - z.tv_sec) * 1000 + ((x.tv_usec - z.tv_usec)/1000); -} - -void* pcap_offline_layer::thread() { - pcap_o_pkthdr *pkt_header; - pcap_o_pkthdr lh; - const u_char *pkt_data; - unsigned char pkt_count = 0; - -// loggers::get_instance().log(">>> pcap_offline_layer::run"); - - memset(&lh, 0, sizeof(lh)); - - _running = TRUE; - - int delay = 1000; - params::const_iterator it; - it = _params.find(std::string("delay")); - if(it != _params.cend()){ - delay = std::stoi(it->second); - } - - // wait a bit before sending first packet - std::this_thread::sleep_for(std::chrono::milliseconds(delay)); - - while (_running) { // Loop while _running flag is up - // get next frame - int result = pcap_next_ex(_device, (struct pcap_pkthdr**)&pkt_header, &pkt_data); - if(result == 2){ - if(_loop){ - - }else{ - _running = FALSE; - return NULL; - } - } - if(_realtime) { - // wait for next packet timestamp - if(lh.ts.tv_sec|lh.ts.tv_usec){ - long diff = timeval_diff(pkt_header->ts, lh.ts); - if(diff > 0) { - loggers::get_instance().log("<<< pcap_offline_layer::run: Wait %d msec", diff); - std::this_thread::sleep_for(std::chrono::milliseconds(diff)); - loggers::get_instance().log("<<< pcap_offline_layer::run: Wait done"); - } - } - } - while(_running && !_resume.try_lock()) { - std::this_thread::sleep_for(std::chrono::milliseconds(100)); - } - lh = *pkt_header; -#if 0 - { - char buf[128]; - std::time_t t = pkt_header->ts.tv_sec; - std::tm * pt = std::localtime( &t ); - t = std::strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", pt); - std::sprintf(buf+t, ".%06ld", pkt_header->ts.tv_usec); - _o_params["timestamp"] = std::string(buf); - } -#else - _o_params["timestamp"] = std::to_string(pkt_header->ts.tv_usec); -#endif - _o_data = OCTETSTRING(pkt_header->len, pkt_data); - write(_fd[1], &pkt_count, 1);pkt_count++; - } - -// loggers::get_instance().log("<<< pcap_offline_layer::run"); - return NULL; -} - -void pcap_offline_layer::send_data(OCTETSTRING& data, params& params) { - loggers::get_instance().log("pcap_offline_layer::send_data: Offline mode, operation was skipped"); -} - -void pcap_offline_layer::receive_data(OCTETSTRING& data, params& params) { - loggers::get_instance().log(">>> pcap_offline_layer::receive_data: Received %d bytes", data.lengthof()); - loggers::get_instance().log_to_hexa("Packet dump", data); - - // Pass the packet to the upper layers - receive_to_all_layers(data, params); -} - -void pcap_offline_layer::Handle_Fd_Event_Readable(int fd) { - //loggers::get_instance().log(">>> pcap_offline_layer::Handle_Fd_Event_Readable: %d", fd); - char c[2]; - float duration; - // Process the packet at this layer - loggers::get_instance().set_start_time(_time_key); - this->receive_data(_o_data, _o_params); - loggers::get_instance().set_stop_time(_time_key, duration); - read(_fd[0], &c, 1); - _resume.unlock(); -} - -pcap_offline_layer_factory pcap_offline_layer_factory::_f; diff --git a/ccsrc/Protocols/Pcap/pcap_offline_layer.hh b/ccsrc/Protocols/Pcap/pcap_offline_layer.hh deleted file mode 100644 index 0886683d1882c4ab657954b61773cb90646de104..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Pcap/pcap_offline_layer.hh +++ /dev/null @@ -1,78 +0,0 @@ -/*! - * \file pcap_offline_layer.hh - * \brief Header file for ITS Offline Pcap port layer. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include -#include - -#include "t_layer.hh" -#include "params.hh" - -#include - -class PORT; //! Forward declaration of TITAN class - -typedef struct pcap pcap_t; - -/*! - * \class pcap_layer - * \brief This class provides description of ITS PCAP port protocol layer - */ -class pcap_offline_layer : public layer, public PORT { - params _params; //! Layer parameters - pcap_t* _device; //! Device handle - std::thread* _thread; //! Thread handle, used to read PCAP file instead of NIC, used in file mode - std::mutex _resume; - bool _running; //! Set to true when the thread is running, used in file mode - bool _realtime; //! Set to true if realtime delay shall be added between packets - bool _loop; //! Set to true if playback shall be looped - int _fd[2]; //! pipe to signal to Titan - - params _o_params; - OCTETSTRING _o_data; - - std::string _time_key; - - static void* run(void* p_this); -public: - void* thread(void); -public: //! \publicsection - /*! - * \brief Specialised constructor - * Create a new instance of the pcap_layer class - * \param[in] p_type \todo - * \param[in] p_param \todo - */ - pcap_offline_layer(const std::string& p_type, const std::string& param); - /*! - * \brief Default destructor - */ - virtual ~pcap_offline_layer(); - - /*! - * \virtual - * \fn void send_data(OCTETSTRING& data, params& params); - * \brief Send bytes formated data to the lower layers - * \param[in] p_data The data to be sent - * \param[in] p_params Some parameters to overwrite default value of the lower layers parameters - */ - virtual void send_data(OCTETSTRING& data, params& params); - /*! - * \virtual - * \fn void receive_data(OCTETSTRING& data, params& params); - * \brief Receive bytes formated data from the lower layers - * \param[in] p_data The bytes formated data received - * \param[in] p_params Some lower layers parameters values when data was received - */ - virtual void receive_data(OCTETSTRING& data, params& info); - - void Handle_Fd_Event_Readable(int fd); -}; diff --git a/ccsrc/Protocols/Pcap/pcap_offline_layer_factory.hh b/ccsrc/Protocols/Pcap/pcap_offline_layer_factory.hh deleted file mode 100644 index ac6e6a6f276a573aec79f81d0661d64112be3c40..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Pcap/pcap_offline_layer_factory.hh +++ /dev/null @@ -1,45 +0,0 @@ -/*! - * \file pcap_offline_layer_factory.hh - * \brief Header file for Pcap layer factory. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include "layer_stack_builder.hh" - -#include "pcap_offline_layer.hh" - -/*! - * \class pcap_offline_layer_factory - * \brief This class provides a factory class to create an pcap_offline_layer class instance - */ -class pcap_offline_layer_factory: public layer_factory { - static pcap_offline_layer_factory _f; //! Reference to the unique instance of this class -public: //! \publicsection - /*! - * \brief Default constructor - * Create a new instance of the udp_layer_factory class - * \remark The PCAP layer identifier is PCAP - */ - pcap_offline_layer_factory() { - // register factory - layer_stack_builder::register_layer_factory("PCAP_FILE", this); - }; - /*! - * \fn layer* create_layer(const std::string & type, const std::string & param); - * \brief Create the layers stack based on the provided layers stack description - * \param[in] p_type The provided layers stack description - * \param[in] p_params Optional parameters - * \return 0 on success, -1 otherwise - * \inline - */ - inline virtual layer* create_layer(const std::string& p_type, const std::string& p_param) { - return new pcap_offline_layer(p_type, p_param); - }; -}; // End of class pcap_offline_layer_factory - diff --git a/ccsrc/Protocols/Tcp/module.mk b/ccsrc/Protocols/Tcp/module.mk deleted file mode 100644 index 8231756939bc94c0fb844d5ed91486bf2602483c..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Tcp/module.mk +++ /dev/null @@ -1,3 +0,0 @@ -sources := tcp_layer.cc -includes := . - diff --git a/ccsrc/Protocols/Tcp/tcp_layer.cc b/ccsrc/Protocols/Tcp/tcp_layer.cc deleted file mode 100644 index 107237503054ca68ef1d1ccc12866908b700d579..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Tcp/tcp_layer.cc +++ /dev/null @@ -1,247 +0,0 @@ -#include -#include -#include -#include -#include - -#include "tcp_layer_factory.hh" - -#include "loggers.hh" - -tcp_layer::tcp_layer(const std::string & p_type, const std::string & param) : layer(p_type), SSL_Socket(), PORT(p_type.c_str()), _params(), _client_id{-1}, _time_key("tcp_layer::Handle_Fd_Event_Readable"), _reconnect_on_send{false} { - loggers::get_instance().log(">>> tcp_layer::tcp_layer: %s, %s", to_string().c_str(), param.c_str()); - // Setup parameters - params::convert(_params, param); - _params.log(); - - set_socket_debugging(false); - params::const_iterator it = _params.find(params::debug); - if (it == _params.cend()) { - _params.insert(std::pair(std::string("debug"), "0")); - } else if (it->second.compare("1") == 0) { - set_socket_debugging(true); - } - it = _params.find(std::string("tcp_fragmented")); - if (it == _params.cend()) { - _params.insert(std::pair(std::string("tcp_fragmented"), "0")); - } - bool server_mode = false; - it = _params.find(params::server_mode); - if (it != _params.cend()) { - server_mode = (1 == std::stoi(it->second)); - } else { - _params.insert(std::pair(std::string("server_mode"), "0")); - } - it = _params.find(params::server); - if (it == _params.cend()) { - _params.insert(std::pair(std::string("server"), "127.0.0.1")); // TODO Try using params::server instead of std::string("server") - } - if (!parameter_set(params::server.c_str(), _params[params::server].c_str())) { - loggers::get_instance().warning("tcp_layer::set_parameter: Unprocessed parameter: %s", params::server.c_str()); - } - bool ssl_mode = false; - it = _params.find(params::use_ssl); - if (it == _params.cend()) { - _params.insert(std::pair(std::string("use_ssl"), "0")); - } else if (it->second.compare("1") == 0) { - _params.insert(std::pair(std::string("use_ssl"), "1")); - ssl_mode = true; - } - set_ssl_use_ssl(ssl_mode); - it = _params.find(params::port); - if (it == _params.cend()) { - if (_params[params::use_ssl].compare("0") == 0) { // Use standard HTTP port - _params.insert(std::pair(std::string("port"), "80")); - } else { // Use standard HTTPS port - _params.insert(std::pair(std::string("port"), "443")); - } - } - if (!parameter_set(remote_port_name(), _params[params::port].c_str())) { - loggers::get_instance().warning("tcp_layer::set_parameter: Unprocessed parameter: %s", params::port.c_str()); - } - it = _params.find(params::local_port); - if (it == _params.cend()) { - if (_params[params::use_ssl].compare("0") == 0) { // Use standard HTTP local_port - _params.insert(std::pair(std::string("local_port"), "80")); - } else { // Use standard HTTPS local_port - _params.insert(std::pair(std::string("local_port"), "443")); - } - } - if (!parameter_set(local_port_name(), _params[params::local_port].c_str())) { - loggers::get_instance().warning("tcp_layer::set_parameter: Unprocessed parameter: %s", params::local_port.c_str()); - } - - parameter_set(use_connection_ASPs_name(), (!server_mode) ? "yes" : "no"); - parameter_set(server_backlog_name(), "1024"); - loggers::get_instance().log("tcp_layer::tcp_layer: server_mode=%x", server_mode); - set_server_mode(server_mode); - if (server_mode) { - parameter_set("serverPort", _params[params::local_port].c_str()); - } - if (ssl_mode) { // Add certificate bundle - // Check mutual authentication param - _params.insert(std::pair(std::string("mutual_tls"), "0")); - parameter_set(ssl_verifycertificate_name(), "no"); - it = _params.find(params::mutual_auth); - if (it == _params.cend()) { - if (_params[params::mutual_auth].compare("1") == 0) { // Use mutual authentication - parameter_set(ssl_verifycertificate_name(), "yes"); - _params.insert(std::pair(std::string("mutual_tls"), "1")); - } - } - // Set trusted CA file - /*it = _params.find(params::mutual_auth); - if (it == _params.cend()) { - parameter_set(ssl_trustedCAlist_file_name(), it->second.c_str()); - _params.insert(std::pair(std::string("mutual_tls"), it->second)); - } else { - parameter_set(ssl_trustedCAlist_file_name(), "/usr/share/ca-certificates/mozilla/Amazon_Root_CA_1.crt"); - }*/ - // Set additional certificates - parameter_set(ssl_trustedCAlist_file_name(), "../certificates/out/certs/CA_rsa.cert.pem"); // FIXME Use a parameter - parameter_set(ssl_private_key_file_name(), "../certificates/out/privates/96ea9868b49aebca76608fa2579e9c4884c14cc2c867d34423a4841e2225342d_server_rsa.key.pem"); - parameter_set(ssl_certificate_file_name(), "../certificates/out/certs/96ea9868b49aebca76608fa2579e9c4884c14cc2c867d34423a4841e2225342d_server_rsa.cert.pem"); - } else { - parameter_set(ssl_trustedCAlist_file_name(), "../certificates/out/certs/CA_rsa.cert.pem"); // FIXME Use a parameter - parameter_set(ssl_certificate_file_name(), "../certificates/out/certs/96ea9868b49aebca76608fa2579e9c4884c14cc2c867d34423a4841e2225342d_client_rsa.cert.pem"); - } - set_ttcn_buffer_usercontrol(false); - set_handle_half_close(true); - - map_user(); - - parameter_set(client_TCP_reconnect_name(), "yes"); - - if (server_mode == 0) { - loggers::get_instance().log("tcp_layer::tcp_layer: Establish connection: %s/%s", _params[params::server].c_str(), _params[params::port].c_str()); - open_client_connection(_params[params::server].c_str(), _params[params::port].c_str(), NULL, NULL); - } - } - -tcp_layer::~tcp_layer() { - loggers::get_instance().log(">>> tcp_layer::~tcp_layer: %d", _client_id); - if (_client_id != -1) { - remove_client(_client_id); - } - - unmap_user(); -} - -void tcp_layer::Handle_Fd_Event(int fd, boolean is_readable, boolean is_writable, boolean is_error) -{ - loggers::get_instance().log(">>> tcp_layer::Handle_Fd_Event: %d", fd); - Handle_Socket_Event(fd, is_readable, is_writable, is_error); - log_debug("<<< tcp_layer::Handle_Fd_Event"); -} - -void tcp_layer::Handle_Timeout(double time_since_last_call) -{ - loggers::get_instance().log(">>> tcp_layer::Handle_Timeout: %f", time_since_last_call); - Handle_Timeout_Event(time_since_last_call); - loggers::get_instance().log("<<< tcp_layer::Handle_Timeout"); -} - -void tcp_layer::send_data(OCTETSTRING& data, params& params) { - loggers::get_instance().log_msg(">>> tcp_layer::send_data: ", data); - - loggers::get_instance().log("tcp_layer::send_data: SSL mode: %x", get_ssl_use_ssl()); - loggers::get_instance().log("tcp_layer::send_data: server_mode: %s", _params[params::server_mode].c_str()); - loggers::get_instance().log("tcp_layer::send_data: peer_list_get_nr_of_peers: %d", peer_list_get_nr_of_peers()); - - if ((_params[params::server_mode].compare("0") == 0) && (peer_list_get_nr_of_peers() == 0)) { - // Reconnect (e.g. HTTP connection lost - loggers::get_instance().log("tcp_layer::send_data: Re-establish connection: %s/%s", _params[params::server].c_str(), _params[params::port].c_str()); - open_client_connection(_params[params::server].c_str(), _params[params::port].c_str(), NULL, NULL); - } - send_outgoing(static_cast(data), data.lengthof(), _client_id); -} - -void tcp_layer::receive_data(OCTETSTRING& data, params& params) { - loggers::get_instance().log_msg(">>> tcp_layer::receive_data: ", data); - - receive_to_all_layers(data, params); -} - -void tcp_layer::message_incoming(const unsigned char* message_buffer, int length, int client_id) { - loggers::get_instance().log(">>> tcp_layer::message_incoming"); - loggers::get_instance().log_to_hexa("tcp_layer::message_incoming: ", message_buffer, length); - - - float duration; - loggers::get_instance().set_start_time(_time_key); - OCTETSTRING data(length, message_buffer); - params params; - this->receive_data(data, params); // TODO Check execution time for decoding operation - loggers::get_instance().set_stop_time(_time_key, duration); -} - -void tcp_layer::client_connection_opened(int p_client_id) -{ - loggers::get_instance().log(">>> tcp_layer::client_connection_opened: %d", p_client_id); - _client_id = p_client_id; -} - -bool tcp_layer::add_user_data(int p_client_id) -{ - loggers::get_instance().log(">>> tcp_layer::add_user_data: %d", p_client_id); - if (_params[params::use_ssl].compare("0") == 0) { - loggers::get_instance().log("tcp_layer::add_user_data: Non secured mode"); - return Abstract_Socket::add_user_data(p_client_id); - } - loggers::get_instance().log("tcp_layer::add_user_data: SSL mode"); - return SSL_Socket::add_user_data(p_client_id); -} - -int tcp_layer::send_message_on_fd(int p_client_id, const unsigned char * message_buffer, int length_of_message) -{ - loggers::get_instance().log(">>> tcp_layer::send_message_on_fd: %d", p_client_id); - - if(get_user_data(p_client_id)) { - loggers::get_instance().log("tcp_layer::send_message_on_fd: SSL mode"); - return SSL_Socket::send_message_on_fd(p_client_id, message_buffer, length_of_message); - } - - loggers::get_instance().log("tcp_layer::send_message_on_fd: Non secured mode"); - return Abstract_Socket::send_message_on_fd(p_client_id, message_buffer, length_of_message); -} - -int tcp_layer::send_message_on_nonblocking_fd(int p_client_id, const unsigned char * message_buffer, int length_of_message) -{ - loggers::get_instance().log(">>> tcp_layer::send_message_on_nonblocking_fd: %d", p_client_id); - - if(get_user_data(p_client_id)) { - loggers::get_instance().log("tcp_layer::send_message_on_nonblocking_fd: SSL mode"); - return SSL_Socket::send_message_on_nonblocking_fd(p_client_id, message_buffer, length_of_message); - } - - loggers::get_instance().log("tcp_layer::send_message_on_nonblocking_fd: Non secured mode"); - return Abstract_Socket::send_message_on_nonblocking_fd(p_client_id, message_buffer, length_of_message); -} - -int tcp_layer::receive_message_on_fd(int p_client_id) -{ - loggers::get_instance().log(">>> tcp_layer::receive_message_on_fd: %d", p_client_id); - - if(get_user_data(p_client_id)) { - // INFO: it is assumed that only SSL_Socket assigns user data to each peer - loggers::get_instance().log("tcp_layer::receive_message_on_fd: SSL mode"); - return SSL_Socket::receive_message_on_fd(p_client_id); - } - - loggers::get_instance().log("tcp_layer::receive_message_on_fd: Non secured mode"); - if (_params[std::string("tcp_fragmented")].compare("1") == 0) { - sleep(5); // FIXME When HTTP paquet is fragmented into several TCP packets, a timer is required. This is a Q&D solution - } - return Abstract_Socket::receive_message_on_fd(p_client_id); -} - -void tcp_layer::peer_disconnected(int p_client_id) -{ - loggers::get_instance().log(">>> tcp_layer::peer_disconnected: %d", p_client_id); - - Abstract_Socket::peer_disconnected(p_client_id); - _client_id = -1; -} - -tcp_layer_factory tcp_layer_factory::_f; - diff --git a/ccsrc/Protocols/Tcp/tcp_layer.hh b/ccsrc/Protocols/Tcp/tcp_layer.hh deleted file mode 100644 index 166a1456b6f7333ca791aa188ad46a7f229fb670..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Tcp/tcp_layer.hh +++ /dev/null @@ -1,99 +0,0 @@ -/*! - * \file tcp_layer.hh - * \brief Header file for ITS TCP socket based protocol port layer. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include "layer.hh" - -#include "Abstract_Socket.hh" - -class PORT; //! Forward declaration of TITAN class - -/*! - * \class tcp_layer - * \brief This class provides description of ITS TCP port protocol layer - */ -class tcp_layer : public layer, public SSL_Socket, public PORT { - params _params; //! Layer parameters - int _client_id; //! Connection identifier - std::string _time_key; //! \todo - bool _reconnect_on_send; //! Set to true if connection shall be done when sending data. Otherwise, connection is established by the \see constructor - -public: //! \publicsection - /*! - * \brief Specialised constructor - * Create a new instance of the tcp_layer class - * \param[in] p_type \todo - * \param[in] p_param \todo - */ - tcp_layer(const std::string& p_type, const std::string& p_param); - /*! - * \brief Default destructor - * \remark If \see _reconnect_on_send is set to false, the disconnection is done by the destructor - */ - virtual ~tcp_layer(); - - /*! - * \virtual - * \fn void send_data(OCTETSTRING& data, params& params); - * \brief Send bytes formated data to the lower layers - * \param[in] p_data The data to be sent - * \param[in] p_params Some parameters to overwrite default value of the lower layers parameters - * \virtual - */ - virtual void send_data(OCTETSTRING& data, params& params); - /*! - * \virtual - * \fn void receive_data(OCTETSTRING& data, params& params); - * \brief Receive bytes formated data from the lower layers - * \param[in] p_data The bytes formated data received - * \param[in] p_params Some lower layers parameters values when data was received - */ - virtual void receive_data(OCTETSTRING& data, params& info); - - /*! - * \virtual - * \fn void message_incoming(const unsigned char* message_buffer, int length, int client_id = -1); - * \brief Receive bytes formated data from the lower layers - * \param[in] p_buffer The bytes formated data received - * \param[in] p_length The number of bytes received - * \param[in] p_client_id The connection identifier.Default: -1 - */ - virtual void message_incoming(const unsigned char* p_buffer, int p_length, int p_client_id = -1); - -protected: //! \protectedsection - void Add_Fd_Read_Handler(int fd) { Handler_Add_Fd_Read(fd); }; - void Add_Fd_Write_Handler(int fd) { Handler_Add_Fd_Write(fd); }; - void Remove_Fd_Read_Handler(int fd) { Handler_Remove_Fd_Read(fd); }; - void Remove_Fd_Write_Handler(int fd) { Handler_Remove_Fd_Write(fd); }; - void Remove_Fd_All_Handlers(int fd) { Handler_Remove_Fd(fd); }; - void Handler_Uninstall() { Uninstall_Handler(); } - void Timer_Set_Handler(double call_interval, boolean is_timeout = TRUE, - boolean call_anyway = TRUE, boolean is_periodic = TRUE) { - Handler_Set_Timer(call_interval, is_timeout, call_anyway, is_periodic); - }; - - const char* remote_address_name() { return params::server.c_str(); }; - const char* remote_port_name() { return params::port.c_str(); }; - const char* socket_debugging_name() { return params::debug.c_str(); }; - const char* ssl_use_ssl_name() { return params::use_ssl.c_str(); }; - - void client_connection_opened(int p_client_id); - bool add_user_data(int p_client_id); - int send_message_on_fd(int p_client_id, const unsigned char * message_buffer, int length_of_message); - int send_message_on_nonblocking_fd(int client_id, const unsigned char * message_buffer, int length_of_message); - int receive_message_on_fd(int p_client_id); - void peer_disconnected(int p_client_id); - -private: //! \privatesection - void Handle_Fd_Event(int fd, boolean is_readable, boolean is_writable, boolean is_error); - void Handle_Timeout(double time_since_last_call); -}; // End of class tcp_layer - diff --git a/ccsrc/Protocols/Tcp/tcp_layer_factory.hh b/ccsrc/Protocols/Tcp/tcp_layer_factory.hh deleted file mode 100644 index 47a1613e83cccf769ebf70b285cf943a487ab63d..0000000000000000000000000000000000000000 --- a/ccsrc/Protocols/Tcp/tcp_layer_factory.hh +++ /dev/null @@ -1,44 +0,0 @@ -/*! - * \file tcp_layer_factory.hh - * \brief Header file for ITS TCP socket based protocol layer factory. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include "layer_stack_builder.hh" - -#include "tcp_layer.hh" - -/*! - * \class tcp_layer_factory - * \brief This class provides a factory class to create an tcp_layer class instance - */ -class tcp_layer_factory : public layer_factory { - static tcp_layer_factory _f; //! Reference to the unique instance of this class -public: //! \publicsection - /*! - * \brief Default constructor - * Create a new instance of the tcp_layer class - * \remark The TCP socket based layer identifier is TCP - */ - tcp_layer_factory() { - // Register factory - layer_stack_builder::register_layer_factory("TCP", this); - }; - /*! - * \fn layer* create_layer(const std::string & type, const std::string & param); - * \brief Create the layers stack based on the provided layers stack description - * \param[in] p_type The provided layers stack description - * \param[in] p_params Optional parameters - * \return 0 on success, -1 otherwise - */ - inline virtual layer* create_layer(const std::string& p_type, const std::string& p_param){ - return new tcp_layer(p_type, p_param); - }; -}; // End of class tcp_layer_factory - diff --git a/ccsrc/loggers/loggers.cc b/ccsrc/loggers/loggers.cc deleted file mode 100644 index fba1c590dcc06cec73dab5da72c84f2e37888c75..0000000000000000000000000000000000000000 --- a/ccsrc/loggers/loggers.cc +++ /dev/null @@ -1,4 +0,0 @@ -#include "loggers.hh" - -std::unique_ptr loggers::_instance = static_cast>(new loggers); - diff --git a/ccsrc/loggers/loggers.hh b/ccsrc/loggers/loggers.hh deleted file mode 100644 index 6f252f58c33c7c70516fadb9e4c6297c3dcf19ef..0000000000000000000000000000000000000000 --- a/ccsrc/loggers/loggers.hh +++ /dev/null @@ -1,289 +0,0 @@ -/*! - * \file loogers.hh - * \brief Header file for the logger framework. - * \author ETSI STF525 - * \copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * \version 0.1 - */ -#pragma once - -#include -#include -#include -#include -#include - -/** -class Base_Type; -class OCTETSTRING; -class TTCN_Buffer; -class TTCN_Logger; -enum TTCN_Logger::Severity; -extern void TTCN_error(const char *err_msg, ...) __attribute__ ((__format__ (__printf__, 1, 2), __noreturn__)); -extern void TTCN_error_begin(const char *err_msg, ...) __attribute__ ((__format__ (__printf__, 1, 2))); -extern void TTCN_error_end() __attribute__ ((__noreturn__)); -void TTCN_warning(const char *warning_msg, ...) __attribute__ ((__format__ (__printf__, 1, 2))); -extern void TTCN_warning_begin(const char *warning_msg, ...) __attribute__ ((__format__ (__printf__, 1, 2))); -extern void TTCN_warning_end(); -**/ - -using namespace std; // Required for isnan() -#include - -/*! - * \class loggers - * \brief This class provides basic functionalities for an ITS dictionary - * \implements Singleton pattern - * \todo Remove reference to TTCN3.hh - */ -class loggers { -private: //! \privatesection - static std::unique_ptr _instance; //! Smart pointer to the unique instance of the logger framework - std::map _times; //! Timer used to measure execution time between calls to methods \loggers::set_start_time and \loggers::set_stop_time - - /*! - * \brief Default constructor - * Create a new instance of the loggers class - * \private - */ - explicit loggers() : _times() { }; - - inline void log_time_exec(const char *p_fmt, ...); - -public: //! \publicsection - /*! - * \brief Default destructor - */ - virtual ~loggers() {}; - - /*! - * \fn static loggers& get_instance(); - * \brief Accessor for the unique instance of the logger framework - * \inline - */ - static inline loggers& get_instance() { return *_instance.get(); }; - - /*! - * \fn void log_to_hexa(const char *p_prompt, const TTCN_Buffer& buffer); - * \brief Hexa dump of the \see TTCN_Buffer buffer - * \param[in] p_prompt Label of the log to be produced - * \param[in] buffer The TTCN_Buffer buffer to dump - * \inline - */ - inline void log_to_hexa(const char *p_prompt, const TTCN_Buffer& buffer); - /*! - * \fn void log_to_hexa(const char *p_prompt, const OCTETSTRING& msg); - * \brief Hexa dump of the \see OCTETSTRING buffer - * \param[in] p_prompt Label of the log to be produced - * \param[in] msg The OCTETSTRING buffer to dump - * \inline - */ - inline void log_to_hexa(const char *p_prompt, const OCTETSTRING& msg); - /*! - * \fn void log_to_hexa(const char *p_prompt, const unsigned char* msg, const size_t msg_size); - * \brief Hexa dump of the provided buffer - * \param[in] p_prompt Label of the log to be produced - * \param[in] msg The buffer to dump - * \inline - */ - inline void log_to_hexa(const char *p_prompt, const unsigned char* msg, const size_t msg_size); - /*! - * \fn void log_msg(const char *p_prompt, const Base_Type& p_type); - * \brief Debug log of TITAN data structures - * \param[in] p_prompt Label of the log to be produced - * \param[in] msg The TITAN data structure to log - * \inline - */ - inline void log_msg(const char *p_prompt, const Base_Type& p_type); - /*! - * \fn void log(const char *p_fmt, ...); - * \brief Debug message based on printf-compliant formatting message - * \param[in] p_fmt The printf-compliant format of the message to log - * \param[in] ... The arguments - * \inline - */ - inline void log(const char *p_fmt, ...); - - /*! - * \fn void user_msg(const char *p_prompt, const Base_Type& p_type); - * \brief User message of TITAN data structures - * \param[in] p_prompt Label of the log to be produced - * \param[in] msg The TITAN data structure to log - * \inline - */ - inline void user_msg(const char *p_prompt, const Base_Type& p_type); - /*! - * \fn void user(const char *p_fmt, ...); - * \brief User message based on printf-compliant formatting message - * \param[in] p_fmt The printf-compliant format of the message to log - * \param[in] ... The arguments - * \inline - */ - inline void user(const char *p_fmt, ...); - - /*! - * \fn void user_msg(const char *p_prompt, const Base_Type& p_type); - * \brief Warning message of TITAN data structures - * \param[in] p_prompt Label of the log to be produced - * \param[in] msg The TITAN data structure to log - * \inline - */ - inline void warning_msg(const char *p_prompt, const Base_Type& p_type); - /*! - * \fn void user(const char *p_fmt, ...); - * \brief Warning message based on printf-compliant formatting message - * \param[in] p_fmt The printf-compliant format of the message to log - * \param[in] ... The arguments - * \inline - */ - inline void warning(const char *p_fmt, ...); - - /*! - * \fn void user(const char *p_fmt, ...); - * \brief Error message based on printf-compliant formatting message - * \param[in] p_fmt The printf-compliant format of the message to log - * \param[in] ... The arguments - * \inline - */ - inline void error(const char *p_fmt, ...); - - /*! - * \fn void set_start_time(std::string& p_time_key); - * \brief Start execution time measurement - * \param[in] p_time_key A timer identifier (any string) - * \inline - */ - inline void set_start_time(std::string& p_time_key); - /*! - * \fn void set_stop_time(std::string& p_time_key, float& p_time); - * \brief Stop execution time measurement - * \param[in] p_time_key The timer identifier provided while calling \see loggers::set_start_time method - * \param[out] p_time The execution time measured in milliseconds - * \inline - */ - inline void set_stop_time(std::string& p_time_key, float& p_time); -}; // End of class loggers - -void loggers::log_to_hexa(const char *p_prompt, const TTCN_Buffer & buffer) -{ - TTCN_Logger::begin_event(TTCN_Logger::DEBUG_UNQUALIFIED); - TTCN_Logger::log_event_str(p_prompt); - buffer.log(); - TTCN_Logger::end_event(); -} - -void loggers::log_to_hexa(const char *p_prompt, const OCTETSTRING& msg) -{ - TTCN_Logger::begin_event(TTCN_Logger::DEBUG_UNQUALIFIED); - TTCN_Logger::log_event_str(p_prompt); - TTCN_Logger::log_event("Size: %d,\nMsg: ", msg.lengthof()); - - for(int i = 0; i < msg.lengthof(); i++) { - TTCN_Logger::log_event(" %02x", ((const unsigned char*)msg)[i]); - } - TTCN_Logger::log_event("\n"); - TTCN_Logger::end_event(); -} - -void loggers::log_to_hexa(const char *p_prompt, const unsigned char* msg, const size_t msg_size) -{ - TTCN_Logger::begin_event(TTCN_Logger::DEBUG_UNQUALIFIED); - TTCN_Logger::log_event_str(p_prompt); - for(size_t i = 0; i < msg_size; i++) { - TTCN_Logger::log_event(" %02x", *(msg + i)); - } - TTCN_Logger::log_event("\n"); - TTCN_Logger::end_event(); -} - -void loggers::log_msg(const char *p_prompt, const Base_Type& p_type) -{ - TTCN_Logger::begin_event(TTCN_Logger::DEBUG_UNQUALIFIED); - TTCN_Logger::log_event_str(p_prompt); - p_type.log(); - TTCN_Logger::end_event(); -} - -void loggers::log(const char *p_fmt, ...) -{ - TTCN_Logger::begin_event(TTCN_Logger::DEBUG_UNQUALIFIED); - va_list args; - va_start(args, p_fmt); - TTCN_Logger::log_event_va_list(p_fmt, args); - va_end(args); - TTCN_Logger::end_event(); -} - -void loggers::user_msg(const char *p_prompt, const Base_Type& p_type) -{ - TTCN_Logger::begin_event(TTCN_Logger::USER_UNQUALIFIED); - TTCN_Logger::log_event_str(p_prompt); - p_type.log(); - TTCN_Logger::end_event(); -} - -void loggers::user(const char *p_fmt, ...) -{ - TTCN_Logger::begin_event(TTCN_Logger::USER_UNQUALIFIED); - va_list args; - va_start(args, p_fmt); - TTCN_Logger::log_event_va_list(p_fmt, args); - va_end(args); - TTCN_Logger::end_event(); -} - -void loggers::warning(const char *p_fmt, ...) -{ - TTCN_Logger::begin_event(TTCN_Logger::WARNING_UNQUALIFIED); - va_list args; - va_start(args, p_fmt); - TTCN_Logger::log_event_va_list(p_fmt, args); - va_end(args); - TTCN_Logger::end_event(); -} - -void loggers::warning_msg(const char *p_prompt, const Base_Type& p_type) -{ - TTCN_Logger::begin_event(TTCN_Logger::WARNING_UNQUALIFIED); - TTCN_Logger::log_event_str(p_prompt); - p_type.log(); - TTCN_Logger::end_event(); -} - -void loggers::error(const char *p_fmt, ...) -{ - va_list args; - va_start(args, p_fmt); - TTCN_error(p_fmt, args); - va_end(args); -} - -void loggers::set_start_time(std::string& p_time_key) -{ - _times[p_time_key] = std::clock(); -} - -void loggers::set_stop_time(std::string& p_time_key, float& p_time) -{ - std::map::iterator it = _times.find(p_time_key); - if (it != loggers::_times.end()) { - p_time = (std::clock() - _times[p_time_key]) * 1000.0 / CLOCKS_PER_SEC; // in milliseconds - _times.erase(it); - loggers::get_instance().log_time_exec("%s: Execution duration: %f ms", p_time_key.c_str(), p_time); - - } -} - -void loggers::log_time_exec(const char *p_fmt, ...) -{ - TTCN_Logger::begin_event(TTCN_Logger::EXECUTOR_RUNTIME); - va_list args; - va_start(args, p_fmt); - TTCN_Logger::log_event_va_list(p_fmt, args); - va_end(args); - TTCN_Logger::end_event(); -} - diff --git a/ccsrc/loggers/module.mk b/ccsrc/loggers/module.mk deleted file mode 100644 index c735f82e1383ff9c6f5adb160aad284a11784f6d..0000000000000000000000000000000000000000 --- a/ccsrc/loggers/module.mk +++ /dev/null @@ -1,3 +0,0 @@ -sources := loggers.cc -includes := . - diff --git a/config.mk b/config.mk index 66a73807f16c416aa16a09be412990b667df3f65..b8bb114ece97625875e41809bc6749f51dad9b7f 100644 --- a/config.mk +++ b/config.mk @@ -1,4 +1,5 @@ -#TTCN3_DIR := /cygdrive/c/Tools/Titan +TTCN3_COMPILER_OPTIONS := -b -d -e -f -g -l -L -M -n -O -r -R -U none -x -X +#TTCN3_DIR := $(HOME)/frameworks/titan/titan.core/Install #WPCAP_DLL_PATH := /cygdrive/c/windows/system32/npcap/wpcap.dll #NPCAP_INCLUDE := /cygdrive/c/PROGRA~1/Npcap/sdk/include T3Q_PATH=./tools/t3q-v2.0.0b30 diff --git a/etc/AtsMec/AtsMec_Sandbox.cf_ b/etc/AtsMec/AtsMec_Sandbox.cf_ deleted file mode 100644 index c6006e9d1ecdc5b430174e5ffcf27711efd01db2..0000000000000000000000000000000000000000 --- a/etc/AtsMec/AtsMec_Sandbox.cf_ +++ /dev/null @@ -1,575 +0,0 @@ -[MODULE_PARAMETERS] -# This section shall contain the values of all parameters that are defined in your TTCN-3 modules. - -# IUT roles - -LibCommon_Time.PX_TAC := 30.0 -#LibCommon_Time.PX_TWAIT := 30.0 -LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; -LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; - -LibItsHttp_Pics.PICS_HEADER_HOST := "try-mec.etsi.org" #"192.168.1.39" - -LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" -LibItsHttp_Pics.PICS_USE_TOKEN_HEADER := true -#LibItsHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" - -LibMec_Pics.PICS_ROOT_API := "/sbxdflb1km/mep1" # Need to sign in on https://try-mec.etsi.org/, section 'Try-it from your MEC application' - -# LibMec_Pixits -LibMec_Pixits.PX_RNIS_SUBSCRITIONS_URI := "/rni/v2/subscriptions" -LibMec_Pixits.PX_RNIS_QUERIES_URI := "/rni/v2/queries" -LibMec_Pixits.PX_MEC_SVC_MGMT_APPS_URI := "/mec_service_mgmt/v1/applications" -LibMec_Pixits.PX_ME_APP_SUPPORT_URI := "/mec_app_support/v1/applications" -LibMec_Pixits.PX_SVC_MGMT_TRANS_URI := "/mec_service_mgmt/v1/transports" -LibMec_Pixits.PX_ME_APP_SUPPORT_TIMING_CAPS_URI := "/mec_app_support/v1/timing/timing_caps" -LibMec_Pixits.PX_ME_APP_SUPPORT_TIMING_CURRENT_URI := "/mec_app_support/v1/timing/current_time" - -LibMec_Pics.PICS_MEC_PLAT := true - -# Mec-011 AppEnblementAPI -EdgePlatformApplicationEnablementAPI_Pixits.PX_APP_INSTANCE_ID := "b8ae165a-a1e3-4d6c-86d9-52c59ad314b6" -EdgePlatformApplicationEnablementAPI_Pixits.PX_NON_EXISTENT_APP_INSTANCE_ID := "1b5d27e6-5cc4-47d4-812b-a943233dbe08" -EdgePlatformApplicationEnablementAPI_Pixits.PX_SERVICE_NAME := "mec028-1" -EdgePlatformApplicationEnablementAPI_Pixits.PX_SERVICE_ID := "1b5d27e6-5cc4-47d4-812b-a943233dbe08" -EdgePlatformApplicationEnablementAPI_Pixits.PX_HREF := "http://yanngarcia.ddns.net/mec_service_mgmt/v2/notif/1" -EdgePlatformApplicationEnablementAPI_Pixits.PX_SRV_AVAIL_NOTIF_CALLBACK_URI := "http://yanngarcia.ddns.net/mec_service_mgmt/v2/srv_notif/1" -EdgePlatformApplicationEnablementAPI_Pixits.PX_SERVICE_INFO_VERSION := "v2" -EdgePlatformApplicationEnablementAPI_Pixits.PX_NEW_SERVICE_INFO_VERSION := "v2.1" -EdgePlatformApplicationEnablementAPI_Pixits.PX_SERVICE_INFO_STATE := ACTIVE -EdgePlatformApplicationEnablementAPI_Pixits.PX_SUBSCRIPTION_ID := "3" -EdgePlatformApplicationEnablementAPI_Pixits.PX_DNS_RULE_ID := "route2home" -EdgePlatformApplicationEnablementAPI_Pixits.PX_DOMAIN_NAME := "try-mec.etsi.org" -EdgePlatformApplicationEnablementAPI_Pixits.PX_IP_ADDRESS := "10.10.0.2" -EdgePlatformApplicationEnablementAPI_Pixits.PX_TTL := 8 -EdgePlatformApplicationEnablementAPI_Pixits.PX_TRAFFIC_RULE_ID := "trafficRuleId01" - -# Mec-012 RnisAPI -RnisAPI_Pixits.PX_SUBSCRIPTION_HREF_VALUE := "cell_change" -RnisAPI_Pixits.PX_CALLBACK_REFERENCE := "http://yanngarcia.ddns.net/rni/v2/notif/1" -RnisAPI_Pixits.PX_ASSOCIATE_ID_VALUE := "10.100.0.1" -RnisAPI_Pixits.PX_CELL_ID := "1010101" -RnisAPI_Pixits.PX_C_ID := "0xFFFFFFFF" -RnisAPI_Pixits.PX_APP_INS_ID := "01" -RnisAPI_Pixits.PX_APP_ID := "19" -RnisAPI_Pixits.PX_E_RAB_ID := 0 -RnisAPI_Pixits.PX_QCI := 0 - -# Mec-013 LocationAPI -LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := true -LocationAPI_Pixits.PX_ZONE_ID := "zone01" -LocationAPI_Pixits.PX_ACCESS_POINT_ID := "4g-macro-cell-2" -LocationAPI_Pixits.PX_USER := "4005C0A640001" -LocationAPI_Pixits.PX_IP_ADDRESS := "10.100.0.1" -LocationAPI_Pixits.PX_CLIENT_ID := "0123" -LocationAPI_Pixits.PX_SUBSCRIPTION_ID := "1" -LocationAPI_Pixits.PX_CALLBACK_REF_URL := { notifyURL := "http://yanngarcia.ddns.net/location/v2/notif/1", callbackData := omit, notificationFormat := omit } -LocationAPI_Pixits.PX_AREA_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v2/notif/1", callbackData := omit, notificationFormat := omit } -LocationAPI_Pixits.PX_UE_DIST_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v2/notif/1", callbackData := omit, notificationFormat := omit } -LocationAPI_Pixits.PX_UE_COORD_LAT := 43.729538 -LocationAPI_Pixits.PX_UE_COORD_LONG := 7.413819 - - -UEidentityAPI_Pics.PICS_UE_IDENTITY_API_SUPPORTED := false - -# Mec-015 TrafficManagementAPI -TrafficManagementAPI_Pics.PICS_BWMANAGEMENT_API_SUPPORTED := true - -# Mec-028 WLAN Information API -LibMec_Pixits.PX_ME_WLAN_QUERIES_URI := "/wai/v2/queries" -LibMec_Pixits.PX_ME_WLAN_URI := "/wai/v2" - -#WlanInformationAPI_Pixits.PX_WLAN_FILTER_FIELD := "ap/macId" # ApInfo filter -WlanInformationAPI_Pixits.PX_WLAN_FILTER_FIELD := "staId/macId" # StatInfo filter -WlanInformationAPI_Pixits.PX_WLAN_FILTER_VALUE := "\"005C06060606\"" -WlanInformationAPI_Pixits.PX_ASSOC_STA_SUBSCRIPTION_CALLBACK := "http://yanngarcia.ddns.net/wai/v2/notif" - -# Mec-030 V2X Information Service API - -[LOGGING] -# In this section you can specify the name of the log file and the classes of events -# you want to log into the file or display on console (standard error). - -LogFile := "../logs/AtsMec/%e.%h-%r.%s" -FileMask := LOG_ALL | USER | DEBUG | MATCHING -ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING -#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE -#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE -LogSourceInfo := Stack -LogEntityName:= Yes -LogEventTypes:= Yes -#TimeStampFormat := DateTime - -[TESTPORT_PARAMETERS] -# In this section you can specify parameters that are passed to Test Ports. -#system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.1.39,port=30030,use_ssl=0)" -system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=try-mec.etsi.org,port=443,use_ssl=1)" -#system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=443,use_ssl=1)" -system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=80,use_ssl=0)" - -[DEFINE] -# In this section you can create macro definitions, -# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE]. - -[INCLUDE] -# To use configuration settings given in other configuration files, -# the configuration files just need to be listed in this section, with their full or relative pathnames. - -[ORDERED_INCLUDE] -# To use configuration settings given in other configuration files, -# the configuration files just need to be listed in this section, with their full or relative pathnames. - -[EXTERNAL_COMMANDS] -# This section can define external commands (shell scripts) to be executed by the ETS -# whenever a control part or test case is started or terminated. - -#BeginTestCase := "" -#EndTestCase := "" -#BeginControlPart := "" -#EndControlPart := "" - -[EXECUTE] -# In this section you can specify what parts of your test suite you want to execute. -#AtsMec_TestControl.control - -# ETSI GS MEC 011 -# Check that the IUT responds with a list of available MEC services for a given application instance when queried by a MEC Application -AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_001_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_001_BR -# Check that the IUT notifies the authorised relevant (subscribed) application instances when a new service for a given application instance is registered -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_002_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_002_BR -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_002_NF -# Check that the IUT responds with the information on a specific service for a given application instance when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_003_OK -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_003_NF -# Check that the IUT updates a service information for a given application instance when commanded by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_004_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_004_BR -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_004_NF -# Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_004_PF -# Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_001_OK -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_001_NF -# Check that the IUT acknowledges the subscription by a MEC Application to notifications on service availability events -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_002_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_002_BR -# Check that the IUT responds with the information on a specific subscription when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_003_OK -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_003_NF -# Check that the IUT acknowledges the unsubscribe from service availability event notifications when commanded by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_004_OK -# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_004_NF -# Check that the IUT responds that it has completed the application level termination -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_CONFTASK_001_OK -# Check that the IUT responds with an error when a request for an operationAction is sent to an unknown application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_CONFTASK_001_NF -# Check that the IUT responds that the MEC application is up and running -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_CONFTASK_002_OK -# Check that the IUT responds with an error when a request for an indication is sent to an unknown application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_CONFTASK_002_NF -# Check that the IUT responds with a list of active DNS rules when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_DNS_001_OK -# Check that the IUT responds with the information on a specific DNS rule when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_DNS_002_OK -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_DNS_002_NF -# Check that the IUT updates a specific DNS rule when commanded by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_DNS_003_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_DNS_003_BR -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_DNS_003_NF -# Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_DNS_003_PF -# Check that the IUT responds with the liveness of a MEC service instance when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MSL_001_OK -# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MSL_001_NF -# Check that the IUT updates the liveness of a MEC service instance when requested by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MSL_002_OK -# Check that the IUT responds with an error when incorrect parameters were sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MSL_002_BR -# Check that the IUT responds with a list of available MEC services when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SAQ_001_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SAQ_001_BR -# Check that the IUT responds with the information on a specific service when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SAQ_002_OK -# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SAQ_002_NF -# Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_001_OK -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_001_NF -# Check that the IUT acknowledges the subscription by a MEC Application to notifications on service availability events -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_002_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_002_BR -# Check that the IUT responds with the information on a specific subscription when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_003_OK -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_003_NF -# Check that the IUT acknowledges the unsubscribe from service availability event notifications when commanded by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_004_OK -# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_004_NF -# Check that the IUT responds with timing capabilities when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TIME_001_OK -# Check that the IUT responds with current time when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TIME_002_OK -# Check that the IUT responds with a list of available traffic rules when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TRAF_001_OK -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TRAF_001_NF -# Check that the IUT responds with the information on a specific traffic rule when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TRAF_002_OK -# Check that the IUT updates a specific traffic rule when commanded by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TRAF_003_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TRAF_003_BR -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TRAF_003_NF -# Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TRAF_003_PF -# Check that the IUT responds with a list of available transports when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TRANS_001_OK - -# ETSI GS MEC 012 -# Check that the RNIS service sends an RNIS notification about cell change if the RNIS service has an associated subscription and the event is generated -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_001_OK -# Check that the RNIS service sends an RNIS notification about RAB establishment if the RNIS service has an associated subscription and the event is generated -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_002_OK -# Check that the RNIS service sends an RNIS notification about RAB modification if the RNIS service has an associated subscription and the event is generated -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_003_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_004_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_005_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_006_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_007_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_008_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_009_OK -# Check that the RNIS service sends the list of links to the relevant RNIS subscriptions when requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_011_OK -# Check that the RNIS service creates a new RNIS subscription -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_012_OK -# Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions with a wrong subscription type -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_011_BR -# Check that the RNIS service responds with an error when it receives a request to create a new RNIS subscription with a wrong format -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_012_BR -# Check that the RNIS service sends a RNIS subscription when requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_013_OK -# Check that the RNIS service responds with error when a not existing RNIS subscription is requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_013_NF -# Check that the RNIS service modifies a RNIS subscription when requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_014_OK -# Check that the RNIS service sends an error when it receives a malformed modify request for a RNIS subscription -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_014_BR -# Check that the RNIS service responds with error when a modification for a not existing RNIS subscription is requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_014_NF -# Check that the RNIS service deletes a RNIS subscription when requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_015_OK -# Check that the RNIS service responds with error when the deletion of a not existing RNIS subscription is requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_015_NF -# Check that the RNIS service returns the RAB information when requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_016_OK -# Check that the RNIS service returns the PLMN information when requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_017_OK -# Check that the RNIS service returns the S1 bearer information -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_018_OK -# Check that the RNIS service returns the L2 measurements information -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_019_OK -# Check that the RNIS service returns an error when the RAB information is requested with a malformatted message -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_016_BR -# Check that the RNIS service returns an error when the RAB information is requested with a malformatted message -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_016_NF -# Check that the RNIS service returns an error when the PLMN information is requested with a malformatted message -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_017_BR -# Check that the RNIS service returns an error when the PLMN information for a not existing element is requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_017_NF -# Check that the RNIS service returns an error when the S1 bearer information is requested with a malformatted message -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_018_BR -# Check that the RNIS service returns an error when the S1 bearer information for a not existing element is requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_018_NF -# Check that the RNIS service returns an error when the L2 measurements information is requested with a malformatted message -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_019_BR -# Check that the RNIS service returns an error when the L2 measurements information for a not existing element is requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_019_NF - -# ETSI GS MEC 013 -# Check that the IUT responds with a list for the location of User Equipments when queried by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_BR -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_NF -# Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the location changes -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_BR -# Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_002_OK -# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_002_NF -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UETRACKSUB_001_OK -# Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the UE changes location -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UETRACKSUB_001_BR -# Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UETRACKSUB_002_OK -# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UETRACKSUB_002_NF -# Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_BR -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_NF -# Check that the IUT acknowledges the UE information change subscription request when commanded by a MEC Application and notifies it when the location changes -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFSUB_001_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFSUB_001_BR -# Check that the IUT acknowledges the cancellation of UE information change notifications when commanded by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFSUB_002_OK -# Check that the IUT acknowledges the cancellation of UE information change notifications when commanded by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFSUB_002_NF -# heck that the IUT responds with the list of radio nodes currently associated with the MEC host and the location of each radio node when queried by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_RLOCLOOK_001_OK -# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_RLOCLOOK_001_NF -# Check that the IUT acknowledges the UE area change subscription request when commanded by a MEC Application and notifies it when the UE enters the specified circle -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_001_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_001_BR -# Check that the IUT acknowledges the cancellation of UE area change notifications when commanded by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_002_OK -# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_002_NF -# Check that the IUT responds with the distance to a UE when queried by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEDISTLOOK_001_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEDISTLOOK_001_BR -# Check that the IUT acknowledges the UE distance subscription request when commanded by a MEC Application and notifies it when (all) the requested UE(s) is (are) within the specified distance -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEDISTSUB_001_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEDISTSUB_001_BR -# Check that the IUT acknowledges the cancellation of UE distance notifications when commanded by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEDISTSUB_002_OK -# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEDISTSUB_002_NF - -# ETSI GS MEC 014 -#AtsMec_UEidentityAPI_TestCases.TC_MEC_MEC014_SRV_UETAG_001_OK -#AtsMec_UEidentityAPI_TestCases.TC_MEC_MEC014_SRV_UETAG_001_BR -#AtsMec_UEidentityAPI_TestCases.TC_MEC_MEC014_SRV_UETAG_001_NF -#AtsMec_UEidentityAPI_TestCases.TC_MEC_MEC014_SRV_UETAG_002_OK -#AtsMec_UEidentityAPI_TestCases.TC_MEC_MEC014_SRV_UETAG_002_BR -#AtsMec_UEidentityAPI_TestCases.TC_MEC_MEC014_SRV_UETAG_002_PF - -# ETSI GS MEC 015 -# Check that the IUT responds with the list of configured bandwidth allocations when queried by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_OK -# Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_002_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_002_BR -# Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_002_NF -# Check that the IUT responds with a registration and initialisation approval for the requested bandwidth requirements sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_003_OK_01 -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_003_OK_02 -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_003_BR_01 -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_003_BR_02 -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_003_BR_03 -# Check that the IUT responds with the configured bandwidth allocation when queried by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_OK -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_NF -# Check that the IUT updates the requested bandwidth requirements when commanded by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_005_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_005_BR -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_005_NF -# Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_006_OK -#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_006_BR -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_006_NF -# Check that the IUT unregisters from the Bandwidth Management Service when commanded by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_007_OK -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_007_NF -# Check that the IUT responds with the Multi-access Traffic Steering information when queried by a MEC Application -#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_001_OK -# Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application -#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_OK -#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_BR -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_NF -# Check that the IUT responds with a configured Multi-access Traffic Steering when queried by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_MTS_003_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_MTS_003_BR -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_MTS_003_NF - -# ETSI GS MEC 016 - -# ETSI GS MEC 028 -# Check that the IUT responds with the list of WLAN Access Point -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_001_OK -# Check that the IUT responds with the list of WLAN Access Point filtered by the macId provided as query parameter -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_002_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_002_BR -# Check that the IUT responds with the list of Station Point -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_003_OK -# Check that the IUT responds with the list of Station Point filtered by the macId provided as query parameter -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_004_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_004_BR -# Check that the IUT responds with the requested list of subscription -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_005_OK -# Check that the IUT responds with the requested list of subscription -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_006_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_006_BR -# Check that the IUT responds with an error when a request with not existing parameters is sent -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_006_NF -# Check that the IUT responds with a Notification Subscription -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_007_OK -# Check that the IUT responds with an error when an invalid Subscription request is sent -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_007_BR -# Check that the IUT responds with an error when a request with not existing parameters is sent -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_007_NF -# Check that the IUT responds with the list of Subscription -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_008_OK -# Check that the IUT responds with an error when a request for existing subscription with incorrect parameters is sent -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_008_NF -# Check that the IUT responds with a Notification Subscription when it is modified -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_009_OK -# Check that the IUT responds with an error when an invalid field is set in the subscription modification reques -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_009_BR -# Check that the IUT responds with 204 when an existing subscription is correctly deleted -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_010_OK -# Check that the IUT responds with an error when an not existing subscription cannot be deleted -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_010_NF -# Check that the IUT sends a notification about WLAN event notification if the MEC service has an associated subscription and the event is generated -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_011_OK - -# ETSI GS MEC 030 -# Check that the IUT responds with a configured provisioning information over Uu unicast when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_OK_01 -# Check that the IUT responds with a configured provisioning information over Uu unicast when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_OK_02 -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_BR -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_NF -# Check that the IUT responds with a configured provisioning information over Uu MBMS when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_OK_01 -# Check that the IUT responds with a configured provisioning information over Uu MBMS when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_OK_02 -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_BR -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_NF -# Check that the IUT responds with a configured provisioning information over PC5 when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_OK_01 -# Check that the IUT responds with a configured provisioning information over PC5 when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_OK_02 -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_BR -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_NF -# Check that the IUT sends a request about QoS information for a vehicular UE when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_004_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_004_BR -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_004_NF -# Check that the IUT processes properly a request to publish a V2X message -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_005_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_005_BR -# Check that the IUT responds with the requested list of subscription when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_006_OK_01 -# Check that the IUT responds with the requested list of subscription when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_006_OK_02 -# Check that the IUT responds with the requested list of subscription when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_006_OK_03 -# Check that the IUT responds with the requested list of subscription when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_006_OK_04 -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_006_BR -# Check that the IUT responds with the requested to create a subscription -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_01 -# Check that the IUT responds with the requested to create a subscription -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_02 -# Check that the IUT responds with the requested to create a subscription -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_03 -# Check that the IUT responds with the requested to create a subscription -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_04 -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_BR -# Check that the IUT responds with the requested of subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_01 -# Check that the IUT responds with the requested of subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_02 -# Check that the IUT responds with the requested of subscription information when queried by a MEC Application#AtsMec_V2XInformationServiceAPI_TestCases.TC_#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_03 -# Check that the IUT responds with the requested of subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_04 -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_BR -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_NF -# Check that the IUT responds with the request of updating subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_01 -# Check that the IUT responds with the request of updating subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_02 -# Check that the IUT responds with the request of updating subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_03 -# Check that the IUT responds with the request of updating subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_04 -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_BR -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_NF -# Check that the IUT responds with the request of removing subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_01 -# Check that the IUT responds with the request of removing subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_02 -# Check that the IUT responds with the request of removing subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_03 -# Check that the IUT responds with the request of removing subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_04 -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_NF - -[GROUPS] -# In this section you can specify groups of hosts. These groups can be used inside the -# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. - -[COMPONENTS] -# This section consists of rules restricting the location of created PTCs. - -[MAIN_CONTROLLER] -# The options herein control the behavior of MC. -KillTimer := 10.0 -LocalAddress := 127.0.0.1 -TCPPort := 12000 -NumHCs := 1 diff --git a/etc/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablement_Sandbox.cfg_ b/etc/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablement_Sandbox.cfg_ new file mode 100644 index 0000000000000000000000000000000000000000..0164f79e9b42a62ed13455110b955ff7e539eb74 --- /dev/null +++ b/etc/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablement_Sandbox.cfg_ @@ -0,0 +1,208 @@ +[MODULE_PARAMETERS] +# This section shall contain the values of all parameters that are defined in your TTCN-3 modules. + +# IUT roles + +LibCommon_Time.PX_TAC := 30.0 +#LibCommon_Time.PX_TWAIT := 30.0 +LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; +LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; + +LibHttp_Pics.PICS_HEADER_HOST := "192.168.1.21" + +LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" +LibHttp_Pics.PICS_USE_TOKEN_HEADER := true +#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" + +LibMec_Pics.PICS_ROOT_API := "/sbxykqjr17/mep1/" # Need to sign in on https://mec-platform.etsi.org/, section 'Try-it from your MEC application' + +LibMec_Pics.PICS_MEC_PLAT := true + +# Application Instance ID +EdgePlatformApplicationEnablementAPI_Pixits.PX_APP_INSTANCE_ID := "a503822f-a3ff-4ac3-913b-c35acf610498" # Copied from ETSI MEC Sandbox GUI + +# Callbacks + +[LOGGING] +# In this section you can specify the name of the log file and the classes of events +# you want to log into the file or display on console (standard error). + +LogFile := "../logs/AtsMec_EdgePlatformApplicationEnablement/%e.%h-%r.%s" +FileMask := LOG_ALL | USER | DEBUG | MATCHING +ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING +#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT +#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT +LogSourceInfo := Stack +LogEntityName:= Yes +LogEventTypes:= Yes +#TimeStampFormat := DateTime + +[TESTPORT_PARAMETERS] +# In this section you can specify parameters that are passed to Test Ports. +system.httpPort.params := "HTTP(codecs=json:json_codec_mec011)/TCP(debug=1,server=mec-platform.etsi.org,port=443,use_ssl=1,trusted_ca_list=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/yann/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)" +system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec011)/TCP(debug=1,server_mode=1,use_ssl=0)" + +[DEFINE] +# In this section you can create macro definitions, +# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE]. + +[INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[ORDERED_INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[EXTERNAL_COMMANDS] +# This section can define external commands (shell scripts) to be executed by the ETS +# whenever a control part or test case is started or terminated. + +#BeginTestCase := "" +#EndTestCase := "" +#BeginControlPart := "" +#EndControlPart := "" + +[EXECUTE] +# In this section you can specify what parts of your test suite you want to execute. +#AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.control + +# Check that the IUT responds with a list of available MEC services for a given application instance when queried by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_001_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_001_BR +# Check that the IUT responds with an error when a request with an unknown service is sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_001_NF +# Check that the IUT notifies the authorised relevant (subscribed) application instances when a new service for a given application instance is registered +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_002_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_002_BR +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_002_NF +# Check that the IUT responds with the information on a specific service for a given application instance when queried by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_003_OK +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_003_NF +# Check that the IUT updates a service information for a given application instance when commanded by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_004_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_004_BR +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_004_NF +# Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_004_PF +# Check that the IUT executes the deletion of a service for a given application instance when requested by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_005_OK +# Check that the IUT responds with an error when a request for deletion of a unknown service is sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_005_NF + +# Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_001_OK +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_001_NF +# Check that the IUT acknowledges the subscription by a MEC Application to notifications on termination events +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_002_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_002_BR +# Check that the IUT responds with the information on a specific subscription when queried by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_003_OK +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_003_NF +# Check that the IUT acknowledges the unsubscribe from service availability event notifications when commanded by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_004_OK +# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_004_NF + +# Check that the IUT responds that the MEC application is up and running +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_CONFTASK_002_OK +# Check that the IUT responds that it has completed the application level termination +AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_CONFTASK_001_OK +# Check that the IUT responds with an error when a request for an operationAction is sent to an unknown application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_CONFTASK_001_NF +# Check that the IUT responds with an error when a request for an indication is sent to an unknown application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_CONFTASK_002_NF + +# Check that the IUT responds with the liveness of a MEC service instance when queried by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MSL_001_OK +# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MSL_001_NF +# Check that the IUT updates the liveness of a MEC service instance when requested by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MSL_002_OK +# Check that the IUT responds with an error when incorrect parameters were sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MSL_002_BR + +# Check that the IUT responds with a list of available MEC services when queried by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SAQ_001_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SAQ_001_BR +# Check that the IUT responds with the information on a specific service when queried by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SAQ_002_OK +# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SAQ_002_NF + +# Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_001_OK +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_001_NF +# Check that the IUT acknowledges the subscription by a MEC Application to notifications on service availability events +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_002_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_002_BR +# Check that the IUT responds with the information on a specific subscription when queried by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_003_OK +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_003_NF +# Check that the IUT acknowledges the unsubscribe from service availability event notifications when commanded by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_004_OK +# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_004_NF + +# Check that the IUT acknowledges the registration by a MEC Application to the MEC platform +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_REGAPPS_001_OK_01 +# Check that the IUT acknowledges the registration by a MEC Application to the MEC platform +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_REGAPPS_001_OK_02 +# Check that the IUT acknowledges the registration by a MEC Application instanciated by the MEC platform +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_REGAPPS_001_OK_03 +# Check that the IUT responds with an error message when the IUT received a registration with missing fields from a MEC Application instanciated by the MEC platform +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_REGAPPS_001_BR_01 +# Check that the IUT responds with an error message when the IUT received by a MEC Application registration with missing endpoint +# AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_REGAPPS_001_BR_02 +# Check that the IUT responds with an error message when the IUT received by a MEC Application registration with unexpected appServiceRequired +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_REGAPPS_001_BR_03 +# Check that the IUT responds with an error message when the IUT received by a MEC Application registration with unexpected appServiceOptional +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_REGAPPS_001_BR_04 +# Check that the IUT responds with an error message when the IUT received by a MEC Application registration with unexpected appFeatureRequired +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_REGAPPS_001_BR_05 +# Check that the IUT responds with an error message when the IUT received by a MEC Application registration with unexpected appFeatureOptional +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_REGAPPS_001_BR_06 +# Check that the IUT responds with the AppInfo description when queried by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_REGAPPS_002_OK +# Check that the IUT responds with an error when when it receives a request for returning an AppInfo with a wrong ID +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_REGAPPS_002_NF +# Check that the IUT responds with 204 No Content when queried to update MEC Application registration +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_REGAPPS_003_OK +# Check that the IUT responds with an error when queried to update MEC Application registration with a wrong ID +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_REGAPPS_003_NF +# Check that the IUT responds with 204 No Content when queried to delete an existing MEC Application registration +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_REGAPPS_004_OK +# Check that the IUT responds with an error when queried to delete an unknown MEC Application registration +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_REGAPPS_004_NF + +# Check that the IUT responds with timing capabilities when queried by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TIME_001_OK +# Check that the IUT responds with current time when queried by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TIME_002_OK + +[GROUPS] +# In this section you can specify groups of hosts. These groups can be used inside the +# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. + +[COMPONENTS] +# This section consists of rules restricting the location of created PTCs. + +[MAIN_CONTROLLER] +# The options herein control the behavior of MC. +KillTimer := 10.0 +LocalAddress := 127.0.0.1 +TCPPort := 12000 +NumHCs := 1 diff --git a/etc/AtsMec_FederationEnablement/AtsMec_FederationEnablement_Mockoon.cf_ b/etc/AtsMec_FederationEnablement/AtsMec_FederationEnablement_Mockoon.cf_ new file mode 100644 index 0000000000000000000000000000000000000000..5c8c0703f1822e22f4fbb4a4f8bab49db308ec9f --- /dev/null +++ b/etc/AtsMec_FederationEnablement/AtsMec_FederationEnablement_Mockoon.cf_ @@ -0,0 +1,113 @@ +[MODULE_PARAMETERS] +# This section shall contain the values of all parameters that are defined in your TTCN-3 modules. + +# IUT roles + +LibCommon_Time.PX_TAC := 30.0 +#LibCommon_Time.PX_TWAIT := 30.0 +LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; +LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; + +LibHttp_Pics.PICS_HEADER_HOST := "192.168.1.39" + +LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" +LibHttp_Pics.PICS_USE_TOKEN_HEADER := true +#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" + +# LibMec_Pixits + + +[LOGGING] +# In this section you can specify the name of the log file and the classes of events +# you want to log into the file or display on console (standard error). + +LogFile := "../logs/AtsMec_FederationEnablement/%e.%h-%r.%s" +FileMask := LOG_ALL | USER | DEBUG | MATCHING +ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING +#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE +#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE +LogSourceInfo := Stack +LogEntityName:= Yes +LogEventTypes:= Yes +#TimeStampFormat := DateTime + +[TESTPORT_PARAMETERS] +# In this section you can specify parameters that are passed to Test Ports. +system.httpPort.params := "HTTP(codecs=json:json_codec_mec040)/TCP(debug=1,server=192.168.1.12,port=30030,use_ssl=0)" +#system.httpPort.params := "HTTP(codecs=json:json_codec_mec040)/TCP(debug=1,server=try-mec.etsi.org,port=443,use_ssl=1)" +system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec040)/TCP(debug=1,server_mode=1,local_port=80,use_ssl=0)" + +[DEFINE] +# In this section you can create macro definitions, +# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE]. + +[INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[ORDERED_INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[EXTERNAL_COMMANDS] +# This section can define external commands (shell scripts) to be executed by the ETS +# whenever a control part or test case is started or terminated. + +#BeginTestCase := "" +#EndTestCase := "" +#BeginControlPart := "" +#EndControlPart := "" + +[EXECUTE] +# In this section you can specify what parts of your test suite you want to execute. +#AtsMec_TestControl.control + +# Check that the IUT responds with a list of all available systemInfo when requested by a MEC Orchestrator - No query parameters +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_01 +# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - SystemId query parameters +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_02 +# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple SystemId query parameters +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_03 +# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty SystemId query parameters +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_04 +# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - SystemName query parameters +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_05 +# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - SystemName query parameters +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_05 +# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple SystemName query parameters +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_06 +# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty SystemName query parameters +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_07 +# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - systemProvider query parameters +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_08 +# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple systemProvider query parameters +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_09 +# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty systemProvider query parameters +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_10 +# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple query parameters +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_11 +# Check that the IUT responds with an error when selection is not applicable - SystemId +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_NF_01 +# Check that the IUT responds with an error when selection is not applicable - SystemName +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_NF_02 +# Check that the IUT responds with an error when selection is not applicable - SystemProvider +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_NF_03 +# Check that the IUT responds with an error when request is malformed +AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_BR + + + + +[GROUPS] +# In this section you can specify groups of hosts. These groups can be used inside the +# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. + +[COMPONENTS] +# This section consists of rules restricting the location of created PTCs. + +[MAIN_CONTROLLER] +# The options herein control the behavior of MC. +KillTimer := 10.0 +LocalAddress := 127.0.0.1 +TCPPort := 12000 +NumHCs := 1 diff --git a/etc/AtsMec_IoT/AtsMec_IoT_Mockoon.cf_ b/etc/AtsMec_IoT/AtsMec_IoT_Mockoon.cf_ new file mode 100644 index 0000000000000000000000000000000000000000..a53911e2829335a8808c346e2a852d5035c41214 --- /dev/null +++ b/etc/AtsMec_IoT/AtsMec_IoT_Mockoon.cf_ @@ -0,0 +1,81 @@ +[MODULE_PARAMETERS] +# This section shall contain the values of all parameters that are defined in your TTCN-3 modules. + +# IUT roles + +LibCommon_Time.PX_TAC := 30.0 +#LibCommon_Time.PX_TWAIT := 30.0 +LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; +LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; + +LibHttp_Pics.PICS_HEADER_HOST := "try-mec.etsi.org" #"192.168.1.39" + +LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" +LibHttp_Pics.PICS_USE_TOKEN_HEADER := true +#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" + +LibMec_Pics.PICS_ROOT_API := "/sbx1y8q0x9/mep1" # Need to sign in on https://try-mec.etsi.org/, section 'Try-it from your MEC application' + +# LibMec_Pixits + + +[LOGGING] +# In this section you can specify the name of the log file and the classes of events +# you want to log into the file or display on console (standard error). + +LogFile := "../logs/AtsMec/%e.%h-%r.%s" +FileMask := LOG_ALL | USER | DEBUG | MATCHING +ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING +#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE +#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE +LogSourceInfo := Stack +LogEntityName:= Yes +LogEventTypes:= Yes +#TimeStampFormat := DateTime + +[TESTPORT_PARAMETERS] +# In this section you can specify parameters that are passed to Test Ports. +#system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.1.39,port=30030,use_ssl=0)" +system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=try-mec.etsi.org,port=443,use_ssl=1)" +#system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=443,use_ssl=1)" +system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=80,use_ssl=0)" + +[DEFINE] +# In this section you can create macro definitions, +# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE]. + +[INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[ORDERED_INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[EXTERNAL_COMMANDS] +# This section can define external commands (shell scripts) to be executed by the ETS +# whenever a control part or test case is started or terminated. + +#BeginTestCase := "" +#EndTestCase := "" +#BeginControlPart := "" +#EndControlPart := "" + +[EXECUTE] +# In this section you can specify what parts of your test suite you want to execute. +#AtsMec_TestControl.control + + +[GROUPS] +# In this section you can specify groups of hosts. These groups can be used inside the +# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. + +[COMPONENTS] +# This section consists of rules restricting the location of created PTCs. + +[MAIN_CONTROLLER] +# The options herein control the behavior of MC. +KillTimer := 10.0 +LocalAddress := 127.0.0.1 +TCPPort := 12000 +NumHCs := 1 diff --git a/etc/AtsMec/AtsMec_Lewis.cf_ b/etc/AtsMec_Location/AtsMec_Location_Lewis.cf_ similarity index 96% rename from etc/AtsMec/AtsMec_Lewis.cf_ rename to etc/AtsMec_Location/AtsMec_Location_Lewis.cf_ index e660e3b354a2247a4dfff0b88b9393311f65c280..384e475d44bbab49006718e8a2e3371d9164b9b0 100644 --- a/etc/AtsMec/AtsMec_Lewis.cf_ +++ b/etc/AtsMec_Location/AtsMec_Location_Lewis.cf_ @@ -8,17 +8,17 @@ LibCommon_Time.PX_TAC := 30.0 LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; -LibItsHttp_Pics.PICS_HEADER_HOST := "172.22.1.6" +LibHttp_Pics.PICS_HEADER_HOST := "172.22.1.6" -LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" -LibItsHttp_Pics.PICS_USE_TOKEN_HEADER := true -#LibItsHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" +LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" +LibHttp_Pics.PICS_USE_TOKEN_HEADER := true +#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" LibMec_Pics.PICS_ROOT_API := "etsi-013" # LibMex_Pixits -LibMec_Pixits.PX_ME_APP_Q_ZONE_ID_URI := "/location/v2/zones" -LibMec_Pixits.PX_ME_APP_Q_USERS_LIST_URI := "/location/v2/users" +LibMec_Pixits.PX_ME_APP_Q_ZONE_ID_URI := "/location/v3/zones" +LibMec_Pixits.PX_ME_APP_Q_USERS_LIST_URI := "/location/v3/users" LibMec_Pixits.PX_RNIS_SUBSCRITIONS_URI := "/rni/v1/subscriptions" LibMec_Pixits.PX_RNIS_QUERIES_URI := "/rni/v1/queries" LibMec_Pixits.PX_MEC_SVC_MGMT_APPS_URI := "/mec_service_mgmt/v1/applications" diff --git a/etc/AtsMec/AtsMec_Mockoon.cf_ b/etc/AtsMec_Location/AtsMec_Location_Mockoon.cf_ similarity index 97% rename from etc/AtsMec/AtsMec_Mockoon.cf_ rename to etc/AtsMec_Location/AtsMec_Location_Mockoon.cf_ index 893163fa3659c3ef4581a09382c2fef67e4e0837..292a40d6850fd22323c979dbff2467a686e691b5 100644 --- a/etc/AtsMec/AtsMec_Mockoon.cf_ +++ b/etc/AtsMec_Location/AtsMec_Location_Mockoon.cf_ @@ -8,11 +8,11 @@ LibCommon_Time.PX_TAC := 30.0 LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; -LibItsHttp_Pics.PICS_HEADER_HOST := "try-mec.etsi.org" #"192.168.1.39" +LibHttp_Pics.PICS_HEADER_HOST := "try-mec.etsi.org" #"192.168.1.39" -LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" -LibItsHttp_Pics.PICS_USE_TOKEN_HEADER := true -#LibItsHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" +LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" +LibHttp_Pics.PICS_USE_TOKEN_HEADER := true +#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" LibMec_Pics.PICS_ROOT_API := "/sbx1y8q0x9/mep1" # Need to sign in on https://try-mec.etsi.org/, section 'Try-it from your MEC application' @@ -63,9 +63,9 @@ LocationAPI_Pixits.PX_USER := "4005C0A640001" LocationAPI_Pixits.PX_IP_ADDRESS := "10.100.0.1" LocationAPI_Pixits.PX_CLIENT_ID := "0123" LocationAPI_Pixits.PX_SUBSCRIPTION_ID := "1" -LocationAPI_Pixits.PX_CALLBACK_REF_URL := { notifyURL := "http://yanngarcia.ddns.net/location/v2/notif/1", callbackData := omit, notificationFormat := omit } -LocationAPI_Pixits.PX_AREA_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v2/notif/1", callbackData := omit, notificationFormat := omit } -LocationAPI_Pixits.PX_UE_DIST_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v2/notif/1", callbackData := omit, notificationFormat := omit } +LocationAPI_Pixits.PX_CALLBACK_REF_URL := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } +LocationAPI_Pixits.PX_AREA_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } +LocationAPI_Pixits.PX_UE_DIST_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } LocationAPI_Pixits.PX_UE_COORD_LAT := 43.729538 LocationAPI_Pixits.PX_UE_COORD_LONG := 7.413819 @@ -313,16 +313,16 @@ AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_0 #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_BR # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_NF -# Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the location changes -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_BR +# Check that the IUT acknowledges the subscription by a MEC Application to notifications user location event +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01 # Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_002_OK # Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_002_NF -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UETRACKSUB_001_OK +# Check that the IUT acknowledges the subscription by a MEC Application to notifications user location periodic +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02 # Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the UE changes location #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UETRACKSUB_001_BR # Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application @@ -335,7 +335,7 @@ AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_0 #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_BR # Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_NF -# Check that the IUT acknowledges the UE information change subscription request when commanded by a MEC Application and notifies it when the location changes +# Check that the IUT responds with a list zones when queried by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFSUB_001_OK # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFSUB_001_BR @@ -348,7 +348,7 @@ AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_0 # Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_RLOCLOOK_001_NF # Check that the IUT acknowledges the UE area change subscription request when commanded by a MEC Application and notifies it when the UE enters the specified circle -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_001_OK +#AtsMec_LocationAPI_TestCases.TP_MEC_MEC013_SRV_UEAREASUB_001_OK # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_001_BR # Check that the IUT acknowledges the cancellation of UE area change notifications when commanded by a MEC Application diff --git a/etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ b/etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ new file mode 100644 index 0000000000000000000000000000000000000000..91327401cd08c563e6b2fc683cd1d128e1dd4a7f --- /dev/null +++ b/etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ @@ -0,0 +1,224 @@ +[MODULE_PARAMETERS] +# This section shall contain the values of all parameters that are defined in your TTCN-3 modules. + +# IUT roles + +LibCommon_Time.PX_TAC := 30.0 +#LibCommon_Time.PX_TWAIT := 30.0 +LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; +LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; + +LibHttp_Pics.PICS_HEADER_HOST := "192.168.1.21" #"192.168.1.39" + +LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" +LibHttp_Pics.PICS_USE_TOKEN_HEADER := true +#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" + +LibMec_Pics.PICS_ROOT_API := "/sbxykqjr17/mep1/" # Need to sign in on https://sandbox-mec.etsi.org/, section 'Try-it from your MEC application' + +LibMec_Pics.PICS_MEC_PLAT := true + +# Mec-013 LocationAPI +LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := true +LocationAPI_Pixits.PX_ZONE_ID := "zone03" +LocationAPI_Pixits.PX_ACCESS_POINT_ID := "4g-macro-cell-6" +LocationAPI_Pixits.PX_AP_COORD_LAT := 43.737087 +LocationAPI_Pixits.PX_AP_COORD_LONG := 7.421007 +LocationAPI_Pixits.PX_CONNECTION_TYPE := LTE +LocationAPI_Pixits.PX_USER := "4005C0A640001" +LocationAPI_Pixits.PX_IP_ADDRESS := "10.1.0.1" +LocationAPI_Pixits.PX_IP_ADDRESS_1 := "10.100.0.1" +LocationAPI_Pixits.PX_ZONE_ID_1 := "zone01" +LocationAPI_Pixits.PX_CLIENT_ID := "0123" +LocationAPI_Pixits.PX_SUBSCRIPTION_ID := "1" +LocationAPI_Pixits.PX_CALLBACK_REF_URL := "http://yanngarcia.ddns.net/location/v3/notif/1" +LocationAPI_Pixits.PX_AREA_SUB_CALLBACK_URI := "http://yanngarcia.ddns.net/location/v3/notif/1" +LocationAPI_Pixits.PX_UE_NEW_SUB_CALLBACK_URI := "http://yanngarcia.ddns.net/location/v3/notification/1" +LocationAPI_Pixits.PX_UE_DIST_SUB_CALLBACK_URI := "http://yanngarcia.ddns.net/location/v3/notif/1" + +LocationAPI_Pixits.PX_UE_MONITORED_IP_ADDRESS := "10.100.0.1" +LocationAPI_Pixits.PX_UE_REFERENCED_IP_ADDRESS := "10.100.0.3" +LocationAPI_Pixits.PX_UE_COORD_LAT := 43.736515 +LocationAPI_Pixits.PX_UE_COORD_LONG := 7.421802 + +[LOGGING] +# In this section you can specify the name of the log file and the classes of events +# you want to log into the file or display on console (standard error). + +LogFile := "../logs/AtsMec_Location/%e.%h-%r.%s" +FileMask := LOG_ALL | USER | DEBUG | MATCHING +ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING +#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE +#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE +LogSourceInfo := Stack +LogEntityName:= Yes +LogEventTypes:= Yes +#TimeStampFormat := DateTime + +[TESTPORT_PARAMETERS] +# In this section you can specify parameters that are passed to Test Ports. +system.httpPort.params := "HTTP(codecs=json:json_codec_mec013)/TCP(debug=1,server=mec-platform.etsi.org,port=443,use_ssl=1,trusted_ca_list=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/yann/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)" +system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec013)/TCP(debug=1,server_mode=1,use_ssl=0)" +#system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec013)/TCP(debug=1,server_mode=1,local_port=443,use_ssl=1,mutual_auth=1,mutual_tls=1,trusted_ca_list=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/yann/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)" + +[DEFINE] +# In this section you can create macro definitions, +# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE]. + +[INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[ORDERED_INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[EXTERNAL_COMMANDS] +# This section can define external commands (shell scripts) to be executed by the ETS +# whenever a control part or test case is started or terminated. + +#BeginTestCase := "" +#EndTestCase := "" +#BeginControlPart := "" +#EndControlPart := "" + +[EXECUTE] +# In this section you can specify what parts of your test suite you want to execute. +#AtsMec_TestControl.control + +# Check that the IUT responds with the list of radio nodes currently associated with the MEC host and the location of each radio node when queried by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_RLOCLOOK_001_OK +# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_RLOCLOOK_001_NF +# Check that the IUT responds with the radio nodes when queried by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_RLOCLOOK_002_OK +# Check that the IUT responds with an error when the radio nodes does not exist +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_RLOCLOOK_002_NF +# Check that the IUT responds with a list of UE area subscriptions when queried by a MEC Application - No filter +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_01 +# Check that the IUT responds with a list of UE area subscriptions when queried by a MEC Application - Event filter +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_02 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid filter +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREALOOK_001_BR +# Check that the IUT acknowledges the change of UE area subscription request when commanded by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREALOOK_002_OK +# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREALOOK_002_NF +# Check that the IUT acknowledges the creation of UE area subscription request when commanded by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_001_OK_01 +# Check that the IUT acknowledges the creation of UE area subscription request when commanded by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_001_OK_02 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_001_BR +# Check that the IUT acknowledges the change of UE area subscription request when commanded by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_002_OK +# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREALOOK_002_NF +# Check that the IUT acknowledges the cancellation of UE area change notifications when commanded by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_003_OK +# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_003_NF +# Check that the IUT responds with the list of UE distance subscriptions to a UE when queried by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEDISTLOOK_001_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid filter +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEDISTLOOK_001_BR +# Check that the IUT responds with the distance to a UE when queried by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEDISTLOOK_002_OK +# Check that the IUT responds with an error when inconsistent request was sent by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEDISTLOOK_002_NF +# Check that the IUT acknowledges the UE distance subscription request when commanded by a MEC Application and notifies it when (all) the requested UE(s) is (are) within the specified distance +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_01 +# Check that the IUT acknowledges the UE distance subscription request when commanded by a MEC Application and notifies it when (all) the requested UE(s) is (are) within the specified distance +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_02 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEDISTSUB_001_BR +# Check that the IUT acknowledges the cancellation of UE distance notifications when commanded by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEDISTSUB_002_OK +# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEDISTSUB_002_NF +# Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - No Filter +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_01 +# Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - Filter with one address +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_02 +# Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - Filter with several addresses +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_03 +# Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - Filter with several zoneIds +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_04 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_BR +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_NF +# Check that the IUT responds with a list for the location of User Equipments when queried by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_OK +# Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_01 +# Check that the IUT responds with the subscription when queried by a MEC Application - UE location Periodic +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_02 +# Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event and address +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_03 +# Check that the IUT responds with an error when inconsistent request was sent by a MEC Application - Invalid filter +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_002_BR +# Check that the IUT responds with an error when inconsistent request was sent by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_002_NF_01 +# Check that the IUT responds with an error when inconsistent request was sent by a MEC Application - Using filter +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_002_NF_02 +# Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_01 +# Check that the IUT responds with the subscription when queried by a MEC Application - UE location Periodoc +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_02 +# Check that the IUT responds with an error when the non existing subscription is queried by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_003_NF +# Check that the IUT acknowledges the subscription by a MEC Application to notifications user location event +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_01 +# Check that the IUT acknowledges the subscription by a MEC Application to notifications user location event +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_02 +# Check that the IUT acknowledges the subscription by a MEC Application to notifications user location periodic +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_01 +# Check that the IUT acknowledges the subscription by a MEC Application to notifications user location periodic +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_02 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_BR_02 +# Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_002_OK +# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_002_NF +# Check that the IUT acknowledges a request to modify an existing subscription by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_003_OK_01 +# Check that the IUT acknowledges a request to modify an existing subscription by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_003_OK_02 +# Check that the IUT responds with an error when received an inconsistent request +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_003_BR_01 +# Check that the IUT responds with an error when received an inconsistent request +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_003_BR_02 +# Check that the IUT acknowledges a request to modify a not existing subscription by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_003_NF_01 +# Check that the IUT acknowledges a request to modify a not existing subscription by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_003_NF_02 +# Check that the IUT provides a test notification when requested by a MEC Application +AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UETESTNOT_001_OK +# Check that the IUT responds with a list zones when queried by a MEC Application +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEZONELOOK_001_OK +# Check that the IUT responds with the subscription when queried by a MEC Application - Zone location Event +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_01 +# Check that the IUT responds with the subscription when queried by a MEC Application - Zone Status +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_02 + + + + + +[GROUPS] +# In this section you can specify groups of hosts. These groups can be used inside the +# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. + +[COMPONENTS] +# This section consists of rules restricting the location of created PTCs. + +[MAIN_CONTROLLER] +# The options herein control the behavior of MC. +KillTimer := 10.0 +LocalAddress := 127.0.0.1 +TCPPort := 12000 +NumHCs := 1 diff --git a/etc/AtsMec_Rnis/AtsMec_Rnis.cfg b/etc/AtsMec_Rnis/AtsMec_Rnis.cfg new file mode 120000 index 0000000000000000000000000000000000000000..17a9bfedf68e45096a712ec3a9e2f1e96f6d4843 --- /dev/null +++ b/etc/AtsMec_Rnis/AtsMec_Rnis.cfg @@ -0,0 +1 @@ +AtsMec_Sandbox.cf_ \ No newline at end of file diff --git a/etc/AtsMec_Rnis/AtsMec_Sandbox.cf_ b/etc/AtsMec_Rnis/AtsMec_Sandbox.cf_ new file mode 100644 index 0000000000000000000000000000000000000000..7daad533fe144868db31877c945925f21c034a7b --- /dev/null +++ b/etc/AtsMec_Rnis/AtsMec_Sandbox.cf_ @@ -0,0 +1,154 @@ +[MODULE_PARAMETERS] +# This section shall contain the values of all parameters that are defined in your TTCN-3 modules. + +# IUT roles + +LibCommon_Time.PX_TAC := 30.0 +#LibCommon_Time.PX_TWAIT := 30.0 +LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; +LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; + +LibHttp_Pics.PICS_HEADER_HOST := "sandbox-mec.etsi.org" #"192.168.1.39" + +LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" +LibHttp_Pics.PICS_USE_TOKEN_HEADER := true +#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" + +LibMec_Pics.PICS_ROOT_API := "/sbx8tunqyy/mep1" # Need to sign in on https://sandbox-mec.etsi.org/, section 'Try-it from your MEC application' + +# LibMec_Pixits +LibMec_Pixits.PX_RNIS_SUBSCRITIONS_URI := "/rni/v2/subscriptions" +LibMec_Pixits.PX_RNIS_QUERIES_URI := "/rni/v2/queries" + +LibMec_Pics.PICS_MEC_PLAT := true + +LibMec_Pixits.PX_RNIS_SUBSCRITIONS_URI := "/rni/v2/subscriptions" +LibMec_Pixits.PX_RNIS_QUERIES_URI := "/rni/v2/queries" + +RnisAPI_Pixits.PX_SUBSCRIPTION_HREF_VALUE := "cell_change" +RnisAPI_Pixits.PX_ASSOCIATE_ID_VALUE := "192.0.0.2" +RnisAPI_Pixits.PX_CELL_ID := "0x0800000A" +RnisAPI_Pixits.PX_C_ID := "0xFFFFFFFF" +RnisAPI_Pixits.PX_APP_INS_ID := "01" +RnisAPI_Pixits.PX_APP_ID := "19" +RnisAPI_Pixits.PX_E_RAB_ID := 0 +RnisAPI_Pixits.PX_QCI := 0 + + +[LOGGING] +# In this section you can specify the name of the log file and the classes of events +# you want to log into the file or display on console (standard error). + +LogFile := "../logs/AtsMec_Rnis/%e.%h-%r.%s" +FileMask := LOG_ALL | USER | DEBUG | MATCHING +ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING +#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE +#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE +LogSourceInfo := Stack +LogEntityName:= Yes +LogEventTypes:= Yes +#TimeStampFormat := DateTime + +[TESTPORT_PARAMETERS] +# In this section you can specify parameters that are passed to Test Ports. +system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=sandbox-mec.etsi.org,port=443,use_ssl=1,trusted_ca_list=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/yann/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)" +system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=443,use_ssl=1,mutual_auth=1,mutual_tls=1,trusted_ca_list=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/yann/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)" + +[DEFINE] +# In this section you can create macro definitions, +# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE]. + +[INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[ORDERED_INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[EXTERNAL_COMMANDS] +# This section can define external commands (shell scripts) to be executed by the ETS +# whenever a control part or test case is started or terminated. + +#BeginTestCase := "" +#EndTestCase := "" +#BeginControlPart := "" +#EndControlPart := "" + +[EXECUTE] +# In this section you can specify what parts of your test suite you want to execute. +#AtsMec_TestControl.control + +#AtsMec_RnisAPI_TestCases.tc_HelloW +# Check that the RNIS service sends an RNIS notification about cell change if the RNIS service has an associated subscription and the event is generated +AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_001_OK +# Check that the RNIS service sends an RNIS notification about RAB establishment if the RNIS service has an associated subscription and the event is generated +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_002_OK +# Check that the RNIS service sends an RNIS notification about RAB modification if the RNIS service has an associated subscription and the event is generated +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_003_OK +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_004_OK +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_005_OK +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_006_OK +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_007_OK +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_008_OK +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_009_OK +# Check that the RNIS service sends the list of links to the relevant RNIS subscriptions when requested +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_011_OK +# Check that the RNIS service creates a new RNIS subscription +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_012_OK +# Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions with a wrong subscription type +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_011_BR +# Check that the RNIS service responds with an error when it receives a request to create a new RNIS subscription with a wrong format +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_012_BR +# Check that the RNIS service sends a RNIS subscription when requested +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_013_OK +# Check that the RNIS service responds with error when a not existing RNIS subscription is requested +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_013_NF +# Check that the RNIS service modifies a RNIS subscription when requested +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_014_OK +# Check that the RNIS service sends an error when it receives a malformed modify request for a RNIS subscription +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_014_BR +# Check that the RNIS service responds with error when a modification for a not existing RNIS subscription is requested +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_014_NF +# Check that the RNIS service deletes a RNIS subscription when requested +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_015_OK +# Check that the RNIS service responds with error when the deletion of a not existing RNIS subscription is requested +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_015_NF +# Check that the RNIS service returns the RAB information when requested +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_016_OK +# Check that the RNIS service returns the PLMN information when requested +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_017_OK +# Check that the RNIS service returns the S1 bearer information +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_018_OK +# Check that the RNIS service returns the L2 measurements information +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_019_OK +# Check that the RNIS service returns an error when the RAB information is requested with a malformatted message +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_016_BR +# Check that the RNIS service returns an error when the RAB information is requested with a malformatted message +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_016_NF +# Check that the RNIS service returns an error when the PLMN information is requested with a malformatted message +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_017_BR +# Check that the RNIS service returns an error when the PLMN information for a not existing element is requested +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_017_NF +# Check that the RNIS service returns an error when the S1 bearer information is requested with a malformatted message +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_018_BR +# Check that the RNIS service returns an error when the S1 bearer information for a not existing element is requested +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_018_NF +# Check that the RNIS service returns an error when the L2 measurements information is requested with a malformatted message +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_019_BR +# Check that the RNIS service returns an error when the L2 measurements information for a not existing element is requested +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_019_NF + +[GROUPS] +# In this section you can specify groups of hosts. These groups can be used inside the +# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. + +[COMPONENTS] +# This section consists of rules restricting the location of created PTCs. + +[MAIN_CONTROLLER] +# The options herein control the behavior of MC. +KillTimer := 10.0 +LocalAddress := 127.0.0.1 +TCPPort := 12000 +NumHCs := 1 diff --git a/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ b/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ new file mode 100644 index 0000000000000000000000000000000000000000..a2043ca473d55f71c9da8ce717c5f4678fbdf424 --- /dev/null +++ b/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ @@ -0,0 +1,178 @@ +[MODULE_PARAMETERS] +# This section shall contain the values of all parameters that are defined in your TTCN-3 modules. + +# IUT roles + +LibCommon_Time.PX_TAC := 30.0 +#LibCommon_Time.PX_TWAIT := 30.0 +LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; +LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; + +LibHttp_Pics.PICS_HEADER_HOST := "192.168.1.21" #"192.168.1.39" + +LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" +LibHttp_Pics.PICS_USE_TOKEN_HEADER := true +#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" + +LibMec_Pics.PICS_ROOT_API := "/sbxykqjr17/mep1/" # Need to sign in on https://mec-platform.etsi.org/, section 'Try-it from your MEC application' + +LibMec_Pics.PICS_MEC_PLAT := true + +# 5g-small-cell-1 +V2XInformationServiceAPI_Pixits.PX_V2X_ECGI := "268804901557" +V2XInformationServiceAPI_Pixits.PX_V2X_CELL_ID := "101010101" +V2XInformationServiceAPI_Pixits.PX_V2X_ECGI_LAT := 43.730846 +V2XInformationServiceAPI_Pixits.PX_V2X_ECGI_LONG := 7.415385 + +# Callbacks +V2XInformationServiceAPI_Pixits.PX_PROV_UU_UNI_SUB_CALLBACK := "https://yanngarcia.ddns.net:36001/vis/v2/" +V2XInformationServiceAPI_Pixits.PX_PROV_V2X_SUB_CALLBACK := "https://yanngarcia.ddns.net:36001/vis/v2/" + +[LOGGING] +# In this section you can specify the name of the log file and the classes of events +# you want to log into the file or display on console (standard error). + +LogFile := "../logs/AtsMec_V2XInformationService/%e.%h-%r.%s" +FileMask := LOG_ALL | USER | DEBUG | MATCHING +ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING +#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT +#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT +LogSourceInfo := Stack +LogEntityName:= Yes +LogEventTypes:= Yes +#TimeStampFormat := DateTime + +[TESTPORT_PARAMETERS] +# In this section you can specify parameters that are passed to Test Ports. +system.httpPort.params := "HTTP(codecs=json:json_codec_mec030)/TCP(debug=1,server=mec-platform.etsi.org,port=443,use_ssl=1,trusted_ca_list=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/yann/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)" +system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec030)/TCP(debug=1,server_mode=1,local_port=443,use_ssl=1,mutual_auth=1,mutual_tls=1,trusted_ca_list=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/yann/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)" + +[DEFINE] +# In this section you can create macro definitions, +# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE]. + +[INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[ORDERED_INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[EXTERNAL_COMMANDS] +# This section can define external commands (shell scripts) to be executed by the ETS +# whenever a control part or test case is started or terminated. + +#BeginTestCase := "" +#EndTestCase := "" +#BeginControlPart := "" +#EndControlPart := "" + +[EXECUTE] +# In this section you can specify what parts of your test suite you want to execute. +#AtsMec_V2XInformationServiceAPI_TestControl.control + +# Check that the IUT responds with a configured provisioning information over Uu unicast when queried by a MEC Application +AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_OK_01 +# Check that the IUT responds with a configured provisioning information over Uu unicast when queried by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_OK_02 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_BR +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_NF + +# Check that the IUT responds with a configured provisioning information over Uu MBMS when queried by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_OK_01 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_OK_02 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_BR +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_NF + +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_OK_01 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_OK_02 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_BR +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_NF + +# Check that the IUT processes properly a request to information of V2X Message Distribution servers +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_004_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_004_BR +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_004_NF + +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_005_OK +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_005_BR +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_005_NF + +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_006_OK +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_006_BR + +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_01 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_02 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_03 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_04 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_05 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_BR + +# Check that the IUT responds with the requested to create a subscription - ProvChgUuUniSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_01 +# Check that the IUT responds with the requested to create a subscription - ProvChgUuMbmsSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_02 +# Check that the IUT responds with the requested to create a subscription - ProvChgPc5Subscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_03 +# Check that the IUT responds with the requested to create a subscription - V2xMsgSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_04 +# Check that the IUT responds with the requested to create a subscription - PredQosSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_05 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Wrong SubscriptionType +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_BR_01 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - No Callback neitheir WebSocket +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_BR_02 + +# Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgUuUniSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_01 +# Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgUuMbmsSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_02 +# Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgPc5Subscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_03 +# Check that the IUT responds with the requested of subscription information when queried by a MEC Application - V2xMsgSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_04 +# Check that the IUT responds with the requested of subscription information when queried by a MEC Application - PredQosSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_05 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_BR +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_NF + +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_01 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_02 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_03 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_04 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_05 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_BR +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_NF + +# Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - ProvChgUuUniSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_01 +# Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - ProvChgUuMbmsSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_02 +# Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - ProvChgPc5Subscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_03 +# Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - V2xMsgSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_04 +# Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - PredQosSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_05 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_NF + +[GROUPS] +# In this section you can specify groups of hosts. These groups can be used inside the +# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. + +[COMPONENTS] +# This section consists of rules restricting the location of created PTCs. + +[MAIN_CONTROLLER] +# The options herein control the behavior of MC. +KillTimer := 10.0 +LocalAddress := 127.0.0.1 +TCPPort := 12000 +NumHCs := 1 diff --git a/etc/AtsMec_WlanInformation/AtsMec_WlanInformation_Sandbox.cfg_ b/etc/AtsMec_WlanInformation/AtsMec_WlanInformation_Sandbox.cfg_ new file mode 100644 index 0000000000000000000000000000000000000000..50d1b79d6ed8fbf7a5c88aeb9f5c053e8a12fc05 --- /dev/null +++ b/etc/AtsMec_WlanInformation/AtsMec_WlanInformation_Sandbox.cfg_ @@ -0,0 +1,144 @@ +[MODULE_PARAMETERS] +# This section shall contain the values of all parameters that are defined in your TTCN-3 modules. + +# IUT roles + +LibCommon_Time.PX_TAC := 30.0 +#LibCommon_Time.PX_TWAIT := 30.0 +LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; +LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; + +LibHttp_Pics.PICS_HEADER_HOST := "192.168.1.21" + +LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" +LibHttp_Pics.PICS_USE_TOKEN_HEADER := true +#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" + +LibMec_Pics.PICS_ROOT_API := "/sbxykqjr17/mep1/" # Need to sign in on https://mec-platform.etsi.org/, section 'Try-it from your MEC application' + +LibMec_Pics.PICS_MEC_PLAT := true + +WlanInformationAPI_Pixits.PX_WLAN_FILTER_VALUE := "005C0A0A0002" +WlanInformationAPI_Pixits.PX_MAC_ID := "005C07070707" +WlanInformationAPI_Pixits.PX_ASSOC_STA_SUBSCRIPTION_CALLBACK := "http://yanngarcia.ddns.net/wais/v2/assoc_sta" + +[LOGGING] +# In this section you can specify the name of the log file and the classes of events +# you want to log into the file or display on console (standard error). + +LogFile := "../logs/AtsMec_WlanInformation/%e.%h-%r.%s" +FileMask := LOG_ALL | USER | DEBUG | MATCHING +ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING +#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT +#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT +LogSourceInfo := Stack +LogEntityName:= Yes +LogEventTypes:= Yes +#TimeStampFormat := DateTime + +[TESTPORT_PARAMETERS] +# In this section you can specify parameters that are passed to Test Ports. +system.httpPort.params := "HTTP(codecs=json:json_codec_mec028)/TCP(debug=1,server=mec-platform.etsi.org,port=443,use_ssl=1,trusted_ca_list=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/yann/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)" +system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec028)/TCP(debug=1,server_mode=1,use_ssl=0)" + +[DEFINE] +# In this section you can create macro definitions, +# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE]. + +[INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[ORDERED_INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[EXTERNAL_COMMANDS] +# This section can define external commands (shell scripts) to be executed by the ETS +# whenever a control part or test case is started or terminated. + +#BeginTestCase := "" +#EndTestCase := "" +#BeginControlPart := "" +#EndControlPart := "" + +[EXECUTE] +# In this section you can specify what parts of your test suite you want to execute. +#AtsMec_TestControl.control + +# Need to activate a network scenario with Wi-Fi POA + +# Check that the IUT responds with the list of WLAN Access Point +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_001_OK +# Check that the IUT responds with the list of WLAN Access Point filtered by the macId provided as query parameter +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_002_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_002_BR +# Check that the IUT responds with the list of Station Point +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_003_OK +# Check that the IUT responds with the list of Station Point filtered by the macId provided as query parameter +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_004_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_004_BR +# Check that the IUT responds with the requested list of subscription +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_005_OK +# Check that the IUT responds with the requested list of subscription when the MEC Platform is queried using a filter on subscription type +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_006_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_006_BR +# Check that the IUT responds with an error when a request with not existing parameters is sent +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_006_NF +# Check that the IUT responds with a Notification Subscription +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_007_OK +# Check that the IUT responds with an error when an invalid Subscription request is sent +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_007_BR +# Check that the IUT responds with an error when a request with not existing parameters is sent +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_007_NF +# Check that the IUT responds with the list of Subscription +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_008_OK +# Check that the IUT responds with an error when a request for existing subscription with incorrect parameters is sent +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_008_NF +# Check that the IUT responds with a Notification Subscription when it is modified +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_009_OK +# Check that the IUT responds with an error when an invalid field is set in the subscription modification request +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_009_BR +# Check that the IUT responds with an error when an unknown subscription modification request +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_009_NF +# Check that the IUT responds with 204 when an existing subscription is correctly deleted +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_010_OK +# Check that the IUT responds with an error when an not existing subscription cannot be deleted +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_010_NF +# Check that the IUT sends a notification about WLAN event notification if the MEC service has an associated subscription and the event is generated +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_011_OK +# Check that the IUT responds with the list of WLAN Access Point +AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_012_OK +# Check that the IUT responds with a new measurement configuration +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_013_OK +# Check that the IUT responds with an error when an invalid request is sent +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_013_BR +# Check that the IUT responds with the specified measurement configuration +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_014_OK +# Check that the IUT responds with an error when an invalid request is sent +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_014_NF +# Check that the IUT responds with the modified measurement configuration +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_015_OK +# Check that the IUT responds with an error when an invalid request is sent +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_015_NF +# Check that the IUT responds with with 204 when requested to delete the specified measurement configuration +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_016_OK +# Check that the IUT responds with an error when an invalid request is sent +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_016_NF + +[GROUPS] +# In this section you can specify groups of hosts. These groups can be used inside the +# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. + +[COMPONENTS] +# This section consists of rules restricting the location of created PTCs. + +[MAIN_CONTROLLER] +# The options herein control the behavior of MC. +KillTimer := 10.0 +LocalAddress := 127.0.0.1 +TCPPort := 12000 +NumHCs := 1 diff --git a/gs032p3-ttcn-test-suite.code-workspace b/gs032p3-ttcn-test-suite.code-workspace new file mode 100644 index 0000000000000000000000000000000000000000..5d037498b5f2d53a4124c3341698423887f3fd8b --- /dev/null +++ b/gs032p3-ttcn-test-suite.code-workspace @@ -0,0 +1,84 @@ +{ + "folders": [ + { + "path": "." + }, + { + "path": "../gs032p2-test-purposes" + }, + { + "path": "../eurecom" + }, + { + "path": "../gs032p3-robot-test-suite" + } + ], + "settings": { + "files.associations": { + "array": "cpp", + "bit": "cpp", + "*.tcc": "cpp", + "bitset": "cpp", + "cctype": "cpp", + "chrono": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "condition_variable": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdint": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstring": "cpp", + "ctime": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "deque": "cpp", + "map": "cpp", + "unordered_map": "cpp", + "vector": "cpp", + "exception": "cpp", + "fstream": "cpp", + "functional": "cpp", + "initializer_list": "cpp", + "iomanip": "cpp", + "iosfwd": "cpp", + "iostream": "cpp", + "istream": "cpp", + "limits": "cpp", + "memory": "cpp", + "memory_resource": "cpp", + "new": "cpp", + "optional": "cpp", + "ostream": "cpp", + "ratio": "cpp", + "regex": "cpp", + "shared_mutex": "cpp", + "sstream": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "string": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "type_traits": "cpp", + "tuple": "cpp", + "typeinfo": "cpp", + "utility": "cpp", + "atomic": "cpp", + "codecvt": "cpp", + "compare": "cpp", + "concepts": "cpp", + "set": "cpp", + "algorithm": "cpp", + "iterator": "cpp", + "numeric": "cpp", + "random": "cpp", + "mutex": "cpp", + "numbers": "cpp", + "semaphore": "cpp", + "stop_token": "cpp", + "thread": "cpp", + "cinttypes": "cpp" + } + } +} \ No newline at end of file diff --git a/install.sh b/install.sh new file mode 100755 index 0000000000000000000000000000000000000000..c8048c944363e79c8c8f17320cfb98d3d726fdf2 --- /dev/null +++ b/install.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +#set -e +set -vx + +BASE_PATH=`pwd` + +git submodule update --init --recursive --remote + +if [ ! -d ./titan-test-system-framework ] +then + git clone --recurse-submodules --branch devel https://labs.etsi.org/rep/cti-tools/titan-test-system-framework.git + cd ./titan-test-system-framework +else + cd ./titan-test-system-framework + git checkout devel +fi +cd ./ttcn/LibHttp +ln -f module_mec.mk module.mk + +cd $BASE_PATH +ln -f ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/ + +exit 0 diff --git a/plantuml/README.md b/plantuml/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/plantuml/__main__.py b/plantuml/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..69134aa9d62290195f2864ea48d8fa7f11cc7e9d --- /dev/null +++ b/plantuml/__main__.py @@ -0,0 +1,186 @@ +# -*- Coding: utf-8 -*- + +from __future__ import division # Import floating-point division (1/4=0.25) instead of Euclidian division (1/4=0) + +import os +import glob +import sys +import logging + +from regex_list import * + +MSG_PATH = "" +IN_FILE_PATH = "" +OUT_FILE_PATH = "" +out_streams = object() +logger = object() +parser = object() +data_ctx = dict() + +def process_command_line_args(): + global IN_FILE_PATH + + print(f"Arguments count: {len(sys.argv)}") + for i, arg in enumerate(sys.argv): + print(f"Argument {i:>6}: {arg}") + IN_FILE_PATH = sys.argv[1] + # End of function process_command_line_args + +def process_line(line): + global MSG_PATH, out_streams, logger, parser, data_ctx + + match = parser.parse_line(line) + if match != None: + logger.info(f"Matching: {match}") + if 'testcase' in match: + logger.info('Got testcase') + out_streams.write('@startuml\n') + out_streams.write(f"title {match['testcase']}\n") + out_streams.write("/'Editor: https://plantuml-editor.kkeisuke.com/ '/\n") + out_streams.write("/'Syntax: http://plantuml.com/fr/sequence-diagram '/\n") + out_streams.write('!include etsi-style.iuml\n') + out_streams.write('!pragma teoz true\n') + out_streams.write('autonumber\n') + out_streams.write('participant system\n') + out_streams.write('box "TTCN-3 Environment" #LightBlue\n') + elif 'operation' in match: + logger.info('Got operation') + if match['operation'] == 'mapped': + out_streams.write(f"participant \"{match['comp']}:{match['protocol_port']}\"\n") + data_ctx['protocol_port'].append(f"{match['comp']}:{match['protocol_port']}") + else: + if match['protocol_port'] != 'syncPort': + out_streams.write(f"\"{match['comp']}:{match['protocol_port']}\" --> system: unmap\n") + elif 'request' in match: + logger.info('Got request') + if data_ctx['box_ended'] == False: + out_streams.write('endbox\n') + data_ctx['box_ended'] = True + for p in data_ctx['protocol_port']: + out_streams.write(f"\"{p}\" --> system: map\n") + out_streams.write(f"\"{match['comp']}:{match['port']}\" -[#green]> system: @{match['module']}.{match['message']}\n") + s = match['request'].replace(",", ",\\n").replace("\"", "").strip() + if len(s) > 128: + n = match['hours'] + "_" + match['minutes'] + "_" + match['seconds'] + "_" + match['milliseconds'] + ".txt" + n = os.path.join(MSG_PATH, n) + with open(n, "w") as msg: + msg.write(s) + s = f'[[file://{n} request := ...]]' #{Click to read the message} + out_streams.write(f"note right: {s}\n") + out_streams.write(f"note left: {match['hours']}:{match['minutes']}:{match['seconds']}.{match['milliseconds']}\n") + elif 'response' in match: + logger.info('Got response') + if data_ctx['box_ended'] == False: + out_streams.write('endbox\n') + data_ctx['box_ended'] = True + out_streams.write(f"system -[#green]> \"{match['comp']}:{match['port']}\": @{match['module']}.{match['message']}\n") + s = match['response'].replace(",", ",\\n").replace("\"", "").strip() + if len(s) > 128: + n = match['hours'] + "_" + match['minutes'] + "_" + match['seconds'] + "_" + match['milliseconds'] + ".txt" + n = os.path.join(MSG_PATH, n) + with open(n, "w") as msg: + msg.write(s) + s = f'[[file://{n} response := ...]]' #{Click to read the message} + out_streams.write(f"note right: {s}\n") + out_streams.write(f"note left: {match['hours']}:{match['minutes']}:{match['seconds']}.{match['milliseconds']}\n") + elif 'timer_name' in match: + logger.info('Got timer') + if match['timer_name'] == 'tc_sync': + pass + else: + for p in data_ctx['protocol_port']: + if p.startswith(match['comp']): + out_streams.write(f"\"{p}\" -> \"{p}\": {match['start_stop']}, duration: {match['duration']}\n") + break + out_streams.write(f"note left: {match['hours']}:{match['minutes']}:{match['seconds']}.{match['milliseconds']}\n") + elif 'verdict' in match: + logger.info('Got verdict') + if 'ptcid' in match and match['ptcid'] != None: + s = match['ptcid'].split('(') + s = s[1].split(')') + for p in data_ctx['protocol_port']: + if p.startswith(s[0]): + if match['verdict'] == 'fail': + out_streams.write(f"hnote over \"{p}\" #red: fail\n") + elif match['verdict'] == 'pass': + out_streams.write(f"hnote over \"{p}\" #green: pass\n") + elif match['verdict'] == 'inconc': + out_streams.write(f"hnote across #yellow: inconc\n") + else: + out_streams.write(f"hnote over \"{p}\" #gray: error\n") + out_streams.write(f"note left: {match['hours']}:{match['minutes']}:{match['seconds']}.{match['milliseconds']}\n") + break + elif 'final_verdict' in match: + logger.info('Got verdict') + if match['final_verdict'] == 'fail': + out_streams.write(f"hnote across #red: fail\n") + elif match['final_verdict'] == 'pass': + out_streams.write(f"hnote across #green: pass\n") + elif match['final_verdict'] == 'inconc': + out_streams.write(f"hnote across #yellow: inconc\n") + else: + out_streams.write(f"hnote across #gray: error\n") + out_streams.write(f"note left: {match['hours']}:{match['minutes']}:{match['seconds']}.{match['milliseconds']}\n") + else: + logger.info('Got unsupported item') + # End of 'if' statement + out_streams.flush() + # End of function process_line + +def main(): + global MSG_PATH, OUT_FILE_PATH, out_streams, logger, parser, data_ctx + + process_command_line_args() + + # Initialize the logger + logger = logging.getLogger(__name__) + logger.setLevel(logging.DEBUG) + l = logging.StreamHandler() + l.setFormatter(logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')) + logger.addHandler(l) + + # Prepare outputs + OUT_FILE_PATH = sys.argv[2] + CURRENT_PATH = os.getcwd() + MSG_PATH = os.path.join(CURRENT_PATH, "msgs") + logger.info(f'CURRENT_PATH:{CURRENT_PATH} - MSG_PATH{MSG_PATH}') + if os.path.exists(MSG_PATH): + files = glob.glob(os.path.join(MSG_PATH, '*')) + for f in files: + os.remove(f) + else: + os.mkdir(MSG_PATH) + + # Setup the regex + parser = regex_list(logger) + parser.reset_state() + + data_ctx = dict() + data_ctx['protocol_port'] = [] + data_ctx['box_ended'] = False + + print(f"IN_FILE_PATH= {IN_FILE_PATH}") + with open(IN_FILE_PATH, "r") as in_stream: + with open(OUT_FILE_PATH, "w") as out_streams: + line = in_stream.readline() + while line != '': + process_line(line) + line = in_stream.readline() + # End of 'for' statement + # Add the end tag + out_streams.write('@enduml\n') + out_streams.flush() + # End of 'with' statement + # End of 'with' statement + + # Check if file is not empty + if os.path.getsize(OUT_FILE_PATH) == 0: + logger.error(f'Empty result, please check that FileMask is properly set: ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TIMEROP | TESTCASE') + else: + os.system('java -DPLANTUML_LIMIT_SIZE=8192 -jar ./plantuml.jar -svg {}'.format(OUT_FILE_PATH)) +# End of main function + +if __name__ == "__main__": + main() + +# End of file diff --git a/plantuml/__pycache__/__main__.cpython-38.pyc b/plantuml/__pycache__/__main__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..de40fb98efc4c82c6716c5aaa70ff4e71ed2479f Binary files /dev/null and b/plantuml/__pycache__/__main__.cpython-38.pyc differ diff --git a/plantuml/__pycache__/regex_list.cpython-38.pyc b/plantuml/__pycache__/regex_list.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3ba283603e4faf0bf80ab95cbc1fdd0fcb9cfe94 Binary files /dev/null and b/plantuml/__pycache__/regex_list.cpython-38.pyc differ diff --git a/plantuml/etsi-style.iuml b/plantuml/etsi-style.iuml new file mode 100644 index 0000000000000000000000000000000000000000..e26d257713d678a0011da52cb4400a16a1264b16 --- /dev/null +++ b/plantuml/etsi-style.iuml @@ -0,0 +1,46 @@ +hide footbox +autonumber +skinparam { + dpi 300 + shadowing false + 'handwritten true + defaultFontSize 8 +} + +skinparam note { + FontSize 8 + FontStyle bold + FontColor White + borderColor Black + backgroundColor DimGray +} + +skinparam participant { + FontSize 8 + FontStyle bold + FontColor White + borderColor Navy + backgroundColor RoyalBlue +} + +skinparam actor { + FontSize 8 + FontStyle bold + FontColor Navy + borderColor Navy + backgroundColor RoyalBlue +} + +skinparam sequence { + ArrowFontColor Black + ArrowColor SlateGray + LifeLineBorderColor Navy + LifeLineBackgroundColor DimGray +} + +skinparam ParticipantPadding 5 +skinparam BoxPadding 5 + +!define sendrcvRTP(a,b,c) a <-[#LimeGreen]> b : c +!define sendRTP(a,b,c) a -[#LimeGreen]> b : c +!define setParticipant(a,b) participant a as b diff --git a/plantuml/plantuml.jar b/plantuml/plantuml.jar new file mode 100644 index 0000000000000000000000000000000000000000..506b8c4b818bcb6f8ac254e898da44470cbad888 Binary files /dev/null and b/plantuml/plantuml.jar differ diff --git a/plantuml/regex_list.py b/plantuml/regex_list.py new file mode 100644 index 0000000000000000000000000000000000000000..ecd5fbc6b91347cad5cc1eb0430da2756da2e6f2 --- /dev/null +++ b/plantuml/regex_list.py @@ -0,0 +1,124 @@ +# -*- coding: utf-8 -*- +from __future__ import division # Import floating-point division (1/4=0.25) instead of Euclidian division (1/4=0) + +import logging +import re +import os +class regex_list(object): + """ + For testing purposes: https://regex101.com/ + """ + def __init__(self, p_logger): + self.__logger = p_logger + self.__state = 'none' + self.__flags = re.DOTALL | re.VERBOSE + self.__regexps = dict() + self.__regexps['exec_test'] = re.compile(r'^(?P\d+):(?P\d+):(?P\d+).(?P\d+)(\s((?Pmtc|\d+))){0,1}\sTESTCASE\s.*\sTest\scase\s(?P\w+)\sstarted\.$', self.__flags) + self.__regexps['map_port'] = re.compile(r'^(?P\d+):(?P\d+):(?P\d+).(?P\d+)(\s((?Pmtc|\d+))){0,1}\sPORTEVENT\s.*\sPort\s(?P\w+)\swas\s(?P\w+)\sto\s(?P\w+):(?P\w+)\.$', self.__flags) + self.__regexps['unmap_port'] = re.compile(r'^(?P\d+):(?P\d+):(?P\d+).(?P\d+)(\s((?Pmtc|\d+))){0,1}\sPORTEVENT\s.*\sPort\s(?P\w+)\swas\s(?P\w+)\sfrom\s(?P\w+):(?P\w+)\.$', self.__flags) + self.__regexps['messages'] = self.__regexps['unmap_port'] + self.__regexps['message_out'] = re.compile(r'^(?P\d+):(?P\d+):(?P\d+).(?P\d+)(\s((?Pmtc|\d+))){0,1}\sPORTEVENT\s.*\sSent\son\s(?P\w+)\sto\ssystem(\(.*\)){0,1}\s@(?P\w+).(?P\w+)\s:\s\{(?P.+)\}$', self.__flags) + self.__regexps['message_in'] = re.compile(r'^(?P\d+):(?P\d+):(?P\d+).(?P\d+)(\s((?Pmtc|\d+))){0,1}\sPORTEVENT\s.*\sMessage\senqueued\son\s(?P\w+)\sfrom\ssystem\s@(?P\w+).(?P\w+)\s:\s\{(?P.+)\}\sid\s\w+$', self.__flags) + self.__regexps['timer'] = re.compile(r'^(?P\d+):(?P\d+):(?P\d+).(?P\d+)(\s((?Pmtc|\d+))){0,1}\sTIMEROP\s.*\s(?P\w+)\stimer\s(?P\w+):\s(?P\w+).*$', self.__flags) + self.__regexps['final_verdict'] = re.compile(r'^(?P\d+):(?P\d+):(?P\d+).(?P\d+)(\s((?Pmtc|\d+))){0,1}\sTESTCASE\s.*\sTest\scase\s(.+)\sfinished\.\sVerdict:\s(?P\w+)$', self.__flags) + self.__regexps['verdict'] = re.compile(r'^(?P\d+):(?P\d+):(?P\d+).(?P\d+)(\s((?Pmtc|\d+))){0,1}\sVERDICTOP\s.*\sLocal\sverdict\sof\s(MTC|PTC)(\s(?P.+)){0,1}:\s(?P\w+).*$', self.__flags) + # End of __init__ class + + def reset_state(self): + self.__state = 'exec_test' + self.__logger.info('Reset state: ' + self.__state) + # End of reset_state + + def parse_line(self, p_line): + self.__logger.debug('>>> regex_list::parse_line: ' + self.__get_state()) + self.__logger.debug('regex_list::parse_line: ' + p_line) + + if self.__get_state() == 'exec_test': + m = self.__regexps[self.__state].match(p_line) + if m: + self.__set_next_state() + return m.groupdict() + elif self.__get_state() == 'map_port': + m = self.__regexps[self.__state].match(p_line) + if m: + return m.groupdict() + else: # In map_port, check for TTCN-3 message sent ('message_out') and received ('message_in') + m = self.__regexps['message_out'].match(p_line) + if m: + self.__set_next_state() + return m.groupdict() + else: + m = self.__regexps['message_in'].match(p_line) + if m: + self.__set_next_state() + return m.groupdict() + else: + m = self.__regexps['timer'].match(p_line) + if m: + return m.groupdict() + elif self.__get_state() == 'messages': + m = self.__regexps[self.__state].match(p_line) + if m: + self.__set_next_state() + return m.groupdict() + else: # Check for TTCN-3 message sent ('message_out') and received ('message_in') + m = self.__regexps['message_out'].match(p_line) + if m: + return m.groupdict() + else: + m = self.__regexps['message_in'].match(p_line) + if m: + return m.groupdict() + else: + m = self.__regexps['timer'].match(p_line) + if m: + return m.groupdict() + elif self.__get_state() == 'unmap_port': + m = self.__regexps[self.__state].match(p_line) + if m: + return m.groupdict() + else: # In unmap_port, check for final_verdict + m = self.__regexps['verdict'].match(p_line) + if m: + self.__set_next_state() + return m.groupdict() + elif self.__get_state() == 'verdict' or self.__get_state() == 'final_verdict': + m = self.__regexps['verdict'].match(p_line) + if m: + return m.groupdict() + else: + m = self.__regexps['final_verdict'].match(p_line) + if m: + self.__set_next_state() + return m.groupdict() + return None + # End of method parse_line + + def __set_next_state(self): + if self.__state == 'exec_test': + self.__logger.info('regex_list::parse_line: Set state to map_port') + self.__state = 'map_port' + elif self.__state == 'map_port': + self.__logger.info('regex_list::parse_line: Set state to messages') + self.__state = 'messages' + elif self.__state == 'messages': + self.__logger.info('regex_list::parse_line: Set state to unmap_port') + self.__state = 'unmap_port' + elif self.__state == 'unmap_port': + self.__logger.info('regex_list::parse_line: Set state to verdict') + self.__state = 'verdict' + elif self.__state == 'verdict': + self.__logger.info('regex_list::parse_line: Set state to final_verdict') + self.__state = 'final_verdict' + elif self.__state == 'final_verdict': + self.__logger.info('regex_list::parse_line: Terminated') + self.reset_state() + # End of method __set_next_state + + def __get_state(self): + return self.__state + # End of method __get_state + +# End of class regex_list + +# End of file diff --git a/scripts/build_titan.bash b/scripts/build_titan.bash index 7305264aa49162fdc94336b596148d6ebb2da978..9d39632ab48255e2ed3ec1e21f67235a07bf108c 100755 --- a/scripts/build_titan.bash +++ b/scripts/build_titan.bash @@ -87,6 +87,9 @@ DEBUG:=no GEN_PDF:=no EOF +# To prevent link error /usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command lineema +sed --in-place 's/LINUX_LIBS := -lxml2/LINUX_LIBS := -lxml2 -lpthread/g' ./core/Makefile + echo "Starting build..." make clean if [ "${OSTYPE}" == "cygwin" ] diff --git a/scripts/devenv.bash.debian b/scripts/devenv.bash.debian index c6a9aaa760e99b77b8176a4b8867af032d8bf6a8..3954023022c3ecaae5adb797b9f65d34014d2616 100755 --- a/scripts/devenv.bash.debian +++ b/scripts/devenv.bash.debian @@ -57,11 +57,13 @@ then export TTCN3_LICENSE_FILE=${TTCN3_DIR}/etc/license/license.dat export PATH_DEV_TTCN=${HOME}/dev/ttcn3 # ITS support - export PATH_DEV_ITS=${HOME}/dev/etsi_its + export PATH_DEV_ITS=${HOME}/dev/TS.ITS # Emergency Communication support - export PATH_DEV_EMCOM=${HOME}/dev/etsi_emcom + export PATH_DEV_EMCOM=${HOME}/dev/NG112 # Mobile-Edge Computing support - export PATH_DEV_MEC=${HOME}/dev/etsi_mec + export PATH_DEV_MEC=${HOME}/dev/gs032p3-ttcn-test-suite + # CDM/CISE support + export PATH_DEV_MEC=${HOME}/dev/cise # Validation folder export VALIDATION_DIR=${HOME} fi diff --git a/scripts/devenv.bash.ubuntu b/scripts/devenv.bash.ubuntu index 06d2da6002345aee624bfbcdcf4e498929c5cb91..254cc37f0994b24a461c14791d3ec14c4336a3a2 100755 --- a/scripts/devenv.bash.ubuntu +++ b/scripts/devenv.bash.ubuntu @@ -59,11 +59,13 @@ then export TTCN3_LICENSE_FILE=${TTCN3_DIR}/etc/license/license.dat export PATH_DEV_TTCN=${HOME}/dev/ttcn3 # ITS support - export PATH_DEV_ITS=${HOME}/dev/etsi_its + export PATH_DEV_ITS=${HOME}/dev/TS.ITS # Emergency Communication support - export PATH_DEV_EMCOM=${HOME}/dev/etsi_emcom + export PATH_DEV_EMCOM=${HOME}/dev/NG112 # Mobile-Edge Computing support - export PATH_DEV_MEC=${HOME}/dev/etsi_mec + export PATH_DEV_MEC=${HOME}/dev/gs032p3-ttcn-test-suite + # CDM/CISE support + export PATH_DEV_MEC=${HOME}/dev/cise # Validation folder export VALIDATION_DIR=${HOME} fi diff --git a/scripts/generate_png.sh b/scripts/generate_png.sh new file mode 100755 index 0000000000000000000000000000000000000000..37b46baa5ad5a4e0bba0dc0e876c0bfb1d1bd736 --- /dev/null +++ b/scripts/generate_png.sh @@ -0,0 +1,17 @@ +#!/bin/bash +#set -e +#set -vx + +clear + +if [ -z $ATS ] +then + echo "ATS shall be defined" + exit 1 +fi + +cd ../plantuml/ +python3 . ../logs/${ATS}/merged.log ./${ATS}.txt +cd - + +exit 0 diff --git a/scripts/run_all.bash b/scripts/run_all.bash index fd921d1d2e4f1fa52576d00074cbce890a9c8ad2..f5fe4490ed33e548810b911615a0299df7d2a264 100755 --- a/scripts/run_all.bash +++ b/scripts/run_all.bash @@ -49,7 +49,10 @@ do done sleep 1 - mv ../logs/$ATS/merged.log ../logs/$ATS/merged.`date +'%Y%m%d%S'`.log + if [ -f ../logs/$ATS/merged_formated.log ] + then + mv ../logs/$ATS/merged_formated.log ../logs/$ATS/merged.`date +'%Y%m%d%S'`.log + fi done exit 0 diff --git a/scripts/run_mtc.bash b/scripts/run_mtc.bash index 0559a9eaa0bd77cbbbdbd85f61678d8367e14861..e2255124147fb86b02e580a4992ec7ea013ab1c0 100755 --- a/scripts/run_mtc.bash +++ b/scripts/run_mtc.bash @@ -42,7 +42,6 @@ if [ "${TITAN_LOG_DIR}" != "" ] then ttcn3_logmerge -o ${TITAN_LOG_DIR}/merged.log ${LOG_FILES} ttcn3_logformat -o ${TITAN_LOG_DIR}/merged_formated.log ${TITAN_LOG_DIR}/merged.log - mv ${TITAN_LOG_DIR}/merged_formated.log ${TITAN_LOG_DIR}/merged.log echo "log files were merged into ${TITAN_LOG_DIR}/merged.log" fi diff --git a/simu/_Getch.py b/simu/_Getch.py deleted file mode 100644 index 62426380a1a64c5b911022e71ddb79c43ba7b075..0000000000000000000000000000000000000000 --- a/simu/_Getch.py +++ /dev/null @@ -1,41 +0,0 @@ - - -class _Getch: - """Gets a single character from standard input. Does not echo to the -screen.""" - def __init__(self): - try: - self.impl = _GetchWindows() - except ImportError: - self.impl = _GetchUnix() - - def __call__(self): return self.impl() - -class _GetchUnix: - def __init__(self): - import tty, sys - - def __call__(self): - import sys, tty, termios - fd = sys.stdin.fileno() - old_settings = termios.tcgetattr(fd) - try: - tty.setraw(sys.stdin.fileno()) - ch = sys.stdin.read(1) - finally: - termios.tcsetattr(fd, termios.TCSADRAIN, old_settings) - return ch - -class _GetchWindows: - def __init__(self): - import msvcrt - - def __call__(self): - import msvcrt - while msvcrt.kbhit(): - msvcrt.getch() - ch = msvcrt.getch() - while ch in b'\x00\xe0': - msvcrt.getch() - ch = msvcrt.getch() - return ch.decode() diff --git a/simu/data/access_point_list.csv b/simu/data/access_point_list.csv deleted file mode 100644 index ce83101402e7d3ed5fce5e35b1d0b71d60474f63..0000000000000000000000000000000000000000 --- a/simu/data/access_point_list.csv +++ /dev/null @@ -1,7 +0,0 @@ -accessPointId,zoneId,connectionType,operationStatus,numberOfUsers,interestRealm,resourceURL -001010000000000000000000000000001,zone01,Macro,Serviceable,5,LA,http://example.com/exampleAPI/location/v1/zones/zone01/accessPoints/ap001 -001010000000000000000000000000010,zone01,Macro,Unserviceable,0,DC,http://example.com/exampleAPI/location/v1/zones/zone01/accessPoints/ap002 -001010000000000000000000000000011,zone01,Macro,Serviceable,5,NJ,http://example.com/exampleAPI/location/v1/zones/zone01/accessPoints/ap003 -002010000000000000000000000000001,zone02,Macro,Serviceable,5,LA,http://example.com/exampleAPI/location/v1/zones/zone02/accessPoints/ap001 -002010000000000000000000000000010,zone02,Macro,Unserviceable,0,DC,http://example.com/exampleAPI/location/v1/zones/zone02/accessPoints/ap002 -002010000000000000000000000000011,zone02,Macro,Serviceable,5,NJ,http://example.com/exampleAPI/location/v1/zones/zone02/accessPoints/ap003 diff --git a/simu/data/associated.csv b/simu/data/associated.csv deleted file mode 100644 index f4f9131b32127d6baefe0a9f23bc5fa8fa156b90..0000000000000000000000000000000000000000 --- a/simu/data/associated.csv +++ /dev/null @@ -1,3 +0,0 @@ -cellId,appInst,type,address -134217738,appInst01,1,192.0.0.1 -134217739,appInst02,1,192.0.0.2 diff --git a/simu/data/cells.csv b/simu/data/cells.csv deleted file mode 100644 index 2ba84522be7378cfd898adfeea4b87fd110d7f4a..0000000000000000000000000000000000000000 --- a/simu/data/cells.csv +++ /dev/null @@ -1,3 +0,0 @@ -cellId,mcc,mnc,hoStatus,seconds,nanoseconds -134217738,1,1,COMPLETED,1577836800,0 -134217739,1,1,COMPLETED,1577836800,0 diff --git a/simu/data/location_info.csv b/simu/data/location_info.csv deleted file mode 100644 index 06afa5bb1263ee4cd692de326648242f317039fd..0000000000000000000000000000000000000000 --- a/simu/data/location_info.csv +++ /dev/null @@ -1,4 +0,0 @@ -accessPointId,latitude,longitude,altitude,accuracy -001010000000000000000000000000001,90.123,80.123,10.0,0 -001010000000000000000000000000010,91.123,81.123,12.0,1 -001010000000000000000000000000011,93.123,83.123,16.0,3 diff --git a/simu/data/security.csv b/simu/data/security.csv deleted file mode 100644 index 0347ad324659fd88381d08aa6b8652ed1539be26..0000000000000000000000000000000000000000 --- a/simu/data/security.csv +++ /dev/null @@ -1,2 +0,0 @@ -id,grantTypes,tokenEndpoint -security0,OAUTH2_CLIENT_CREDENTIALS,/meMp1/security/TokenEndPoint diff --git a/simu/data/subscribers.csv b/simu/data/subscribers.csv deleted file mode 100644 index ab026929534cadb88b9221ccdb536f4df7594814..0000000000000000000000000000000000000000 --- a/simu/data/subscribers.csv +++ /dev/null @@ -1,6 +0,0 @@ -id,address,accessPointId,zoneId,resourceURL,seconds,nanoSeconds,ueTag -toto1,acr:192.0.0.1,001010000000000000000000000000001,zone01,http://example.com/exampleAPI/location/v2/users?address:acr:192.0.0.1,1483231138,0,UeTagA -toto2,acr:192.0.2.2,001010000000000000000000000000001,zone01,http://example.com/exampleAPI/location/v1/users?address:acr:192.0.2.2,1483231138,0,UeTagB -toto3,acr:192.0.2.3,001010000000000000000000000000010,zone01,http://example.com/exampleAPI/location/v1/users?address:acr:192.0.2.3,1483231138,0,UeTagC -toto4,acr:192.0.2.4,001010000000000000000000000000001,zone02,http://example.com/exampleAPI/location/v1/users?address:acr:192.0.2.4,1483231138,0,UeTagD -toto5,acr:192.0.2.5,001010000000000000000000000000010,zone02,http://example.com/exampleAPI/location/v1/users?address:acr:192.0.2.5,1483231138,0,UeTagE diff --git a/simu/data/subscriptions.csv b/simu/data/subscriptions.csv deleted file mode 100644 index b7cc6dae614e9fccd0600d3f5b90fcbe6f7f0b1d..0000000000000000000000000000000000000000 --- a/simu/data/subscriptions.csv +++ /dev/null @@ -1 +0,0 @@ -subscription_id,corr_id,address,callback,ue_event_criteria,resourceURL diff --git a/simu/data/traffic_rules.csv b/simu/data/traffic_rules.csv deleted file mode 100644 index 7bb9d8f09d15b84d3b81b62a64d14c417fe6476d..0000000000000000000000000000000000000000 --- a/simu/data/traffic_rules.csv +++ /dev/null @@ -1 +0,0 @@ -trafficRuleId,filterType,priority,trafficFilter,action,dstInterface,state diff --git a/simu/data/transport_info.csv b/simu/data/transport_info.csv deleted file mode 100644 index e5f71de4e0006b8e8e5d10149ea55fdb3114001e..0000000000000000000000000000000000000000 --- a/simu/data/transport_info.csv +++ /dev/null @@ -1,2 +0,0 @@ -transportId,name,description,type,protocol,version,endpoint,security,implSpecificInfo -TransId12345,REST,REST API,REST_HTTP,HTTP,2.0,{},security0,{} diff --git a/simu/data/ue_information_list.csv b/simu/data/ue_information_list.csv deleted file mode 100644 index fae914230902eb231ba6549c8405e215f73346e0..0000000000000000000000000000000000000000 --- a/simu/data/ue_information_list.csv +++ /dev/null @@ -1,6 +0,0 @@ -appInst,ueTag,address,state -appInst01,UeTagA,acr:192.0.0.1,UNREGISTERED -appInst01,UeTagC,acr:192.0.0.3,INVALID_STATE -appInst02,UeTagB,acr:192.0.0.2,UNREGISTERED -appInst03,UeTagD,acr:192.0.0.4,UNREGISTERED -appInst03,UeTagE,acr:192.0.0.5,UNREGISTERED diff --git a/simu/data/zones.csv b/simu/data/zones.csv deleted file mode 100644 index ebbbf6891a6dc0068dd5e93580f66dc5faba2296..0000000000000000000000000000000000000000 --- a/simu/data/zones.csv +++ /dev/null @@ -1,3 +0,0 @@ -zoneId,numberOfAccessPoints,numberOfUnserviceableAccessPoints,numberOfUsers,resourceURL -zone01,3,1,10,http://example.com/exampleAPI/location/v1/zones/zone01 -zone02,12,0,36,http://example.com/exampleAPI/location/v1/zones/zone02 diff --git a/simu/mec_database.py b/simu/mec_database.py deleted file mode 100644 index 75df61fce8b7699f9f26cb022b1d75f5508f64e3..0000000000000000000000000000000000000000 --- a/simu/mec_database.py +++ /dev/null @@ -1,435 +0,0 @@ -# Simulate MEC devices using Pandas database - -import os -import pandas as pd -from datetime import datetime, time - -class mec_database: - """ - TODO - """ - # Private properties - __path__ = '' # To be updated according to the local settings - __subscribers__ = None - __registered_list__ = None - __zones__ = None - __ue_information_list__ = None - __access_point_list__ = None - __location_info__ = None - __cells__ = None - __associated__ = None - __subscribions__ = None - __transport_info__ = None - __security__ = None - __traffic_rules__ = None - - def __init__(self): - """ Default ctor: Open Pandas database. """ - self.__path__ = os.path.join(os.getcwd(), 'data') - print('==> self.__path__=', self.__path__) - self.__zones__ = pd.DataFrame(pd.read_csv(os.path.join(self.__path__, 'zones.csv'), index_col = 'zoneId')) - self.__subscribers__ = pd.DataFrame(pd.read_csv(os.path.join(self.__path__, 'subscribers.csv'), index_col = 'address')) - self.__ue_information_list__ = pd.DataFrame(pd.read_csv(os.path.join(self.__path__, 'ue_information_list.csv'), index_col = ['appInst', 'ueTag'])) - self.__access_point_list__ = pd.DataFrame(pd.read_csv(os.path.join(self.__path__, 'access_point_list.csv'), index_col = 'accessPointId')) - self.__location_info__ = pd.DataFrame(pd.read_csv(os.path.join(self.__path__, 'location_info.csv'), index_col = 'accessPointId')) - self.__cells__ = pd.DataFrame(pd.read_csv(os.path.join(self.__path__, 'cells.csv'), encoding = 'utf-8', index_col = 'cellId')) - self.__associated__ = pd.DataFrame(pd.read_csv(os.path.join(self.__path__, 'associated.csv'), encoding = 'utf-8', index_col = 'cellId')) - self.__subscriptions__ = pd.DataFrame(pd.read_csv(os.path.join(self.__path__, 'subscriptions.csv'), encoding = 'utf-8', index_col = 'subscription_id')) - self.__transport_info__ = pd.DataFrame(pd.read_csv(os.path.join(self.__path__, 'transport_info.csv'), encoding = 'utf-8', index_col = 'transportId')) - self.__security__ = pd.DataFrame(pd.read_csv(os.path.join(self.__path__, 'security.csv'), encoding = 'utf-8', index_col = 'id')) - self.__traffic_rules__ = pd.DataFrame(pd.read_csv(os.path.join(self.__path__, 'traffic_rules.csv'), encoding = 'utf-8', index_col = 'trafficRuleId')) -# self.dump() - # End of __init__ - - def dump(self): - """ Dump database contents. For debug purpose only. """ - print("Subscribers: ", self.__subscribers__.head()) - print("Zones: ", self.__zones__.head()) - print("UEinformation", self.__ue_information_list__.head()) - print("AccessPoint: ", self.__access_point_list__.head()) - print("LocationInfo: ", self.__location_info__.head()) - print("Cells: ", self.__cells__.head()) - print("Associated: ", self.__associated__.head()) - print("subscriptions: ", self.__subscriptions__.head()) - print("transport_info: ", self.__transport_info__.head()) - print("security: ", self.__security__.head()) - print("traffic_rules: ", self.__traffic_rules__.head()) - # End of dump - - def __to_accessPoint__(self, p_access_point, p_location): - """ - Build an AccessPointLocation Json message. - Keyword arguments: - -- p_access_point: Access point identifier - -- p_location : Access point geographical location - """ - print(">>> __to_accessPoint__: ", p_access_point) - print("__to_accessPoint__: location= ", p_location['latitude'][0]) - i = 0.0 - resp = "{\"accessPointId\": \"" + p_access_point[0] + \ - "\",\"locationInfo\": {\"latitude\": " + str(p_location['latitude'][0]) + ",\"longitude\": " + str(p_location['longitude'][0]) + ",\"altitude\": " + str(p_location['altitude'][0]) + ",\"accuracy\": " + str(p_location['accuracy'][0]) + "}," \ - "\"connectionType\": \"" + p_access_point[2] + "\"," \ - "\"operationStatus\": \"" + p_access_point[3] + "\"," \ - "\"numberOfUsers\": " + str(p_access_point[4]) + "," \ - "\"interestRealm\": \"" + p_access_point[5] + "\"," \ - "\"resourceURL\": \"" + p_access_point[6] + "\"" \ - "}" - print("__to_accessPoint__: ", resp) - return resp - # End of __to_accessPoint__ - - def __to_zone__(self, p_zone): - """ - Build a Zones Json message. - Keyword arguments: - -- p_zone: Zone description - """ - print(">>> __to_zone__: ", p_zone) - resp = "{\t\"zoneId\": \"" + p_zone[0] + "\",\t\"numberOfAccessPoints\": \"" + str(p_zone[1]) + "\",\t\"numberOfUnserviceableAccessPoints\": \"" + str(p_zone[2]) + "\",\t\"numberOfUsers\": \"" + str(p_zone[3]) + "\",\t\"resourceURL\": \"" + p_zone[4] + "\"}" - print("__to_zone__: ", resp) - return resp - # End of __to_zone__ - - def __to_userInfo__(self, p_subscriber, p_location = None, p_contextLocationInfo = None): - """ Build a UserInfo Json message. """ - print(">>> __to_userInfo__: ", p_subscriber) - resp = "{\t\"address\": \"" + p_subscriber[0] + "\",\t\"accessPointId\": \"" + p_subscriber[2] + "\",\t\"zoneId\": \"" + p_subscriber[3] + "\",\t\"resourceURL\": \"" + p_subscriber[4] + "\"}" - print("__to_userInfo__: ", resp) - return resp - # End of __to_userInfo__ - - def __to_ueIdentityTagInfo__(self, p_ue_identity_tag, p_ue): - """ Build a ueIdentityTagInfo Json message. """ - print(">>> __to_ueIdentityTagInfo__: ", p_ue_identity_tag, ", ", p_ue) - resp = "{\t\"ueIdentityTagInfo\": {\t\"ueIdentityTags\": [{\t\"ueIdentityTag\": \"" + p_ue_identity_tag + "\",\t\"state\": \"" + p_ue[1] + "\"}]}}" - print("__to_ueIdentityTagInfo__: ", resp) - return resp - # End of __to_ueIdentityTagInfo__ - - def __to_subscriptions__(self, p_subscription): - """ Build the userTrackingSubscription response """ - print(">>> __to_subscriptions__: ", p_subscription) - resp = "\t{\"userTrackingSubscription\": {\t\"clientCorrelator\": \"" + p_subscription[1] + "\",\t\"callbackReference\": {\"notifyURL\": \"" + p_subscription[3] + "\"},\t\"address\": \"" + p_subscription[2] + "\",\t\"userEventCriteria\" : [" - resp += "\"" + p_subscription[4][0] + "\"" - i = 1 - while i < len(p_subscription[4]): - resp += ",\"" + p_subscription[4][i] + "\"" - i += 1 - # End of 'while' statement - resp += "],\t\"resourceURL\":\"" + p_subscription[5] + "\"\t}}" - print("__to_subscriptions__: ", resp) - return resp - # End of __to_subscriptions__ - - def __to_transport_info__(self, p_transport_info): - """ - Build a TransportInfo Json message. - Keyword arguments: - -- p_transport_info: TransportInfo description - """ - print(">>> __to_transport_info__: ", p_transport_info) -# print("__to_transport_info__: security id: ", p_transport_info[7]) - resp = "{{\t\"id\": \"TransId12345\",\"name\": \"REST\",\"description\": \"REST API\",\"type\": \"REST_HTTP\",\"protocol\": \"HTTP\",\"version\": \"2.0\",\"endpoint\": {},\"security\": {\"oAuth2Info\": {\"grantTypes\": [\"OAUTH2_CLIENT_CREDENTIALS\"],\"tokenEndpoint\": \"/meMp1/security/TokenEndPoint\"}\"},\"implSpecificInfo\": {}}" -# resp = None -# try: -# security = self.__security__.loc[self.__security__['id'] == p_transport_info[7]] -# print("__to_transport_info__: security= ", security) -# -# resp = "{\t\"id\": \"" + p_transport_info[0] + "\",\t\"name\": \"" + p_transport_info[1] + "\",\t\"description\": \"" + p_transport_info[2] + "\",\t\"type\": \"" + p_transport_info[3] + "\",\t\"protocol\": \"" + p_transport_info[4] + "\",\t\"version\": \"" + str(p_transport_info[5]) + "\",\t\"endpoint\": \"" + p_transport_info[6] + "\",\t\"security\": \"" + security + "\",\t\"implSpecificInfo\": \"" + p_transport_info[8] + "\"}" -# print("__to_transport_info__: ", resp) -# except KeyError: -# print("__to_transport_info__: No security entry") - return resp - # End of method __to_transport_info__ - - def __to_traffic_rule__(self, p_traffic_rule): - """ - Build a TrafficRule Json message. - Keyword arguments: - -- p_traffic_rule: TrafficRule description - """ - print(">>> __to_traffic_rule__: ", p_traffic_rule) - resp = "{\"trafficRuleId\": \"TrafficRule1\",\"filterType\": \"FLOW\",\"priority\": 1,\"trafficFilter\": [{\"srcAddress\": [\"192.168.1.1\"],\"dstAddress\": [\"192.168.1.1\"],\"srcPort\": [\"8080\"],\"dstPort\": [\"8080\"],\"protocol\": [ \"?\"],\"token\": [\"?\"],\"srcTunnelAddress\": [\"?\"],\"tgtTunnelAddress\": [\"?\"],\"srcTunnelPort\": [\"?\"],\"dstTunnelPort\": [\"?\"],\"qCI\": 1,\"dSCP\": 0,\"tC\": 1}],\"action\": \"DROP\",\"dstInterface\": {\"interfaceType\": \"TUNNEL\",\"tunnelInfo\": {\"tunnelType\": \"GTP_U\",\"tunnelDstAddress\": \"?\",\"tunnelSrcAddress\": \"?\"},\"srcMacAddress\": \"02-00-00-00-00-00\",\"dstMacAddress\": \"02-00-00-00-00-00\",\"dstIpAddress\":\"192.0.2.0\"},\"state\":\"ACTIVE\"}" -# resp = None -# try: -# resp = "{\t\"id\": \"" + p_transport_info[0] + "\",\t\"name\": \"" + p_transport_info[1] + "\",\t\"description\": \"" + p_transport_info[2] + "\",\t\"type\": \"" + p_transport_info[3] + "\",\t\"protocol\": \"" + p_transport_info[4] + "\",\t\"version\": \"" + str(p_transport_info[5]) + "\",\t\"endpoint\": \"" + p_transport_info[6] + "\",\t\"security\": \"" + security + "\",\t\"implSpecificInfo\": \"" + p_transport_info[8] + "\"}" -# print("__to_transport_info__: ", resp) -# except KeyError: -# print("__to_transport_info__: No security entry") - return resp - # End of method __to_transport_info__ - - def __to_rni_subscriptions__(self, p_subscription, p_subscription_type): - """ Build a RNI subscription Json message. """ - print(">>> __to_rni_subscriptions__") - resp = "{\"CellChangeSubscription\": {\"subscriptionType\": \"" + p_subscription_type + "\",\"callbackReference\": \"http://meAppClient.example.com/rni/v2/notifications/cell_change/77777\", \"_links\": {\"self\": \"http://example.com/exampleAPI/rni/v2/subscriptions\"}, \"filterCriteria\": {\"appInsId\": \"01\", \"associateId\": [{\"type\": \"1\", \"value\": \"192.0.0.2\"}], \"plmn\": {\"mcc\": \"01\", \"mnc\": \"001\"}, \"cellId\": \"0x800000A\", \"hoStatus\": \"COMPLETED\"}, \"expiryDeadline\": {\"seconds\": 1577836800, \"nanoSeconds\": 0}}}" -# resp = "{\"CellChangeSubscription\": {\"callbackReference\": " + p_subscription['callbackReference'] + ", \"_links\": {\"self\": " + p_subscription['_links'] + "}, \"filterCriteria\": {\"appInsId\": " + p_subscription['filterCriteria']['appInsId'] + ", \"associateId\": [{\"type\": " + p_subscription['filterCriteria']['associateId']['type'] + ", \"value\": " + p_subscription['filterCriteria']['associateId']['value'] + "}], \"plmn\": {\"mcc\": " + p_subscription['filterCriteria']['plmn']['mcc'] + ", \"mnc\": " + p_subscription['filterCriteria']['plmn']['mnc'] + "}, \"cellId\": [" + p_subscription['filterCriteria']['cellId'] + "], 'hoStatus': " + p_subscription['filterCriteria']['hoStatus'] + "}, \"expiryDeadline\": {\"seconds\": " + p_subscription['expiryDeadline']['seconds'] + ", \"nanoSeconds\": \"" + p_subscription['expiryDeadline']['nanoSeconds'] + "}}" - print("__to_rni_subscriptions__: ", resp) - return resp - # end of __to_rni_subscriptions__ - - def getSubscriberList(self, p_uri): - """ Build a SubscriberList Json message. """ - print(">>> getSubscriberList") - resp = None - try: - resp = "{\"userList\": {\t\"user\": [\t" - for r in self.__subscribers__.itertuples(): - t = tuple(r) - resp += self.__to_userInfo__(t) + "," - # En of 'for' statement - resp = resp[: len(resp) - 1] - resp += "\t],\"resourceURL\": \"http://example.com" + p_uri + "\"}}" - print("getSubscriberList: ", resp) - except KeyError: - print("getSubscriberList: No subscriber list") - return resp - # End of getSubscriberList - - def getZoneList(self, p_uri): - print(">>> getZoneList") - resp = None - try: - resp = "{\"zoneList\": {\t\"zone\": [\t" - for r in self.__zones__.itertuples(): - t = tuple(r) - resp += self.__to_zone__(t) + "," - # En of 'for' statement - resp = resp[: len(resp) - 1] - resp += "\t],\"resourceURL\": \"http://example.com" + p_uri + "\"}}" - print("getZoneList: ", resp) - except KeyError: - print("getZoneList: No zones list") - return resp - # End of getZoneList - - def getAccessPointList(self, p_zone_id, p_uri): - print(">>> getAccessPointList") - resp = None - try: - r = self.__access_point_list__.loc[self.__access_point_list__['zoneId'] == p_zone_id] - print("getAccessPointList: r= ", r) - resp = "{\"accessPointList\": {\t\"zoneId\": \"" + p_zone_id + "\",\t\"accessPoint\": [\t" - for i in r.itertuples(): - t = tuple(i) - location = self.__location_info__.loc[[t[0]]] - resp += self.__to_accessPoint__(t, location) + "," - # En of 'for' statement - resp = resp[: len(resp) - 1] - resp += "\t],\"resourceURL\": \"http://example.com" + p_uri + "\"}}" - print("getAccessPointList: ", resp) - except KeyError: - print("getAccessPointList: No access point list") - return resp - # End of method getAccessPointList - - def getSubscriptionLinkList(self, p_uri): - s = p_uri.split('?') - return "{\"SubscriptionLinkList\": {\"_links\": {\"self\": \"http://example.com" + s[0] + "\"},\"subscription\": [{\"href\": \"http://meAppClient.example.com/rni/v1/notifications/cell_change/77777\",\"subscriptionType\": \"CELL_CHANGE\"},{\"href\": \"http://meAppClient.example.com/rni/v1/notifications/MeasTa/77777\",\"subscriptionType\": \"MEAS_TIMING_ADVANCE\"}]}}" - # End of method getSubscriptionLinkList - - def getMp1TransportInfoList(self): - print(">>> getMp1TransportInfoList") - resp = None - try: - resp = "{\"transportInfoList\": [\t" - for r in self.__transport_info__.itertuples(): - t = tuple(r) - resp += self.__to_transport_info__(t) + "," - # En of 'for' statement - resp = resp[: len(resp) - 1] - resp += "\t]}" - print("getMp1TransportInfoList: ", resp) - except KeyError: - print("getMp1TransportInfoList: No transportInfo list") - return resp - # End of method getMp1TransportInfo - - def getMp1TrafficRulesList(self): - print(">>> getMp1TrafficRulesList") - resp = None - try: - resp = "{\"TrafficRulesList\": [\t" - for r in self.__traffic_rules__.itertuples(): - t = tuple(r) - resp += self.__to_traffic_rule__(t) + "," - # En of 'for' statement - resp = resp[: len(resp) - 1] - resp += "\t]}" - print("getMp1TrafficRulesList: ", resp) - except KeyError: - print("getMp1TrafficRulesList: No TrafficRules list") - return resp - # End of method getMp1TrafficRules - - def getMp1TrafficRule(self): - print(">>> getMp1TrafficRule") - resp = None - try: - resp = "{\"TrafficRule\": [\t" - for r in self.__traffic_rule__.itertuples(): - t = tuple(r) - resp += self.__to_traffic_rule__(t) + "," - # En of 'for' statement - resp = resp[: len(resp) - 1] - resp += "\t]}" - print("getMp1TrafficRule: ", resp) - except KeyError: - print("getMp1TrafficRule: No TrafficRules list") - return resp - # End of method getMp1TrafficRules - - def getSubscriberFromAddress(self, p_ue_address): - print(">>> getSubscriberFromAddress: ", p_ue_address) - result = None - try: - r = tuple(self.__subscribers__.loc[[p_ue_address]].itertuples(index=True, name=''))[0] - print("getSubscriberFromAddress: Find subscriber with address ", p_ue_address, ": ", r) - result = "{\"userInfo\": " + self.__to_userInfo__(r) + "}" - except KeyError: - print("getSubscriberFromAddress: No subscriber with address ", p_ue_address) - return result - # End of method getSubscriberFromAddress - - def getSubscriberFromZoneId(self, p_zone_id, p_uri): - print(">>> getSubscriberFromZoneId: ", p_zone_id) - resp = None - try: - r = self.__subscribers__.loc[self.__subscribers__['zoneId'] == p_zone_id] - resp = "{\"userList\": {\t\"user\": [\t" - for i in r.itertuples(): - t = tuple(i) - resp += self.__to_userInfo__(t) + "," - # En of 'for' statement - resp = resp[: len(resp) - 1] - resp += "\t],\"resourceURL\": \"http://example.com" + p_uri + "\"}}" - print("getSubscriberFromZoneId: ", resp) - except KeyError: - print("getSubscriberFromZoneId: No subscriber in zone ", p_zone_id) - return resp - # End of method getSubscriberFromAddress - - def getUEidentityTagInfo(self, p_app_inst, p_ue_identity_tag): - print(">>> getUEidentityTagInfo: ", p_app_inst, ", ", p_ue_identity_tag) - resp = None - try: - r = tuple(self.__ue_information_list__.loc[p_app_inst, p_ue_identity_tag]) - print("getUEidentityTagInfo: Find zoneId for appInst: ", p_app_inst, ", r= ", r) - resp = self.__to_ueIdentityTagInfo__(p_ue_identity_tag, r) - print("getUEidentityTagInfo: ", resp) - except KeyError: - print("getUEidentityTagInfo: No UE for appInst ", p_app_inst) - return resp - # End of method getUEidentityTagInfo - - def getBwAllocationAppInst(self, p_app_inst, p_ue_identity_tag): - print(">>> getBwAllocationAppInst: ", p_app_inst, ", ", p_ue_identity_tag) - resp = None - resp = "{\"bwInfo\": {\"timeStamp\": {\"seconds\": 0,\"nanoSeconds\": 0},\"appInsId\": \"string\",\"requestType\": \"APPLICATION_SPECIFIC_BW_ALLOCATION\",\"sessionFilter\": [{\"sourceIp\": \"string\",\"sourcePort\": [\"string\"],\"dstAddress\": \"string\",\"dstPort\": [\"string\"],\"protocol\": \"string\"}],\"fixedBWPriority\": \"not defined in the present document\",\"fixedAllocation\": \"string\",\"allocationDirection\": \"00 = Downlink (towards the UE)\"}}" - print("getBwAllocationAppInst: ", resp) - return resp - # End of method getBwAllocationAppInst - - def registerUEidentity(self, p_app_inst, p_json_msg): - print(">>> registerUEidentity", p_json_msg) - if p_json_msg["state"] != "REGISTERED" and p_json_msg["state"] != "UNREGISTERED": - return '400 Bad Request' - resp = None - try: - # Check the record exists - r = tuple(self.__ue_information_list__.loc[p_app_inst, p_json_msg["ueIdentityTag"]]) - print("registerUEidentity: Find zoneId for appInst: ", p_app_inst, ", r= ", r) - if self.__ue_information_list__.loc[p_app_inst, p_json_msg["ueIdentityTag"]]['state'] == 'INVALID_STATE': - return '412 Precondition Failed' - self.__ue_information_list__.loc[p_app_inst, p_json_msg["ueIdentityTag"]]['state'] = p_json_msg["state"] - l = (p_json_msg["ueIdentityTag"], p_json_msg["state"]) - resp = self.__to_ueIdentityTagInfo__(p_json_msg["ueIdentityTag"], l) - except KeyError: - print("registerUEidentity: No appInst/UE ", p_app_inst, "/", p_ue_identity_tag) - return resp - # End of method registerUEidentity - - def registerSubscription(self, p_json_msg, p_uri): - print(">>> registerSubscription: ", p_json_msg, "/", p_uri) - resp = None - subscription_id = "subscription" + p_json_msg["clientCorrelator"] - try: - # Check the record does not exist - self.__subscriptions__.loc[self.__subscriptions__['subscription_id'] == subscription_id] - print("registerSubscription: There is a subscription for ", subscription_id) - except KeyError: - #print("registerSubscription: Add new row in subscription") - resource_url = "http://example.com" + p_uri + "/" + subscription_id - row = pd.Series({ 'subscription_id': subscription_id, 'corr_id': p_json_msg["clientCorrelator"], 'address': p_json_msg["address"], 'callback': p_json_msg["callbackReference"]["notifyURL"], 'ue_event_criteria': p_json_msg["userEventCriteria"], 'resourceURL': resource_url }) - #print("registerSubscription: row: ", row) - self.__subscriptions__ = self.__subscriptions__.append(row, ignore_index=True).reindex() - #print("registerSubscription: ", self.__subscriptions__.head()) - r = tuple(self.__subscriptions__.loc[self.__subscriptions__['subscription_id'] == subscription_id].to_records()) - #print("registerSubscription: New added row: ", r[0]) - resp = self.__to_subscriptions__(r[0]) - return resp - # End of registerSubscription - - def unregisterSubscription(self, p_subscription_id): - print(">>> unregisterSubscription: ", p_subscription_id) - resp = None - try: - # Check the record exists - r = self.__subscriptions__.loc[self.__subscriptions__['subscription_id'] == p_subscription_id] - t = tuple(r.to_records()) - print("unregisterSubscription: Find row: ", t) - resp = self.__to_subscriptions__(t[0]) - # Remove it - self.__subscriptions__.drop(r.index) - except KeyError: - print("unregisterSubscription: No subscription for ", p_subscription_id) - return resp - # End of unregisterSubscription - - def registerRniSubscription(self, p_json_msg): - print(">>> registerRniSubscription: ", p_json_msg) - resp = None - if p_json_msg['subscriptionType'] == 'CELL_CHANGE': - resp = self.__to_rni_subscriptions__(p_json_msg, 'CELL_CHANGE') - return resp - # End of registerRniSubscription - - def getRabInfo(self, p_cell_id): - print(">>> getRabInfo: ", p_cell_id) - resp = None - if p_cell_id == '0x8000099': - resp = "{\"problemDetails\": {\t\"type\": \"Not Found\",\t\"title\": \"RnisAPI\",\t\"status\": 404,\t\"detail\": \"Not Found\",\t\"instance\": \"string\"}}" - else: - resp = "{ \"RabInfo\": { \"timeStamp\": { \"seconds\": 1577836800, \"nanoSeconds\": 0 }, \"appInsId\": \"01\", \"requestId\": \"01\", \"cellUserInfo\": [ { \"ecgi\": { \"plmn\": { \"mcc\": \"001\", \"mnc\": \"01\" }, \"cellId\": \"" + p_cell_id + "\" }, \"ueInfo\": [ { \"associateId\": [ { \"type\": \"1\", \"value\": \"192.0.2.0\" } ], \"erabInfo\": [ { \"erabId\": 10 , \"erabQosParameters\": [ { \"qci\": 7, \"qosInformation\": [ { \"erabMbrDl\": 10, \"erabMbrUl\": 10, \"erabGbrDl\": 10, \"erabGbrUl\": 10 } ] } ] } ] } ] } ] } }" - return resp - # End of getRabInfo - - def getPlmnInfo(self, p_app_inst): - print(">>> getPlmnInfo: ", p_app_inst) - resp = None - if p_app_inst == '99': - resp = "{\"problemDetails\": {\t\"type\": \"Not Found\",\t\"title\": \"RnisAPI\",\t\"status\": 404,\t\"detail\": \"Not Found\",\t\"instance\": \"string\"}}" - else: - resp = "{ \"PlmnInfo\": { \"timeStamp\": { \"seconds\": 1577836800, \"nanoSeconds\": 0 }, \"appInsId\": \"" + p_app_inst + "\", \"plmn\": [ { \"mcc\": \"001\", \"mnc\": \"01\" } ] } }" - return resp - # End of getPlmnInfo - - def getS1BearerInfo(self, p_cell_id): - print(">>> getS1BearerInfo: ", p_cell_id) - resp = None - if p_cell_id == '0x8000099': - resp = "{\"problemDetails\": {\t\"type\": \"Not Found\",\t\"title\": \"RnisAPI\",\t\"status\": 404,\t\"detail\": \"Not Found\",\t\"instance\": \"string\"}}" - else: - resp = "{ \"S1BearerInfo\": { \"timeStamp\": { \"seconds\": 1577836800, \"nanoSeconds\": 0 }, \"s1UeInfo\": [ { \"tempUeId\": [ { \"mmec\": \"0\", \"mtmsi\": \"1234\" } ], \"associateId\": [ { \"type\": \"1\", \"value\": \"192.0.2.0\" }, { \"type\": \"3\", \"value\": \"198.51.100.0\" } ], \"ecgi\": [ { \"plmn\": { \"mcc\": \"001\", \"mnc\": \"01\" }, \"cellId\": \"0x800000A\" } ], \"s1BearerInfoDetailed\": [ { \"erabId\": 1, \"s1EnbInfo\": { \"ipAddress\": \"192.0.2.0\", \"tunnelId\": \"1111\" }, \"sGwInfo\": { \"ipAddress\": \"192.0.2.1\", \"tunnelId\": \"2222\" } } ] } ] } }" - return resp - # End of getS1BearerInfo - - def getL2MeasInfo(self, p_cell_id): - print(">>> getL2MeasInfo: ", p_cell_id) - resp = None - if p_cell_id == '0x8000099': - resp = "{\"problemDetails\": {\t\"type\": \"Not Found\",\t\"title\": \"RnisAPI\",\t\"status\": 404,\t\"detail\": \"Not Found\",\t\"instance\": \"string\"}}" - return resp - # End of getL2MeasInfo - -# End of class mec_database diff --git a/simu/mec_http_server.py b/simu/mec_http_server.py deleted file mode 100644 index 229dd28723722315b22887abe3b73a7cdeb3cbb1..0000000000000000000000000000000000000000 --- a/simu/mec_http_server.py +++ /dev/null @@ -1,528 +0,0 @@ -import http.server -import json -from mec_database import mec_database - -# This class will handles any incoming request from the browser -class myHandler(http.server.BaseHTTPRequestHandler): - __db__ = mec_database() - - def __init__(self, p_request, p_client_address, p_server): - super(http.server.BaseHTTPRequestHandler, self).__init__(p_request, p_client_address, p_server) - self.wfile._wbufsize = -1; - - # Handler for the GET requests - def do_GET(self): - print('>>> do_GET: ', self.path) - self.protocol_version = self.request_version - # Check HTTP end_headers - if self.__check_http_headers__() == False: - resp = "{\"problemDetails\": {\t\"type\": \"Bad Request\",\t\"title\": \"N/A\",\t\"status\": 400,\t\"detail\": \"Wrong headers\",\t\"instance\": \"N/A\"}}" - self.send_response(400, 'Bad Request') - self.send_header('Host', self.headers.get('Host')) # send_header() shall be after send_response() - self.send_header('Authorization', self.headers.get('Authorization')) - self.send_header('Connection', 'keep-alive') - self.send_header('Content-Type', 'application/problem+json') - l = len(resp) - self.send_header('Content-Length', str(l)) - self.end_headers() - self.wfile.write(bytes(resp, 'utf-8')) - return - - resp, content_type = self.__process__() - print('do_GET: resp= ', resp, ', Content_Type= ', content_type) - if (resp == None): - self.send_response(404, 'Not Found') - self.send_header('Host', self.headers.get('Host')) # send_header() shall be after send_response() - self.send_header('Authorization', self.headers.get('Authorization')) - self.send_header('Connection', 'keep-alive') - self.send_header('Content-Type', content_type) - self.send_header('Content-Length', '0') - self.end_headers() - else: - if resp.find('Not Found') != -1: - self.send_response(404, 'Not Found') - elif resp.find('Forbidden') != -1: - self.send_response(403, 'Forbidden') - elif resp.find('Bad Request') != -1: - self.send_response(400, 'Bad Request') - else: - self.send_response(200, 'OK') - self.send_header('Host', self.headers.get('Host')) # send_header() shall be after send_response() - self.send_header('Authorization', self.headers.get('Authorization')) - self.send_header('Connection', 'keep-alive') - self.send_header('Content-Type', content_type) - l = len(resp) - self.send_header('Content-Length', str(l)) - #self.end_headers() # Unable to bufferize wfile, so calling end_headers() headers and body are sent in 2 different TCP packets - self._headers_buffer.append(b"\r\n") - self._headers_buffer.append(bytes(resp, 'utf-8')) - self.wfile.write(b"".join(self._headers_buffer)) - self._headers_buffer = [] - #self.wfile.write(bytes(resp, 'utf-8')) - #self.wfile.flush() - print("<<< do_GET") - return - # End of do_GET - - # Handler for the POST requests - def do_POST(self): - print(">>> do_POST: ", self.path) - self.protocol_version = self.request_version - # Check HTTP end_headers - if self.__check_http_headers__() == False: - resp = "{\"problemDetails\": {\t\"type\": \"Bad Request\",\t\"title\": \"N/A\",\t\"status\": 400,\t\"detail\": \"Wrong headers\",\t\"instance\": \"N/A\"}}" - self.protocol_version = self.request_version - self.send_response(400, 'Bad Request') - self.send_header('Host', self.headers.get('Host')) - self.send_header('Authorization', self.headers.get('Authorization')) - self.send_header('Connection', 'keep-alive') - self.send_header('Content-Type', 'application/problem+json') - l = len(resp) - self.send_header('Content-Length', str(l)) - self.end_headers() - self.wfile.write(bytes(resp, 'utf-8')) - return - - resp, content_type = self.__process__() - print('do_POST: resp= ', resp, ', Content_Type= ', content_type) - if (resp == None): - self.send_response(404, 'Not Found') - self.send_header('Host', self.headers.get('Host')) # send_header() shall be after send_response() - self.send_header('Authorization', self.headers.get('Authorization')) - self.send_header('Connection', 'keep-alive') - self.send_header('Content-Type', content_type) - self.send_header('Content-Length', '0') - self.end_headers() - else: - if resp.find('Not Found') != -1: - self.send_response(404, 'Not Found') - resp = "" - elif resp.find('Forbidden') != -1: - self.send_response(403, 'Forbidden') - resp = "" - elif resp.find('Bad Request') != -1 or resp.find('Wrong parameters') != -1: - self.send_response(400, 'Bad Request') - elif resp.find('Precondition Failed') != -1: - self.send_response(412, 'Precondition Failed') - resp = "{\"problemDetails\": {\t\"type\": \"Precondition Failed\",\t\"title\": \"N/A\",\t\"status\": 412,\t\"detail\": \"Wrong preconditions\",\t\"instance\": \"N/A\"}}" - content_type = 'application/problem+json' - elif resp.find('userTrackingSubscription') != -1: - self.send_response(201, 'Created') - resp = "" - elif resp.find('CellChangeSubscription') != -1: - self.send_response(201, 'Created') - else: - self.send_response(200, 'OK') - self.send_header('Host', self.headers.get('Host')) # send_header() shall be after send_response() - self.send_header('Authorization', self.headers.get('Authorization')) - self.send_header('Connection', 'keep-alive') - self.send_header('Content-Type', content_type) - l = len(resp) - self.send_header('Content-Length', str(l)) - #self.end_headers() # Unable to bufferize wfile, so calling end_headers() headers and body are sent in 2 different TCP packets - self._headers_buffer.append(b"\r\n") - self._headers_buffer.append(bytes(resp, 'utf-8')) - self.wfile.write(b"".join(self._headers_buffer)) - self._headers_buffer = [] - #self.wfile.write(bytes(resp, 'utf-8')) - #self.wfile.flush() - print("<<< do_POST") - return - # End of do_POST - - # Handler for the PUT requests - def do_PUT(self): - print(">>> do_PUT: ", self.path) - self.protocol_version = self.request_version - # Check HTTP end_headers - if self.__check_http_headers__() == False: - resp = "{\"problemDetails\": {\t\"type\": \"Bad Request\",\t\"title\": \"N/A\",\t\"status\": 400,\t\"detail\": \"Wrong headers\",\t\"instance\": \"N/A\"}}" - self.protocol_version = self.request_version - self.send_response(400, 'Bad Request') - self.send_header('Host', self.headers.get('Host')) - self.send_header('Authorization', self.headers.get('Authorization')) - self.send_header('Connection', 'keep-alive') - self.send_header('Content-Type', 'application/problem+json') - l = len(resp) - self.send_header('Content-Length', str(l)) - self.end_headers() - self.wfile.write(bytes(resp, 'utf-8')) - return - - resp, content_type = self.__process__() - print('do_PUT: resp= ', resp, ', Content_Type= ', content_type) - if (resp == None): - self.send_response(404, 'Not Found') - self.send_header('Host', self.headers.get('Host')) # send_header() shall be after send_response() - self.send_header('Authorization', self.headers.get('Authorization')) - self.send_header('Connection', 'keep-alive') - self.send_header('Content-Type', content_type) - self.send_header('Content-Length', '0') - self.end_headers() - else: - if resp.find('Not Found') != -1: - self.send_response(404, 'Not Found') - resp = "" - elif resp.find('Forbidden') != -1: - self.send_response(403, 'Forbidden') - resp = "" - elif resp.find('Bad Request') != -1: - self.send_response(400, 'Bad Request') - resp = "" - elif resp.find('Precondition Failed') != -1: - self.send_response(412, 'Precondition Failed') - resp = "{\"problemDetails\": {\t\"type\": \"Precondition Failed\",\t\"title\": \"N/A\",\t\"status\": 412,\t\"detail\": \"Wrong preconditions\",\t\"instance\": \"N/A\"}}" - content_type = 'application/problem+json' - else: - self.send_response(200, 'OK') - self.send_header('Host', self.headers.get('Host')) # send_header() shall be after send_response() - self.send_header('Authorization', self.headers.get('Authorization')) - self.send_header('Connection', 'keep-alive') - self.send_header('Content-Type', content_type) - l = len(resp) - self.send_header('Content-Length', str(l)) - #self.end_headers() # Unable to bufferize wfile, so calling end_headers() headers and body are sent in 2 different TCP packets - self._headers_buffer.append(b"\r\n") - self._headers_buffer.append(bytes(resp, 'utf-8')) - self.wfile.write(b"".join(self._headers_buffer)) - self._headers_buffer = [] - #self.wfile.write(bytes(resp, 'utf-8')) - #self.wfile.flush() - print("<<< do_PUT") - return - # End of do_POST - - # Handler for the DELETE requests - def do_DELETE(self): - print('>>> do_DELETE: ', self.path) - self.protocol_version = self.request_version - # Check HTTP end_headers - if self.__check_http_headers__() == False: - resp = "{\"problemDetails\": {\t\"type\": \"Bad Request\",\t\"title\": \"N/A\",\t\"status\": 400,\t\"detail\": \"Wrong headers\",\t\"instance\": \"N/A\"}}" - self.send_response(400, 'Bad Request') - self.send_header('Host', self.headers.get('Host')) - self.send_header('Authorization', self.headers.get('Authorization')) - self.send_header('Connection', 'keep-alive') - self.send_header('Content-Type', 'application/problem+json') - l = len(resp) - self.send_header('Content-Length', str(l)) - self.end_headers() - self.wfile.write(bytes(resp, 'utf-8')) - return - - resp, content_type = self.__process__() - print('do_DELETE: resp= ', resp, ', Content_Type= ', content_type) - if (resp == None): - self.send_response(404, 'Not Found') - self.send_header('Host', self.headers.get('Host')) # send_header() shall be after send_response() - self.send_header('Authorization', self.headers.get('Authorization')) - self.send_header('Connection', 'keep-alive') - self.send_header('Content-Type', content_type) - self.send_header('Content-Length', '0') - self.end_headers() - else: - if resp.find('Not Found') != -1: - self.send_response(404, 'Not Found') - elif resp.find('Forbidden') != -1: - self.send_response(403, 'Forbidden') - elif resp.find('Bad Request') != -1: - self.send_response(400, 'Bad Request') - else: - self.send_response(200, 'OK') - self.send_header('Host', self.headers.get('Host')) # send_header() shall be after send_response() - self.send_header('Authorization', self.headers.get('Authorization')) - self.send_header('Connection', 'keep-alive') - self.send_header('Content-Type', content_type) - l = len(resp) - self.send_header('Content-Length', str(l)) - #self.end_headers() - self._headers_buffer.append(b"\r\n") - self._headers_buffer.append(bytes(resp, 'utf-8')) - self.wfile.write(b"".join(self._headers_buffer)) - self._headers_buffer = [] - #self.wfile.write(bytes(resp, 'utf-8')) - #self.wfile.flush() - print("<<< do_DELETE") - return - # End of do_DELETE - - # Check HTTP headers - def __check_http_headers__(self): - print('>>> __check_http_headers__') - result = True - host = self.headers.get('Host') - if host == None: - print("__check_http_headers__: Failed to parse Host header") - result = False - content_type = self.headers.get('Content-Type') - if content_type != 'application/json': - print("__check_http_headers__: Failed to parse 'Content-Type' header") - result = False - auth = self.headers.get('Authorization') - if auth == None: - print("__check_http_headers__: Failed to parse 'Authorization' header") - result = False - return result - # End of __check_http_headers__ - - # Process the request - def __process__(self): - s = self.path.split('/') - print('>>> __process__: ', s) - if s[1] != 'exampleAPI': - return None, 'application/json' - # TODO Check HTTP headers - if s[2] == 'location' and ((s[3] == 'v1') or (s[3] == 'v2')): - return self.__process__location__api__(s) - elif s[2] == 'ui' and ((s[3] == 'v1') or (s[3] == 'v2')): - return self.__process__ue__identity__api__(s) - elif s[2] == 'rni' and ((s[3] == 'v1') or (s[3] == 'v2')): - return self.__process__rnis__api__(s) - elif s[2] == 'bwm' and ((s[3] == 'v1') or (s[3] == 'v2')): - return self.__process__bwm__api__(s) - elif s[2] == 'mec_app_support' and ((s[3] == 'v1') or (s[3] == 'v2')): - return self.__process__mp1__api__(s) - else: - return None, 'application/json' - # End of __process__ - - # Process the LocationAPI request - def __process__location__api__(self, p_split): - print (">>> __process__location__api__: ", p_split) - resp = None - content_type = 'application/json' - if p_split[4].startswith('users'): # E.g. users?zoneId=zone01 - s = p_split[4].split('?') - if s.__len__() == 1: # Users list requested - resp = self.__db__.getSubscriberList(self.path) - elif s.__len__() == 2: # E.g. zoneId=zone01 - s = s[1].split('=') - if s[0] == 'zoneId': # Users list into a specific zoneId requested - resp = self.__db__.getSubscriberFromZoneId(s[1], self.path) - elif s[0] == 'address': - resp = self.__db__.getSubscriberFromAddress(s[1]) - elif p_split[4] == 'zones': - if p_split.__len__() == 5: - s = p_split[4].split('?') - print("__process__location__api__: ", s) - if s.__len__() == 1: # A list requested - if s[0] == 'zones': - resp = self.__db__.getZoneList(self.path) - else: - resp = "{\"Unsupported zone request\"}" - elif s.__len__() == 2: # E.g. ? - resp = "{\"Unsupported zone request\"}" - else: - resp = "{\"Unsupported " + p_split[4] + " request\"}" - elif p_split.__len__() == 7: - if p_split[6] == 'accessPoints': - resp = self.__db__.getAccessPointList(p_split[5], self.path) - else: - resp = "{\"Unsupported " + p_split[5] + " request\"}" - else: - resp = "{\"Unsupported " + p_split[4] + " request\"}" - elif p_split[4] == 'subscriptions': - if p_split.__len__() == 6: - # Extract the body if any - body = None - content_len = int(self.headers.get('Content-Length')) - if (content_len != 0): - body = self.rfile.read(content_len) - json_msg = self.__decode__json__body__(body) - if (json_msg == None): - resp = "{\"problemDetails\": {\t\"type\": \"Body processing not supported\",\t\"title\": \"UElocationAPI\",\t\"status\": 400,\t\"detail\": \"Unknown request\",\t\"instance\": \"string\"}}" - else: - resp = self.__db__.registerSubscription(json_msg, self.path) - elif p_split.__len__() == 7: - resp = self.__db__.unregisterSubscription(p_split[6]) - else: - resp = "{\"Unsupported " + p_split[4] + " request\"}" - - print ("<<< __process__location__api__: ", resp, ", ", content_type) - return resp, content_type - # End of __process__location__api__ - - # Process the ue_identityAPI request - def __process__ue__identity__api__(self, p_split): - print (">>> __process__ue__identity__api__: ", p_split) - resp = None - content_type = 'application/json' - if p_split[4] == 'appInst98': # Used for unknown application, e.g. TC_MEC_PLAT_UETAG_003_BI - resp = "{\"problemDetails\": {\t\"type\": \"Not Authorized\",\t\"title\": \"UEidentityAPI\",\t\"status\": 403,\t\"detail\": \"Forbidden\",\t\"instance\": \"AppInst98\"}}" - else: - if p_split[5].startswith('ue_identity_tag_info'): # E.g. ue_identity_tag_info?ueIdentityTag=UeTagA - s = p_split[5].split('?') - if s[0] != 'ue_identity_tag_info': - resp = "{\"problemDetails\": {\t\"type\": \"Bad Request\",\t\"title\": \"UEidentityAPI\",\t\"status\": 400,\t\"detail\": \"Wrong parameters\",\t\"instance\": \"string\"}}" - elif s.__len__() == 1: # ue_identity_tag_info, POST - # Register/Unregister operation - body = None - # Extract the body if any - content_len = int(self.headers.get('Content-Length')) - if (content_len != 0): - body = self.rfile.read(content_len) - json_msg = self.__decode__json__body__(body) - if (json_msg == None): - resp = "{\"problemDetails\": {\t\"type\": \"Body processing not supported\",\t\"title\": \"UEidentityAPI\",\t\"status\": 400,\t\"detail\": \"Unknown request\",\t\"instance\": \"string\"}}" - else: - resp = self.__db__.registerUEidentity(p_split[4], json_msg) - elif s.__len__() == 2: # E.g. ueIdentityTag=UeTagA - s = s[1].split('=') - if s[0] == 'ueIdentityTag': # Users list into a specific zoneId requested - resp = self.__db__.getUEidentityTagInfo(p_split[4], s[1]) - if (resp == None): - resp = "{\"problemDetails\": {\t\"type\": \"Not Found\",\t\"title\": \"UEidentityAPI\",\t\"status\": 404,\t\"detail\": \"Wrong parameters\",\t\"instance\": \"string\"}}" - content_type = 'application/problem+json' - if (resp == None): - resp = "{\"problemDetails\": {\t\"type\": \"Bad Request\",\t\"title\": \"UEidentityAPI\",\t\"status\": 400,\t\"detail\": \"Wrong parameters\",\t\"instance\": \"string\"}}" - if resp.find('problemDetails') != -1: - content_type = 'application/problem+json' - - print ("<<< __process__ue__identity__api__: ", resp, ", ", content_type) - return resp, content_type - # End of __process__ue__identity__api__ - - # Process the RnisAPI request - def __process__rnis__api__(self, p_split): - print ('>>> __process__rnis__api__: ', p_split) - resp = None - content_type = 'application/json' - if p_split[4].startswith('subscriptions'): - if p_split.__len__() == 5: - s = p_split[4].split('?') - if s.__len__() == 1: # Chek message body - # Register/Unregister operation - body = None - # Extract the body if any - content_len = int(self.headers.get('Content-Length')) - if (content_len != 0): - body = self.rfile.read(content_len) - json_msg = self.__decode__json__body__(body) - if (json_msg == None): - resp = "{\"problemDetails\": {\t\"type\": \"Body processing not supported\",\t\"title\": \"UEidentityAPI\",\t\"status\": 400,\t\"detail\": \"Unknown request\",\t\"instance\": \"string\"}}" - else: - resp = self.__db__.registerRniSubscription(json_msg) - elif s[0] != 'subscriptions': - resp = "{\"problemDetails\": {\t\"type\": \"Bad Request\",\t\"title\": \"RnisAPI\",\t\"status\": 400,\t\"detail\": \"Wrong parameters\",\t\"instance\": \"string\"}}" - else: - s = s[1].split('=') - print('__process__rnis__api__: ', s) - if s[0] != 'subscription_type': - resp = "{\"problemDetails\": {\t\"type\": \"Bad Request\",\t\"title\": \"RnisAPI\",\t\"status\": 400,\t\"detail\": \"Wrong parameters\",\t\"instance\": \"string\"}}" - elif s[1] == 'wrongSubscriptionType': - resp = "{\"problemDetails\": {\t\"type\": \"Bad Request\",\t\"title\": \"RnisAPI\",\t\"status\": 400,\t\"detail\": \"Wrong parameters\",\t\"instance\": \"string\"}}" - else: - resp = self.__db__.getSubscriptionLinkList(self.path) - elif p_split.__len__() == 6: - if p_split[5] == '': - resp = self.__db__.getSubscriptionLinkList(self.path) - elif s[0] != 'subscriptions': - resp = "{\"problemDetails\": {\t\"type\": \"Bad Request\",\t\"title\": \"RnisAPI\",\t\"status\": 400,\t\"detail\": \"Wrong parameters\",\t\"instance\": \"string\"}}" - else: - s = s[1].split('=') - print('__process__rnis__api__: ', s) - if s[0] != 'subscription_type': - resp = "{\"problemDetails\": {\t\"type\": \"Bad Request\",\t\"title\": \"RnisAPI\",\t\"status\": 400,\t\"detail\": \"Wrong parameters\",\t\"instance\": \"string\"}}" - elif s[1] == 'wrongSubscriptionType': - resp = "{\"problemDetails\": {\t\"type\": \"Bad Request\",\t\"title\": \"RnisAPI\",\t\"status\": 400,\t\"detail\": \"Wrong parameters\",\t\"instance\": \"string\"}}" - else: - resp = self.__db__.getSubscriptionLinkList(self.path) - elif p_split[4].startswith('queries'): - if p_split.__len__() == 6: - s = p_split[5].split('?') - if s.__len__() == 1: # Chek message body - resp = "{\"problemDetails\": {\t\"type\": \"Bad Request\",\t\"title\": \"RnisAPI\",\t\"status\": 400,\t\"detail\": \"Wrong parameters\",\t\"instance\": \"string\"}}" - else: - query = s[0] - s = s[1].split('=') - print('__process__rnis__api__ (queries): ', s) - if query == 'rab_info' and s[0] == 'cell_id': - resp = self.__db__.getRabInfo(s[1]) - elif query == 'plmn_info' and s[0] == 'app_ins_id': - resp = self.__db__.getPlmnInfo(s[1]) - elif query == 's1_bearer_info' and s[0] == 'cell_id': - resp = self.__db__.getS1BearerInfo(s[1]) - elif query == 'layer2_meas' and s[0] == 'cell_id': - resp = self.__db__.getL2MeasInfo(s[1]) - else: - resp = "{\"problemDetails\": {\t\"type\": \"Bad Request\",\t\"title\": \"RnisAPI\",\t\"status\": 400,\t\"detail\": \"Wrong parameters\",\t\"instance\": \"string\"}}" - if (resp == None): - resp = "{\"problemDetails\": {\t\"type\": \"Not supported\",\t\"title\": \"RnisAPI\",\t\"status\": 400,\t\"detail\": \"Wrong parameters\",\t\"instance\": \"string\"}}" - if resp.find('problemDetails') != -1: - content_type = 'application/problem+json' - - print ("<<< __process__rnis__api__: ", resp, ", ", content_type) - return resp, content_type - # End of __process__rnis__api__ - - # Process the BwManagementAPI request - def __process__bwm__api__(self, p_split): - print (">>> __process__bwm__api__: ", p_split) - resp = None - content_type = 'application/json' - if p_split[4].startswith('bw_allocations'): # E.g. bw_allocation?app_instance_id=InstApp01 - s = p_split[4].split('?') - if s.__len__() == 1: # BW Allocation list requested - #resp = self.__db__.getBwAllocationList(self.path) - # Register/Unregister operation - body = None - # Extract the body if any - content_len = int(self.headers.get('Content-Length')) - if (content_len != 0): - body = self.rfile.read(content_len) - json_msg = self.__decode__json__body__(body) - if (json_msg == None): - resp = "{\"problemDetails\": {\t\"type\": \"Body processing not supported\",\t\"title\": \"BwManagementAPI\",\t\"status\": 400,\t\"detail\": \"Unknown request\",\t\"instance\": \"string\"}}" - content_type = 'application/problem+json' - else: - resp = self.__db__.bwAllocation(json_msg) - elif s.__len__() == 2: # E.g. app_instance_id=InstApp01 - s = s[1].split('=') - if s[0] == 'app_instance_id': - resp = self.__db__.getBwAllocationAppInst(p_split[4], s[1]) - if (resp == None): - resp = "{\"problemDetails\": {\t\"type\": \"Not supported\",\t\"title\": \"BwManagementAPI\",\t\"status\": 400,\t\"detail\": \"Wrong parameters\",\t\"instance\": \"string\"}}" - content_type = 'application/problem+json' - - print ("<<< __process__bwm__api__: ", resp, ", ", content_type) - return resp, content_type - # End of __process__bwm__api__ - - # Process the MP1 request - def __process__mp1__api__(self, p_split): - print (">>> __process__mp1__api__: ", p_split) - resp = None - content_type = 'application/json' - if p_split[4].startswith('transports'): # E.g. /mp1/v1/transports - resp = self.__db__.getMp1TransportInfoList() - elif p_split[4].startswith('applications'): - if p_split[6].startswith('dns_rules'): # E.g. /mp1/v1/applications/appInstId01/dns_rules - pass - elif p_split[6].startswith('traffic_rules'): # E.g. GET/PUT /mp1/v1/applications/appInstId01/traffic_rules... - if length(p_split) == 7: # E.g. GET /mp1/v1/applications/appInstId01/traffic_rules - resp = self.__db__.getMp1TrafficRulesList() - else: # E.g. GET/PUT /mp1/v1/applications/appInstId01/traffic_rules/{trafficRuleId} - resp = self.__db__.getMp1TrafficRule(p_split[7]) - if (resp == None): - resp = "{\"problemDetails\": {\t\"type\": \"Not supported\",\t\"title\": \"Mp1\",\t\"status\": 400,\t\"detail\": \"Wrong parameters\",\t\"instance\": \"string\"}}" - content_type = 'application/problem+json' - print ("<<< __process__mp1__api__: ", resp, ", ", content_type) - return resp, content_type - # End of __process__bwm__api__ - - # Decode a Json HTTP body message - def __decode__json__body__(self, p_body): - print(">>> __decode__json__body__: ", p_body) - json_msg = json.loads(p_body) - print("__decode__json__body__: ", type(json_msg)) - print("__decode__json__body__: ", json_msg.keys()) - if ("ueIdentityTags" in json_msg.keys()) == True: - return json_msg.get("ueIdentityTags")[0] - elif ("userTrackingSubscription" in json_msg.keys()) == True: - return json_msg.get("userTrackingSubscription") - elif ("CellChangeSubscription" in json_msg.keys()) == True: - return json_msg.get("CellChangeSubscription") - return None - # End of __decode__json__body__ - -# End of class SimpleHTTPRequestHandler diff --git a/simu/mec_simulator.py b/simu/mec_simulator.py deleted file mode 100644 index a0306e91e1f3e08b6e20efb31ee133a3ce75b8c0..0000000000000000000000000000000000000000 --- a/simu/mec_simulator.py +++ /dev/null @@ -1,39 +0,0 @@ -# Very basic MEC PLAT simulator - -import http.server -import socketserver -import mec_http_server -import threading -import sys, os, time -import _Getch as getc - -# MEC simulator IPv4 address -ADDRESS_BINDING = '127.0.0.1' -# MEC simulator IPv4 listening port -PORT_NUMBER = 8081 - -if __name__ == '__main__': - getch = getc._Getch() - exit = False - try: - # Create a web server and define the handler to manage the incoming request - server = http.server.HTTPServer((ADDRESS_BINDING, PORT_NUMBER), mec_http_server.myHandler) - server.wbufsize = -1 - print ('Started httpserver on port ', PORT_NUMBER) - # Wait forever for incoming http requests in background - #server.serve_forever(poll_interval=2) - threading.Thread(target=server.serve_forever).start() - # Use keybord entries to trigBger notifications - while exit == False: - ch = getch() - if ch == 'q': - exit = True - else: - print(">>> ch= ", ch) - server.shutdown() - server.socket.close() - except KeyboardInterrupt: - print ('^C received, shutting down the web server') - server.shutdown() - server.socket.close() -# End of __main__ diff --git a/titan-test-system-framework b/titan-test-system-framework new file mode 160000 index 0000000000000000000000000000000000000000..a8db2aefc860cdfec0b76ae767f5c91fe7ec042f --- /dev/null +++ b/titan-test-system-framework @@ -0,0 +1 @@ +Subproject commit a8db2aefc860cdfec0b76ae767f5c91fe7ec042f diff --git a/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn b/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn deleted file mode 100644 index 79fdc78c3910b9f3d5efbda9b97778b490d6c2a2..0000000000000000000000000000000000000000 --- a/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn +++ /dev/null @@ -1,1733 +0,0 @@ -/** -* @author ETSI / STF569 -* @version $URL:$ -* $ID:$ -* @desc This module provides the MEC test cases. -* @copyright ETSI Copyright Notification -* No part may be reproduced except as authorized by written permission. -* The copyright and the foregoing restriction extend to reproduction in all media. -* All rights reserved. -* @see ETSI GS MEC 003, Draft ETSI GS MEC 021 V2.1.1 -*/ - module AtsMec_Ams_TestCases { - - // Libcommon - import from LibCommon_BasicTypesAndValues all; - import from LibCommon_Sync all; - - // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; - - // LibMec_LocationAPI - import from Ams_Templates all; - import from Ams_Pics all; - import from Ams_Pixits all; - - // LibMec - import from LibMec_TypesAndValues all; - import from LibMec_Templates all; - import from LibMec_Functions all; - import from LibMec_Pics all; - import from LibMec_Pixits all; - - group appMobilityServices { - - /** - * @desc Check that the AMS service returns information about the registered application mobility services when requested - * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_mobility_service_info( - mw_app_mobility_service_info( - { - mw_app_mobility_registration_info( - mw_service_consumer_id( - PX_APP_INS_ID, - PX_MEP_ID - ) - ) - } - )))))) -> value v_response { - tc_ac.stop; - - if (f_check_headers(valueof(v_response.response.header)) == true) { - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationNotificationSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { - log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_001_OK - - /** - * @desc Check that the AMS service returns an error when receives a query about a registered application mobility service with wrong parameters - * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "?appMobilityService=" & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, - -, - 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_001_BR - - - /** - * @desc Check that the AMS service creates a new application mobility services when requested - * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_002_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request( - m_registration_request( - m_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_app_mobility_service_info( - mw_app_mobility_service_info( - mw_registration_info( - mw_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ), - PX_APP_MOBILITY_SERVICE_ID - ) - ) - ) - ) - ) - ) - - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo and status code set to 201 Created ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_002_OK - - /** - * @desc Check that the AMS service sends an error when it receives a malformed request to create a new application mobility service - * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_002_BR() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request( - m_registration_request_error( - m_service_consumer_error( - PX_APP_INS_ID, - - - ) - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a Problem Details when bad request is performed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_002_BR - } // End of group appMobilityServices - - - group individualAppMobilityService{ - - /** - * @desc Check that the AMS service returns information about this individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_011_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_mobility_service_info( - mw_app_mobility_service_info( - -, - PX_APP_MOBILITY_SERVICE_ID - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_011_OK - - /** - * @desc Check that the AMS service sends an error when receives a query about a not existing individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_011_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - ))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_011_NF - - - - /** - * @desc Check that the AMS service modifies the individual application mobility service when requested - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_012_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request( - m_registration_request( - m_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ) - ) - ) - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_mobility_service_info( - mw_app_mobility_service_info({ - *, - mw_app_mobility_registration_info( - mw_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ), - *}, - - - ) - ) - ) - ))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_012_OK - - /** - * @desc Check that the AMS service sends an error when receives a request to modify a not existing individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_012_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request( - m_registration_request( - m_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ) - ) - ) - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - ))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_012_NF - - /** - * @desc Check that the AMS service sends an error when receives a request to modify a individual application mobility service using bad parameters - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_012_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request_with_error( - m_registration_request_with_error( - m_service_consumer_id_with_error( - PX_APP_INS_ID, - - - ), - -, - - - ) - ) - ) - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - ))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_012_BR - - - /** - * @desc Check that the AMS service de-register the individual application mobility service and delete the resource - * that represents the individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.5 - */ - testcase TC_MEC_MEC012_SRV_AMS_013_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content( - ))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 204 No Content ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_013_OK - - /** - * @desc Check that the AMS service sends an error when is requested to delete the resource - * that represents the individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.5 - */ - testcase TC_MEC_MEC012_SRV_AMS_013_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - ))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_013_NF - - } - - group appMobilityServiceDeregisterTask { - - /** - * @desc Check that the AMS service deregister an individual application mobility service on expiry of the timer associated with the service - * @see ETSI GS MEC 021 2.0.10, clause 8.5.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_014_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")) & "/deregisterTask", - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_mobility_service_info( - mw_app_mobility_service_info({ - *, - mw_app_mobility_registration_info( - mw_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ), - *}, - - - ) - ) - ) - ))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_014_OK - - /** - * @desc Check that the AMS service send an error when is requested to deregister a not existent individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.5.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_014_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")) & "/deregisterTask", - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - ))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_012_OK - - - } - - group appMobilityServicesSubscriptions { - - /** - * @desc Check that the AMS service returns information about the available subscriptions when requested. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_003_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - //@TODO: How can we convert enums in strings? - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionType=" & int2str(enum2int(PX_SUBSCRIPTION_TYPE)), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_ams_subscriptions( - mw_ams_subscription( - PX_SUBSCRIPTION_TYPE, - -, - -, - -, - - - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of subscriptions type MobilityProcedureSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // END TC_MEC_MEC012_SRV_AMS_003_OK - - /** - * @desc Check that the AMS service sends an error when it receives a malformed query about the available subscriptions - * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_003_BR() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionTyp=" & int2str(enum2int(PX_SUBSCRIPTION_TYPE)), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // END of TC_MEC_MEC012_SRV_AMS_003_BR - - /** - * @desc Check that the AMS service creates a notification subscriptions when requested. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_004_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS, - v_headers, - m_http_message_body_json( - m_body_json_ams_subscriptions( - m_ams_subscription( - PX_SUBSCRIPTION_TYPE, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_ams_subscriptions( - mw_ams_subscription( - PX_SUBSCRIPTION_TYPE, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AMS Subscription and 201 Created status code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_004_OK - - /** - * @desc Check that the AMS service sends an error when it receives a malformed request to create a notification subscription - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_004_BR() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS, - v_headers, - m_http_message_body_json( - m_body_json_ams_subscriptions( - m_ams_subscription_error( - PX_SUBSCRIPTION_TYPE, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a Problem Details and 400 Bad request status code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_004_BR - - /** - * @desc Check that the AMS service returns information about a given subscription when requested. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_005_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_ams_subscriptions( - mw_ams_subscription(PX_SUBSCRIPTION_TYPE, -, -, -, -) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of subscriptions type MobilityProcedureSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_005_OK - - /** - * @desc Check that the AMS service returns an error when receives a query about a not existing subscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_005_NF() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 404 - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_005_NF - - /** - * @desc Check that the AMS service deletes a given subscription when requested - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.5 - */ - testcase TC_MEC_MEC012_SRV_AMS_006_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 No Content on deletion request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_006_OK - - /** - * @desc Check that the AMS service sends an error when it receives a delete request for a not existing subscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.5 - */ - testcase TC_MEC_MEC012_SRV_AMS_006_NF() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_006_NF - - /** - * @desc Check that the AMS service modifies a given subscription when requested. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_007_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_subscriptions( - m_ams_subscription( - PX_SUBSCRIPTION_TYPE, PX_CALLBACK_REFERENCE, -, -, - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_ams_subscriptions( - mw_ams_subscription(PX_SUBSCRIPTION_TYPE, -, -, -, -) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_007_OK - - /** - * @desc Check that the AMS service sends an error when it receives a malformed modify request for a given subscription. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_007_BR() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request( - m_registration_request( - m_service_consumer_error(PX_APP_INS_ID, -), - -, - - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_007_BR - - /** - * @desc Check that the AMS service sends an error when it receives a modify request for a not existing subscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_007_NF() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_subscriptions( - m_ams_subscription( - PX_SUBSCRIPTION_TYPE, PX_CALLBACK_REFERENCE, -, -, - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_007_NF - - - } // End of group appMobilityServicesSubscriptions - - group ams_notifications { - - /** - * @desc Check that the AMS service sends an AMS notification about a mobility procedure if the AMS service has an associated subscription and the event is generated - * @see ETSI GS MEC 021 2.1.1, clause 7.4.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_008_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_NOTIFICATIONS)) { - log("*** " & testcasename() & ": PICS_AMS and PICS_AMS_NOTIFICATIONS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_notif_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - action("Trigger a mobility procedure event"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] httpPort_notif.receive( - mw_http_request( - mw_http_request_post( - PX_CALLBACK_URI, - -, - mw_http_message_body_json( - mw_body_json_mobility_procedure_notification( - mw_mobility_procedure_notification( - -, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ) { - tc_wait.stop; - log("*** " & testcasename() & ": INFO: IUT successfully sends mobility procedure notification ***"); - - // Send 204 No Content - httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); - - log("*** " & testcasename() & ": PASS: IUT successfully sends mobility procedure notification ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_notif_down(); - } // End of TC_MEC_MEC012_SRV_AMS_008_OK - - /** - * @desc Check that the AMS service sends an AMS notification about adjacent application instances if the AMS service has an associated subscription and the event is generated - * @see ETSI GS MEC 021 2.1.1, clause 7.4.3 - */ - testcase TC_MEC_MEC012_SRV_AMS_009_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_NOTIFICATIONS)) { - log("*** " & testcasename() & ": PICS_AMS and PICS_AMS_NOTIFICATIONS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_notif_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - action("Trigger a adjacent application info event"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] httpPort_notif.receive( - mw_http_request( - mw_http_request_post( - PX_CALLBACK_URI, - -, - mw_http_message_body_json( - mw_body_json_adjacent_application_info_notification( - mw_adjacent_application_info_notification( - -, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ) { - tc_wait.stop; - log("*** " & testcasename() & ": INFO: IUT successfully sends adjacent application info notification ***"); - - // Send 204 No Content - httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); - - log("*** " & testcasename() & ": PASS: IUT successfully sends adjacent application info notification ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_notif_down(); - } - - - /** - * @desc Check that the AMS service sends an AMS notification on subscription expiration if the AMS service has an associated subscription and the event is generated - * @see ETSI GS MEC 021 2.1.1, clause 7.4.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_010_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var UInt64 v_timestamp; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_NOTIFICATIONS)) { - log("*** " & testcasename() & ": PICS_AMS and PICS_AMS_NOTIFICATIONS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_notif_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - action("Trigger a expire notification event"); - v_timestamp := f_get_current_timestamp_utc(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] httpPort_notif.receive( - mw_http_request( - mw_http_request_post( - PX_CALLBACK_URI, - -, - mw_http_message_body_json( - mw_body_json_expire_notification( - mw_expire_notification( - -, - -, - { seconds := v_timestamp / 1000, nanoSeconds := 1000 * v_timestamp mod 1000 } - ) - ) - ) - ) - ) - ) { - tc_wait.stop; - log("*** " & testcasename() & ": INFO: IUT successfully sends adjacent application info notification ***"); - - // Send 204 No Content - httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); - - log("*** " & testcasename() & ": PASS: IUT successfully sends adjacent applicationinfo notification ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_notif_down(); - } - - - - } // End of group ams_notifications - -} // End of module AtsMec_Ams_TestCases - - - - - - - diff --git a/ttcn/AtsMec/AtsMec_LocationAPI_TestCases.ttcn b/ttcn/AtsMec/AtsMec_LocationAPI_TestCases.ttcn deleted file mode 100644 index 0a3b1b3c4971a7def00edd8d50b758e11eda7b19..0000000000000000000000000000000000000000 --- a/ttcn/AtsMec/AtsMec_LocationAPI_TestCases.ttcn +++ /dev/null @@ -1,1924 +0,0 @@ -/** - * @author ETSI / STF569 - * @version $URL:$ - * $ID:$ - * @desc This module provides the MEC test cases. - * @copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * @see ETSI GS MEC 003, Draft ETSI GS MEC 013 V2.0.3 (2018-10) - */ -module AtsMec_LocationAPI_TestCases { - - // Libcommon - import from LibCommon_Sync all; - - // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; - - // LibMec/LocationAPI - import from LocationAPI_TypesAndValues all; - import from LocationAPI_Templates all; - import from LocationAPI_Functions all; - import from LocationAPI_Pics all; - import from LocationAPI_Pixits all; - - // LibMec - import from LibMec_Functions all; - import from LibMec_Pics all; - import from LibMec_Pixits all; - - group ueLocationLookup { - - /** - * @desc Check that the IUT responds with a list for the location of User Equipments when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2 - * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo - */ - testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_user_list( - mw_user_list( - ?/*{mw_user_info( - PX_USER, - PX_ACCESS_POINT_ID, - PX_ZONE_ID, - -, - PX_RESOURCE_URL - )}*/, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ZoneId ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2 - * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo - */ - testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?areaId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")), // areaId instead of zoneId - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_BR - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2 - * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo - */ - testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_NON_EXISTENT_ZONE_ID, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_NF - - } // End of group ueLocationLookup - - group ueLocSub { - - /** - * @desc Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the location changes - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UELOCSUB/PlatUeLocationSubscription.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_user_tracking_subscription( - m_user_tracking_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_USER - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_user_tracking_subscription( - mw_user_tracking_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_USER - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a callbackURL ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_user_tracking_subscription(v_response.response.body.json_body.userTrackingSubscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UELOCSUB/PlatUeLocationSubscription.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI & "_Invalid", - v_headers, - m_http_message_body_json( - m_body_json_user_tracking_subscription( - m_user_tracking_subscription( - PX_CLIENT_ID_UNKNOWN, - PX_CALLBACK_REF_URL, - PX_USER_UNKNOWN - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR - - /** - * @desc Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UELOCSUB/PlatUeLocationSubscription.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UELOCSUB_002_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var UserTrackingSubscription v_user_tracking_subscription; - var Headers v_headers; - var charstring v_uri; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_user_tracking_subscription(v_user_tracking_subscription); - v_uri :=regexp( - oct2char(unichar2oct(v_user_tracking_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_USERS_LOC_SUB_URI & "/(?*)", - 0 - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI & "/" & v_uri, - v_headers - ) - ) - ); - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 No Content ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_002_OK - - /** - * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UELOCSUB/PlatUeLocationSubscription.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UELOCSUB_002_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_002_NF - - } // End of group ueLocSub - - group ueTrackSub { - - /** - * @desc Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the UE changes location - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UETRACKSUB/PlatUeTrackingSubscription.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UETRACKSUB_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_periodic_notification_subscription( - m_periodic_notification_subscription( - { PX_IP_ADDRESS }, - PX_CALLBACK_REF_URL, - -, -, - PX_USER - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_periodic_notification_subscription( - mw_periodic_notification_subscription( - { PX_IP_ADDRESS }, - PX_CALLBACK_REF_URL, - -, -, - PX_USER, - ? - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a callbackURL ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_periodic_notification_subscription(v_response.response.body.json_body.periodicNotificationSubscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UETRACKSUB_001_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UETRACKSUB/PlatUeTrackingSubscription.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UETRACKSUB_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "_Invalid", - v_headers, - m_http_message_body_json( - m_body_json_user_tracking_subscription( - m_user_tracking_subscription( - PX_CLIENT_ID_UNKNOWN, - PX_CALLBACK_REF_URL, - PX_USER - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UETRACKSUB_001_BR - - /** - * @desc Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UETRACKSUB/PlatUeTrackingSubscription.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UETRACKSUB_002_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var PeriodicNotificationSubscription v_position_notification_subscription; - var charstring v_uri; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_periodic_notification_subscription(v_position_notification_subscription); - v_uri := regexp( - oct2char(unichar2oct(v_position_notification_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/(?*)", - 0 - ); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/" & v_uri, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds 204 No Content ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UETRACKSUB_002_OK - - /** - * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UETRACKSUB/PlatUeTrackingSubscription.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UETRACKSUB_002_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UETRACKSUB_002_NF - - } // End of group ueTrackSub - - group ueInfLook { - - /** - * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFLOOK/PlatUeInformationLookup.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLATand PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_user_list( - mw_user_list(-, ?) - ))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFLOOK/PlatUeInformationLookup.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "/invalid/" & oct2char(unichar2oct(PX_USER, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_BR - - /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFLOOK/PlatUeInformationLookup.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "/" & oct2char(unichar2oct(PX_USER_UNKNOWN, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_001_NF - - } // End of group ueInfLook - - group ueInfSub { - - /** - * @desc Check that the IUT acknowledges the UE information change subscription request when commanded by a MEC Application and notifies it when the location changes - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFSUB/PlatUeInformationSubscription.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UEINFSUB_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_INF_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_zonal_traffic_subscription( - m_zonal_traffic_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_ZONE_ID - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_zonal_traffic_subscription( - mw_zonal_traffic_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_ZONE_ID - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a callbackURL ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_zonal_traffic_subscription(v_response.response.body.json_body.zonalTrafficSubscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEINFSUB_001_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFSUB/PlatUeInformationSubscription.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UEINFSUB_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & "/invilad/" & PX_ME_APP_Q_USERS_INF_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_zonal_traffic_subscription( - m_zonal_traffic_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_ZONE_ID - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEINFSUB_001_BR - - /** - * @desc Check that the IUT acknowledges the cancellation of UE information change notifications when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFSUB/PlatUeInformationSubscription.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UEINFSUB_002_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var ZonalTrafficSubscription v_zonal_traffic_subscription; - var charstring v_uri; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_zonal_traffic_subscription(v_zonal_traffic_subscription); - v_uri := regexp( - oct2char(unichar2oct(v_zonal_traffic_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_USERS_INF_SUB_URI & "/(?*)", - 0 - ); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_INF_SUB_URI & "/" & v_uri, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 No Content ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEINFSUB_002_OK - - /** - * @desc Check that the IUT acknowledges the cancellation of UE information change notifications when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFSUB/PlatUeInformationSubscription.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UEINFSUB_002_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_INF_SUB_URI & "/" & oct2char(unichar2oct(PX_USER_UNKNOWN, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEINFSUB_002_NF - - } // End of group ueInfSub - - /* - * Radio Node Location Lookup (RLOCLOOK) - */ - - group radioNodeLocationLookup { - - /** - * @desc Check that the IUT responds with the list of radio nodes currently associated with the MEC host and the location of each radio node when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/AccessPointList - */ - testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")) & "/accessPoints", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_access_point_list( - mw_access_point_list( - PX_ZONE_ID - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with an AccessPoint list containing a ZoneId ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_OK - - /** - * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application - */ - testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_ZONE_ID, "UTF-8")) & "/accessPoints", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found() - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_NF - - } // End of group radioNodeLocationLookup - - - - /* - * UE Area Subscribe (UEAREASUB) - */ - group ueAreaSubscribe { - - /** - * @desc Check that the IUT acknowledges the UE area change subscription request when commanded by a MEC Application and notifies it when the UE enters the specified circle - */ - testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_AREA_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_circle_notification_subscription( - m_circle_notification_subscription( - PX_CLIENT_ID, //clientCorrelator - PX_AREA_SUB_CALLBACK_URI, // callbackReference - { PX_IP_ADDRESS } // address - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_circle_notification_subscription( - mw_circle_notification_subscription( - PX_CLIENT_ID )))))) -> value v_response { - // TODO how to send this when the UE enters the area? The TP has the IUT doing this immediately. Do we want this or will it be discarded as part of the test? -// // MEC 013, clause 7.3.11.3 -// the IUT entity sends a vPOST containing, -// uri indicating value CALLBACK_URL -// body containing -// subscriptionNotification containing -// terminalLocation containing -// address set to IP_ADDRESS -// ; -// ; -// ; -// ; -// to the MEC_APP entity - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a circleNotificationSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_circle_notification_subscription(v_response.response.body.json_body.circleNotificationSubscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - */ - testcase TC_MEC_MEC013_SRV_UEAREASUB_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_AREA_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_circle_notification_subscription( - m_circle_notification_subscription( - PX_CLIENT_ID_UNKNOWN, //clientCorrelator - PX_AREA_SUB_CALLBACK_URI, // callbackReference - { PX_IP_ADDRESS } // address - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_001_BR - - /** - * @desc Check that the IUT acknowledges the cancellation of UE area change notifications when commanded by a MEC Application - */ - testcase TC_MEC_MEC013_SRV_UEAREASUB_002_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var CircleNotificationSubscription v_circle_notification_subscription; - var charstring v_uri; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - f_create_circle_notification_subscription(v_circle_notification_subscription); - v_uri := regexp( - oct2char(unichar2oct(v_circle_notification_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_AREA_SUB_URI & "/(?*)", - 0 - ); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_AREA_SUB_URI & "/" & v_uri, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_002_OK - - /** - * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application - */ - testcase TC_MEC_MEC013_SRV_UEAREASUB_002_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_AREA_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_002_NF - - } // End of group ueAreaSubscribe - - /* - * UE Distance Lookup (UEDISTLOOK) - */ - group ueDistanceLookup { - - /** - * @desc Check that the IUT responds with the distance to a UE when queried by a MEC Application - */ - testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & oct2char(unichar2oct(PX_UE_LOC_QRY_URI, "UTF-8")) & "?address=" & oct2char(unichar2oct(PX_IP_ADDRESS, "UTF-8")) & "&latitude=" & float2str(PX_UE_COORD_LAT) & "&longitude=" & float2str(PX_UE_COORD_LONG), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_terminal_distance( - mw_terminal_distance - ))))) { - - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 200 OK ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - */ - testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & oct2char(unichar2oct(PX_UE_LOC_QRY_URI, "UTF-8")) & "?address=" & oct2char(unichar2oct(PX_IP_ADDRESS, "UTF-8")) & "&lat=" & float2str(PX_UE_COORD_LAT) & "&longitude=" & float2str(PX_UE_COORD_LONG), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 400 bad request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_BR - - } // End of group ueDistanceLookup - - /* - * UE Distance Subscribe (UEDISTSUB) - */ - group ueDistanceSubscribe { - - /** - * @desc Check that the IUT acknowledges the UE distance subscription request when commanded by a MEC Application and notifies it when (all) the requested UE(s) is (are) within the specified distance - */ - testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_DIST_URI, - v_headers, - m_http_message_body_json( - m_body_json_distance_notification_subscription( - m_distance_notification_subscription( - PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference - -, // checkImmediate - PX_CLIENT_ID, //clientCorrelator - -, // criteria - 10.0, // distance - -, - { PX_UE_MONITORED_IP_ADDRESS } // monitoredAddress - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_distance_notification_subscription( - mw_distance_notification_subscription( - PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference - -, - PX_CLIENT_ID, //clientCorrelator - -, -, -, - { PX_UE_MONITORED_IP_ADDRESS } // monitoredAddress - )))))) -> value v_response { - // TODO how to send this when the UE enters the area? The TP has the IUT doing this immediately. Do we want this or will it be discarded as part of the test? -// - // MEC 013, clause 7.3.11.3 -// the IUT entity sends a vPOST containing, // uri indicating value CALLBACK_URL -// body containing -// subscriptionNotification containing -// terminalLocation containing -// address set to IP_ADDRESS -// ; -// ; -// ; -// ; -// to the MEC_APP entity - - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a circleNotificationSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_distance_notification_subscription(v_response.response.body.json_body.distanceNotificationSubscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - */ - testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_DIST_URI & "_INVALID", - v_headers, - m_http_message_body_json( - m_body_json_distance_notification_subscription( - // TODO the TP uses a wrong field name to trigger an error response. Do we create a new data structure just for this or - // change the test to use another trigger (e.g.: invalid IP address)? - m_distance_notification_subscription( - PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference - -, // checkImmediate - PX_CLIENT_ID, //clientCorrelator - -, // criteria - 10.0, // distance - -, // frequency - { PX_UE_MONITORED_IP_ADDRESS }, // monitoredAddress - { PX_IP_ADDRESS } // referenceAddress - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_BR - - /** - * @desc Check that the IUT acknowledges the cancellation of UE distance notifications when commanded by a MEC Application - */ - testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var DistanceNotificationSubscription v_distance_notification_subscription; - var charstring v_uri; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - f_create_distance_notification_subscription(v_distance_notification_subscription); - v_uri := regexp( - oct2char(unichar2oct(v_distance_notification_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_DIST_URI & "/(?*)", - 0 - ); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_DIST_URI & "/" & v_uri, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_OK - - /** - * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application - */ - testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_DIST_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found() - )) { - - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_NF - - } // End of group ueDistanceSubscribe - -} // End of module AtsMec_LocationAPI_TestCases diff --git a/ttcn/AtsMec/AtsMec_TestControl.ttcn b/ttcn/AtsMec/AtsMec_TestControl.ttcn deleted file mode 100644 index 4c747361eaddfb23a600476d43a2462f78889fbc..0000000000000000000000000000000000000000 --- a/ttcn/AtsMec/AtsMec_TestControl.ttcn +++ /dev/null @@ -1,126 +0,0 @@ -module AtsMec_TestControl { - - // LibMec/LocationAPI - import from LocationAPI_Pics all; - // LibMec/UEidentityAPI - import from UEidentityAPI_Pics all; - // LibMec/RnisAPI - import from RnisAPI_Pics all; - // LibMec/TrafficManagementAPI - import from TrafficManagementAPI_Pics all; - // LibMec/AppEnablementAPI - import from EdgePlatformApplicationEnablementAPI_Pics all; - // LibMec/UEAppInterfaceAPI - import from UEAppInterfaceAPI_Pics all; - - // LibMec - import from LibMec_Pics all; - - // AtsMec - import from AtsMec_LocationAPI_TestCases all; - import from AtsMec_UEidentityAPI_TestCases all; -// import from AtsMec_RadioNodeLocationAPI_TestCases all; - import from AtsMec_RnisAPI_TestCases all; - import from AtsMec_TrafficManagementAPI_TestCases all; - import from AtsMec_EdgePlatformApplicationEnablementAPI_TestCases all; - import from AtsMec_UEAppInterfaceAPI_TestCases all; - - control { - - if (PICS_MEC_PLAT and PICS_SERVICES) { - if (PICS_UE_IDENTITY_API_SUPPORTED) { - execute(TC_MEC_MEC014_SRV_UETAG_001_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_001_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_001_NF()); - execute(TC_MEC_MEC014_SRV_UETAG_002_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_002_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_002_PF()); - } - if (PICS_LOCATION_API_SUPPORTED) { - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_NF()); - -// execute(TC_MEC_PLAT_RLOC_001_OK()); -// execute(TC_MEC_PLAT_RLOC_001_NF()); - } - - if (PICS_APP_ENABLEMENT_API_SUPPORTED) { - /*execute(TC_MEC_SRV_TRANS_001_OK()); - execute(TC_MEC_SRV_TRAF_001_OK()); - execute(TC_MEC_SRV_TRAF_002_OK()); - execute(TC_MEC_SRV_TRAF_003_OK()); - execute(TC_MEC_SRV_TRAF_001_NF());*/ - } - - if (PICS_ENABLE_UE_APP_CTX) { - execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_NF()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_NF()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_NF()); - } - } - - /*if (PICS_RNIS) { - if (PICS_RNIS_NOTIFICATIONS) { - execute(TC_MEC_MEC012_SRV_RNIS_001_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_002_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_003_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_004_OK()); - } - if (PICS_RNIS_ALL_SUBSCRIPTIONS) { - execute(TC_MEC_MEC012_SRV_RNIS_011_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_012_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_011_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_012_BR()); - } - if (PICS_RNIS_QUERY) { - execute(TC_MEC_MEC012_SRV_RNIS_016_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_016_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_016_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_017_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_017_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_017_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_018_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_018_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_018_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_019_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_019_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_019_NF()); - } - }*/ - - if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED) { - execute(TC_MEC_MEC015_SRV_TM_001_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_BR()); - execute(TC_MEC_MEC015_SRV_TM_002_NF()); - } - } // End of 'control' statement - -} // End of module AtsMec_TestControl diff --git a/ttcn/AtsMec/AtsMec_TrafficManagementAPI_TestCases.ttcn b/ttcn/AtsMec/AtsMec_TrafficManagementAPI_TestCases.ttcn deleted file mode 100644 index 67bdef54bd5a011fa45a0fed458b2b794111a615..0000000000000000000000000000000000000000 --- a/ttcn/AtsMec/AtsMec_TrafficManagementAPI_TestCases.ttcn +++ /dev/null @@ -1,1309 +0,0 @@ -/** - * @author ETSI / STF569 - * @version $URL:$ - * $ID:$ - * @desc This module provides the MEC test cases. - * @copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * @see ETSI GS MEC 015, Draft ETSI GS MEC 015 V2.1.1 (2020-06) - */ -module AtsMec_TrafficManagementAPI_TestCases { - - // JSON - import from JSON all; - - // Libcommon - import from LibCommon_Time all; - import from LibCommon_VerdictControl all; - import from LibCommon_Sync all; - - // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; - - // LibMec/TrafficManagementAPI - import from TrafficManagementAPI_TypesAndValues all; - import from TrafficManagementAPI_Templates all; - import from TrafficManagementAPI_Functions all; - import from TrafficManagementAPI_Pics all; - import from TrafficManagementAPI_Pixits all; - - // LibMec - import from LibMec_Templates all; - import from LibMec_Functions all; - import from LibMec_Pics all; - import from LibMec_Pixits all; - - group me_app_role { - - /** - * @desc Check that the IUT responds with the list of configured bandwidth allocations when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PX_ME_BWM_URI, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_bw_info_list - )))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of BwInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_001_OK - - /** - * @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_002_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - PX_APP_INSTANCE_ID - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_002_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_002_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PX_ME_BWM_URI & "/app_instance_id=" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), // 'app_instance_id=' is a wrong parameter - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_002_BR - - /** - * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_002_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_APP_INSTANCE_ID, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 404 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_002_NF - - /** - * @desc Check that the IUT responds with a registration and initialisation approval for the requested bandwidth requirements sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_003_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var JSON.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PX_ME_BWM_URI, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "1024", // FixedAllocation - Downlink // AllocationDirection - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - v_app_instance_id - )))))) -> value v_response { - tc_ac.stop; - - if (f_check_headers(valueof(v_response.response.header)) == false) { - log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } else { - var charstring_list v_bw_allocation_id; - f_get_header(valueof(v_response.response.header), "Location", v_bw_allocation_id); - log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo, BWAllocationID: ", v_bw_allocation_id[0], " ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_003_OK_01 - - /** - * @desc Check that the IUT responds with a registration and initialisation approval for the requested bandwidth requirements sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_003_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var JSON.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PX_ME_BWM_URI, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - v_app_instance_id, - SESSION_SPECIFIC_BW_ALLOCATION, // Request type - "1024", // FixedAllocation - Downlink, // AllocationDirection - { m_session_filter("10.10.10.10", { "1010" }) } - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - v_app_instance_id, - SESSION_SPECIFIC_BW_ALLOCATION, // Request type - "1024", // FixedAllocation - Downlink, // AllocationDirection - { mw_session_filter } - )))))) -> value v_response { - tc_ac.stop; - - if (f_check_headers(valueof(v_response.response.header)) == false) { - log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } else { - var charstring_list v_bw_allocation_id; - f_get_header(valueof(v_response.response.header), "Location", v_bw_allocation_id); - log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo, BWAllocationID: ", v_bw_allocation_id[0], " ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_003_OK_02 - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_003_BR_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PX_ME_BWM_URI, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "Invalid", // FixedAllocation - Downlink // AllocationDirection - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_003_BR_01 - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_003_BR_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PX_ME_BWM_URI, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "1024", // FixedAllocation - Downlink, // AllocationDirection - { m_session_filter("10.10.10.10", { "1010" }) } // MEC015 Clause 7.2.2 Type: BwInfo Table 7.2.2-1: Elements of BwInfo, sessionFilter shall be omit - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_003_BR_02 - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_003_BR_03() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PX_ME_BWM_URI, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - PX_APP_INSTANCE_ID, - SESSION_SPECIFIC_BW_ALLOCATION, // Request type - "1024", // FixedAllocation - Downlink // AllocationDirection - // MEC015 Clause 7.2.2 Type: BwInfo Table 7.2.2-1: Elements of BwInfo, sessionFilter shall be present - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_003_BR_03 - - /** - * @desc Check that the IUT responds with the configured bandwidth allocation when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_004_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var charstring v_bw_allocation_id; - var BwInfo v_bw_info; - var JSON.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info); - if (v_bw_allocation_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body - httpPort.send( - m_http_request( - m_http_request_get( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, - v_headers - ) - ) - ); - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - v_app_instance_id - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo ***"); - f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_004_OK - - /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_004_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var charstring v_bw_allocation_id; - var BwInfo v_bw_info; - var JSON.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - httpPort.send( - m_http_request( - m_http_request_get( - PX_ME_BWM_URI & "/Unknown_bw_allocation_id", - v_headers - ) - ) - ); - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 404 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_004_NF - - /** - * @desc Check that the IUT updates the requested bandwidth requirements when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_005_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var charstring v_bw_allocation_id; - var BwInfo v_bw_info; - var JSON.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info); - if (v_bw_allocation_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body - httpPort.send( - m_http_request( - m_http_request_put( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "2048", // FixedAllocation - Downlink // AllocationDirection - ) - ) - ) - ) - ) - ); - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "2048", // FixedAllocation - Downlink // AllocationDirection - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated BwInfo ***"); - f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_005_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_005_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var charstring v_bw_allocation_id; - var BwInfo v_bw_info; - var JSON.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info); - if (v_bw_allocation_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body - httpPort.send( - m_http_request( - m_http_request_put( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "Invalid", // FixedAllocation - Downlink // AllocationDirection - ) - ) - ) - ) - ) - ); - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_005_BR - - /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_005_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var JSON.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("003")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - httpPort.send( - m_http_request( - m_http_request_put( - PX_ME_BWM_URI & "/InvalidAllocationId", - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "2048", // FixedAllocation - Downlink // AllocationDirection - ) - ) - ) - ) - ) - ); - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 404 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_005_NF - - /** - * @desc Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_006_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var charstring v_bw_allocation_id; - var BwInfo v_bw_info; - var JSON.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("004")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info); - if (v_bw_allocation_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body - httpPort.send( - m_http_request( - m_http_request_patch( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, - v_headers, - m_http_message_body_json( - m_body_json_bw_info_deltas( - m_bw_info_deltas( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - -, - "5096" - ) - ) - ) - ) - ) - ); - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "5096", // FixedAllocation - Downlink // AllocationDirection - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a patched BwInfo ***"); - f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_006_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_006_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var charstring v_bw_allocation_id; - var BwInfo v_bw_info; - var JSON.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("004")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info); - if (v_bw_allocation_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body - httpPort.send( - m_http_request( - m_http_request_patch( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, - v_headers, - m_http_message_body_json( - m_body_json_bw_info_deltas( - m_bw_info_deltas( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - -, - "Invalid" - ) - ) - ) - ) - ) - ); - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_006_BR - - /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_006_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var charstring v_bw_allocation_id; - var BwInfo v_bw_info; - var JSON.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("004")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - httpPort.send( - m_http_request( - m_http_request_patch( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, - v_headers, - m_http_message_body_json( - m_body_json_bw_info_deltas( - m_bw_info_deltas( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - -, - "5096" - ) - ) - ) - ) - ) - ); - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 404 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_006_NF - - /** - * @desc Check that the IUT unregisters from the Bandwidth Management Service when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_007_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var charstring v_bw_allocation_id; - var BwInfo v_bw_info; - var JSON.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("005")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info); - if (v_bw_allocation_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body - httpPort.send( - m_http_request( - m_http_request_delete( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, - v_headers - ) - ) - ); - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_007_OK - - } // End of group me_app_role - -} // End of module AtsMec_TrafficManagementAPI_TestCases diff --git a/ttcn/AtsMec/AtsMec_UEAppInterfaceAPI_TestCases.ttcn b/ttcn/AtsMec/AtsMec_UEAppInterfaceAPI_TestCases.ttcn deleted file mode 100644 index 3066da2aa2fecd0e9c865b77281b538e087325b2..0000000000000000000000000000000000000000 --- a/ttcn/AtsMec/AtsMec_UEAppInterfaceAPI_TestCases.ttcn +++ /dev/null @@ -1,641 +0,0 @@ -/** - * @author ETSI / STF569 - * @version $URL:$ - * $ID:$ - * @desc This module provides the MEC test cases. - * @copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * @see ETSI GS MEC 003, Draft ETSI GS MEC 013 V2.0.3 (2018-10) - */ -module AtsMec_UEAppInterfaceAPI_TestCases { - - // Libcommon - import from LibCommon_Sync all; - - // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; - - // LibMec/UEAppInterfaceAPI - import from UEAppInterfaceAPI_Templates all; - import from UEAppInterfaceAPI_Functions all; - import from UEAppInterfaceAPI_Pics all; - import from UEAppInterfaceAPI_Pixits all; - - // LibMec - import from LibMec_Functions all; - import from LibMec_Pics all; - import from LibMec_Pixits all; - - group ue_app_ctx { - - /** - * @desc Check that the IUT acknowledges the creation of the application context when requested by an UE Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_UE_APP_CTX_URI, - v_headers, - m_http_message_body_json( - m_body_json_app_context( - m_app_context( - PX_CONTEXT_ID, - PX_ASSOCIATE_UE_APP_ID, - m_required_app_info( - PX_APP_NAME, - PX_APP_PROVIDER, - PX_REFERENCE_URL - ))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_app_context( - mw_app_context( - -, - -, - mw_required_app_info( - PX_APP_NAME - ))))))) -> value v_response { - tc_ac.stop; - - if (f_check_headers(v_response.response.header) == true) { - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppContext ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { - log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_UE_APP_CTX_URI, - v_headers, - m_http_message_body_json( - m_body_json_app_context( - m_app_context( - PX_CONTEXT_ID, - PX_ASSOCIATE_UE_APP_ID, - m_required_app_info( - PX_APP_NAME, - PX_APP_PROVIDER, - PX_REFERENCE_URL - ))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationNotificationSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_BR - - /** - * @desc Check that the IUT updates the application callback reference when commanded by an UE Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_ue_app_ctx(); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_CONTEXT_ID)), - v_headers, - m_http_message_body_json( - m_body_json_app_context( - m_app_context( - PX_CONTEXT_ID, - PX_ASSOCIATE_UE_APP_ID, - m_required_app_info( - PX_APP_NAME, - PX_APP_PROVIDER, - PX_REFERENCE_URL - ), - PX_CALLBACK_REF - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppContext ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_ue_app_ctx(); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_CONTEXT_ID)), - v_headers, - m_http_message_body_json( - m_body_json_app_context( - m_app_context( - PX_CONTEXT_ID, - PX_ASSOCIATE_UE_APP_ID, - m_required_app_info( - PX_APP_NAME, - PX_APP_PROVIDER, - PX_REFERENCE_URL - ), - PX_CALLBACK_REF - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppContext ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_BR - - /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_CONTEXT_ID)), - v_headers, - m_http_message_body_json( - m_body_json_app_context( - m_app_context( - PX_NON_EXISTENT_CONTEXT_ID, - PX_ASSOCIATE_UE_APP_ID, - m_required_app_info( - PX_APP_NAME, - PX_APP_PROVIDER, - PX_REFERENCE_URL - ), - PX_CALLBACK_REF - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppContext ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_NF - - /** - * @desc Check that the IUT deletes the application context when commanded by an UE Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_003_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_ue_app_ctx(); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_CONTEXT_ID)), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully delete AppContext ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPCTX_003_OK - - /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_003_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_ue_app_ctx(); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_CONTEXT_ID)), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully delete AppContext ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPCTX_003_NF - - } // End of group ue_app_ctx - - group ue_apps { - - /** - * @desc Check that the IUT responds with the list of user applications available when requested by an UE Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPS/SysUeApplications.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPS_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_ue_app_ctx(); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_UE_APPS_URI & "&appName=" & oct2char(unichar2oct(PX_APP_NAME)), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_info( - { *, mw_appInfo_list(PX_APP_NAME), *} - ))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_create_ue_app_ctx(); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPS_001_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPS/SysUeApplications.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPS_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_ue_app_ctx(); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_UE_APPS_URI & "&appName=" & oct2char(unichar2oct(PX_APP_NAME)) & "&serviceCont=unknown", // Wrong URI - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_create_ue_app_ctx(); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPS_001_BR - - /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPS/SysUeApplications.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPS_001_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_UE_APPS_URI & "&appName=" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_NAME)), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPS_001_NF - - } // End of group ue_apps - -} // End of module AtsMec_UEAppInterfaceAPI_TestCases diff --git a/ttcn/AtsMec/AtsMec_V2XInformationServiceAPI_TestCases.ttcn b/ttcn/AtsMec/AtsMec_V2XInformationServiceAPI_TestCases.ttcn deleted file mode 100644 index ce87389334fb27dd5cf45c68473418aa67a727e2..0000000000000000000000000000000000000000 --- a/ttcn/AtsMec/AtsMec_V2XInformationServiceAPI_TestCases.ttcn +++ /dev/null @@ -1,2870 +0,0 @@ -/** - * @author ETSI / TTF T012 - * @version $URL:$ - * $ID:$ - * @desc This module provides the MEC test cases. - * @copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * @see ETSI GS MEC 002, Draft ETSI GS MEC 030 V2.1.1 (2020-04) - */ -module AtsMec_V2XInformationServiceAPI_TestCases { - - // JSON - import from JSON all; - - // Libcommon - import from LibCommon_Time all; - import from LibCommon_VerdictControl all; - import from LibCommon_Sync all; - - // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; - - // LibMec/V2XInformationServiceAPI - import from V2XInformationServiceAPI_TypesAndValues all; - import from V2XInformationServiceAPI_Pics all; - import from V2XInformationServiceAPI_Pixits all; - import from V2XInformationServiceAPI_Templates all; - import from V2XInformationServiceAPI_Functions all; - - // LibMec - import from LibMec_Templates all; - import from LibMec_Functions all; - import from LibMec_Pics all; - import from LibMec_Pixits all; - - group me_app_role { - - /** - * @desc Check that the IUT responds with a configured provisioning information over Uu unicast when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_001_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=" & PX_V2X_ECGI, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_uu_unicast_provisioning_info( - mw_uu_unicast_provisioning_info - ))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuUnicastProvisioningInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_001_OK_01 - - /** - * @desc Check that the IUT responds with a configured provisioning information over Uu unicast when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_001_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=" & PX_V2X_LATITUDE, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_uu_unicast_provisioning_info( - mw_uu_unicast_provisioning_info - ))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuUnicastProvisioningInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_001_OK_02 - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/invalid_uu_unicast_provisioning_info?location_info=" & PX_V2X_LATITUDE, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_001_BR - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_001_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=" & PX_V2X_UNKNOWN_ECGI, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_001_NF - - /** - * @desc Check that the IUT responds with a configured provisioning information over Uu mbms when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_002_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=" & PX_V2X_ECGI, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_uu_mbms_provisioning_info( - mw_uu_mbms_provisioning_info - ))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuMbmsProvisioningInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_002_OK_01 - - /** - * @desc Check that the IUT responds with a configured provisioning information over Uu mbms when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_002_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=" & PX_V2X_LATITUDE, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_uu_mbms_provisioning_info( - mw_uu_mbms_provisioning_info - ))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuMbmsProvisioningInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_002_OK_02 - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_002_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/invalid_uu_mbms_provisioning_info?location_info=" & PX_V2X_LATITUDE, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_002_BR - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_002_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=" & PX_V2X_UNKNOWN_ECGI, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_002_NF - - /** - * @desc Check that the IUT responds with a configured provisioning information over PC5 when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_003_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=" & PX_V2X_ECGI, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_pc5_provisioning_info( - mw_pc5_provisioning_info - ))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a Pc5ProvisioningInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_003_OK_01 - - /** - * @desc Check that the IUT responds with a configured provisioning information over PC5 when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_003_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=" & PX_V2X_LATITUDE, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_pc5_provisioning_info( - mw_pc5_provisioning_info - ))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a Pc5ProvisioningInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_003_OK_02 - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_003_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/invalid_pc5_provisioning_info?location_info=" & PX_V2X_LATITUDE, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_003_BR - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_003_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=" & PX_V2X_UNKNOWN_ECGI, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_003_NF - - /** - * @desc Check that the IUT sends a request about QoS information for a vehicular UE when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_004_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/provide_predicted_qos", - v_headers, - m_http_message_body_json( - m_body_json_v2x_predicted_qos( - m_predicted_qos( - PX_LOC_GRANULARITY, - { - m_predicted_qos_routes( - { - m_route_info( - m_location_info( - m_ecgi( - PX_CELL_ID, - m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area(43.72, 10.41) - ), - -, - 128, - 128 - ), - m_route_info( - m_location_info( - m_ecgi( - PX_CELL_ID, - m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area(43.75, 10.5) - ), - -, - 128, - 128 - ) - } - ) - } - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_v2x_predicted_qos( - mw_predicted_qos( - PX_LOC_GRANULARITY - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a PredictedQos ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_004_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_004_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/provide_predicted_qos", - v_headers, - m_http_message_body_json( - m_body_json_v2x_predicted_qos( - m_predicted_qos( - PX_LOC_GRANULARITY & "InvalidSemantic", - { - m_predicted_qos_routes( - { - m_route_info( - m_location_info( - m_ecgi( - PX_CELL_ID, - m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area(43.72, 10.41) - ), - -, - 128, - 128 - ), - m_route_info( - m_location_info( - m_ecgi( - PX_CELL_ID, - m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area(43.75, 10.5) - ), - -, - 128, - 128 - ) - } - ) - } - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_004_BR - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_004_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/provide_predicted_qos", - v_headers, - m_http_message_body_json( - m_body_json_v2x_predicted_qos( - m_predicted_qos( - PX_LOC_GRANULARITY, - { - m_predicted_qos_routes( - { - m_route_info( - m_location_info( - m_ecgi( - PX_UNKNOWN_CELL_ID, - m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area(43.72, 10.41) - ), - -, - 128, - 128 - ), - m_route_info( - m_location_info( - m_ecgi( - PX_CELL_ID, - m_plmn(PX_UNKNOWN_MCC, PX_UNKNOWN_MNC) - ), - m_location_info_geo_area(43.75, 10.5) - ), - -, - 128, - 128 - ) - } - ) - } - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_004_NF - - /** - * @desc Check that the IUT processes properly a request to publish a V2X message - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_005_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/publish_v2x_message", - v_headers, - m_http_message_body_json( - m_body_json_v2x_message( - m_v2x_message - ))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct status ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_005_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_005_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/publish_v2x_message", - v_headers, - m_http_message_body_json( - m_body_json_v2x_message( - m_v2x_message( - -, - "UnknownEncodeFormat" - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_005_BR - - /** - * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_006_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_uni", - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_v2x_subscription_link_list - )))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_006_OK_01 - - /** - * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_006_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_mbms", - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_v2x_subscription_link_list - )))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_006_OK_02 - - /** - * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_006_OK_03() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_pc5", - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_v2x_subscription_link_list - )))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_006_OK_03 - - /** - * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_006_OK_04() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/v2x_msg", - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_v2x_subscription_link_list - )))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_006_OK_04 - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_006_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/_prov_chg_uu_uni_", // Invalid subscription type - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLink ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_006_BR - - /** - * @desc Check that the IUT responds with the requested to create a subscription - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_007_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_uni", - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_uni_subscription( - m_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, - m_prov_chg_uu_uni_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - )), - m_v2x_application_server( - oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), - oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_prov_chg_uu_uni_subscription( - mw_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, - -, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_01 - - /** - * @desc Check that the IUT responds with the requested to create a subscription - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_007_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_mbms", - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_mbms_subscription( - m_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, - m_prov_chg_uu_mbms_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - )), - m_v2x_server_usd( - { PX_V2X_MBMS_SERVICE_ID }, - m_sdp_info( - PX_V2X_MC_SERVER, - PX_V2X_MC_PORT - ), - m_tmgi( - PX_V2X_SERVICE_AREA_ID, - PX_MCC, - PX_MNC - ))))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_prov_chg_uu_mbms_subscription( - mw_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, - -, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_02 - - /** - * @desc Check that the IUT responds with the requested to create a subscription - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_007_OK_03() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_pc5", - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_pc5_subscription( - m_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, - m_filter_criteria( - PX_V2X_DST_LAYER_2_ID, - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - ))))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_prov_chg_pc5_subscription( - mw_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, - -, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_03 - - /** - * @desc Check that the IUT responds with the requested to create a subscription - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_007_OK_04() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/V2xMsgSubscription", - v_headers, - m_http_message_body_json( - m_body_json_v2x_msg_subscription( - m_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, - m_v2x_msg_subscription_filter_criteria - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_v2x_msg_subscription( - mw_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, - -, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_04 - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_007_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_uni", - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_uni_subscription( - m_prov_chg_uu_uni_subscription_invalid( - PX_PROV_UU_UNI_SUB_CALLBACK, - m_prov_chg_uu_uni_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - )), - m_v2x_application_server( - oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), - oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_007_BR - - /** - * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_008_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_prov_chg_uu_uni_subscription( - mw_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, - -, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_01 - - /** - * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_008_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_mbms_subscription.links.self_, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_prov_chg_uu_mbms_subscription( - mw_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, - -, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_02 - - /** - * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_008_OK_03() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgPc5Subscription v_prov_chg_pc5_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_pc5_subscription(v_prov_chg_pc5_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_pc5_subscription.links.self_, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_prov_chg_pc5_subscription( - mw_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, - -, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_prov_pc5_subscription(v_prov_chg_pc5_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_03 - - /** - * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_008_OK_04() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var V2xMsgSubscription v_v2x_msg_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_v2x_msg_subscription(v_v2x_msg_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_v2x_msg_subscription( - mw_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, - -, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_v2x_msg_subscription(v_v2x_msg_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_04 - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_008_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var V2xMsgSubscription v_v2x_msg_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_v2x_msg_subscription(v_v2x_msg_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_v2x_msg_subscription(v_v2x_msg_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_008_BR - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_008_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/invalid_links", - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_008_NF - - /** - * @desc Check that the IUT responds with the request of updating subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_009_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_, - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_uni_subscription( - m_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, - m_prov_chg_uu_uni_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.77, - 10.46 - )), - m_v2x_application_server( - oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), - oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )), - v_prov_chg_uu_uni_subscription.links - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_prov_chg_uu_uni_subscription( - mw_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, - -, - v_prov_chg_uu_uni_subscription.links - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_01 - - /** - * @desc Check that the IUT responds with the request of updating subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_009_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_mbms_subscription.links.self_, - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_mbms_subscription( - m_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, - m_prov_chg_uu_mbms_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.77, - 10.46 - )), - m_v2x_server_usd( - { PX_V2X_MBMS_SERVICE_ID }, - m_sdp_info( - PX_V2X_MC_SERVER, - PX_V2X_MC_PORT - ), - m_tmgi( - PX_V2X_SERVICE_AREA_ID, - PX_MCC, - PX_MNC - ))), - v_prov_chg_uu_mbms_subscription.links -)))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_prov_chg_uu_mbms_subscription( - mw_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, - -, - v_prov_chg_uu_mbms_subscription.links - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_02 - - /** - * @desc Check that the IUT responds with the request of updating subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_009_OK_03() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgPc5Subscription v_prov_chg_pc5_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_pc5_subscription(v_prov_chg_pc5_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_pc5_subscription.links.self_, - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_pc5_subscription( - m_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, - m_filter_criteria( - PX_V2X_DST_LAYER_2_ID, - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.77, - 10.46 - ))), - v_prov_chg_pc5_subscription.links - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_prov_chg_pc5_subscription( - mw_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, - -, - v_prov_chg_pc5_subscription.links - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_prov_pc5_subscription(v_prov_chg_pc5_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_03 - - /** - * @desc Check that the IUT responds with the request of updating subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_009_OK_04() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var V2xMsgSubscription v_v2x_msg_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_v2x_msg_subscription(v_v2x_msg_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_, - v_headers, - m_http_message_body_json( - m_body_json_v2x_msg_subscription( - m_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, - m_v2x_msg_subscription_filter_criteria, - v_v2x_msg_subscription.links - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_v2x_msg_subscription( - mw_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, - -, - v_v2x_msg_subscription.links - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_v2x_msg_subscription(v_v2x_msg_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_04 - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_009_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_, - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_uni_subscription( - m_prov_chg_uu_uni_subscription_invalid( - PX_PROV_UU_UNI_SUB_CALLBACK, - m_prov_chg_uu_uni_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - )), - m_v2x_application_server( - oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), - oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )), - v_prov_chg_uu_uni_subscription.links - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_009_BR - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_009_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/invalid_links", - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_uni_subscription( - m_prov_chg_uu_uni_subscription_invalid( - PX_PROV_UU_UNI_SUB_CALLBACK, - m_prov_chg_uu_uni_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - )), - m_v2x_application_server( - oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), - oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )), - v_prov_chg_uu_uni_subscription.links - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_009_NF - - /** - * @desc Check that the IUT responds with the request of removing subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_010_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_01 - - /** - * @desc Check that the IUT responds with the request of removing subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_010_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_mbms_subscription.links.self_, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_02 - - /** - * @desc Check that the IUT responds with the request of removing subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_010_OK_03() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgPc5Subscription v_prov_chg_pc5_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_pc5_subscription(v_prov_chg_pc5_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_pc5_subscription.links.self_, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_03 - - /** - * @desc Check that the IUT responds with the request of removing subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_010_OK_04() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var V2xMsgSubscription v_v2x_msg_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_v2x_msg_subscription(v_v2x_msg_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_04 - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_010_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/invalid_links", - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_010_NF - - } // End of group me_app_role - -} // End of module AtsMec_V2XInformationServiceAPI_TestCases diff --git a/ttcn/AtsMec/module.mk b/ttcn/AtsMec/module.mk deleted file mode 100644 index 77286dbb44209c07b2439297235c64933087e64c..0000000000000000000000000000000000000000 --- a/ttcn/AtsMec/module.mk +++ /dev/null @@ -1,47 +0,0 @@ -suite := AtsMEC - -sources := \ - AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn \ - AtsMec_TrafficManagementAPI_TestCases.ttcn \ - AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \ - AtsMec_LocationAPI_TestCases.ttcn \ - AtsMec_RnisAPI_TestCases.ttcn \ - AtsMec_TestControl.ttcn \ - AtsMec_UEAppInterfaceAPI_TestCases.ttcn \ - AtsMec_UEidentityAPI_TestCases.ttcn \ - AtsMec_V2XInformationServiceAPI_TestCases.ttcn \ - AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn \ - AtsMec_WlanInformationAPI_TestCases.ttcn \ - AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn \ -# AtsMec_Ams_TestCases.ttcn \ -# AtsMec_FixedAccessInfoAPI_TestCases.ttcn \ -# AtsMec_RadioNodeLocationAPI_TestCases.ttcn \ - -modules := ../LibCommon \ - ../LibIts \ - ../LibIts/ttcn/Http \ - ../LibMec \ - ../LibMec/EdgePlatformApplicationEnablementAPI \ - ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ - ../LibMec/TrafficManagementAPI \ - ../LibMec/LocationAPI \ - ../LibMec/RnisAPI \ - ../LibMec/UEAppInterfaceAPI \ - ../LibMec/UEidentityAPI \ - ../LibMec/V2XInformationServiceAPI \ - ../LibMec/DeviceApplicationInterfaceAPI \ - ../LibMec/WlanInformationAPI \ - ../LibMec/ApplicationMobilityServiceAPI \ - ../../ccsrc/Ports/LibHttp \ - ../../ccsrc/EncDec/LibHttp \ - ../../ccsrc/EncDec/LibMec \ - ../../ccsrc/Framework \ - ../../ccsrc/externals \ - ../../ccsrc/loggers \ - ../../ccsrc/Protocols/ETH \ - ../../ccsrc/Protocols/Http \ - ../../ccsrc/Protocols/Json \ - ../../ccsrc/Protocols/Pcap \ - ../../ccsrc/Protocols/Tcp \ - ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ - diff --git a/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn b/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..931930f2bbd9ac84c9bba12cd32988dcd4c8e5b0 --- /dev/null +++ b/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn @@ -0,0 +1,1956 @@ +/** +* @author ETSI / STF569 +* @version $URL:$ +* $ID:$ +* @desc This module provides the MEC test cases. +* @copyright ETSI Copyright Notification +* No part may be reproduced except as authorized by written permission. +* The copyright and the foregoing restriction extend to reproduction in all media. +* All rights reserved. +* @see ETSI GS MEC 003, Draft ETSI GS MEC 021 V2.1.1 +*/ + module AtsMec_ApplicationMobiltyServiceAPI_TestCases { + + // JSON + import from Json all; + + // Libcommon + import from LibCommon_BasicTypesAndValues all; + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec_ApplicationMobiltyServiceAPI + import from ApplicationMobilityServiceAPI_TypesAndValues all; + import from ApplicationMobilityServiceAPI_Templates all; + import from ApplicationMobilityServiceAPI_Functions all; + import from ApplicationMobilityServiceAPI_Pics all; + import from ApplicationMobilityServiceAPI_Pixits all; + + // LibMec + import from LibMec_TypesAndValues all; + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + group appMobilityServices { + + /** + * @desc Check that the AMS service returns information about the registered application mobility services when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(-, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info_list( + { + *, + v_registration_info_1, + v_registration_info_2, + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_001_OK_01 + + /** + * @desc Check that the AMS service returns information about the a specific registered application mobility service when requested - filter + */ + testcase TC_MEC_MEC021_SRV_AMS_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(-, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI & "?filter=(eq,appMobilityServiceId," & v_registration_info_1.appMobilityServiceId & ")", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info_list( + { + *, + v_registration_info_1, + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_001_OK_02 + + /** + * @desc Check that the AMS service returns information about the a specific registered application mobility service when requested - filter + */ + testcase TC_MEC_MEC021_SRV_AMS_001_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(-, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI & "?filter=(eq,serviceConsumerId[appInstanceId]," & PX_APP_INS_ID_2 & ")", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info_list( + { + *, + v_registration_info_2, + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_001_OK_03 + + /** + * @desc Check that the AMS service returns information about the a specific registered application mobility service when requested - exclude_fields + */ + testcase TC_MEC_MEC021_SRV_AMS_001_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(-, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI & "?filter=(eq,appMobilityServiceId," & v_registration_info_1.appMobilityServiceId & "&exclude_fields=[deviceInformation])", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info_list( + { + *, + mw_registration_info( + v_registration_info_1.appMobilityServiceId, + mw_service_consumer_id( + PX_APP_INS_ID, + PX_MEP_ID + )), + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_001_OK_04 + + /** + * @desc Check that the AMS service returns information about the registered application mobility services when requested - No registered application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_001_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok_no_body + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an empty body ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_001_OK_05 + + /** + * @desc Check that the AMS service returns an error when receives a query about a registered application mobility service with wrong parameters + */ + testcase TC_MEC_MEC021_SRV_AMS_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(-, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI & "?appMobilityService=" & "?filter=(appMobilityServiceId,eq," & v_registration_info_1.appMobilityServiceId & ")", // Wrong syntax + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, + -, + 400 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_001_BR + + /** + * @desc Check that the AMS service creates a new application mobility services when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var Json.String v_app_mobility_service_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + m_registration_info( + -, + m_service_consumer_id( + PX_APP_INS_ID + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_registration_info( + mw_registration_info( + ?, + mw_service_consumer_id( + PX_APP_INS_ID + ))))))) -> value v_response { + tc_ac.stop; + + v_app_mobility_service_id := v_response.response.body.json_body.registrationInfo.appMobilityServiceId; + log("*** " & testcasename() & ": PASS: IUT successfully responds with a v_app_mobility_service_id ", v_app_mobility_service_id, " ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_application_mobility_services(v_app_mobility_service_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_002_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed request to create a new application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var Json.String v_app_mobility_service_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + m_registration_info( + PX_APP_INS_ID, // Wrong field value: Shall be absent in POST requests, and present otherwise + m_service_consumer_id( + PX_APP_INS_ID + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Problem Details when bad request is performed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_002_BR + + } // End of group appMobilityServices + + group appMobilityServicesSubscriptions { + + /** + * @desc Check that the AMS service returns information about the available subscriptions when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionType=" & v_mobility_procedure_subscription.subscriptionType, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_subscriptions( + mw_subscription_link_list( + v_mobility_procedure_subscription.links, + mw_subscription( + -, + v_mobility_procedure_subscription.subscriptionType + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of subscriptions type MobilityProcedureSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // END TC_MEC_MEC021_SRV_AMS_003_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed query about the available subscriptions + */ + testcase TC_MEC_MEC021_SRV_AMS_003_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionType=info_app_adj", // Wrong parameter + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // END TC_MEC_MEC021_SRV_AMS_003_BR + + /** + * @desc Check that the AMS service creates a notification subscriptions when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + m_filter_criteria + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_mobility_procedure_subscription( + mw_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + mw_filter_criteria, + mw_links + )))))) -> value v_response { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_APP_AMS_SUBS & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AMS Subscription and 201 Created status code, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_004_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed request to create a notification subscription + */ + testcase TC_MEC_MEC021_SRV_AMS_004_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription_error( + PX_CALLBACK_REFERENCE, + m_filter_criteria + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_004_BR + + /** + * @desc Check that the AMS service returns information about a given subscription when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_mobility_procedure_subscription( + v_mobility_procedure_subscription + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_005_OK + + /** + * @desc Check that the AMS service returns an error when receives a query about a not existing subscription + */ + testcase TC_MEC_MEC021_SRV_AMS_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_005_NF + + /** + * @desc Check that the AMS service deletes a given subscription when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_006_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_006_OK + + /** + * @desc Check that the AMS service sends an error when it receives a delete request for a not existing subscription + */ + testcase TC_MEC_MEC021_SRV_AMS_006_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_006_NF + + /** + * @desc Check that the AMS service modifies a given subscription when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_007_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + m_filter_criteria( + PX_APP_INS_ID + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + m_filter_criteria( + PX_APP_INS_ID + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates successfully the subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_007_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed modify request for a given subscription + */ + testcase TC_MEC_MEC021_SRV_AMS_007_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription_error( + PX_CALLBACK_REFERENCE, + m_filter_criteria( + PX_APP_INS_ID + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_007_BR + + /** + * @desc Check that the AMS service sends an error when it receives a modify request for a not existing subscription + */ + testcase TC_MEC_MEC021_SRV_AMS_007_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers, + m_http_message_body_json( + m_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + m_filter_criteria( + PX_APP_INS_ID + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_007_NF + + } // End of group appMobilityServicesSubscriptions + + group ams_notifications { + + /** + * @desc Check that the AMS service sends an AMS notification about a mobility procedure if the AMS service has an associated subscription and the event is generated + */ + testcase TC_MEC_MEC021_SRV_AMS_008_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + action("Trigger a mobility procedure event"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_mobility_procedure_notification( + mw_mobility_procedure_notification( + v_mobility_procedure_subscription.links + )))))) { + tc_wait.stop; + + // Send 204 No Content + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully sends mobility procedure notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of TC_MEC_MEC021_SRV_AMS_008_OK + + /** + * @desc Check that the AMS service sends an AMS notification about adjacent application instances if the AMS service has an associated subscription and the event is generated + */ + testcase TC_MEC_MEC021_SRV_AMS_009_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AdjacentAppInfoSubscription v_adjacent_appInfo_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Preamble + f_create_adjacent_appInfo_subscription(v_adjacent_appInfo_subscription, v_subscription_id); + action("Trigger a mobility procedure event"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_adjacent_app_info_notification( + mw_adjacent_app_info_notification( + v_adjacent_appInfo_subscription.links + )))))) { + tc_wait.stop; + + // Send 204 No Content + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully sends adjacent appInfo notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_adjacent_appInfo_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of TC_MEC_MEC021_SRV_AMS_009_OK + + /** + * @desc Check that the AMS service sends an AMS notification on subscription expiration if the AMS service has an associated subscription and the event is generated + */ + testcase TC_MEC_MEC021_SRV_AMS_010_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + action("Trigger a mobility procedure event"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_mobility_procedure_notification( + mw_mobility_procedure_notification( + v_mobility_procedure_subscription.links + )))))) { + tc_wait.stop; + + // Send 204 No Content + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); + + log("*** " & testcasename() & ": INFO: IUT successfully sends mobility procedure notification ***"); + repeat; + } + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_expire_notification( + mw_expire_notification + ))))) { + tc_wait.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully sends expiry notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + } // End of TC_MEC_MEC021_SRV_AMS_009_OK + + } // End of group ams_notifications + + group individualAppMobilityService { + + /** + * @desc Check that the AMS service returns information about this individual application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_011_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info_1.appMobilityServiceId, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info( + v_registration_info_1 + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a the correct RegistrationInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_011_OK + + /** + * @desc Check that the AMS service sends an error when receives a query about a not existing individual application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_011_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_011_NF + + /** + * @desc Check that the AMS service modifies the individual application mobility service when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_012_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + v_registration_info_1.serviceConsumerId.appInstanceId := PX_APP_INS_ID_NEW; + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info_1.appMobilityServiceId, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + v_registration_info_1 + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info( + v_registration_info_1 + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates with a the correct RegistrationInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_012_OK + + /** + * @desc Check that the AMS service sends an error when receives a request to modify a individual application mobility service using bad parameters + */ + testcase TC_MEC_MEC021_SRV_AMS_012_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + var Json.String v_appMobilityServiceId; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + v_appMobilityServiceId := v_registration_info_1.appMobilityServiceId; + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info_1.appMobilityServiceId, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + v_registration_info_1 + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates with a the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_application_mobility_services(v_appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_012_BR + + /** + * @desc Check that the AMS service sends an error when receives a request to modify a not existing individual application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_012_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + v_registration_info_1.serviceConsumerId.appInstanceId := PX_APP_INS_ID_NEW; + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + v_registration_info_1 + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates with a the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_012_NF + + /** + * @desc Check that the AMS service de-register the individual application mobility service and delete the resource that represents the individual application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_013_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info.appMobilityServiceId, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully deletes the RegistrationInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_013_OK + + /** + * @desc Check that the AMS service sends an error when is requested to delete the resource that represents the individual application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_013_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully de-registers the RegistrationInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_013_NF + + } // End of group individualAppMobilityService + + group appMobilityServiceDeregisterTask { + + /** + * @desc Check that the AMS service deregister an individual application mobility service on expiry of the timer associated with the service + */ + testcase TC_MEC_MEC021_SRV_AMS_014_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info.appMobilityServiceId, "UTF-8")) & "/deregisterTask", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info_list( + { + *, + v_registration_info, + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully deregisters the registerInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_014_OK + + /** + * @desc Check that the AMS service send an error when is requested to deregister a not existent individual application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_014_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")) & "/deregisterTask", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully deregisters the registerInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_014_NF + + } // End of group appMobilityServiceDeregisterTask + + group adjacentApplicationInstances { + + /** + * @desc Check that the AMS service returns information about the registered application mobility services when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_015_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AdjacentAppInstanceInfo v_adjacent_app_instance_info_1; + var AdjacentAppInstanceInfo v_adjacent_app_instance_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_adjacent_app_instance_info(-, -, m_communication_interface({{ host := PX_HOST, port_ := PX_PORT }}), v_adjacent_app_instance_info_1); + f_create_adjacent_app_instance_info(PX_APP_INS_ID_2, PX_APP_ID_2, m_communication_interface({{ host := PX_HOST, port_ := PX_PORT }}), v_adjacent_app_instance_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_QUERIES_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_adjacent_app_instance_info_list( + { + *, + v_adjacent_app_instance_info_1, + v_adjacent_app_instance_info_2, + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_adjacent_app_instance_info(v_adjacent_app_instance_info_1.appInstanceId); + f_delete_adjacent_app_instance_info(v_adjacent_app_instance_info_2.appInstanceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_015_OK_01 + + } // End of group adjacentApplicationInstances + +} // End of module AtsMec_ApplicationMobiltyServiceAPI_TestCases + + + + + + + diff --git a/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestControl.ttcn b/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..afa12b3887c449c30a7820a3260672063fc0397d --- /dev/null +++ b/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestControl.ttcn @@ -0,0 +1,66 @@ +module AtsMec_ApplicationMobiltyServiceAPI_TestControl { + + // LibMec_ApplicationMobiltyServiceAPI + import from ApplicationMobilityServiceAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec + import from AtsMec_ApplicationMobiltyServiceAPI_TestCases all; + + + control { + + if (PICS_MEC_PLAT and PICS_SERVICES) { + execute(TC_MEC_MEC021_SRV_AMS_001_OK_01()); + execute(TC_MEC_MEC021_SRV_AMS_001_OK_02()); + execute(TC_MEC_MEC021_SRV_AMS_001_OK_03()); + execute(TC_MEC_MEC021_SRV_AMS_001_OK_04()); + execute(TC_MEC_MEC021_SRV_AMS_001_OK_05()); + execute(TC_MEC_MEC021_SRV_AMS_001_BR()); + + execute(TC_MEC_MEC021_SRV_AMS_002_OK()); + execute(TC_MEC_MEC021_SRV_AMS_002_BR()); + + execute(TC_MEC_MEC021_SRV_AMS_003_OK()); + execute(TC_MEC_MEC021_SRV_AMS_003_BR()); + + execute(TC_MEC_MEC021_SRV_AMS_004_OK()); + execute(TC_MEC_MEC021_SRV_AMS_004_BR()); + + execute(TC_MEC_MEC021_SRV_AMS_005_OK()); + execute(TC_MEC_MEC021_SRV_AMS_005_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_006_OK()); + execute(TC_MEC_MEC021_SRV_AMS_006_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_007_OK()); + execute(TC_MEC_MEC021_SRV_AMS_007_BR()); + execute(TC_MEC_MEC021_SRV_AMS_007_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_008_OK()); + + execute(TC_MEC_MEC021_SRV_AMS_009_OK()); + + execute(TC_MEC_MEC021_SRV_AMS_009_OK()); + + execute(TC_MEC_MEC021_SRV_AMS_011_OK()); + execute(TC_MEC_MEC021_SRV_AMS_011_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_012_OK()); + execute(TC_MEC_MEC021_SRV_AMS_012_BR()); + execute(TC_MEC_MEC021_SRV_AMS_012_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_013_OK()); + execute(TC_MEC_MEC021_SRV_AMS_013_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_014_OK()); + execute(TC_MEC_MEC021_SRV_AMS_014_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_015_OK_01()); + } + + } // End of 'control' statement + +} // End of module AtsMec_ApplicationMobiltyServiceAPI_TestControl diff --git a/ttcn/AtsMec_ApplicationMobiltyService/module.mk b/ttcn/AtsMec_ApplicationMobiltyService/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..3f0d27376530381cd2deea94ebb6556b6c267e2f --- /dev/null +++ b/ttcn/AtsMec_ApplicationMobiltyService/module.mk @@ -0,0 +1,39 @@ +suite := AtsMec_ApplicationMobiltyService + +sources := \ + AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn \ + AtsMec_ApplicationMobiltyServiceAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/IoTAPI \ + ../LibMec/FederationEnablementAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/AtsMec/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn similarity index 51% rename from ttcn/AtsMec/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn rename to ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn index 03c3c78d15223a9529874f8abfafad18124a4815..12ea8f68a797a8a32ef1bc79816a68298d1d73dc 100644 --- a/ttcn/AtsMec/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn @@ -12,20 +12,22 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // JSON - import from JSON all; + import from Json all; // Libcommon import from LibCommon_Sync all; // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; // LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; import from ApplicationPackageLifecycleAndOperationGrantingAPI_Templates all; + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Functions all; import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pics all; import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits all; @@ -35,7 +37,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { import from LibMec_Pixits all; group granting { - + /** * @desc Check that MEO sends a synchronous grant response when a grant request is requested - INSTANTIATE */ @@ -45,7 +47,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -69,9 +71,23 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PX_APP_ID, INSTANTIATE, m_grant_request_link( - m_link_type(""), // TODO - m_link_type("") // TODO - ))))))); + m_link_type(PX_APP_LCM_OP_OCC_ID_URI), + m_link_type(PX_APP_INSTANCE_ID_URI) + ), + { + m_resource_definition( + "", // TODO + -, + { "" }, // TODO + m_resource_definition_resource( + m_vim_connection_info( + "", // TODO + "" // TODO + ), + "" // TODO + )) + } + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -85,7 +101,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_grant ))))) -> value v_response { tc_ac.stop; - + if (f_check_headers(valueof(v_response.response.header)) == false) { log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); @@ -99,6 +115,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_001_OK /** @@ -109,7 +128,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var Headers v_headers; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -131,11 +150,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PX_APP_INSTANCE_ID, PX_APP_LCM_OP_OCC_ID, PX_APP_ID, - INVALID_OPERATE, + INSTANTIATE, m_grant_request_link( - m_link_type(""), // TODO - m_link_type("") // TODO - ))))))); + m_link_type(PX_APP_LCM_OP_OCC_ID_URI), + m_link_type(PX_APP_INSTANCE_ID_URI) + ) + // addResources not set + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -146,7 +167,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response_400_bad_request( ))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Bad response ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -155,6 +176,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_001_BR /** @@ -166,7 +190,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -190,8 +214,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PX_APP_ID, PX_APP_OPERATION, m_grant_request_link( - m_link_type(""), // TODO - m_link_type("") // TODO + m_link_type(PX_APP_LCM_OP_OCC_ID_URI), + m_link_type(PX_APP_INSTANCE_ID_URI) ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -206,7 +230,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_grant ))))) -> value v_response { tc_ac.stop; - + if (f_check_headers(valueof(v_response.response.header)) == false) { log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); @@ -220,6 +244,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_002_OK /** @@ -232,7 +259,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response_2; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -256,8 +283,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PX_APP_ID, PX_APP_OPERATION, m_grant_request_link( - m_link_type(""), // TODO - m_link_type("") // TODO + m_link_type(PX_APP_LCM_OP_OCC_ID_URI), + m_link_type(PX_APP_INSTANCE_ID_URI) ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -285,7 +312,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_grant ))))) -> value v_response_2 { tc_ac.stop; - + if (not(isbound(v_response_1)) or f_check_headers(valueof(v_response_2.response.header)) == false) { log("*** " & testcasename() & ": FAIL: Didn't receive 202 accepted or Header 'Location' was not present in the response headers ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); @@ -299,10 +326,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_003_OK /** - * @desc Check that MEO sends the status of a grant request when a query on a granting ID is performed + * @desc Check that MEO sends a asynchronous grant response when a grant request is requested */ testcase TC_MEC_MEC010p2_MEO_GRANT_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -310,7 +340,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -323,33 +353,64 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(PX_GRANTING_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + m_http_request_post( + PICS_ROOT_API & PX_MEO_GRANT_URI, + v_headers, + m_http_message_body_json( + m_body_json_grant_request( + m_grant_request( + PX_APP_INSTANCE_ID, + PX_APP_LCM_OP_OCC_ID, + PX_APP_ID, + INSTANTIATE, + m_grant_request_link( + m_link_type(PX_APP_LCM_OP_OCC_ID_URI), + m_link_type(PX_APP_INSTANCE_ID_URI) + ), + { + m_resource_definition( + "", // TODO + -, + { "" }, // TODO + m_resource_definition_resource( + m_vim_connection_info( + "", // TODO + "" // TODO + ), + "" // TODO + )) + } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_grant_response( - mw_grant( - PX_APP_INSTANCE_ID - )))))) -> value v_response { + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_grant_response( + mw_grant + ))))) -> value v_response { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 202 accepted status code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + if (f_check_headers(valueof(v_response.response.header), -, PX_MEO_GRANT_URI & "/" & oct2char(unichar2oct(v_response.response.body.json_body.grantResponse.id))) == false) { + log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Grant Response and cirrect Location header ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_004_OK /** @@ -359,9 +420,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var Grant v_grant; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -371,11 +433,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_grant_request(v_grant); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(PX_GRANTING_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(v_grant.id, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -383,36 +446,29 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Test Body tc_ac.start; alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_202_accepted - )) -> value v_response { - repeat; - } [] httpPort.receive( mw_http_response( mw_http_response_ok( mw_http_message_body_json( mw_body_json_grant_response( mw_grant( + v_grant.id, PX_APP_INSTANCE_ID - ) - ))))) { + )))))) -> value v_response { tc_ac.stop; - if (isbound(v_response)) { - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 202 accepted status code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { - log("*** " & testcasename() & ": FAIL: IUT successfully didn't respond with a 202 accepted status code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 202 accepted status code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_delete_grant_request(v_grant.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_005_OK /** @@ -422,9 +478,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var Grant v_grant; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -434,11 +491,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_grant_request(v_grant); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(PX_GRANTING_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(v_grant.id, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -446,12 +504,19 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Test Body tc_ac.start; alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) -> value v_response { + repeat; + } [] httpPort.receive( mw_http_response( mw_http_response_ok( mw_http_message_body_json( mw_body_json_grant_response( mw_grant( + v_grant.id, PX_APP_INSTANCE_ID )))))) { tc_ac.stop; @@ -469,6 +534,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_delete_grant_request(v_grant.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_006_OK /** @@ -479,7 +548,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var Headers v_headers; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -515,12 +584,15 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_006_NF } // End of group granting group meo_pkgmgt { - + /** * @desc Check that MEO creates a new App Package when requested */ @@ -530,7 +602,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -549,12 +621,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_http_message_body_json( m_body_json_create_package_management( m_create_package_management( - "appPkgName", + PX_APP_PKG_NAME, PX_APP_PKG_VERSION, m_checksum(-, PX_CHECKSUM), PX_APP_PKG_PATH )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -565,19 +636,15 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response_201_created( mw_http_message_body_json( mw_body_json_app_pkg_info( - mw_app_pkg_info/*( - -, - PX_APP_PKG_NAME, - PX_APP_PKG_VERSION, - mw_checksum, - PX_OPERATIONAL_STATE, - PX_USAGE_STATE - )*/ - ))))) -> value v_response { + mw_app_pkg_info( + -, -, + PX_APP_PKG_NAME, + PX_APP_PKG_VERSION, + -, + mw_checksum + )))))) -> value v_response { tc_ac.stop; - // TODO Chek Location header - log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -586,18 +653,20 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_001_OK - + /** - * @desc Check that MEO creates a new App Package when requested + * @desc Check that MEO responds with an error when it receives a malformed request for creating a new App Package */ testcase TC_MEC_MEC010p2_MEO_PKGM_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -621,7 +690,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_checksum(-, PX_CHECKSUM), PX_APP_PKG_PATH )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -641,9 +709,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_001_BR - + /** * @desc Check that MEO returns the list of App Packages when requested - Note 3 */ @@ -651,9 +721,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -663,6 +734,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -670,7 +742,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_URI, v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -680,8 +751,19 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_app_pkg_info_list - )))) -> value v_response { + mw_body_json_app_pkg_info_list( + { + *, + mw_app_pkg_info( + -, -, + PX_APP_PKG_NAME, + PX_APP_PKG_VERSION, + -, + mw_checksum + ), + * + } + ))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package list ***"); @@ -692,19 +774,23 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_002_01_OK - + /** - * @desc Check that MEO returns the list of App Packages when requested - Note 3 + * @desc Check that MEO returns the list of on-boarded packages when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEO_PKGM_002_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -714,6 +800,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info, true); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -731,8 +818,19 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_app_pkg_info_list - )))) -> value v_response { + mw_body_json_app_pkg_info_list( + { + *, + mw_app_pkg_info( + -, -, + PX_APP_PKG_NAME, + PX_APP_PKG_VERSION, + -, + mw_checksum + ), + * + } + ))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package list ***"); @@ -743,19 +841,21 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_002_02_OK - + /** - * @desc Check that MEO responds with an error when it receives - * a malformed request for retrieving the list of existing App Packages + * @desc Check that MEO responds with an error when it receives a malformed request for retrieving the list of existing App Packages */ testcase TC_MEC_MEC010p2_MEO_PKGM_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -792,9 +892,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_002_BR - + /** * @desc Check that MEO returns the an App Package when requested - Note 3 */ @@ -802,9 +904,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -814,11 +917,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")), v_headers ))); @@ -833,7 +937,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_app_pkg_info( mw_app_pkg_info( - PX_APP_PKG_ID + v_app_pkg_info.id )))))) -> value v_response { tc_ac.stop; @@ -845,9 +949,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_003_01_OK - + /** * @desc Check that MEO returns the an App Package when requested - Note 3 */ @@ -855,9 +962,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -867,11 +975,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info, true); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")), v_headers ))); @@ -898,12 +1007,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_003_02_OK - + /** - * @desc Check that MEO responds with an error when it receives - * a request for retrieving a App Package referred with a wrong ID + * @desc Check that MEO responds with an error when it receives a request for retrieving a App Package referred with a wrong ID */ testcase TC_MEC_MEC010p2_MEO_PKGM_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -911,7 +1022,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -925,7 +1036,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_PKG_ID, "UTF-8")), v_headers ))); @@ -948,9 +1059,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_003_NF - + /** * @desc Check that MEO deletes an App Package when requested */ @@ -958,9 +1071,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -970,11 +1084,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")), v_headers ))); @@ -997,9 +1112,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_004_OK - + /** * @desc Check that MEO responds with an error when it receives * a request for deleting an App Package referred with a wrong ID @@ -1010,7 +1128,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1024,7 +1142,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_PKG_ID, "UTF-8")), v_headers ))); @@ -1047,9 +1165,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_004_NF - + /** * @desc Check that MEO updates the operational state of an individual application package resource */ @@ -1057,9 +1177,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1069,18 +1190,18 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_patch( - PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_app_pkg_info_modification( m_app_pkg_info_modification( DISABLED )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1092,7 +1213,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_app_pkg_info_modification( mw_app_pkg_info_modification( - DISABLED + DISABLED )))))) -> value v_response { tc_ac.stop; @@ -1104,12 +1225,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_005_OK - + /** - * @desc Check that MEO sends an error when it receives a malformed request to modify - * the operational state of an application package + * @desc Check that MEO sends an error when it receives a malformed request to modify the operational state of an application package */ testcase TC_MEC_MEC010p2_MEO_PKGM_005_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1117,7 +1240,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1136,9 +1259,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_http_message_body_json( m_body_json_app_pkg_info_modification( m_app_pkg_info_modification( - UNKNOWN + ERROR_BAD_REQUEST // Should be DISABLED )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1158,9 +1280,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_005_BR - + /** * @desc Check that MEO responds with an error when it receives * a request for updating an App Package referred with a wrong ID @@ -1171,7 +1295,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1212,9 +1336,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_005_NF - + /** * @desc Check that MEO service returns an application package subscription when requested */ @@ -1224,7 +1350,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1245,7 +1371,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_app_pkg_info_subscription( PX_CALLBACK_URI )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1271,12 +1396,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_response.response.body.json_body.appPkgSubscriptionInfo.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_006_OK - + /** - * @desc Check that MEO service sends an error when it receives a - * malformed request for creating a new subscription on AppPackages + * @desc Check that MEO service sends an error when it receives a malformed request for creating a new subscription on AppPackages */ testcase TC_MEC_MEC010p2_MEO_PKGM_006_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1284,7 +1411,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1306,7 +1433,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PX_CALLBACK_URI, "Invalid_field" )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1326,19 +1452,22 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_006_BR - + /** * @desc Check that MEO service returns the list of Application Package Subscriptions when requested */ - testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1348,6 +1477,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -1355,7 +1485,67 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_SUBS, v_headers ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_pkgm_subscription_link_list( + mw_app_pkg_ubscription_link_list( + mw_app_pkg_subscription_link_list_link( + -, + { + *, + mw_app_pkg_subscription_link_list_link_subscription(v_app_pkg_subscription_info.links.self_.href) , + * + } + ))))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info list ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK_01 + + /** + * @desc Check that MEO service returns an empty list of Application Package Subscriptions when requested + */ + testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEO_PKGM_SUBS, + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1365,8 +1555,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_pkgm_subscription_link_list // TODO - )))) -> value v_response { + mw_body_json_pkgm_subscription_link_list( + mw_app_pkg_ubscription_link_list( + mw_app_pkg_subscription_link_list_link( + -, + omit + ))))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info list ***"); @@ -1377,9 +1571,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK - + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK_02 + /** * @desc Check that MEO service returns an Application Package Subscription when requested */ @@ -1387,9 +1583,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1399,14 +1596,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(v_app_pkg_subscription_info.id, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1433,9 +1630,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_008_OK - + /** * @desc Check that MEO service returns an Application Package Subscription when requested */ @@ -1445,7 +1645,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1462,7 +1662,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1482,9 +1681,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_008_NF - + /** * @desc Check that MEO service deletes an Application Package Subscription when requested */ @@ -1492,9 +1693,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1504,14 +1706,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(v_app_pkg_subscription_info.id, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1531,9 +1733,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_009_OK - + /** * @desc Check that MEO service sends an error when it receives a deletion request for a subscription on AppPackages * with a wrong identifier @@ -1544,7 +1748,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1561,7 +1765,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1581,57 +1784,74 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_009_NF - + /** - * @desc Check that the MEO service sends a application package notification - * if the MEO service has an associated subscription and the event is generated + * @desc Check that the MEO service sends a application package notification if the MEO service has an associated subscription and the event is generated */ testcase TC_MEC_MEC010p2_MEO_PKGM_010_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + if (not(PICS_APP_PACKAGE_NOTIFICATIONS)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_NOTIFICATIONS required for executing the TC ***"); setverdict(inconc); stop; } // Test component configuration - f_cf_01_http_up(); + f_cf_01_http_notif_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info); f_init_default_headers_list(-, -, v_headers); + action("Trigger application package notification"); // TODO To be reviewed f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { - [] httpPort.receive( - mw_http_request( - mw_http_request_post( - PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), // TODO To be changed - v_headers, - mw_http_message_body_json( - mw_body_json_app_package_notification( - mw_app_pkg_notification // TODO To be refined - ))))) -> value v_response { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(v_app_pkg_subscription_info.id, "UTF-8")), // TODO To be changed + v_headers, + mw_http_message_body_json( + mw_body_json_app_package_notification( + mw_app_pkg_notification // TODO To be refined + ))))) { tc_ac.stop; + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + log("*** " & testcasename() & ": PASS: IUT successfully sends notification info ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } + [] httpPort_notif.receive { + tc_ac.stop; + + httpPort_notif.send(m_http_response(m_http_response_500_internal_error(v_headers))); + + log("*** " & testcasename() & ": FAIL: Expected message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); + f_cf_01_http_notif_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_010_OK - + /** * @desc Check that MEO reads the content of the AppD of on-boarded individual application package resources when requested */ @@ -1641,7 +1861,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1680,9 +1900,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_011_OK - + /** * @desc Check that MEO reads the content of the AppD of on-boarded individual application package resources when requested */ @@ -1692,7 +1914,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1730,9 +1952,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_011_NF - + /** * @desc Check that MEO fetches the on-boarded application package content identified by appPkgId when requested */ @@ -1742,7 +1966,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1781,9 +2005,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_01_OK - + /** * @desc Check that MEO fetches the on-boarded application package content identified by appDId when requested */ @@ -1793,7 +2019,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1832,9 +2058,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_02_OK - + /** * @desc Check that MEO fetches the on-boarded application package content identified by appPkgId when requested */ @@ -1844,7 +2072,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1881,9 +2109,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_01_NG - + /** * @desc Check that MEO service sends an error when it receives a request refering a wrong on-boarded appPkgId */ @@ -1893,7 +2123,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1930,23 +2160,25 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_02_NG - + } // End of group meo_pkgmgt - + group mepm_pkgmgt { - + /** * @desc Check that MEPM returns the list of App Packages when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEPM_PKGM_001_01_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1956,6 +2188,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -1963,7 +2196,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEPM_PKGM_URI, v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1973,8 +2205,17 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_app_pkg_info_list - )))) -> value v_response { + mw_body_json_app_pkg_info_list( + { + *, + mw_app_pkg_info( + v_app_pkg_info.id, + v_app_pkg_info.appDId + ) + , + * + } + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package list ***"); @@ -1985,19 +2226,22 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_001_01_OK - + /** * @desc Check that MEPM returns the list of App Packages when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEPM_PKGM_001_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2007,6 +2251,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info, true); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -2014,7 +2259,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED, // FIXME Rename into PX_PKGM_URI_ONBOARDED v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2024,8 +2268,19 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_app_pkg_info_list - )))) -> value v_response { + mw_body_json_app_pkg_info_list( + { + *, + mw_app_pkg_info( + v_app_pkg_info.id, + v_app_pkg_info.appDId, + -, -, -, -, -, + ONBOARDED + ) + , + * + } + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package list ***"); @@ -2036,19 +2291,21 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_001_02_OK - + /** - * @desc Check that MEPM responds with an error when it receives - * a malformed request for retrieving the list of existing App Packages + * @desc Check that MEPM responds with an error when it receives a malformed request for retrieving the list of existing App Packages */ testcase TC_MEC_MEC010p2_MEPM_PKGM_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2065,7 +2322,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEPM_PKGM_URI & "?filter()", v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2085,19 +2341,21 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_001_BR - + /** * @desc Check that MEPM returns the an App Package when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEPM_PKGM_002_01_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2107,14 +2365,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2126,8 +2384,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_app_pkg_info( mw_app_pkg_info( - PX_APP_PKG_ID - )))))) -> value v_response { + v_app_pkg_info.id, + v_app_pkg_info.appDId + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); @@ -2138,19 +2397,22 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_002_01_OK - + /** * @desc Check that MEPM returns the an App Package when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEPM_PKGM_002_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2160,14 +2422,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info, true); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2179,8 +2441,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_app_pkg_info( mw_app_pkg_info( - PX_APP_PKG_ID - )))))) -> value v_response { + v_app_pkg_info.id, + v_app_pkg_info.appDId, + -, -, -, -, -, + ONBOARDED + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); @@ -2191,20 +2456,21 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_002_02_OK - + /** - * @desc Check that MEPM responds with an error when it receives - * a request for retrieving a App Package referred with a wrong ID + * @desc Check that MEPM responds with an error when it receives a request for retrieving a App Package referred with a wrong ID */ testcase TC_MEC_MEC010p2_MEPM_PKGM_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2218,10 +2484,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_PKG_ID, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2230,7 +2495,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); @@ -2241,9 +2506,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_002_NF - + /** * @desc Check that MEPM service returns an application package subscription when requested */ @@ -2253,7 +2520,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2274,7 +2541,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_app_pkg_info_subscription( PX_CALLBACK_URI )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2300,20 +2566,21 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_response.response.body.json_body.appPkgSubscriptionInfo.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_003_OK - + /** - * @desc Check that MEPM service sends an error when it receives a - * malformed request for creating a new subscription on AppPackages + * @desc Check that MEPM service sends an error when it receives a malformed request for creating a new subscription on AppPackages */ testcase TC_MEC_MEC010p2_MEPM_PKGM_003_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2335,7 +2602,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PX_CALLBACK_URI, "Invalid_field" )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2344,7 +2610,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); @@ -2355,19 +2621,21 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_003_BR - + /** * @desc Check that MEPM service returns the list of Application Package Subscriptions when requested */ testcase TC_MEC_MEC010p2_MEPM_PKGM_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2377,6 +2645,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info, PX_MEPM_PKGM_SUBS); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -2384,7 +2653,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEPM_PKGM_SUBS, v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2394,8 +2662,16 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_pkgm_subscription_link_list // TODO - )))) -> value v_response { + mw_body_json_pkgm_subscription_link_list( + mw_app_pkg_ubscription_link_list( + mw_app_pkg_subscription_link_list_link( + -, + { + *, + mw_app_pkg_subscription_link_list_link_subscription(v_app_pkg_subscription_info.links.self_.href) , + * + } + ))))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info list ***"); @@ -2406,19 +2682,22 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_004_OK - + /** * @desc Check that MEPM service returns an Application Package Subscription when requested */ testcase TC_MEC_MEC010p2_MEPM_PKGM_005_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2428,11 +2707,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info, PX_MEPM_PKGM_SUBS); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(v_app_pkg_subscription_info.id, "UTF-8")), v_headers ))); @@ -2447,11 +2727,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_pkgm_subscription_info( mw_app_pkg_subscription_info( - PX_APP_PKG_ID, + v_app_pkg_subscription_info.id, -, PX_CALLBACK_URI, m_app_pkg_link("") // TODO - )))))) -> value v_response { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info ***"); @@ -2462,19 +2742,21 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_005_OK - + /** - * @desc Check that MEPM service returns an Application Package Subscription when requested + * @desc Check that MEPM service sends an error when it receives a query for a subscription on AppPackages with a wrong identifier */ testcase TC_MEC_MEC010p2_MEPM_PKGM_005_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2500,7 +2782,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); @@ -2511,19 +2793,21 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_005_NF - + /** * @desc Check that MEPM service deletes an Application Package Subscription when requested */ testcase TC_MEC_MEC010p2_MEPM_PKGM_006_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2533,6 +2817,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info, PX_MEPM_PKGM_SUBS); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -2540,7 +2825,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2549,7 +2833,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info ***"); @@ -2560,20 +2844,20 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_006_OK - + /** - * @desc Check that MEPM service sends an error when it receives a deletion request for a subscription on AppPackages - * with a wrong identifier + * @desc Check that MEPM service sends an error when it receives a deletion request for a subscription on AppPackages with a wrong identifier */ testcase TC_MEC_MEC010p2_MEPM_PKGM_006_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2590,7 +2874,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2599,7 +2882,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); @@ -2610,44 +2893,52 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_006_NF - + /** - * @desc Check that the MEPM service sends a application package notification - * if the MEPM service has an associated subscription and the event is generated + * @desc Check that the MEPM service sends a application package notification if the MEPM service has an associated subscription and the event is generated */ testcase TC_MEC_MEC007p2_MEPM_PKGM_007_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; } // Test component configuration - f_cf_01_http_up(); + f_cf_01_http_notif_up(); // Preamble - f_init_default_headers_list(-, -, v_headers); + f_create_app_pkg_subscription(v_app_pkg_subscription_info); + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")) & "/appd", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { - [] httpPort.receive( - mw_http_request( - mw_http_request_post( - PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), // TODO To be changed - v_headers, - mw_http_message_body_json( - mw_body_json_app_package_notification( - mw_app_pkg_notification // TODO To be refined - ))))) -> value v_response { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), // TODO To be changed + v_headers, + mw_http_message_body_json( + mw_body_json_app_package_notification( + mw_app_pkg_notification // TODO To be refined + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully sends notification info ***"); @@ -2658,19 +2949,22 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); + f_cf_01_http_notif_down(); } // End of testcase TC_MEC_MEC007p2_MEPM_PKGM_007_OK - + /** * @desc Check that MEPM reads the content of the AppD of on-boarded individual application package resources when requested */ - testcase TC_MEC_MEC010p2_MEPM_PKGM_009_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEPM_PKGM_008_NA() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2680,12 +2974,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info, true); f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")) & "/appd", + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")) & "/appd", v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2695,9 +2990,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - ? // TODO To be refined - ))) -> value v_response { + mw_http_response_405_not_applicable + )) { tc_ac.stop; // TODO Check HTTP message body @@ -2709,19 +3003,22 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_009_OK - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_008_NA + /** * @desc Check that MEPM reads the content of the AppD of on-boarded individual application package resources when requested */ - testcase TC_MEC_MEC010p2_MEPM_PKGM_009_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEPM_PKGM_009_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2731,12 +3028,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble - f_init_default_headers_list(-, -, v_headers); - // TODO Set accept filed to application/zip... + f_create_package_management(v_app_pkg_info, true); + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")) & "/appd", + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")) & "/appd", v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2746,12 +3043,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found - )) -> value v_response { + mw_http_response_ok( + ? // TODO To be refined + ))) { tc_ac.stop; // TODO Check HTTP message body - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2759,26 +3057,24 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_009_NF - - } // End of group mepm_pkgmgt - - group mepm_lifcyclemgt { - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_009_OK + /** - * @desc Check that MEC API provider has created the configuration information in AppD to the MEPM-V + * @desc Check that MEPM reads the content of the AppD of on-boarded individual application package resources when requested */ - testcase TC_MEC_MEC010p2_MEPM_LCM_01_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEPM_PKGM_009_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration @@ -2786,17 +3082,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); + // TODO Set accept filed to application/zip... httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/configure_platform_for_app", - v_headers, - m_http_message_body_json( - m_body_json_config_platform_for_app_request( - m_config_platform_for_app_request( - m_service_dependency( - "", "" // TODO Add PIXITs - ))))))); + m_http_request_get( + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_PKG_ID, "UTF-8")) & "/appd", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2804,10 +3096,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_202_accepted - )) -> value v_response { + mw_http_response_404_not_found + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + + // TODO Check HTTP message body + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2815,41 +3109,39 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEPM_LCM_01_OK - + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_009_NF + /** - * @desc Check that MEC API provider sends an error when it receives a malformed request - * for the configuration information in AppD to the MEPM-V + * @desc Check that MEPM responds with an error when it receives a PUT request referring an application descriptor AppD */ - testcase TC_MEC_MEC010p2_MEPM_LCM_01_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEPM_PKGM_010_FO() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info, true); f_init_default_headers_list(-, -, v_headers); + // TODO Set accept filed to application/zip... httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/configure_platform_for_app", - v_headers, - m_http_message_body_json( - m_body_json_config_platform_for_app_request( - m_config_platform_for_app_request( - m_service_dependency( - "", "" // TODO Add PIXITs - ))))))); + m_http_request_put( + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")) & "/appd", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2857,9 +3149,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { + mw_http_response_403_forbidden + )) { tc_ac.stop; + + // TODO Check HTTP message body log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -2868,41 +3162,39 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEPM_LCM_01_BR - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_010_FO + /** - * @desc Check that MEC API provider sends an error when it receives a request - * for the configuration information in AppD to the MEPM-V with not valid app instance ID + * @desc Check that MEPM responds with an error when it receives a DELETE request referring an application descriptor AppD */ - testcase TC_MEC_MEC010p2_MEPM_LCM_01_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEPM_PKGM_011_NA() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration f_cf_01_http_up(); // Preamble - f_init_default_headers_list(-, -, v_headers); + f_create_package_management(v_app_pkg_info, true); + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID, "UTF-8")) & "/configure_platform_for_app", - v_headers, - m_http_message_body_json( - m_body_json_config_platform_for_app_request( - m_config_platform_for_app_request( - m_service_dependency( - "", "" // TODO Add PIXITs - ))))))); + m_http_request_delete( + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")) & "/appd", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2910,9 +3202,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found - )) -> value v_response { + mw_http_response_405_not_applicable + )) { tc_ac.stop; + + // TODO Check HTTP message body log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -2921,43 +3215,39 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEPM_LCM_01_NF - - } // End of group mepm_lifcyclemgt - - group mex_lifcyclemgt { - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_011_NA + /** - * @desc Check that MEC API provider retrieves the list of App instances when requested + * @desc Check that MEPM fetches the on-boarded application package content identified by appPkgId when requested */ - testcase TC_MEC_MEC010p2_MEX_LCM_01_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEPM_PKGM_012_01_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration f_cf_01_http_up(); // Preamble - f_init_default_headers_list(-, -, v_headers); + f_create_package_management(v_app_pkg_info, true); + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI, - v_headers, - m_http_message_body_json( - m_body_json_create_app_instance_request( - m_create_app_instance_request( - PX_APP_ID - )))))); + m_http_request_get( + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")) & "/package_content", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2965,15 +3255,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_app_instance_info( - mw_app_instance_info( - -, - PX_APP_ID - )))))) -> value v_response { + mw_http_response_ok( + ? // TODO To be refined + ))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + + // TODO Check HTTP message body + log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2981,40 +3269,39 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_01_OK - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_012_01_OK + /** - * @desc Check that MEC API provider sends an error when it receives a malformed request - * for the creation of a new App Instance + * @desc Check that MEPM fetches the on-boarded application package content identified by appDId when requested */ - testcase TC_MEC_MEC010p2_MEX_LCM_01_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEPM_PKGM_012_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration f_cf_01_http_up(); // Preamble - f_init_default_headers_list(-, -, v_headers); + f_create_package_management(v_app_pkg_info, true); + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI, - v_headers, - m_http_message_body_json( - m_body_json_create_app_instance_request( - m_create_app_instance_request( - "" - )))))); + m_http_request_get( + PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")) & "/package_content", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -3022,10 +3309,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { + mw_http_response_ok( + ? // TODO To be refined + ))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + + // TODO Check HTTP message body + log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -3033,34 +3323,36 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_01_OK - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_012_02_OK + /** - * @desc Check that MEC API provider retrieves the list of App instances when requested + * @desc Check that MEPM fetches the on-boarded application package content identified by appPkgId when requested */ - testcase TC_MEC_MEC010p2_MEX_LCM_02_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEPM_PKGM_012_01_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration f_cf_01_http_up(); // Preamble - f_init_default_headers_list(-, -, v_headers); + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_APP_LCM_URI, - v_headers + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_PKG_ID, "UTF-8")) & "/package_content", + v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -3069,14 +3361,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_instance_info_list/*( - (*, mw_app_instance_info(-, PX_APP_ID), *) -*/ - )))) -> value v_response { + mw_http_response_404_not_found + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + + // TODO Check HTTP message body + log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -3084,35 +3374,1513 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_02_OK - + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_012_01_NF + /** - * @desc Check that MEC API provider retrieves an App Package when requested + * @desc Check that MEPM service sends an error when it receives a query with an application package with a wrong identifier */ - testcase TC_MEC_MEC010p2_MEX_LCM_03_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEPM_PKGM_012_02_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; - } - + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_ON_BOARDED_APP_PKG_ID, "UTF-8")) & "/package_content", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + // TODO Check HTTP message body + log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_012_02_NF + + } // End of group mepm_pkgmgt + + group mepm_lifcyclemgt { + + /** + * @desc Check that MEC API provider has created the configuration information in AppD to the MEPM-V + */ + testcase TC_MEC_MEC010p2_MEPM_LCM_01_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/configure_platform_for_app", + v_headers, + m_http_message_body_json( + m_body_json_config_platform_for_app_request( + m_config_platform_for_app_request( + { + m_service_dependency( + "", + "" // TODO Add PIXITs + ) + } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_LCM_01_OK + + /** + * @desc Check that MEC API provider sends an error when it receives a malformed request for the configuration information in AppD to the MEPM-V + */ + testcase TC_MEC_MEC010p2_MEPM_LCM_01_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/configure_platform_for_app", + v_headers, + m_http_message_body_json( + m_body_json_config_platform_for_app_request( + m_config_platform_for_app_request( + { + m_service_dependency( + "", + "" // TODO Add PIXITs + ) + } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_LCM_01_BR + + /** + * @desc Check that MEC API provider sends an error when it receives a request for the configuration information in AppD to the MEPM-V with not valid app instance ID + */ + testcase TC_MEC_MEC010p2_MEPM_LCM_01_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID, "UTF-8")) & "/configure_platform_for_app", + v_headers, + m_http_message_body_json( + m_body_json_config_platform_for_app_request( + m_config_platform_for_app_request( + { + m_service_dependency( + "", + "" // TODO Add PIXITs + ) + } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_LCM_01_NF + + } // End of group mepm_lifcyclemgt + + group mex_app_instance_mgt { + + /** + * @desc Check that MEC API provider creates a new App Package when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_package_management(v_app_pkg_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI, + v_headers, + m_http_message_body_json( + m_body_json_create_app_instance_request( + m_create_app_instance_request( + v_app_pkg_info.appDId, + v_app_pkg_info.appName & "_1" + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_instance_info( + mw_app_instance_info( + -, + v_app_pkg_info.appDId + )))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_response.response.body.json_body.appInstanceInfo.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_001_OK + + /** + * @desc Check that MEC API provider sends an error when it receives a malformed request for the creation of a new App Instance + */ + testcase TC_MEC_MEC010p2_MEX_LCM_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI, + v_headers, + m_http_message_body_json( + m_body_json_create_app_instance_request( + m_create_app_instance_request( + PX_NON_EXISTENT_APP_PKG_ID, + "PX_NON_EXISTENT_APP_PKG_ID_1" + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an error cocde ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_001_BR + + /** + * @desc Check that MEC API provider retrieves the list of App instances when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_app_instance(v_app_pkg_info, v_app_instance_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_APP_LCM_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_instance_info_list( + { + *, + mw_app_instance_info( + v_app_instance_info.id, + v_app_instance_info.appDId, + v_app_instance_info.appProvider + ), + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of app instance ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_002_OK + + /** + * @desc Check that MEC API provider retrieves an App Package when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_app_instance(v_app_pkg_info, v_app_instance_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_instance_info( + mw_app_instance_info( + v_app_instance_info.id, + v_app_instance_info.appDId, + v_app_instance_info.appProvider + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct app instance ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_003_OK + + /** + * @desc Check that MEC API provider fails on retrieving an App Instance when requested using wrong appInstanceId + */ + testcase TC_MEC_MEC010p2_MEX_LCM_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID)), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_003_NF + + /** + * @desc Check that MEC API provider service deletes an App Instance when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_app_instance(v_app_pkg_info, v_app_instance_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_004_OK + + /** + * @desc Check that MEC API provider fails on deletion of an App Instance when requested using wrong appInstanceId + */ + testcase TC_MEC_MEC010p2_MEX_LCM_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID)), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_004_NF + + /** + * @desc Check that MEC API provider service instantiates an App Instance when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_app_instance(v_app_pkg_info, v_app_instance_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "instantiate", + v_headers, + m_http_message_body_json( + m_body_json_instantiate_app_request( + m_instantiate_app_request( + m_selected_mec_host_info( + { + { key_name := PX_ONBOARD_HOSTID_NAME, key_value := { universal charstring := PX_ONBOARD_HOSTID_VALUE } } + } + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) -> value v_response { + tc_ac.stop; + + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": PASS: FAIL successfully responds with the correct app instance ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_value; + f_get_header(v_response.response.header, "Location", v_header_value); + var charstring v_app_lcm_op_occ_id := regexp( + v_header_value[0], + PX_MEX_LCM_OP_OCC_URI & "/(?*)", + 0 + ); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct header Location ", v_app_lcm_op_occ_id, " ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_005_OK + + /** + * @desc Check that MEC API provider service fails to instantiate an App Instance when it receives a malformed request + */ + testcase TC_MEC_MEC010p2_MEX_LCM_005_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_app_instance(v_app_pkg_info, v_app_instance_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "instantiate", + v_headers, + m_http_message_body_json( + m_body_json_instantiate_app_request( + m_instantiate_app_request( + m_selected_mec_host_info( + { + { key_name := "", key_value := { universal charstring := PX_ONBOARD_HOSTID_VALUE } } + } + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_005_BR + + /** + * @desc Check that MEC API provider service fails to instantiate an App Instance when it receives a request related to a not existing App Instance + */ + testcase TC_MEC_MEC010p2_MEX_LCM_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_app_instance(v_app_pkg_info, v_app_instance_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID)) & "instantiate", + v_headers, + m_http_message_body_json( + m_body_json_instantiate_app_request( + m_instantiate_app_request( + m_selected_mec_host_info( + { + { key_name := "", key_value := { universal charstring := PX_ONBOARD_HOSTID_VALUE } } + } + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_005_NF + + /** + * @desc Check that MEC API provider service terminates an App Instance when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_006_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "terminate", + v_headers, + m_http_message_body_json( + m_body_json_terminate_app_request( + m_terminate_app_request + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) -> value v_response { + tc_ac.stop; + + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": PASS: FAIL does not respond with the correct app instance ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_value; + f_get_header(v_response.response.header, "Location", v_header_value); + var charstring v_retrived_app_lcm_op_occ_id := regexp( + v_header_value[0], + PX_MEX_LCM_OP_OCC_URI & "/(?*)", + 0 + ); + if (not(match(v_retrived_app_lcm_op_occ_id, v_app_lcm_op_occ_id))) { + log("*** " & testcasename() & ": PASS: FAIL APP_LCM_OP_OCC_ID mismatched ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct header Location", v_response.response.header, " ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_006_OK + + /** + * @desc Check that MEC API provider service fails to terminate an App Instance when it receives a malformed request + */ + testcase TC_MEC_MEC010p2_MEX_LCM_006_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "instanicate", // Worng URL + v_headers, + m_http_message_body_json( + m_body_json_terminate_app_request( + m_terminate_app_request + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_006_BR + + /** + * @desc Check that MEC API provider service fails to terminate an App Instance when it receives a request related to a not existing App Instance + */ + testcase TC_MEC_MEC010p2_MEX_LCM_006_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID)) & "terminate", + v_headers, + m_http_message_body_json( + m_body_json_terminate_app_request( + m_terminate_app_request + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_006_NF + + /** + * @desc Check that MEC API provider service changes the status of an App Instance + */ + testcase TC_MEC_MEC010p2_MEX_LCM_007_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "operate", + v_headers, + m_http_message_body_json( + m_body_json_operate_app_request( + m_operate_app_request + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted( + mw_http_message_body_json( + mw_body_json_operate_app_request( + mw_operate_app_request + + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_007_OK + + /** + * @desc Check that MEC API provider service fails to operate on an App Instance when it receives a malformed request + */ + testcase TC_MEC_MEC010p2_MEX_LCM_007_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "operated", // Wrong URL + v_headers, + m_http_message_body_json( + m_body_json_operate_app_request( + m_operate_app_request + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_007_BR + + /** + * @desc Check that MEC API provider service fails to change the status of an App Instance when it receives a request related to a not existing App Instance + */ + testcase TC_MEC_MEC010p2_MEX_LCM_007_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID)) & "operate", + v_headers, + m_http_message_body_json( + m_body_json_operate_app_request( + m_operate_app_request + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_007_NF + + } // End of group mex_app_instance_mgt + + group mex_lifcyclemgt { + + /** + * @desc Check that MEC API provider service retrieves info about LCM Operation Occurrence on App Instances when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_008_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_OP_OCC_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_lcm_op_occ_list( + { + *, + mw_app_lcm_op_occ( + v_app_lcm_op_occ_id + ), + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of AppLcmOpOcc ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_008_OK + + /** + * @desc Check that MEC API provider service retrieves info about LCM Operation Occurrence on an App Instance when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_009_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_OP_OCC_URI & oct2char(unichar2oct(v_app_lcm_op_occ_id)), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_lcm_op_occ( + mw_app_lcm_op_occ( + v_app_lcm_op_occ_id, + -, -, -, -, + mw_app_lcm_op_occ_link( + PX_MEX_LCM_OP_OCC_URI & oct2char(unichar2oct(v_app_lcm_op_occ_id)) + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppLcmOpOcc ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_009_OK + + /** + * @desc Check that MEC API provider service retrieves info about LCM Operation Occurrence on an App Instance when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_009_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_OP_OCC_URI & oct2char(unichar2oct(PX_APP_NON_EXISTANT_LCM_OP_OCC_ID)), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_009_NF + + /** + * @desc Check that MEC API provider service creates a LCM Subscription when requested, where the subscription request can + * have SUBSCRIPTION_TYPE AppInstanceStateChangeSubscription or AppLcmOpOccStateChangeSubscription + */ + testcase TC_MEC_MEC010p2_MEX_LCM_010_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_app_inst_subscription_request( + m_app_inst_subscription_request( + PX_APP_INST_SUBSCRIPTION_REQUEST, + PX_CALLBACK_URI + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_inst_subscription_info( + mw_app_inst_subscription_info( + -, + PX_APP_INST_SUBSCRIPTION_REQUEST, + PX_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppLcmOpOcc ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance_subscription(v_response.response.body.json_body.appInstSubscriptionInfo.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_010_OK + + /** + * @desc Check that MEC API provider service creates a LCM Subscription when requested, where the subscription request can + * have SUBSCRIPTION_TYPE AppInstanceStateChangeSubscription or AppLcmOpOccStateChangeSubscription + */ + testcase TC_MEC_MEC010p2_MEX_LCM_010_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_app_inst_subscription_request( + m_app_inst_subscription_request( + "PX_APP_INST_SUBSCRIPTION_REQUEST", // Wrong subscription request + PX_CALLBACK_URI + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with orrect error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_010_BR + + /** + * @desc Check that MEC API provider service sends the list of LCM Subscriptions when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_011_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + var AppInstSubscriptionInfo v_app_inst_subscription_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_create_app_instance_subscription(v_app_inst_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_MEX_LCM_SUBS, v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -3122,17 +4890,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_app_instance_info( - mw_app_instance_info( - -, - PX_APP_ID, - -, -, -, -, -, -, - mw_link( - mw_link_type( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8"))) - ))))))) -> value v_response { + mw_body_json_app_instance_subscription_link_list( + mw_app_instance_subscription_link_list + ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppLcmOpOcc ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -3140,35 +4903,101 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_03_OK - + + // Postamble + f_delete_app_instance_subscription(v_app_inst_subscription_info.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_011_OK + /** - * @desc Check that MEC API provider fails on retrieving an App Instance when requested using wrong appInstanceId + * @desc Check that MEC API provider service sends the information about an existing LCM subscription when requested */ - testcase TC_MEC_MEC010p2_MEX_LCM_03_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEX_LCM_012_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + var AppInstSubscriptionInfo v_app_inst_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration f_cf_01_http_up(); // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_create_app_instance_subscription(v_app_inst_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_MEX_LCM_SUBS & oct2char(unichar2oct(v_app_inst_subscription_info.id)), v_headers - ))); + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_inst_subscription_info( + mw_app_inst_subscription_info( + v_app_inst_subscription_info.id, + PX_APP_INST_SUBSCRIPTION_REQUEST, + PX_CALLBACK_URI + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct AppInstSubscriptionInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance_subscription(v_app_inst_subscription_info.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_012_OK + + /** + * @desc Check that MEC API provider service sends an error when it receives a query for a not existing LCM Subscription + */ + testcase TC_MEC_MEC010p2_MEX_LCM_012_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEX_LCM_SUBS & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID)), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -3177,9 +5006,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) -> value v_response { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -3187,35 +5017,42 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_03_NF - + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_012_NF + /** - * @desc Check that MEC API provider service deletes an App Instance when requested + * @desc Check that MEC API provider service delete an existing LCM Subscription when requested */ - testcase TC_MEC_MEC010p2_MEX_LCM_04_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEX_LCM_013_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + var AppInstSubscriptionInfo v_app_inst_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration f_cf_01_http_up(); // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_create_app_instance_subscription(v_app_inst_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_MEX_LCM_SUBS & oct2char(unichar2oct(v_app_inst_subscription_info.id)), v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -3224,8 +5061,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) -> value v_response { + )) { tc_ac.stop; + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -3234,22 +5072,24 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_04_OK - + + // Postamble + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_013_OK + /** - * @desc Check that MEC API provider fails on deletion of an App Instance when requested using wrong appInstanceId + * @desc Check that MEC API provider service sends an error when it receives a deletion request for a not existing LCM Subscription */ - testcase TC_MEC_MEC010p2_MEX_LCM_04_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEX_LCM_013_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration @@ -3260,9 +5100,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_MEX_LCM_SUBS & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID)), v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -3271,8 +5111,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) -> value v_response { + )) { tc_ac.stop; + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -3281,9 +5122,252 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_04_NF - + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_013_NF + + /** + * @desc Check that MEC API provider service cancels an on going LCM Operation + */ + testcase TC_MEC_MEC010p2_MEX_LCM_014_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_OP_OCC_URI & oct2char(unichar2oct(v_app_lcm_op_occ_id)) & "/cancel", + v_headers, + m_http_message_body_json( + m_body_json_cancel_mode( + FORCEFUL + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppLcmOpOcc ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_014_OK + + /** + * @desc Check that MEC API provider service fails to cancel an on going LCM Operation when it receives a malformed request + */ + testcase TC_MEC_MEC010p2_MEX_LCM_014_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_OP_OCC_URI & oct2char(unichar2oct(v_app_lcm_op_occ_id)) & "/cancel", + v_headers, + m_http_message_body_json( + m_body_json_cancel_mode( + ERROR_CASE + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppLcmOpOcc ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_014_BR + + /** + * @desc Check that MEC API provider service fails to cancel an on going LCM Operation when it receives a request related to a not existing application LCM Operation + */ + testcase TC_MEC_MEC010p2_MEX_LCM_014_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_OP_OCC_URI & oct2char(unichar2oct(PX_APP_NON_EXISTANT_LCM_OP_OCC_ID)) & "/cancel", + v_headers, + m_http_message_body_json( + m_body_json_cancel_mode( + ERROR_CASE + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppLcmOpOcc ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_014_NF + + // TODO 15 & 16, how to achieve operationStates indicating value FAILED_TEMP + + /** + * @desc Check that MEC API provider service sends the information about an existing LCM subscription when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_017_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + var AppInstSubscriptionInfo v_app_inst_subscription_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_create_app_instance_subscription(v_app_inst_subscription_info); + f_init_default_headers_list(-, -, v_headers); + action("Trigger notification"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(v_app_inst_subscription_info.id, "UTF-8")), // TODO To be changed + v_headers, + mw_http_message_body_json( + mw_body_json_app_inst_notification( + mw_app_inst_notification // TODO To be refined + ))))) { + tc_ac.stop; + + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct AppInstSubscriptionInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] httpPort_notif.receive { + tc_ac.stop; + + httpPort_notif.send(m_http_response(m_http_response_500_internal_error(v_headers))); + + log("*** " & testcasename() & ": FAIL: Expected message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance_subscription(v_app_inst_subscription_info.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_017_OK + + } // End of group mex_lifcyclemgt - + } // End of module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..07d3737fa6516f31bf567a295901a8074710eea3 --- /dev/null +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn @@ -0,0 +1,163 @@ +module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl { + + // LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec + import from AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases all; + + control { + + if (PICS_MEC_PLAT) { + if (PICS_APP_PACKAGE_MANAGEMENT) { + + if (PICS_IUT_MEO) { + if (PICS_GRANTS_MANAGEMENT) { + execute(TC_MEC_MEC010p2_MEO_GRANT_001_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_001_BR()); + execute(TC_MEC_MEC010p2_MEO_GRANT_002_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_003_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_004_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_005_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_006_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_006_NF()); + } + + if (PICS_APP_PACKAGE_MANAGEMENT) { + execute(TC_MEC_MEC010p2_MEO_PKGM_001_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_001_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_004_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_004_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_006_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_006_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_01()); + execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_02()); + execute(TC_MEC_MEC010p2_MEO_PKGM_008_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_008_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_009_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_009_NF()); + + execute(TC_MEC_MEC010p2_MEO_PKGM_011_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_011_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_NF()); + } + + if (PICS_APP_PACKAGE_NOTIFICATIONS) { + execute(TC_MEC_MEC010p2_MEO_PKGM_010_OK()); + } + } + + if (PICS_IUT_MEPM) { + if (PICS_APP_PACKAGE_MANAGEMENT) { + execute(TC_MEC_MEC010p2_MEO_PKGM_001_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_001_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_004_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_004_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_006_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_006_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_01()); + execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_02()); + execute(TC_MEC_MEC010p2_MEO_PKGM_008_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_008_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_009_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_009_NF()); + + execute(TC_MEC_MEC010p2_MEO_PKGM_011_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_011_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_NF()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_001_01_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_001_02_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_001_BR()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_002_01_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_002_02_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_002_NF()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_003_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_003_BR()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_004_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_005_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_006_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_006_NF()); + execute(TC_MEC_MEC007p2_MEPM_PKGM_007_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_008_NA()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_011_NA()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_012_01_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_012_02_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_012_01_NF()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_012_02_NF()); + execute(TC_MEC_MEC010p2_MEPM_LCM_01_OK()); + execute(TC_MEC_MEC010p2_MEPM_LCM_01_BR()); + + if (PICS_APP_PACKAGE_NOTIFICATIONS) { + execute(TC_MEC_MEC010p2_MEPM_PKGM_009_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_009_NF()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_010_FO()); + } + } + } + + if (PICS_IUT_MEX) { + if (PIC_APP_LCM_MANAGEMENT) { + execute(TC_MEC_MEC010p2_MEX_LCM_001_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_001_BR()); + execute(TC_MEC_MEC010p2_MEX_LCM_002_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_003_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_003_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_004_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_004_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_005_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_005_BR()); + execute(TC_MEC_MEC010p2_MEX_LCM_005_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_006_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_006_BR()); + execute(TC_MEC_MEC010p2_MEX_LCM_006_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_007_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_007_BR()); + execute(TC_MEC_MEC010p2_MEX_LCM_007_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_008_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_009_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_009_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_010_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_010_BR()); + execute(TC_MEC_MEC010p2_MEX_LCM_011_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_012_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_012_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_013_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_013_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_014_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_014_BR()); + execute(TC_MEC_MEC010p2_MEX_LCM_014_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_017_OK()); + } + } + } + } + } // End of 'control' statement + +} // End of module AtsMec_TestControl diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..9b2aa7c42141e6b3cece25b5ad4d464448546b41 --- /dev/null +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk @@ -0,0 +1,38 @@ +suite := AtsMec_ApplicationPackageLifecycleAndOperationGranting + +sources := \ + AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn \ + AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/LocationAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ diff --git a/ttcn/AtsMec/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn b/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn similarity index 99% rename from ttcn/AtsMec/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn rename to ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn index 4386301bc6b8116981c8290cef54c81b66d92951..904a4d0c1ce16efe2f47058c39d34713cc21b43b 100644 --- a/ttcn/AtsMec/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn @@ -11,9 +11,8 @@ */ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { - // JSON - import from JSON all; + import from Json all; // Libcommon import from LibCommon_Time all; @@ -21,11 +20,11 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { import from LibCommon_Sync all; // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; // LibMec/DeviceApplicationInterface import from DeviceApplicationInterfaceAPI_TypesAndValues all; diff --git a/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn b/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0a20c8d96c9ee3adcb31bf8447b597b5f9c35183 --- /dev/null +++ b/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn @@ -0,0 +1,30 @@ +module AtsMec_DeviceApplicationInterfaceAPI_TestControl { + + // LibMec/DeviceApplicationInterfaceAPI + import from DeviceApplicationInterfaceAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec + import from AtsMec_DeviceApplicationInterfaceAPI_TestCases all; + + control { + + if (PICS_MEC_PLAT and PICS_SERVICES) { + // if (PICS_ENABLE_UE_APP_CTX) { + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_OK()); + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_BR()); + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_OK()); + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_BR()); + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_NF()); + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_OK()); + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_NF()); + // execute(TC_MEC_MEC016_MEO_UEAPPS_001_OK()); + // execute(TC_MEC_MEC016_MEO_UEAPPS_001_BR()); + // execute(TC_MEC_MEC016_MEO_UEAPPS_001_NF()); + // } + } + } // End of 'control' statement + +} // End of module AtsMec_TestControl diff --git a/ttcn/AtsMec_DeviceApplicationInterface/module.mk b/ttcn/AtsMec_DeviceApplicationInterface/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..a3bfbe021d0c3e235c69cc240c76e62ff60dd35a --- /dev/null +++ b/ttcn/AtsMec_DeviceApplicationInterface/module.mk @@ -0,0 +1,39 @@ +suite := AtsMec_DeviceApplicationInterface + +sources := \ + AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn \ + AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn similarity index 69% rename from ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn rename to ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn index a97354a989805cf67a4fd64817d513100c804886..29b7d54e32431b911079c6ded14e522a912f75d1 100644 --- a/ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn +++ b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn @@ -7,7 +7,7 @@ * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. - * @see ETSI GS MEC 003, Draft ETSI GS MEC 011 V2.2.1 + * @see ETSI GS MEC 003, Draft ETSI GS MEC 011 V3.2.1 */ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { @@ -16,11 +16,11 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { import from LibCommon_Sync all; // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; // LibMec/EdgePlatformApplicationEnablementAPI import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; @@ -29,6 +29,9 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { import from EdgePlatformApplicationEnablementAPI_Pics all; import from EdgePlatformApplicationEnablementAPI_Pixits all; + // LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Templates all; + // LibMec import from LibMec_TypesAndValues all; import from LibMec_Templates all; @@ -45,11 +48,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with a list of available MEC services for a given application instance when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -64,15 +68,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -82,11 +85,18 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_service_info_list - )))) { + mw_body_json_service_info_list( + { + *, + mw_service_info( + v_service_info.serName + ), + * + } + ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfoList ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with to the service creation ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -96,19 +106,22 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_001_OK /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var HttpMessage v_response; + var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control - if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; @@ -120,15 +133,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services?instance_id=" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID)), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services?instance_id=" & oct2char(unichar2oct(v_service_info.serInstanceId)), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -137,10 +149,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -150,18 +162,70 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_001_BR /** - * @desc Check that the IUT notifies the authorised relevant (subscribed) application instances when a new service for a given application instance is registered. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 + * @desc Check that the IUT responds with an error when a request with an unknown service is sent by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_APPSAQ_001_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services?ser_instance_id=" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_NAME)), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_001_NF + + /** + * @desc Check that the IUT notifies the authorised relevant (subscribed) application instances when a new service for a given application instance is registered */ testcase TC_MEC_MEC011_SRV_APPSAQ_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; var universal charstring v_service_name; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not (PICS_NOTIFICATIONS) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -181,31 +245,22 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", v_headers, m_http_message_body_json( m_body_json_service_info( m_service_info( v_service_name, - -, -, -, - m_service_info_link("m_service_info_link"), - -, - -, + -, -, -, -, -, -, m_transport_info( "transportId1", "TC_MEC_MEC011_SRV_APPSAQ_002_OK", REST_HTTP, "HTTP", "2.0", - m_end_point_uris({"/meMp1/service/MyEntryPoint"}), + m_end_point_uris({PX_APP_ENDPOINT_URI}), m_security_info - ) - ) - ) - ) - ) - ) - ); + ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -218,31 +273,25 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_body_json_service_info( mw_service_info( v_service_name //serName - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; - if (f_check_headers(valueof(v_response.response.header)) == true) { -/* TODO how to test this as the notification is for another MEC Application? - and - // MEC 011, clause 6.4.2 - the IUT entity sends a notification_message containing - body containing - notificationType set to "SerAvailabilityNotification", - services containing - serName set to SERVICE_NAME - _links containing - subscription set to MP1_SUBSCRIPTION_A - ; - ; - ; - ; - to the MEC_APP_Subscriber entity -*/ + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in creating service ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services" & "/(?*)", + 0 + ); + + // TODO how to test this as the notification is for another MEC Application? log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfo and set notification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { - log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } } [] tc_ac.timeout { @@ -252,12 +301,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_002_OK /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -282,7 +331,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", v_headers, m_http_message_body_json( m_body_json_service_info( @@ -291,13 +340,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { -, SUSPENDED, RAW, - m_service_info_link("m_service_info_link") - ) - ) - ) - ) - ) - ); + m_service_info_link("m_service_info_link") // Shall not be present in the request + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -306,10 +350,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -324,7 +368,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -347,7 +390,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/services", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/services", v_headers, m_http_message_body_json( m_body_json_service_info( @@ -372,7 +415,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -387,11 +430,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with the information on a specific service for a given application instance when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var HttpMessage v_response; + var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -406,15 +451,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(PX_SERVICE_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(v_service_info.serInstanceId, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -426,9 +470,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_message_body_json( mw_body_json_service_info( mw_service_info( - -, -, -, -, -, - PX_SERVICE_ID - )))))) { + v_service_info.serName, + -, -, -, -, + v_service_info.serInstanceId + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfo ***"); @@ -441,12 +486,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_003_OK /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 + * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application# */ testcase TC_MEC_MEC011_SRV_APPSAQ_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -469,11 +514,9 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -482,10 +525,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found() - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -500,13 +543,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT updates a service information for a given application instance when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring_list v_etag; var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -521,35 +564,18 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - f_create_service_info(v_service_info, v_headers); - if (f_check_headers(v_headers, c_etag_http_header) == false) { - log("*** " & testcasename() & ": INCONC: 'ETag' HTTP header not set ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - f_get_header(v_headers, c_etag_http_header, v_etag); // TODO Check headers - // If-Match header needs to have a PROPER_ETAG + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); - f_set_headers_list({ "If-Match" }, v_etag, v_headers); + v_service_info.version := PX_NEW_SERVICE_INFO_VERSION; httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(v_service_info.serName, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & v_subscription_id, v_headers, m_http_message_body_json( m_body_json_service_info( - m_service_info( - v_service_info.serName, - PX_NEW_SERVICE_INFO_VERSION, - -, -, - m_service_info_link("m_service_info_link"), - -, -, - v_service_info.transportInfo - ) - ) - ) - ) - ) - ); + v_service_info + ))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -560,13 +586,11 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_service_info( - mw_service_info( - v_service_info.serName, - PX_NEW_SERVICE_INFO_VERSION - )))))) { + v_service_info + ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfo ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a modified ServiceInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -576,19 +600,19 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_service_info(v_service_info); + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_004_OK /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_004_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring_list v_etag; var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -603,38 +627,21 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - f_create_service_info(v_service_info, v_headers); - if (f_check_headers(v_headers, c_etag_http_header) == false) { - log("*** " & testcasename() & ": INCONC: 'ETag' HTTP header not set ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - f_get_header(v_headers, c_etag_http_header, v_etag); // TODO Check headers - if (f_check_headers(v_headers, c_etag_http_header) == false) { - log("*** " & testcasename() & ": INCONC: 'ETag' HTTP header not set ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - f_get_header(v_headers, c_etag_http_header, v_etag); // TODO Check headers - // If-Match header needs to have a PROPER_ETAG + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); - f_set_headers_list({ "If-Match" }, v_etag, v_headers); httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(v_service_info.serName, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_service_info( - m_service_info( - v_service_info.serName & char(0, 0, 1, 111), - PX_NEW_SERVICE_INFO_VERSION, - -, -, - m_service_info_link("m_service_info_link") - ) - ) - ) - ) - ) - ); + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_service_info( + m_service_info( + v_service_info.serName, + PX_NEW_SERVICE_INFO_VERSION, + -, -, + m_service_info_link("m_service_info_link") + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -643,10 +650,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -656,13 +663,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_service_info(v_service_info); + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_004_BR /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_004_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -686,7 +692,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_ID, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_service_info( @@ -695,12 +701,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { PX_NEW_SERVICE_INFO_VERSION, -, -, m_service_info_link("m_service_info_link") - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -709,10 +710,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -727,13 +728,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_004_PF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring_list v_etag; var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -748,7 +749,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - f_create_service_info(v_service_info, v_headers); + f_create_service_info(v_service_info, v_subscription_id); if (f_check_headers(v_headers, c_etag_http_header) == false) { log("*** " & testcasename() & ": INCONC: 'ETag' HTTP header not set ***"); f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); @@ -760,7 +761,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(v_service_info.serName, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(v_service_info.serName, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_service_info( @@ -798,10 +799,115 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_service_info(v_service_info); + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_004_PF + /** + * @desc Check that the IUT executes the deletion of a service for a given application instance when requested by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_APPSAQ_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_service_info(v_service_info, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds successfully to the service delation ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_005_OK + + /** + * @desc Check that the IUT responds with an error when a request for deletion of a unknown service is sent by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_APPSAQ_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & PX_NON_EXISTENT_SERVICE_NAME, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds successfully with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_005_NF + } // End of group app_saq /* @@ -811,7 +917,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -868,7 +973,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -922,12 +1026,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications on service availability events. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -943,7 +1047,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); - //TODO Create a subsciption (see TC_MEC_MEC011_SRV_APPSUB_001_OK); httpPort.send( m_http_request( m_http_request_post( @@ -953,16 +1056,9 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_body_json_app_termination_notif_subscription( m_app_termination_notif_subscription( PX_APP_TERM_NOTIF_CALLBACK_URI, - -/*m_self( - { href := PX_HREF } - )*/, - "ID1"/*PX_APP_INSTANCE_ID*/ - ) - ) - ) - ) - ) - ); + -, + PX_APP_INSTANCE_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -974,16 +1070,26 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_message_body_json( mw_body_json_app_termination_notif_subscription( mw_app_termination_notif_subscription( - PX_APP_TERM_NOTIF_CALLBACK_URI - )))))) -> value v_response { + PX_APP_TERM_NOTIF_CALLBACK_URI, + mw_self, + PX_APP_INSTANCE_ID + )))))) -> value v_response { tc_ac.stop; - if (f_check_headers(valueof(v_response.response.header)) == true) { - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationNotificationSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { + if (f_check_headers(v_response.response.header) == false) { log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions" & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationNotificationSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } } [] tc_ac.timeout { @@ -993,12 +1099,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_app_termination_notif_subscription(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSUB_002_OK /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1032,12 +1138,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { { href := PX_HREF } ), PX_APP_INSTANCE_ID - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1046,10 +1147,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1064,11 +1165,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with the information on a specific subscription when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var AppTerminationNotificationSubscription v_app_termination_notification_subscription; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -1083,15 +1185,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_app_termination_notif_subscription(v_app_termination_notification_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & v_subscription_id, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1102,8 +1203,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_app_termination_notif_subscription( - mw_app_termination_notif_subscription - ))))) { + v_app_termination_notification_subscription + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationNotificationSubscription ***"); @@ -1116,12 +1217,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_app_termination_notif_subscription(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSUB_003_OK /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1146,9 +1247,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1157,7 +1256,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); @@ -1175,11 +1274,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT acknowledges the unsubscribe from service availability event notifications when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var AppTerminationNotificationSubscription v_app_termination_notification_subscription; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -1194,15 +1294,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_app_termination_notif_subscription(v_app_termination_notification_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & v_subscription_id, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1211,7 +1310,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); @@ -1229,7 +1328,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_004_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1255,9 +1353,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_request_delete( PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1266,10 +1362,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1284,12 +1380,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of group app_sub - group conf_task { /** * @desc Check that the IUT responds that it has completed the application level termination - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/CONFTASK/ConfirmTasks.tplan2 */ testcase TC_MEC_MEC011_SRV_CONFTASK_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1312,16 +1406,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/applications/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/confirm_termination", + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/confirm_termination", v_headers, m_http_message_body_json( m_body_json_app_termination_confirmation( { operationAction := TERMINATING } - ) - ) - ) - ) - ); + ))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1330,7 +1420,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationConf ***"); @@ -1348,7 +1438,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an operationAction is sent to an unknown application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/CONFTASK/ConfirmTasks.tplan2 */ testcase TC_MEC_MEC011_SRV_CONFTASK_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1376,11 +1465,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_message_body_json( m_body_json_app_termination_confirmation( { operationAction := TERMINATING } - ) - ) - ) - ) - ); + ))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1389,7 +1474,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); @@ -1407,7 +1492,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds that the MEC application is up and running - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/CONFTASK/ConfirmTasks.tplan2 */ testcase TC_MEC_MEC011_SRV_CONFTASK_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1430,16 +1514,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/applications/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/confirm_ready", + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/applications/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/confirm_ready", v_headers, m_http_message_body_json( m_body_json_app_ready_confirmation( { indication := "READY" } - ) - ) - ) - ) - ); + ))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1448,7 +1528,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppReadyConf ***"); @@ -1466,7 +1546,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an indication is sent to an unknown application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/CONFTASK/ConfirmTasks.tplan2 */ testcase TC_MEC_MEC011_SRV_CONFTASK_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1489,16 +1568,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/applications/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/confirm_ready", + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/applications/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/confirm_ready", v_headers, m_http_message_body_json( m_body_json_app_ready_confirmation( { indication := "READY" } - ) - ) - ) - ) - ); + ))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1507,7 +1582,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); @@ -1532,7 +1607,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with a list of active DNS rules when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 */ testcase TC_MEC_MEC011_SRV_DNS_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1586,9 +1660,61 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_DNS_001_OK + /** + * @desc Check that the IUT responds with a list of active DNS rules when queried by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_DNS_001_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/dns_rules", + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DnsRuleList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_DNS_001_NF + /** * @desc Check that the IUT responds with the information on a specific DNS rule when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 */ testcase TC_MEC_MEC011_SRV_DNS_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1646,7 +1772,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 */ testcase TC_MEC_MEC011_SRV_DNS_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1681,11 +1806,1007 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found - )) { + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_DNS_002_NF + + /** + * @desc Check that the IUT updates a specific DNS rule when commanded by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_DNS_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + // TODO If-Match header needs to have a PROPER_ETAG + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/dns_rules/" & oct2char(unichar2oct(PX_DNS_RULE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_dns_rule( + m_dns_rule( + PX_DNS_RULE_ID + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_dns_rule( + mw_dns_rule( + PX_DNS_RULE_ID + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DnsRule ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_DNS_003_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_DNS_003_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + // TODO If-Match header needs to have a PROPER_ETAG + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/dns_rules/" & oct2char(unichar2oct(PX_DNS_RULE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_dns_rule( + m_dns_rule( + PX_DNS_RULE_ID, + -, -, -, -, + PX_DNS_INVALID_STATE + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_DNS_003_BR + + /** + * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_DNS_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + // TODO If-Match header needs to have a PROPER_ETAG + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/dns_rules/" & oct2char(unichar2oct(PX_NON_EXISTENT_DNS_RULE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_dns_rule( + m_dns_rule( + PX_DNS_RULE_ID, + -, -, + PX_INVALID_IP_ADDRESS + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_DNS_003_NF + + /** + * @desc Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition + */ + testcase TC_MEC_MEC011_SRV_DNS_003_PF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + // If-Match header needs to have an INVALID_ETAG + f_set_headers_list({ "If-Match" }, { int2str(f_get_current_timestamp_utc()) }, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/dns_rules/" & oct2char(unichar2oct(PX_DNS_RULE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_dns_rule( + m_dns_rule( + PX_DNS_RULE_ID, + -, -, + PX_IP_ADDRESS + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_412_precondition_failed + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 412 Precondition Failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_DNS_003_PF + + } // End of group app_dns + + /* + * LivenessInfo (MSL) + */ + group msl { + + /** + * @desc Check that the IUT responds with the liveness of a MEC service instance when queried by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MSL_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_subscription_id; + var charstring v_uri; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_service_info_with_liveness(v_service_info, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + v_uri := regexp( + oct2char(unichar2oct(v_service_info.links.liveness.href, "UTF-8")), + "?+" & PX_LINK_LIV & "/(?*)", + 0 + ); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LINK_LIV & "/" & v_uri, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_srv_liveness_info( + mw_service_liveness_info( + ACTIVE + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceLivenessInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_service_info(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MSL_001_OK + + /** + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MSL_001_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LINK_LIV, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_APPSUB_002_OK + + /** + * @desc Check that the IUT updates the liveness of a MEC service instance when requested by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MSL_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_subscription_id; + var charstring v_uri; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_service_info_with_liveness(v_service_info, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + v_uri := regexp( + oct2char(unichar2oct(v_service_info.links.liveness.href, "UTF-8")), + "?+" & PX_LINK_LIV & "/(?*)", + 0 + ); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_LINK_LIV & "/" & v_uri, + v_headers, + m_http_message_body_json( + m_body_json_srv_liveness_update( + m_service_liveness_update( + ACTIVE + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_srv_liveness_info( + mw_service_liveness_info( + ACTIVE + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated ServiceLivenessInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_service_info(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MSL_002_OK + + /** + * @desc Check that the IUT responds with an error when incorrect parameters were sent by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MSL_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_subscription_id; + var charstring v_uri; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_service_info_with_liveness(v_service_info, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + v_uri := regexp( + oct2char(unichar2oct(v_service_info.links.liveness.href, "UTF-8")), + "?+" & PX_LINK_LIV & "/(?*)", + 0 + ); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_LINK_LIV & "/" & v_uri, + v_headers, + m_http_message_body_json( + m_body_json_srv_liveness_update( + m_service_liveness_update( + INACTIVE + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_service_info(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MSL_002_BR + + } // End of group msl + + group reg_apps { + + /** + * @desc Check that the IUT acknowledges the registration by a MEC Application to the MEC platform + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, -, + -,//PX_APP_INSTANCE_ID, + m_end_point_uris({PX_APP_ENDPOINT_URI}) + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_info_regapps( + mw_app_info( + PX_APP_NAME, + -, -, -, + PX_APP_INSTANCE_ID, + mw_end_point_uris({PX_APP_ENDPOINT_URI}) + )))))) -> value v_response { + tc_ac.stop; + + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: Location header not present ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_value; + f_get_header(v_response.response.header, "Location", v_header_value); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_app_deletion(v_response.response.body.json_body.appInfo_regapps.appInstanceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_OK_01 + + /** + * @desc Check that the IUT acknowledges the registration by a MEC Application to the MEC platform + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, -, + PX_APP_INSTANCE_ID, + m_end_point_uris({PX_APP_ENDPOINT_URI}) + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_info_regapps( + mw_app_info( + PX_APP_NAME, + -, -, -, + PX_APP_INSTANCE_ID, + mw_end_point_uris({PX_APP_ENDPOINT_URI}) + )))))) -> value v_response { + tc_ac.stop; + + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: Location header not present ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_value; + f_get_header(v_response.response.header, "Location", v_header_value); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_app_deletion(v_response.response.body.json_body.appInfo_regapps.appInstanceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_OK_02 + + /** + * @desc Check that the IUT acknowledges the registration by a MEC Application instanciated by the MEC platform + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_001_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID, + m_end_point_uris({PX_APP_ENDPOINT_URI}) + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_info_regapps( + mw_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID, + mw_end_point_uris({PX_APP_ENDPOINT_URI}) + )))))) -> value v_response { + tc_ac.stop; + + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: Location header not present ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_value; + f_get_header(v_response.response.header, "Location", v_header_value); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_app_deletion(v_response.response.body.json_body.appInfo_regapps.appInstanceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_OK_03 + + /** + * @desc Check that the IUT responds with an error message when the IUT received a registration with missing fields from a MEC Application instanciated by the MEC platform + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, -, + -, // appInstanceId shall be provided as isInsByMec is set to true + -, -, -, -, -, + true + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_01 + + /** + * @desc Check that the IUT responds with an error message when the IUT received a registration with missing fields from a MEC Application instanciated by the MEC platform + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID, + -, -, -, -, -, + false + + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_03 + + /** + * @desc Check that the IUT responds with an error message when the IUT received by a MEC Application registration with unexpected appServiceRequired + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID, + -, + { + m_service_dependency( + PX_NON_EXISTENT_SERVICE_ID, + PX_SERVICE_INFO_VERSION + ) + } + + + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_03 + + /** + * @desc Check that the IUT responds with an error message when the IUT received by a MEC Application registration with unexpected appServiceOptional + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID, + -, + -, + { + m_service_dependency( + PX_NON_EXISTENT_SERVICE_ID, + PX_SERVICE_INFO_VERSION + ) + } + + + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1696,18 +2817,17 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_DNS_002_NF + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_04 /** - * @desc Check that the IUT updates a specific DNS rule when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 + * @desc Check that the IUT responds with an error message when the IUT received by a MEC Application registration with unexpected appFeatureRequired */ - testcase TC_MEC_MEC011_SRV_DNS_003_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_05() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; @@ -1719,23 +2839,29 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - // TODO If-Match header needs to have a PROPER_ETAG f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/dns_rules/" & oct2char(unichar2oct(PX_DNS_RULE_ID, "UTF-8")), + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, v_headers, m_http_message_body_json( - m_body_json_dns_rule( - m_dns_rule( - PX_DNS_RULE_ID - ) - ) - ) - ) - ) - ); + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID, + -, + -, + -, + { + m_feature_dependency( + "", + "" + ) + } + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1743,15 +2869,11 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_dns_rule( - mw_dns_rule( - PX_DNS_RULE_ID - )))))) { + mw_http_response_400_bad_request + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a DnsRule ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1762,13 +2884,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_DNS_003_OK + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_05 /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 + * @desc Check that the IUT responds with an error message when the IUT received by a MEC Application registration with unexpected appFeatureOptional + */ - testcase TC_MEC_MEC011_SRV_DNS_003_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_06() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; @@ -1785,26 +2907,30 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - // TODO If-Match header needs to have a PROPER_ETAG f_init_default_headers_list(-, -, v_headers); - httpPort.send( m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/dns_rules/" & oct2char(unichar2oct(PX_DNS_RULE_ID, "UTF-8")), + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, v_headers, m_http_message_body_json( - m_body_json_dns_rule( - m_dns_rule( - PX_DNS_RULE_ID, - -, -, -, -, - PX_DNS_INVALID_STATE - ) - ) - ) - ) - ) - ); + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID, + -, + -, + -, + -, + { + m_feature_dependency( + "", + "" + ) + } + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1812,11 +2938,11 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) { + mw_http_response_400_bad_request + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1827,18 +2953,18 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_DNS_003_BR + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_06 /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 + * @desc Check that the IUT responds with the AppInfo description when queried by a MEC Application */ - testcase TC_MEC_MEC011_SRV_DNS_003_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var AppInfo v_app_info; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; @@ -1850,25 +2976,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - // TODO If-Match header needs to have a PROPER_ETAG + f_app_registration(v_app_info, v_headers); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/dns_rules/" & oct2char(unichar2oct(PX_NON_EXISTENT_DNS_RULE_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_dns_rule( - m_dns_rule( - PX_DNS_RULE_ID, - -, -, - PX_INVALID_IP_ADDRESS - ) - ) - ) - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(v_app_info.appInstanceId, "UTF-8")), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1876,11 +2991,18 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found - )) { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_info_regapps( + v_app_info/*mw_app_info( + v_app_info.appName, + -, -, + v_app_info.appDId, + v_app_info.appInstanceId*/ + ))))) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct AppInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1890,19 +3012,19 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_app_deletion(v_app_info.appInstanceId); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_DNS_003_NF + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_002_OK /** - * @desc Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 + * @desc Check that the IUT responds with an error when when it receives a request for returning an AppInfo with a wrong ID */ - testcase TC_MEC_MEC011_SRV_DNS_003_PF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; @@ -1915,25 +3037,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); - // If-Match header needs to have an INVALID_ETAG - f_set_headers_list({ "If-Match" }, { int2str(f_get_current_timestamp_utc()) }, v_headers); httpPort.send( m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/dns_rules/" & oct2char(unichar2oct(PX_DNS_RULE_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_dns_rule( - m_dns_rule( - PX_DNS_RULE_ID, - -, -, - PX_IP_ADDRESS - ) - ) - ) - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1941,11 +3050,11 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_412_precondition_failed - )) { + mw_http_response_404_not_found + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 412 Precondition Failed ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1956,19 +3065,15 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_DNS_003_PF - - } // End of group app_dns - - group liv { + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_002_NF /** - * @desc Check that the IUT responds with the liveness of a MEC service instance when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/Liveness.tplan2 + * @desc Check that the IUT responds with 204 No Content when queried to update MEC Application registration */ - testcase TC_MEC_MEC011_SRV_MSL_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var AppInfo v_app_info; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -1983,15 +3088,23 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_app_registration(v_app_info, v_headers); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & "/" & PX_LINK_LIV, - v_headers - ) - ) - ); + m_http_request_put( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(v_app_info.appInstanceId, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + v_app_info.appName, + v_app_info.appProvider, + -, + v_app_info.appDId, + v_app_info.appInstanceId, + v_app_info.endpoint + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1999,15 +3112,11 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_srv_liveness_info( - mw_service_liveness_info( - ACTIVE - )))))) { + mw_http_response_204_no_content + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceLivenessInfo ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2017,16 +3126,17 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_app_deletion(v_app_info.appInstanceId); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_MSL_001_OK + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_003_OK /** - * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/Liveness.tplan2 + * @desc Check that the IUT responds with an error when queried to update MEC Application registration with a wrong ID */ - testcase TC_MEC_MEC011_SRV_MSL_001_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var AppInfo v_app_info; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -2041,15 +3151,22 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_app_registration(v_app_info, v_headers); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & "/" & PX_LINK_LIV, - v_headers - ) - ) - ); + m_http_request_put( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + v_app_info.appName, + v_app_info.appProvider, + -, + v_app_info.appDId, + v_app_info.appInstanceId + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2057,8 +3174,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found - )) { + mw_http_response_404_not_found + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); @@ -2071,16 +3188,17 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_app_deletion(v_app_info.appInstanceId); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_APPSUB_002_OK + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_003_NF /** - * @desc Check that the IUT updates the liveness of a MEC service instance when requested by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/Liveness.tplan2 + * @desc Check that the IUT responds with 204 No Content when queried to delete an existing MEC Application registration */ - testcase TC_MEC_MEC011_SRV_MSL_002_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var AppInfo v_app_info; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -2095,26 +3213,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_app_registration(v_app_info, v_headers); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_patch( - PICS_ROOT_API & "/" & PX_LINK_LIV, - v_headers, - m_http_message_body_json( - m_body_json_srv_liveness_info( - m_service_liveness_info( - ACTIVE, - m_time_stamp( - f_get_current_timestamp_utc() - ), - 10 - ) - ) - ) - ) - ) - ); + m_http_request_delete( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(v_app_info.appInstanceId, "UTF-8")), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2122,15 +3228,11 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_srv_liveness_info( - mw_service_liveness_info( - ACTIVE - )))))) { + mw_http_response_204_no_content + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a new ServiceLivenessInfo ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2141,13 +3243,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_MSL_002_OK + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_004_OK /** - * @desc Check that the IUT responds with an error when incorrect parameters were sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/Liveness.tplan2 + * @desc Check that the IUT responds with an error when queried to delete an unknown MEC Application registration */ - testcase TC_MEC_MEC011_SRV_MSL_002_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_004_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; @@ -2167,23 +3268,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_patch( - PICS_ROOT_API & "/" & PX_LINK_LIV, - v_headers, - m_http_message_body_json( - m_body_json_srv_liveness_info( - m_service_liveness_info( - INACTIVE, - m_time_stamp( - f_get_current_timestamp_utc() - ), - 10 - ) - ) - ) - ) - ) - ); + m_http_request_delete( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2191,8 +3279,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) { + mw_http_response_404_not_found + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); @@ -2206,9 +3294,9 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_MSL_002_BR + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_004_NF - } // End of group liv + } // End of group reg_apps /* * Service Availability Query (SAQ) @@ -2217,7 +3305,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with a list of available MEC services when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SAQ/PlatServices.tplan2 */ testcase TC_MEC_MEC011_SRV_SAQ_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2242,9 +3329,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2255,7 +3340,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_service_info_list - )))) { + )))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfoList ***"); @@ -2273,7 +3358,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SAQ/PlatServices.tplan2 */ testcase TC_MEC_MEC011_SRV_SAQ_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2299,9 +3383,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & "?instance_id=" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2310,10 +3392,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request() - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2328,11 +3410,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with the information on a specific service when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SAQ/PlatServices.tplan2 */ testcase TC_MEC_MEC011_SRV_SAQ_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -2347,11 +3430,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & "/" & oct2char(unichar2oct(PX_SERVICE_ID, "UTF-8")), + PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & "/" & v_subscription_id, v_headers ) ) @@ -2366,9 +3450,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_service_info( - mw_service_info( - PX_SERVICE_ID - )))))) { + v_service_info + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfo ***"); @@ -2381,12 +3464,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_SAQ_002_OK /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SAQ/PlatServices.tplan2 */ testcase TC_MEC_MEC011_SRV_SAQ_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2411,9 +3494,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2422,7 +3503,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); @@ -2440,19 +3521,19 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of group saq - /* - * Service Subscriptions (SRVSUB) - */ + /* + * Service Subscriptions (SRVSUB) + */ group srv_sub { /** * @desc Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var SerAvailabilityNotificationSubscription v_ser_availability_notification_subscription; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -2468,15 +3549,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); - f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription); + f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription, v_subscription_id); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2488,7 +3567,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_message_body_json( mw_body_json_subscription_link_list( mw_subscription_link_list - ))))) { + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a Mp1SubscriptionLinkList ***"); @@ -2501,13 +3580,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_ser_availability_notification_subscription(v_ser_availability_notification_subscription); + f_delete_ser_availability_notification_subscription(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_SRVSUB_001_OK /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2530,7 +3608,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", v_headers ) ) @@ -2561,12 +3639,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications on service availability events - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -2585,18 +3663,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", v_headers, m_http_message_body_json( m_body_json_srv_avail_notif_subscription( m_srv_avail_notif_subscription( PX_SRV_AVAIL_NOTIF_CALLBACK_URI - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2609,15 +3682,25 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_body_json_srv_avail_notif_subscription( mw_srv_avail_notif_subscription( PX_SRV_AVAIL_NOTIF_CALLBACK_URI - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; - if (f_check_headers(valueof(v_response.response.header)) == true) { + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in creating service ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions" & "/(?*)", + 0 + ); + + // TODO how to test this as the notification is for another MEC Application? log("*** " & testcasename() & ": PASS: IUT successfully responds with a SerAvailabilityNotificationSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { - log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } } [] tc_ac.timeout { @@ -2627,13 +3710,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_ser_availability_notification_subscription(v_response.response.body.json_body.serAvailabilityNotificationSubscription); + f_delete_ser_availability_notification_subscription(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSUB_002_OK /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2657,7 +3739,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", v_headers, m_http_message_body_json( m_body_json_srv_avail_notif_subscription( @@ -2680,7 +3762,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2695,13 +3777,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with the information on a specific subscription when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var SerAvailabilityNotificationSubscription v_ser_availability_notification_subscription; - var charstring v_uri; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -2716,21 +3797,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); - f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription); - v_uri := regexp( - oct2char(unichar2oct(v_ser_availability_notification_subscription.links.self_.href)), - "?+(" & PX_MEC_SVC_MGMT_APPS_URI & "/?*)", - 0 - ); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & v_uri, + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & v_subscription_id, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; @@ -2740,9 +3814,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_srv_avail_notif_subscription( - mw_srv_avail_notif_subscription( - v_ser_availability_notification_subscription.callbackReference - )))))) { + v_ser_availability_notification_subscription + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a SerAvailabilityNotificationSubscription ***"); @@ -2755,13 +3828,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_ser_availability_notification_subscription(v_ser_availability_notification_subscription); + f_delete_ser_availability_notification_subscription(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_SRVSUB_003_OK /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2784,7 +3856,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ) ) @@ -2815,13 +3887,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT acknowledges the unsubscribe from service availability event notifications when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var SerAvailabilityNotificationSubscription v_ser_availability_notification_subscription; - var charstring v_uri; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -2836,19 +3907,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); - f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription); - v_uri := regexp( - oct2char(unichar2oct(v_ser_availability_notification_subscription.links.self_.href)), - "?+(" & PX_MEC_SVC_MGMT_APPS_URI & "/?*)", - 0 - ); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & v_uri, + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & v_subscription_id, v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2857,7 +3923,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); @@ -2875,7 +3941,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_004_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2899,7 +3964,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), v_headers ) ) @@ -2912,7 +3977,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); @@ -2930,14 +3995,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of group srv_sub - /* - * Timing capabilities (TIME) - */ + /* + * Timing capabilities (TIME) + */ group timing { /** * @desc Check that the IUT responds with timing capabilities when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TIME/PlatTiming.tplan2 */ testcase TC_MEC_MEC011_SRV_TIME_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2997,7 +4061,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with current time when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TIME/PlatTiming.tplan2 */ testcase TC_MEC_MEC011_SRV_TIME_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3057,14 +4120,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of group timing - /* - * Traffic rules (TRAF) - */ + /* + * Traffic rules (TRAF) + */ group traffic_rules { /** * @desc Check that the IUT responds with a list of available traffic rules when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/PlatTrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3121,7 +4183,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/PlatTrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3175,7 +4236,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with the information on a specific traffic rule when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/TrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3233,7 +4293,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT updates a specific traffic rule when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/TrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3302,7 +4361,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/PlatTrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_003_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3351,7 +4409,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -3366,7 +4424,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/PlatTrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3430,7 +4487,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/PlatTrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_003_PF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3495,14 +4551,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of group traffic_rules - /* - * Transport (TRANS) - */ + /* + * Transport (TRANS) + */ group transport_rules { /** * @desc Check that the IUT responds with a list of available transports when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRANS/PlatTransport.tplan2 */ testcase TC_MEC_MEC011_SRV_TRANS_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables diff --git a/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..56fdf43e234effd09aa21f07cc3546cf3490def9 --- /dev/null +++ b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn @@ -0,0 +1,106 @@ +module AtsMec_EdgePlatformApplicationEnablementAPI_TestControl { + + // LibMec/AppEnablementAPI + import from EdgePlatformApplicationEnablementAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec_EdgePlatformApplicationEnablementAPI + import from AtsMec_EdgePlatformApplicationEnablementAPI_TestCases all; + + control { + + if (PICS_MEC_PLAT and PICS_SERVICES) { + if (PICS_APP_ENABLEMENT_API_SUPPORTED) { + execute(TC_MEC_MEC011_SRV_APPSAQ_001_OK()); + execute(TC_MEC_MEC011_SRV_APPSAQ_001_BR()); + execute(TC_MEC_MEC011_SRV_APPSAQ_001_NF()); + execute(TC_MEC_MEC011_SRV_APPSAQ_002_OK()); + execute(TC_MEC_MEC011_SRV_APPSAQ_002_BR()); + execute(TC_MEC_MEC011_SRV_APPSAQ_002_NF()); + execute(TC_MEC_MEC011_SRV_APPSAQ_003_OK()); + execute(TC_MEC_MEC011_SRV_APPSAQ_003_NF()); + execute(TC_MEC_MEC011_SRV_APPSAQ_004_OK()); + execute(TC_MEC_MEC011_SRV_APPSAQ_004_BR()); + execute(TC_MEC_MEC011_SRV_APPSAQ_004_NF()); + execute(TC_MEC_MEC011_SRV_APPSAQ_004_PF()); + execute(TC_MEC_MEC011_SRV_APPSAQ_005_OK()); + execute(TC_MEC_MEC011_SRV_APPSAQ_005_NF()); + + execute(TC_MEC_MEC011_SRV_APPSUB_001_OK()); + execute(TC_MEC_MEC011_SRV_APPSUB_001_NF()); + execute(TC_MEC_MEC011_SRV_APPSUB_002_OK()); + execute(TC_MEC_MEC011_SRV_APPSUB_002_BR()); + execute(TC_MEC_MEC011_SRV_APPSUB_003_OK()); + execute(TC_MEC_MEC011_SRV_APPSUB_003_NF()); + execute(TC_MEC_MEC011_SRV_APPSUB_004_OK()); + execute(TC_MEC_MEC011_SRV_APPSUB_004_NF()); + + execute(TC_MEC_MEC011_SRV_CONFTASK_001_OK()); + execute(TC_MEC_MEC011_SRV_CONFTASK_001_NF()); + execute(TC_MEC_MEC011_SRV_CONFTASK_002_OK()); + execute(TC_MEC_MEC011_SRV_CONFTASK_002_NF()); + + execute(TC_MEC_MEC011_SRV_DNS_001_OK()); + execute(TC_MEC_MEC011_SRV_DNS_001_NF()); + execute(TC_MEC_MEC011_SRV_DNS_002_OK()); + execute(TC_MEC_MEC011_SRV_DNS_002_NF()); + execute(TC_MEC_MEC011_SRV_DNS_003_OK()); + execute(TC_MEC_MEC011_SRV_DNS_003_BR()); + execute(TC_MEC_MEC011_SRV_DNS_003_NF()); + execute(TC_MEC_MEC011_SRV_DNS_003_PF()); + + execute(TC_MEC_MEC011_SRV_MSL_001_OK()); + execute(TC_MEC_MEC011_SRV_MSL_001_NF()); + execute(TC_MEC_MEC011_SRV_MSL_002_OK()); + execute(TC_MEC_MEC011_SRV_MSL_002_BR()); + + execute(TC_MEC_MEC011_SRV_REGAPPS_001_OK_01()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_OK_02()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_OK_03()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_01()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_02()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_03()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_04()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_05()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_06()); + execute(TC_MEC_MEC011_SRV_REGAPPS_002_OK()); + execute(TC_MEC_MEC011_SRV_REGAPPS_002_NF()); + execute(TC_MEC_MEC011_SRV_REGAPPS_003_OK()); + execute(TC_MEC_MEC011_SRV_REGAPPS_003_NF()); + execute(TC_MEC_MEC011_SRV_REGAPPS_004_OK()); + execute(TC_MEC_MEC011_SRV_REGAPPS_004_NF()); + + execute(TC_MEC_MEC011_SRV_SAQ_001_OK()); + execute(TC_MEC_MEC011_SRV_SAQ_001_BR()); + execute(TC_MEC_MEC011_SRV_SAQ_002_OK()); + execute(TC_MEC_MEC011_SRV_SAQ_002_NF()); + + execute(TC_MEC_MEC011_SRV_SRVSUB_001_OK()); + execute(TC_MEC_MEC011_SRV_SRVSUB_001_NF()); + execute(TC_MEC_MEC011_SRV_SRVSUB_002_OK()); + execute(TC_MEC_MEC011_SRV_SRVSUB_002_BR()); + execute(TC_MEC_MEC011_SRV_SRVSUB_003_OK()); + execute(TC_MEC_MEC011_SRV_SRVSUB_003_NF()); + execute(TC_MEC_MEC011_SRV_SRVSUB_004_OK()); + execute(TC_MEC_MEC011_SRV_SRVSUB_004_NF()); + + execute(TC_MEC_MEC011_SRV_TIME_001_OK()); + execute(TC_MEC_MEC011_SRV_TIME_002_OK()); + + execute(TC_MEC_MEC011_SRV_TRAF_001_OK()); + execute(TC_MEC_MEC011_SRV_TRAF_001_NF()); + execute(TC_MEC_MEC011_SRV_TRAF_002_OK()); + execute(TC_MEC_MEC011_SRV_TRAF_003_OK()); + execute(TC_MEC_MEC011_SRV_TRAF_003_BR()); + execute(TC_MEC_MEC011_SRV_TRAF_003_NF()); + execute(TC_MEC_MEC011_SRV_TRAF_003_PF()); + + execute(TC_MEC_MEC011_SRV_TRANS_001_OK()); + } + } + + } // End of 'control' statement + +} // End of module AtsMec_EdgePlatformApplicationEnablementAPI_TestControl diff --git a/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk b/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..25ab67bd3a7ece1378b4497d7575085a840112ef --- /dev/null +++ b/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk @@ -0,0 +1,39 @@ +suite := AtsMec_EdgePlatformApplicationEnablement + +sources := \ + AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn \ + AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/AtsMec/AtsMec_WlanInformationAPI_TestCases.ttcn b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn similarity index 56% rename from ttcn/AtsMec/AtsMec_WlanInformationAPI_TestCases.ttcn rename to ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn index 77e96268e2fe5a75a85365d5e12a6706c9b4c635..05b2c294694b580397190317f3d77c6917e25a2a 100644 --- a/ttcn/AtsMec/AtsMec_WlanInformationAPI_TestCases.ttcn +++ b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn @@ -1,59 +1,47 @@ -/** - * @author ETSI / TTF T012 - * @version $URL:$ - * $ID:$ - * @desc This module provides the MEC test cases. - * @copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * @see ETSI GS MEC 002, Draft ETSI GS MEC 028 V2.1.1 (2020-06) - */ -module AtsMec_WlanInformationAPI_TestCases { - - // JSON - import from JSON all; - +module AtsMec_FederationEnablementAPI_TestCases { + // Libcommon - import from LibCommon_Time all; - import from LibCommon_VerdictControl all; import from LibCommon_Sync all; - + // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; - - // LibMec/WlanInformationAPI - import from WlanInformationAPI_TypesAndValues all; - import from WlanInformationAPI_Pics all; - import from WlanInformationAPI_Pixits all; - import from WlanInformationAPI_Templates all; - import from WlanInformationAPI_Functions all; + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_Templates all; + + // LibMec/FederationEnablementAPI + import from FederationEnablementAPI_TypesAndValues all; + import from FederationEnablementAPI_Templates all; + import from FederationEnablementAPI_Functions all; + import from FederationEnablementAPI_Pics all; + import from FederationEnablementAPI_Pixits all; // LibMec - import from LibMec_Templates all; import from LibMec_Functions all; import from LibMec_Pics all; import from LibMec_Pixits all; - group me_app_role { + group lookup { /** - * @desc Check that the IUT responds with the list of WLAN Access Point - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ApInfo.tplan2 + * @desc Check that the IUT responds with a list of all available systemInfo when requested by a MEC Orchestrator - No query parameters */ - testcase TC_MEC_MEC028_SRV_WAI_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_001_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -64,17 +52,16 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/ap/ap_information", + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -82,11 +69,16 @@ module AtsMec_WlanInformationAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_ap_info_list - )))) -> value v_response { + mw_body_json_fed_system_info_list( + superset( + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ))))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ApInfo ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -96,22 +88,25 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_001_OK + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_01 /** - * @desc Check that the IUT responds with the list of WLAN Access Point filtered by the macId provided as query parameter - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ApInfo.tplan2 + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - SystemId query parameters */ - testcase TC_MEC_MEC028_SRV_WAI_002_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_001_OK_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -122,17 +117,16 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/ap/ap_information?filter=(eq," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -140,11 +134,18 @@ module AtsMec_WlanInformationAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_ap_info_list - )))) -> value v_response { + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ) + } + ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ApInfo ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -154,22 +155,25 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_002_OK + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_02 /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ApInfo.tplan2 + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple SystemId query parameters */ - testcase TC_MEC_MEC028_SRV_WAI_002_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_001_OK_03() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -180,27 +184,42 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/apId/ap_information?filter=(ee," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", // Invalid requery + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")) & "&systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -210,22 +229,25 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_002_BR + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_03 /** - * @desc Check that the IUT responds with the list of Station Point - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/StationInfo.tplan2 + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty SystemId query parameters */ - testcase TC_MEC_MEC028_SRV_WAI_003_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_001_OK_04() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -236,17 +258,18 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/sta/sta_information", + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=", v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -254,11 +277,23 @@ module AtsMec_WlanInformationAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_sta_info_list - )))) -> value v_response { + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a StaInfo list ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -268,22 +303,25 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_003_OK + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_04 /** - * @desc Check that the IUT responds with the list of Station Point filtered by the macId provided as query parameter - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/StationInfo.tplan2 + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - SystemName query parameters */ - testcase TC_MEC_MEC028_SRV_WAI_004_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_001_OK_05() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -294,17 +332,18 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/sta/sta_information?filter=(eq," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_1, "UTF-8")), v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -312,11 +351,18 @@ module AtsMec_WlanInformationAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_sta_info_list - )))) -> value v_response { + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ) + } + ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a StaInfo list ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -326,22 +372,25 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_004_OK + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_05 /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/StationInfo.tplan2 + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple SystemName query parameters */ - testcase TC_MEC_MEC028_SRV_WAI_004_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_001_OK_06() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -352,27 +401,42 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/staId/sta_information?filter=(ee," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", // Invalid requery + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_1, "UTF-8")) & "&systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_2, "UTF-8")), v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -382,23 +446,25 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_004_BR + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_06 /** - * @desc Check that the IUT responds with the requested list of subscription - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty SystemName query parameters */ - testcase TC_MEC_MEC028_SRV_WAI_005_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_001_OK_07() runs on HttpComponent system HttpTestAdapter { // Local variables - var AssocStaSubscription v_assoc_sta_subscription; // FIXME Use an array of 3 elements to get a list var Headers v_headers; - var HttpMessage v_response; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -409,18 +475,18 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions", + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemName=", v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -428,12 +494,23 @@ module AtsMec_WlanInformationAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_wlan_subscription_link_list( - mw_subscription_link_list - ))))) -> value v_response { + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of subscription ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -443,87 +520,25 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_005_OK - - /** - * @desc Check that the IUT responds with the requested list of subscription - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 - */ - testcase TC_MEC_MEC028_SRV_WAI_006_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions?subscription_type=assoc_sta", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_wlan_subscription_link_list( - mw_subscription_link_list( - -, - ? - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of AssocStaSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_006_OK + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_07 /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - systemProvider query parameters */ - testcase TC_MEC_MEC028_SRV_WAI_006_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_001_OK_08() runs on HttpComponent system HttpTestAdapter { // Local variables - var AssocStaSubscription v_assoc_sta_subscription; var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -534,28 +549,37 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/assoc_sta", + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_1, "UTF-8")), v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ) + } + ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -565,22 +589,25 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_006_BR + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_08 /** - * @desc Check that the IUT responds with an error when a request with not existing parameters is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple systemProvider query parameters */ - testcase TC_MEC_MEC028_SRV_WAI_006_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_001_OK_09() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -591,27 +618,42 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/assoc_sta", + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_1, "UTF-8")) & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_2, "UTF-8")), v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found - )) { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -621,31 +663,25 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_006_NF - - /*** - var charstring v_uri; - v_uri := regexp( - oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)), - "?+(" & PX_ME_WLAN_URI & "?*)", - 0 - ); - ***/ + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_09 /** - * @desc Check that the IUT responds with the list of Station Point filtered by the macId provided as query parameter - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty systemProvider query parameters */ - testcase TC_MEC_MEC028_SRV_WAI_007_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_001_OK_10() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -656,43 +692,42 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions", - v_headers, - m_http_message_body_json( - m_body_json_assoc_sta_subscription( - m_assoc_sta_subscription( - PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, - m_ap_identity( - PX_MAC_ID - ), - -, -, -, - 10, // notificationPeriod - Table 6.3.2-1: Attributes of the AssocStaSubscription Note 2 - -, - m_time_stamp( - f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds - ))))))); + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=", + v_headers + ) + ) + ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_assoc_sta_subscription( - mw_assoc_sta_subscription( - PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, - -, -, -, - ? - )))))) -> value v_response { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds to the subscription ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -702,22 +737,25 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_assoc_sta_subscription(v_response.response.body.json_body.assocStaSubscription); + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_007_OK + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_10 /** - * @desc Check that the IUT responds with an error when an invalid Subscription request is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple query parameters */ - testcase TC_MEC_MEC028_SRV_WAI_007_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_001_OK_11() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -728,31 +766,42 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions", - v_headers, - m_http_message_body_json( - m_body_json_assoc_sta_subscription( - m_assoc_sta_subscription_invalid( - PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, - m_ap_identity( - PX_MAC_ID - ))))))); + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")) & "?systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_3, "UTF-8")), + v_headers + ) + ) + ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -762,21 +811,20 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_007_BR + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_11 /** - * @desc Check that the IUT responds with an error when a request with not existing parameters is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 + * @desc Check that the IUT responds with an error when selection is not applicable - SystemId */ - testcase TC_MEC_MEC028_SRV_WAI_007_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_001_NF_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - + // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -790,25 +838,21 @@ module AtsMec_WlanInformationAPI_TestCases { f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions&filter=(eq,ap/macId,00:01:02:03:04:04)", - v_headers, - m_http_message_body_json( - m_body_json_assoc_sta_subscription( - m_assoc_sta_subscription( - PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, - m_ap_identity( - PX_MAC_ID - ))))))); + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_UNKNOWN, "UTF-8")), + v_headers + ) + ) + ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); @@ -822,23 +866,18 @@ module AtsMec_WlanInformationAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_007_NF + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_NF_01 /** - * @desc Check that the IUT responds with the list of Subscription - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2 + * @desc Check that the IUT responds with an error when selection is not applicable - SystemName */ - testcase TC_MEC_MEC028_SRV_WAI_008_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_001_NF_02() runs on HttpComponent system HttpTestAdapter { // Local variables - var AssocStaSubscription v_assoc_sta_subscription; var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -849,40 +888,27 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); f_init_default_headers_list(-, -, v_headers); - v_uri := regexp( - oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)), - "?+" & PX_ME_WLAN_URI & "/subscriptions/" & "(?*)", - 0 - ); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/" & v_uri, + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_UNKNOWN, "UTF-8")), v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_assoc_sta_subscription( - mw_assoc_sta_subscription( - v_assoc_sta_subscription.callbackReference, - -, - -, -, - v_assoc_sta_subscription.links - )))))) -> value v_response { + mw_http_response_404_not_found + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -892,25 +918,19 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_008_OK + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_NF_02 /** - * @desc Check that the IUT responds with an error when a request for existing subscription with incorrect parameters is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2 + * @desc Check that the IUT responds with an error when selection is not applicable - SystemProvider */ - testcase TC_MEC_MEC028_SRV_WAI_008_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_001_NF_03() runs on HttpComponent system HttpTestAdapter { // Local variables - var AssocStaSubscription v_assoc_sta_subscription; var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri := "unknown"; - + // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -921,28 +941,27 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/unknown", + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_UNKNOWN, "UTF-8")), v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -952,25 +971,19 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_008_NF + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_NF_03 /** - * @desc Check that the IUT responds with a Notification Subscription when it is modified - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2 + * @desc Check that the IUT responds with an error when request is malformed */ - testcase TC_MEC_MEC028_SRV_WAI_009_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables - var AssocStaSubscription v_assoc_sta_subscription; var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -981,49 +994,27 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); f_init_default_headers_list(-, -, v_headers); - v_uri := regexp( - oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)), - "?+" & PX_ME_WLAN_URI & "/subscriptions/" & "(?*)", - 0 - ); httpPort.send( m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/" & v_uri, - v_headers, - m_http_message_body_json( - m_body_json_assoc_sta_subscription( - m_assoc_sta_subscription( - v_assoc_sta_subscription.callbackReference, - m_ap_identity( - PX_MAC_ID - ), - -, -, - v_assoc_sta_subscription.links, - 12, - m_time_stamp( - f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds - ))))))); + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?system=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")), // system instead of systemId + v_headers + ) + ) + ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_assoc_sta_subscription( - mw_assoc_sta_subscription( - v_assoc_sta_subscription.callbackReference, - ?, - -, -, - v_assoc_sta_subscription.links )))))) -> value v_response { + mw_http_response_400_bad_request + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds to the AssocStatSubscription update ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1033,23 +1024,24 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_assoc_sta_subscription(v_response.response.body.json_body.assocStaSubscription); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_009_OK + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_BR + + } // End of group lookup + + group subscription { /** - * @desc Check that the IUT responds with an error when an invalid field is set in the subscription modification request - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2 + * @desc Check that the IUT creates a new systemInfo when requested by a MEC Orchestrator */ - testcase TC_MEC_MEC028_SRV_WAI_009_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables - var AssocStaSubscription v_assoc_sta_subscription; var Headers v_headers; + var HttpMessage v_response; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -1060,38 +1052,36 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/unknown", - v_headers, - m_http_message_body_json( - m_body_json_assoc_sta_subscription( - m_assoc_sta_subscription( - v_assoc_sta_subscription.callbackReference, - m_ap_identity( - PX_MAC_ID - ), - -, -, - v_assoc_sta_subscription.links, - 12, - m_time_stamp( - f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds - ))))))); + m_http_request_post( + PICS_ROOT_API & PX_FED_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info( + m_system_info( + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_PROVIDER_1 + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) { + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fed_system_info( + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + )))))) -> value v_response { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds the correct error code ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds the success code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1101,24 +1091,22 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); + f_delete_system_info(v_response.response.body.json_body.systemInfo); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_009_BR - + } // End of testcase TC_MEC_MEC040_SRV_MEF_002_OK + /** - * @desc Check that the IUT responds with 204 when an existing subscription is correctly deleted - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2 + * @desc Check that the IUT responds with an error on creating an existing systemInfo */ - testcase TC_MEC_MEC028_SRV_WAI_010_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_002_BR_01() runs on HttpComponent system HttpTestAdapter { // Local variables - var AssocStaSubscription v_assoc_sta_subscription; var Headers v_headers; - var charstring v_uri; + var HttpMessage v_response; + var SystemInfo v_system_info := valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -1129,33 +1117,31 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); + f_create_system_info(v_system_info); f_init_default_headers_list(-, -, v_headers); - v_uri := regexp( - oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)), - "?+(" & PX_ME_WLAN_URI & "?*)", - 0 - ); httpPort.send( m_http_request( - m_http_request_delete( - PICS_ROOT_API & v_uri, - v_headers - ) - ) - ); + m_http_request_post( + PICS_ROOT_API & PX_FED_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info( + m_system_info( // Already created + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_PROVIDER_1 + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_204_no_content - )) { + mw_http_response_400_bad_request + )) -> value v_response { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with yhe correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1165,23 +1151,22 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_system_info(v_system_info); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_010_OK - + } // End of testcase TC_MEC_MEC040_SRV_MEF_002_BR_01 + /** - * @desc Check that the IUT responds with an error when an not existing subscription cannot be deleted - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2 + * @desc Check that the IUT responds with an error on creating an existing systemInfo */ - testcase TC_MEC_MEC028_SRV_WAI_010_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_002_BR_02() runs on HttpComponent system HttpTestAdapter { // Local variables - var AssocStaSubscription v_assoc_sta_subscription; var Headers v_headers; - var charstring v_uri; + var HttpMessage v_response; + var SystemInfo v_system_info := valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -1192,33 +1177,32 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); + f_create_system_info(v_system_info); f_init_default_headers_list(-, -, v_headers); - v_uri := regexp( - oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)), - "?+(" & PX_ME_WLAN_URI & "?*)", - 0 - ); httpPort.send( m_http_request( - m_http_request_delete( - PICS_ROOT_API & v_uri & "_Invalid", - v_headers - ) - ) - ); + m_http_request_post( + PICS_ROOT_API & PX_FED_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info( + m_system_info( + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_ID_1 // Shall be omitted + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found - )) { + mw_http_response_400_bad_request + )) -> value v_response { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with yhe correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1228,89 +1212,25 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); + f_delete_system_info(v_system_info); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_010_NF - - /** - * @desc Check that the IUT sends a notification about WLAN event notification if the MEC service has an associated subscription and the event is generated - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/NotificationCallback.tplan2 - */ - testcase TC_MEC_MEC028_SRV_WAI_011_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_notif_up(); - - // Test adapter configuration - - // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] httpPort_notif.receive( - mw_http_request( - mw_http_request_post( - -, - -, - mw_http_message_body_json( - mw_body_json_assoc_sta_subscription( - mw_assoc_sta_subscription( - PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, - -, - -, -, - ? - )))))) -> value v_response { - tc_wait.stop; - - f_init_default_headers_list(-, -, v_headers); - httpPort_notif.send( - m_http_response( - m_http_response_ok_no_body( - v_headers - ))); - log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); - f_cf_01_http_notif_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_011_OK - + } // End of testcase TC_MEC_MEC040_SRV_MEF_002_BR_02 + /** - * @desc Check that the IUT responds with the list of WLAN Access Point - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator */ - testcase TC_MEC_MEC028_SRV_WAI_012_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -1321,17 +1241,18 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/queries/measurements", + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1339,11 +1260,15 @@ module AtsMec_WlanInformationAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_wlan_measurement_config_link_list - )))) -> value v_response { + mw_body_json_fed_system_info( + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of measurement config ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct SystemInfo entry ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1353,21 +1278,24 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_012_OK + } // End of testcase TC_MEC_MEC040_SRV_MEF_003_OK /** - * @desc Check that the IUT responds with the list of WLAN Access Point - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 + * @desc Check that the IUT responds with an error when it receives a request for returning a systemInfo referred with a wrong systemId */ - /*testcase TC_MEC_MEC028_SRV_WAI_012_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -1378,24 +1306,25 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/invalid_measurements", + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_3, "UTF-8")), v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) { + mw_http_response_404_not_found + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); @@ -1408,21 +1337,24 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - }*/ // End of testcase TC_MEC_MEC028_SRV_WAI_012_BR + } // End of testcase TC_MEC_MEC040_SRV_MEF_003_NF /** - * @desc Check that the IUT responds with the list of WLAN Access Point - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 + * @desc Check that the IUT responds with an error when it receives a request with an inconsistant URI */ - testcase TC_MEC_MEC028_SRV_WAI_012_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_003_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -1433,27 +1365,28 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/invalid_measurements", + PICS_ROOT_API & PX_FED_API_SUB_WRONG & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")), // Inconsistent URI v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ApInfo ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1463,22 +1396,29 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_012_NF + } // End of testcase TC_MEC_MEC040_SRV_MEF_003_BR + + } // End of group subscription + group patch { + /** - * @desc Check that the IUT responds with a new measurement configuration - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 + * @desc Check that the IUT updates the systemInfo when requested by a MEC Orchestrator */ - testcase TC_MEC_MEC028_SRV_WAI_013_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_004_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -1489,29 +1429,22 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements", - v_headers, - m_http_message_body_json( - m_body_json_wlan_measurement_config( - m_measurement_config( + m_http_request_patch( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info_update( + m_system_info_update( -, - { - m_sta_identity( - PX_MAC_ID, - PX_SSID, - -, - PX_IP_ADDRESS - ) - }, - PX_MEASUREMENT_ID, - m_measurement_info(1000, 10) - )))))); + m_end_point_uris( + { PX_FED_ENDPOINT_URI_1, PX_FED_ENDPOINT_URI_2 } + ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1519,20 +1452,15 @@ module AtsMec_WlanInformationAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_wlan_measurement_config( - mw_measurement_config( - ?, - {mw_sta_identity(PX_MAC_ID, - PX_SSID, - -, - PX_IP_ADDRESS - )}, - PX_MEASUREMENT_ID, - mw_measurement_info - )))))) -> value v_response { + mw_body_json_fed_system_info( + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_2 + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the patched SystemInfo entry ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1542,22 +1470,25 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_measurement_config(v_response.response.body.json_body.measurementConfig); + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_013_OK + } // End of testcase TC_MEC_MEC040_SRV_MEF_004_OK_01 /** - * @desc Check that the IUT responds with an error when an invalid request is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 + * @desc Check that the IUT updates the systemInfo when requested by a MEC Orchestrator */ - testcase TC_MEC_MEC028_SRV_WAI_013_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_004_OK_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -1568,106 +1499,36 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements", - v_headers, - m_http_message_body_json( - m_body_json_wlan_measurement_config( - m_measurement_config( - -, - { - m_sta_identity( - PX_MAC_ID & ":00", // Invalid MAC address - PX_SSID, - -, - PX_IP_ADDRESS - ) - }, - PX_MEASUREMENT_ID, - m_measurement_info(1000, 10) - )))))); + m_http_request_patch( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info_update( + m_system_info_update( + PX_FED_SYSTEM_NAME_1 & "_patched" + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully with the correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_013_BR - - /** - * @desc Check that the IUT responds with an error when an invalid request is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 - */ - /*testcase TC_MEC_MEC028_SRV_WAI_013_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/Invalid_measurements", - v_headers, - m_http_message_body_json( - m_body_json_wlan_measurement_config( - m_measurement_config( - -, - { - m_sta_identity( - PX_MAC_ID, - PX_SSID, - -, - PX_IP_ADDRESS - ) - }, - PX_MEASUREMENT_ID, - m_measurement_info(1000, 10) - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found - )) { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info( + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_1 & "_patched", + PX_FED_SYSTEM_ID_2 + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully with the correct error code ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the patched SystemInfo entry ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1677,23 +1538,25 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - }*/ // End of testcase TC_MEC_MEC028_SRV_WAI_013_NF + } // End of testcase TC_MEC_MEC040_SRV_MEF_004_OK_02 /** - * @desc Check that the IUT responds with the specified measurement configuration - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 + * @desc Check that the IUT updates the systemInfo when requested by a MEC Orchestrator */ - testcase TC_MEC_MEC028_SRV_WAI_014_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_004_OK_03() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; - var MeasurementConfig v_measurement_config; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -1704,18 +1567,22 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_measurement_config(v_measurement_config); + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements/" & v_measurement_config.links.self_.href, - v_headers - ) - ) - ); + m_http_request_patch( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info_update( + m_system_info_update( + PX_FED_SYSTEM_NAME_1 & "_patched", + m_end_point_uris( + { PX_FED_ENDPOINT_URI_1, PX_FED_ENDPOINT_URI_2 } + ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1723,23 +1590,15 @@ module AtsMec_WlanInformationAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_wlan_measurement_config( - mw_measurement_config( - ?, - { - mw_sta_identity( - PX_MAC_ID, - PX_SSID, - -, - PX_IP_ADDRESS - ) - }, - PX_MEASUREMENT_ID, - mw_measurement_info - )))))) -> value v_response { + mw_body_json_fed_system_info( + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_1 & "_patched", + PX_FED_SYSTEM_ID_2 + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the patched SystemInfo entry ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1749,23 +1608,23 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_measurement_config(v_response.response.body.json_body.measurementConfig); + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_014_OK + } // End of testcase TC_MEC_MEC040_SRV_MEF_004_OK_03 /** - * @desc Check that the IUT responds with an error when an invalid request is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 + * @desc Check that the IUT responds with an error when requested to update an unknown systemInfo */ - testcase TC_MEC_MEC028_SRV_WAI_014_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_004_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var MeasurementConfig v_measurement_config; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -1776,28 +1635,32 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_measurement_config(v_measurement_config); + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements/" & v_measurement_config.links.self_.href & "_Invalid", - v_headers - ) - ) - ); + m_http_request_patch( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info_update( + m_system_info_update( + -, + m_end_point_uris( + { PX_FED_ENDPOINT_URI_1, PX_FED_ENDPOINT_URI_2 } + ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT responds with the correct error code ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1807,24 +1670,23 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_measurement_config(v_measurement_config); + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_014_NF + } // End of testcase TC_MEC_MEC040_SRV_MEF_004_NF /** - * @desc Check that the IUT responds with the modified measurement configuration - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 + * @desc Check that the IUT responds with an error when requested to update with an inconsistant URI */ - testcase TC_MEC_MEC028_SRV_WAI_015_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_004_BR_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; - var MeasurementConfig v_measurement_config; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -1835,51 +1697,32 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_measurement_config(v_measurement_config); + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href, - v_headers, - m_http_message_body_json( - m_body_json_wlan_measurement_config( - m_measurement_config( - -, - { - m_sta_identity( - PX_MAC_ID, - PX_SSID, - -, - PX_IP_ADDRESS - ) - }, - PX_MEASUREMENT_ID, - m_measurement_info(2000, 20) - )))))); + m_http_request_patch( + PICS_ROOT_API & PX_FED_API_SUB_WRONG & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), // v10 instead of v1 + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info_update( + m_system_info_update( + -, + m_end_point_uris( + { PX_FED_ENDPOINT_URI_1, PX_FED_ENDPOINT_URI_2 } + ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_wlan_measurement_config( - mw_measurement_config( - ?, - {mw_sta_identity(PX_MAC_ID, - PX_SSID, - -, - PX_IP_ADDRESS - )}, - PX_MEASUREMENT_ID, - mw_measurement_info(2000, 20) - )))))) -> value v_response { + mw_http_response_400_bad_request + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1889,23 +1732,23 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_measurement_config(v_response.response.body.json_body.measurementConfig); + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_015_OK + } // End of testcase TC_MEC_MEC040_SRV_MEF_004_BR_01 /** - * @desc Check that the IUT responds with an error when an invalid request is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 + * @desc Check that the IUT responds with an error when requested to update with no data provided */ - testcase TC_MEC_MEC028_SRV_WAI_015_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_004_BR_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var MeasurementConfig v_measurement_config; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -1916,40 +1759,29 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_measurement_config(v_measurement_config); + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href & "_Invalid", - v_headers, - m_http_message_body_json( - m_body_json_wlan_measurement_config( - m_measurement_config( - -, - { - m_sta_identity( - PX_MAC_ID, - PX_SSID, - -, - PX_IP_ADDRESS - ) - }, - PX_MEASUREMENT_ID, - m_measurement_info(2000, 20) - )))))); + m_http_request_patch( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info_update( + m_system_info_update // No data provided + ))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found - )) { + mw_http_response_400_bad_request + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1959,23 +1791,29 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_measurement_config(v_measurement_config); + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_015_NF + } // End of testcase TC_MEC_MEC040_SRV_MEF_004_BR_02 + + } // End of group patch + group delete { + /** - * @desc Check that the IUT responds with with 204 when requested to delete the specified measurement configuration - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 + * @desc Check that the IUT deletes the systemInfo when requested by a MEC Orchestrator */ - testcase TC_MEC_MEC028_SRV_WAI_016_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_005_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var MeasurementConfig v_measurement_config; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -1986,26 +1824,26 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_measurement_config(v_measurement_config); + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href, + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2015,22 +1853,23 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_016_OK + } // End of testcase TC_MEC_MEC040_SRV_MEF_005_OK /** - * @desc Check that the IUT responds with an error when an invalid request is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 + * @desc Check that the IUT responds with an error when requested to delete an unknown systemInfo */ - testcase TC_MEC_MEC028_SRV_WAI_016_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_005_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var MeasurementConfig v_measurement_config; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)) + }; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -2041,26 +1880,27 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_measurement_config(v_measurement_config); + f_create_system_info_list(v_system_info_list); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href & "_invalid", + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + v_system_info_list[1].systemId := omit; f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2070,10 +1910,10 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_measurement_config(v_measurement_config); + f_delete_system_info_list(v_system_info_list); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_016_NF + } // End of testcase TC_MEC_MEC040_SRV_MEF_005_NF - } // End of group me_app_role + } // End of group delete -} // End of module AtsMec_WlanInformationAPI_TestCases +} // End of module AtsMec_FederationEnablementAPI_TestCases diff --git a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f5634c795278c1732c8ee773905bbda0d62a6861 --- /dev/null +++ b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn @@ -0,0 +1,59 @@ +module AtsMec_FederationEnablementAPI_TestControl { + + // LibMec/FederationEnablementAPI + import from FederationEnablementAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec_FederationEnablementAPI + import from AtsMec_FederationEnablementAPI_TestCases all; + + control { + + if (PICS_FED_API_SUPPORTED) { + + if (PICS_MEC_PLAT and PICS_SERVICES) { + execute(TC_MEC_MEC040_SRV_MEF_001_OK_01()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_02()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_03()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_04()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_05()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_06()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_07()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_08()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_09()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_10()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_11()); + + execute(TC_MEC_MEC040_SRV_MEF_001_NF_01()); + execute(TC_MEC_MEC040_SRV_MEF_001_NF_02()); + execute(TC_MEC_MEC040_SRV_MEF_001_NF_03()); + + execute(TC_MEC_MEC040_SRV_MEF_001_BR()); + + execute(TC_MEC_MEC040_SRV_MEF_002_OK()); + execute(TC_MEC_MEC040_SRV_MEF_002_BR_01()); + execute(TC_MEC_MEC040_SRV_MEF_002_BR_02()); + + execute(TC_MEC_MEC040_SRV_MEF_003_OK()); + execute(TC_MEC_MEC040_SRV_MEF_003_NF()); + execute(TC_MEC_MEC040_SRV_MEF_003_BR()); + + execute(TC_MEC_MEC040_SRV_MEF_004_OK_01()); + execute(TC_MEC_MEC040_SRV_MEF_004_OK_02()); + execute(TC_MEC_MEC040_SRV_MEF_004_OK_03()); + + execute(TC_MEC_MEC040_SRV_MEF_004_NF()); + execute(TC_MEC_MEC040_SRV_MEF_004_BR_01()); + execute(TC_MEC_MEC040_SRV_MEF_004_BR_02()); + + execute(TC_MEC_MEC040_SRV_MEF_005_OK()); + execute(TC_MEC_MEC040_SRV_MEF_005_NF()); + } + + } + + } // End of 'control' statement + +} // End of module AtsMec_FederationEnablementAPI_TestControl diff --git a/ttcn/AtsMec_FederationEnablement/module.mk b/ttcn/AtsMec_FederationEnablement/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..2310374076a61668e17a2595a3bddfb382e5cbb4 --- /dev/null +++ b/ttcn/AtsMec_FederationEnablement/module.mk @@ -0,0 +1,39 @@ +suite := AtsMec_FederationEnablement + +sources := \ + AtsMec_FederationEnablementAPI_TestCases.ttcn \ + AtsMec_FederationEnablementAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/IoTAPI \ + ../LibMec/FederationEnablementAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/AtsMec/AtsMec_FixedAccessInfoAPI_TestCases.ttcn b/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn similarity index 55% rename from ttcn/AtsMec/AtsMec_FixedAccessInfoAPI_TestCases.ttcn rename to ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn index a12cf326df2b36a55cc0c8b737c7aa5cc2914353..9a328e877c935df4781261ed3a03e7914cc2cdbd 100644 --- a/ttcn/AtsMec/AtsMec_FixedAccessInfoAPI_TestCases.ttcn +++ b/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn @@ -7,132 +7,157 @@ * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. - * @see ETSI GS MEC 003, ETSI GS MEC 029 V2.1.1 + * @see ETSI GS MEC 003, ETSI GS MEC 029 V2.2.1 */ -module AtsMec_FixedAccessInformationAPI_TestCases { - +module AtsMec_FixedAccessInformationServiceAPI_TestCases { + // Libcommon import from LibCommon_Time all; import from LibCommon_VerdictControl all; import from LibCommon_Sync all; - + // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; - + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + // LibMec_FixedAccessInformationServiceAPI + import from FixedAccessInformationServiceAPI_TypesAndValues all; import from FixedAccessInformationServiceAPI_Templates all; + import from FixedAccessInformationServiceAPI_Functions all; import from FixedAccessInformationServiceAPI_Pics all; import from FixedAccessInformationServiceAPI_Pixits all; - + // LibMec + import from LibMec_Templates all; import from LibMec_Functions all; import from LibMec_Pics all; import from LibMec_Pixits all; - + /* * Fixed Access Information Service (FAIS) */ group fixedAccessInfoService { - + /** * @desc Check that the IUT responds with the current status of the fixed access information when queried by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + testcase TC_MEC_MEC029_SRV_FAIS_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PX_FAI_FA_INFO_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fai_fa_info( + mw_fa_info + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a FaInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_001_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_001_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PX_FAI_FA_INFO_URI & "?interface=1", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { + testcase TC_MEC_MEC029_SRV_FAIS_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PX_FAI_FA_INFO_URI & "?if=1", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } + } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_001_BR - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_001_BR + /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_001_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC029_SRV_FAIS_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration // Preamble @@ -140,22 +165,20 @@ module AtsMec_FixedAccessInformationAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_FA_INFO_URI & "?interface=999", + PICS_ROOT_API & PX_FAI_FA_INFO_URI & "?interface=666", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found() - )) { + mw_http_response_404_not_found + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -164,43 +187,40 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_001_NF - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_001_NF + /** * @desc Check that the IUT responds with the current status of the device information when queried by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_002_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI, - v_headers - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI, + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -210,9 +230,9 @@ module AtsMec_FixedAccessInformationAPI_TestCases { mw_http_message_body_json( mw_body_json_fai_device_info( mw_device_info - ))))) { + ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -221,53 +241,50 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_002_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_002_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_002_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI & "?device=__any_value__", - v_headers - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI & "?dev=__any_value__", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { - + )) { + tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -276,28 +293,28 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_002_BR - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_002_BR + /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_002_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC029_SRV_FAIS_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration // Preamble @@ -305,22 +322,20 @@ module AtsMec_FixedAccessInformationAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI & "?gwId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_GW_ID[0], "UTF-8")), + PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI & "?gwId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_GW_ID[0], "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -329,56 +344,53 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_002_NF + } // End of testcase TC_MEC_MEC029_SRV_FAIS_002_NF /** * @desc CCheck that the IUT responds with the current status of the cable line information when queried by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_003_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI, + PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_fai_cable_line_info( - mw_cable_line_info - ))))) { - + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fai_cable_line_info( + mw_cable_line_info + ))))) { + tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a CableLineInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -387,53 +399,50 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_003_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_003_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_003_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_003_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI & "?cm=__any_value__", - v_headers - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI & "?cm=__any_value__", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { - + )) { + tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -442,52 +451,49 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_003_BR + } // End of testcase TC_MEC_MEC029_SRV_FAIS_003_BR /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_003_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI & "?cmId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_CM_ID, "UTF-8")), - v_headers - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI & "?cmId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_CM_ID, "UTF-8")), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -496,43 +502,40 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_003_NF - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_003_NF + /** * @desc Check that the IUT responds with the current status of the optical network information when queried by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_004_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI, + PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -542,9 +545,9 @@ module AtsMec_FixedAccessInformationAPI_TestCases { mw_http_message_body_json( mw_body_json_fai_pon_info( mw_pon_info - ))))) { + ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a PonInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -553,60 +556,50 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_004_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_004_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_004_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_004_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI & "?onu=__any_value__", + PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI & "?onu=__any_value__", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { - + )) { + tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 400 bad request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -615,59 +608,49 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_004_BR + } // End of testcase TC_MEC_MEC029_SRV_FAIS_004_BR /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_004_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI & "?onuId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_ONU_ID, "UTF-8")), - v_headers - ) - ) - ); + PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI & "?onuId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_ONU_ID, "UTF-8")), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found() - )) { + mw_http_response_404_not_found + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -676,43 +659,40 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_004_NF + } // End of testcase TC_MEC_MEC029_SRV_FAIS_004_NF /** * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_005_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI, + PICS_ROOT_API & PX_FAI_SUB_URI, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -722,9 +702,9 @@ module AtsMec_FixedAccessInformationAPI_TestCases { mw_http_message_body_json( mw_body_json_fai_subscription_link_list( mw_subscription_link_list - ))))) { + ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SubscriptionLinkList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -733,52 +713,50 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_005_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_005_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_005_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_005_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & "?subscription=__any_value", + PICS_ROOT_API & PX_FAI_SUB_URI & "?subscription=__any_value", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 400 Bad Request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -787,43 +765,40 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_005_BR + } // End of testcase TC_MEC_MEC029_SRV_FAIS_005_BR /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_005_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & "?subscription_type=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_SUB_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_SUB_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -831,9 +806,9 @@ module AtsMec_FixedAccessInformationAPI_TestCases { mw_http_response( mw_http_response_404_not_found )) { - + tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -842,51 +817,48 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_SRV_UEINFOLOOK_001_NF + } // End of testcase TC_MEC_MEC029_SRV_FAIS_005_NF /** * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications on Optical Network Unit alarm events */ - testcase TP_MEC_MEC029_SRV_FAIS_006_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_006_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_post( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI, + PICS_ROOT_API & PX_FAI_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription( - PX_ONU_ALARM_SUB_CALLBACK_URI, // callbackReference - m_filter_criteria_onu_alarm - ) - ) - ) - ) - ) - ); + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -894,85 +866,84 @@ module AtsMec_FixedAccessInformationAPI_TestCases { mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_fai_onu_alarm_subscription_link_list( - mw_onu_alarm_subscription( - PX_ONU_ALARM_SUB_CALLBACK_URI - )))))) { - // TODO how to send this? The TP has the IUT doing this immediately. Do we want this or will it be discarded as part of the test? - // MEC 029, clause 7.7.3.4 -// the IUT entity sends a vPOST containing -// uri indicating value CALLBACK_URL -// body containing -// OnuAlarmNotification containing -// notificationType set to "OnuAlarmSubscription" -// ; -// ; -// ; -// to the MEC_APP entity + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a OnuAlarmSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_FAI_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a onuAlarmSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_006_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_006_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_006_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_006_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_post( - "/" & PICS_ROOT_API & PX_UE_ZONAL_TRAF_SUB_URI, + PICS_ROOT_API & PX_FAI_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription_bad_request( - PX_ONU_ALARM_SUB_CALLBACK_URI, // callbackReference - m_filter_criteria_onu_alarm - ) - ) - ) - ) - ) - ); + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription_bad_request( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -981,43 +952,45 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_006_BR - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_006_BR + /** * @desc Check that the IUT responds with the information on a given subscription when queried by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_007_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_007_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & v_subscription_id, v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1025,11 +998,11 @@ module AtsMec_FixedAccessInformationAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_fai_onu_alarm_subscription_link_list( - mw_onu_alarm_subscription - ))))) { + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription + ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a OnuAlarmSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1038,52 +1011,50 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_007_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_007_OK + /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_007_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_007_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1092,52 +1063,48 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_007_NF + } // End of testcase TC_MEC_MEC029_SRV_FAIS_007_NF /** * @desc Check that the IUT updates an existing subscription when commanded by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_008_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_008_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble - // TODO If-Match header needs to have a PROPER_ETAG + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription( - PX_ONU_ALARM_SUB_CALLBACK_URI, - m_filter_criteria_onu_alarm - ) - ) - ) - ) - ) - ); + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1145,11 +1112,11 @@ module AtsMec_FixedAccessInformationAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_fai_onu_alarm_subscription_link_list( - mw_onu_alarm_subscription - ))))) { + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription + ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userTrackingSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1158,61 +1125,58 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_008_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_008_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_008_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_008_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble - // TODO If-Match header needs to have a PROPER_ETAG + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & v_subscription_id, v_headers, m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription_bad_request( - PX_ONU_ALARM_SUB_CALLBACK_URI, - m_filter_criteria_onu_alarm - ) - ) - ) - ) - ) - ); + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription_bad_request( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1221,61 +1185,58 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_008_BR - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_008_BR + /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_008_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_008_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble - // TODO If-Match header needs to have a PROPER_ETAG + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers, m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription( - PX_ONU_ALARM_SUB_CALLBACK_URI, - m_filter_criteria_onu_alarm - ) - ) - ) - ) - ) - ); + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a HTTP error 404 ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1284,59 +1245,56 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_008_NF + } // End of testcase TC_MEC_MEC029_SRV_FAIS_008_NF /** * @desc Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition */ - testcase TP_MEC_MEC029_SRV_FAIS_008_PF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_008_PF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble - // TODO If-Match header needs to have an INVALID_ETAG + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription( - PX_ONU_ALARM_SUB_CALLBACK_URI, - m_filter_criteria_onu_alarm - ) - ) - ) - ) - ) - ); + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_412_precondition_failed - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 412 Precondition Failed ***"); @@ -1347,52 +1305,53 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_008_PF + } // End of testcase TC_MEC_MEC029_SRV_FAIS_008_PF /** * @desc Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_009_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_009_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & v_subscription_id, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1401,50 +1360,45 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_009_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_009_OK + /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_009_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_009_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1453,7 +1407,7 @@ module AtsMec_FixedAccessInformationAPI_TestCases { mw_http_response_404_not_found )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with no 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1462,148 +1416,133 @@ module AtsMec_FixedAccessInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_009_NF - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_009_NF + /** * @desc Check that the IUT sends notification on expiry of Fixed Access Information event subscription to a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_010_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_010_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DevInfoSubscription v_dev_info_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration - f_cf_01_http_up(); - + f_cf_01_http_notif_up(); + // Test adapter configuration - + // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription( - PX_ONU_ALARM_SUB_CALLBACK_URI, - m_filter_criteria_onu_alarm, - -, - m_time_stamp(1577836800) - ) - ) - ) - ) - ) - ); + f_create_dev_info_subscription(v_dev_info_subscription, v_subscription_id); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body - tc_ac.start; + tc_wait.start; alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_fai_onu_alarm_subscription_link_list( - mw_onu_alarm_subscription - ))))) { - // TODO Need to check Location header - - // TODO: how to wait for a timeout of (NOW_PLUS_X_SECONDS - guard time)? which guard time value to use? - // MEC 029, clause 5.2.6.2 -// the IUT entity sends a vPOST containing -// uri indicating value CALLBACK_URL -// body containing -// ExpiryNotification containing -// expiryDeadline indicating value NOW_PLUS_X_SECONDS // TODO: how to set this? -// ; -// ; -// ; -// to the MEC_APP entity - tc_ac.stop; + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PX_FAI_SUB_URI, + -, + mw_http_message_body_json( + mw_body_json_fai_dev_info_subscription( + mw_dev_info_subscription( + PX_DEV_ALARM_SUB_CALLBACK_URI + )))))) { + tc_wait.stop; + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); log("*** " & testcasename() & ": PASS: IUT successfully responds with a DevInfoSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_ac.timeout { + [] tc_wait.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble - f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_010_OK - + f_delete_dev_info_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC029_SRV_FAIS_010_OK + /** * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications on Optical Network Unit alarm events */ - testcase TP_MEC_MEC029_SRV_FAIS_011_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_011_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble - f_init_default_headers_list(-, -, v_headers); - -// TODO how to generate an event? -// Initial conditions with { -// the IUT entity being_in idle_state and -// the IUT entity having a subscriptions containing, -// subscriptionType indicating value "OnuAlarmSubscription" -// callbackReference indicating value CALLBACK_URL -// ; -// } -// -// // MEC 029, clause 5.2.7 -// Expected behaviour -// ensure that { -// when { -// the IUT entity generates a onu_alarm_event -// } -// then { -// // // MEC 029, clause 5.2.7 -// the IUT entity sends a vPOST containing -// Uri set to CALLBACK_URL -// body containing -// OnuAlarmSubscription containing -// notificationType set to "OnuAlarmSubscription" -// ; -// ; -// ; -// to the MEC_APP entity -// } -// } + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PX_FAI_SUB_URI, + -, + mw_http_message_body_json( + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription( + PX_DEV_ALARM_SUB_CALLBACK_URI + )))))) { + tc_wait.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DevInfoSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement // Postamble - f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_011_OK - + f_delete_onu_alarm_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC029_SRV_FAIS_011_OK + } // End of group fixedAccessInfoService - -} // End of module AtsMec_FixedAccessInfoAPI_TestCases + +} // End of module AtsMec_FixedAccessInformationServiceAPI_TestCases diff --git a/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestControl.ttcn b/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..710a3e45738010e9e05401934af615c47817b688 --- /dev/null +++ b/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestControl.ttcn @@ -0,0 +1,55 @@ +module AtsMec_FixedAccessInformationServiceAPI_TestControl { + + // LibMec/FixedAccessInformationAPI + import from FixedAccessInformationServiceAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec_FixedAccessInfoAPI + import from AtsMec_FixedAccessInformationServiceAPI_TestCases all; + + control { + + if (PICS_MEC_PLAT and PICS_FAI_API_SUPPORTED and PICS_FAI_API_SUPPORTED) { + execute(TC_MEC_MEC029_SRV_FAIS_001_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_001_BR()); + execute(TC_MEC_MEC029_SRV_FAIS_001_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_002_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_002_BR()); + execute(TC_MEC_MEC029_SRV_FAIS_002_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_003_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_003_BR()); + execute(TC_MEC_MEC029_SRV_FAIS_003_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_004_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_004_BR()); + execute(TC_MEC_MEC029_SRV_FAIS_004_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_005_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_005_BR()); + execute(TC_MEC_MEC029_SRV_FAIS_005_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_006_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_006_BR()); + + execute(TC_MEC_MEC029_SRV_FAIS_007_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_007_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_008_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_008_BR()); + execute(TC_MEC_MEC029_SRV_FAIS_008_NF()); + execute(TC_MEC_MEC029_SRV_FAIS_008_PF()); + + execute(TC_MEC_MEC029_SRV_FAIS_009_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_009_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_010_OK()); + + execute(TC_MEC_MEC029_SRV_FAIS_011_OK()); + } + } // End of 'control' statement + +} // End of module AtsMec_FixedAccessInformationServiceAPI_TestControl diff --git a/ttcn/AtsMec_FixedAccessInformationService/module.mk b/ttcn/AtsMec_FixedAccessInformationService/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..5b3e010564ae3ccf6e5b8dd75b34bdd9e6a5918c --- /dev/null +++ b/ttcn/AtsMec_FixedAccessInformationService/module.mk @@ -0,0 +1,39 @@ +suite := AtsMec_FixedAccessInfo + +sources := \ + AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn \ + AtsMec_FixedAccessInformationServiceAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..60301b6674ddef518e5996ac079cc122b3e0a9b0 --- /dev/null +++ b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn @@ -0,0 +1,1881 @@ +module AtsMec_IoTAPI_TestCases { + + // Libcommon + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec/LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Templates all; + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits all; + + // LibMec/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_Templates all; + + // LibMec/IoTAPI + import from IoTAPI_TypesAndValues all; + import from IoTAPI_Templates all; + import from IoTAPI_Functions all; + import from IoTAPI_Pics all; + import from IoTAPI_Pixits all; + + // LibMec + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + group iotdev { + + group lookup { + + /** + * @desc Check that the IUT responds with the list of registered IoT devices when queried by a Service Consumer + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_device_info_list( + { + mw_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + ), + mw_device_info( + PX_IOT_DEVICE_ID_2, + PX_IOT_DEVICE_AUTH_2, + -, + PX_IOT_DEVICE_SUPI_2, + PX_IOT_DEVICE_IMSI_2 + ), + mw_device_info( + PX_IOT_DEVICE_ID_3, + PX_IOT_DEVICE_AUTH_3, + -, + PX_IOT_DEVICE_SUPI_3, + PX_IOT_DEVICE_IMSI_3 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_01 + + /** + * @desc Check that the IUT responds with the list of registered IoT devices when queried using a filter by a Service Consumer + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO & "?filter=(eq,enabled,false)", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_device_info_list( + { + mw_device_info( + PX_IOT_DEVICE_ID_2, + PX_IOT_DEVICE_AUTH_2, + -, + PX_IOT_DEVICE_SUPI_2, + PX_IOT_DEVICE_IMSI_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_02 + + /** + * @desc Check that the IUT responds with the list of registered IoT devices when queried by a Service Consumer filtering one field + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO & "?fields=deviceId", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_device_info_list( + { + mw_device_info( + PX_IOT_DEVICE_ID_3, + PX_IOT_DEVICE_AUTH_3, + -, + PX_IOT_DEVICE_SUPI_3, + PX_IOT_DEVICE_IMSI_3 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_03 + + /** + * @desc Check that the IUT responds with the list of registered IoT devices when queried by a Service Consumer filtering the number of fields and applying a filter to a specific field + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO & "?fields=deviceId&filter=(eq,enabled,false)", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_device_info_list( + { + mw_device_info( + PX_IOT_DEVICE_ID_2, + PX_IOT_DEVICE_AUTH_2, + -, + PX_IOT_DEVICE_SUPI_2, + PX_IOT_DEVICE_IMSI_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_04 + + } // End of group lookup + + group subscription { + + /** + * @desc Check that the IUT registers the information of an IoT device when requested by a Service Consumer + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_IOT_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_iot_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_iot_device_info( + mw_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + false, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + )))))) -> value v_response { + tc_ac.stop; + + if (f_check_headers(valueof(v_response.response.header)) == false) { + log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + log("*** " & testcasename() & ": PASS: IUT successfully create DeviceInfo entry ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info(v_response.response.body.json_body.deviceInfo_iot); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_002_OK + + /** + * @desc Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_IOT_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_iot_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + false, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_002_BR + + /** + * @desc Check that the IUT returns the IoT device information when requested by Service Consumer specifying the device identifier + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_device_info( + mw_device_info( + PX_IOT_DEVICE_ID_2, + PX_IOT_DEVICE_AUTH_2, + true, // According to Note 3 of 6.2.2-1 table, it cannot be set directly by the service consumer + PX_IOT_DEVICE_SUPI_2, + PX_IOT_DEVICE_IMSI_2 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct DeviceInfo entry ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_003_OK + + /** + * @desc Check that the IUT returns the IoT device information when requested by Service Consumer specifying the device identifier + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_003_NF + + } // End of group subscribe + + group patch { + + /** + * @desc Check that the IUT updates the information about a registered IoT device when requested by a Service Consumer + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + var TrafficRuleDescriptor v_traffic_rule_descriptor := valueof( + m_traffic_rule_descriptor( + PX_TRAFFIC_RULE_ID, + PX_TRAFFIC_FILTERTYPE, + PX_TRAFFIC_RULE_PRIORITY, + m_traffic_filter( + PX_TRAFFIC_FILTER_SRC_ADDRESS, + PX_TRAFFIC_FILTER_DST_ADDRESS, + PX_TRAFFIC_FILTER_SRC_PORT, + PX_TRAFFIC_FILTER_DST_PORT, + PX_TRAFFIC_FILTER_PROTOCOL + ), + PX_TRAFFIC_RULE_ACTION + )); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_1, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_iot_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1, + PX_REQUESTED_PLTF_ID, + {v_traffic_rule_descriptor} + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_device_info( + mw_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1, + PX_REQUESTED_PLTF_ID, + {v_traffic_rule_descriptor} + )))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates DeviceInfo entry ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_004_OK + + /** + * @desc Check that the IUT returns an error when a Service Consumer requests to update a not registered IoT device + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + var TrafficRuleDescriptor v_traffic_rule_descriptor := valueof( + m_traffic_rule_descriptor( + PX_TRAFFIC_RULE_ID, + PX_TRAFFIC_FILTERTYPE, + PX_TRAFFIC_RULE_PRIORITY, + m_traffic_filter( + PX_TRAFFIC_FILTER_SRC_ADDRESS, + PX_TRAFFIC_FILTER_DST_ADDRESS, + PX_TRAFFIC_FILTER_SRC_PORT, + PX_TRAFFIC_FILTER_DST_PORT, + PX_TRAFFIC_FILTER_PROTOCOL + ), + PX_TRAFFIC_RULE_ACTION + )); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_iot_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1, + PX_REQUESTED_PLTF_ID, + {v_traffic_rule_descriptor} + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_004_NF + + /** + * @desc Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_004_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + var TrafficRuleDescriptor v_traffic_rule_descriptor := valueof( + m_traffic_rule_descriptor( + PX_TRAFFIC_RULE_ID, + PX_TRAFFIC_FILTERTYPE, + PX_TRAFFIC_RULE_PRIORITY, + m_traffic_filter( + PX_TRAFFIC_FILTER_SRC_ADDRESS, + PX_TRAFFIC_FILTER_DST_ADDRESS, + PX_TRAFFIC_FILTER_SRC_PORT, + PX_TRAFFIC_FILTER_DST_PORT, + PX_TRAFFIC_FILTER_PROTOCOL + ), + PX_TRAFFIC_RULE_ACTION + )); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_iot_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + true, // According to Note 3 of 6.2.2-1 table, it cannot be set directly by the service consumer + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1, + PX_REQUESTED_PLTF_ID, + {v_traffic_rule_descriptor} + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_004_BR + + } // End of group patch + + group delete { + + /** + * @desc Check that the IUT deregisters an IoT device information when requested by a Service Consumer specifying the IoT registered device identifier + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 code ***"); + v_device_info_list[1].deviceId := ""; + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_005_OK + + /** + * @desc Check that the IUT deregisters an IoT device information when requested by a Service Consumer specifying the IoT registered device identifier + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_005_NF + + } // End of group delete + + } // End of group iotdev + + group iotpltf { + + group lookup { + + /** + * @desc Check that the IUT responds with the list of registered IoT platforms when queried by a Service Consumer + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_INFO, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_iot_platform_info_list( + v_iot_platform_list + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_001_OK + + } // End of group lookup + + group subscribe { + + /** + * @desc Check that the IUT registers the information of a new IoT platform when requested by a Service Consumer + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB, + v_headers, + m_http_message_body_json( + m_body_json_iot_iot_platform_info( + m_iot_platform_info( + PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_iot_iot_platform_info( + mw_iot_platform_info( + PX_IOT_PLTF_ID_1, + { + mw_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + mw_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + mw_security_info, + mw_impl_specific_info + ) + } + )))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a IotPlatformInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_iot_platform_info(v_response.response.body.json_body.iotPlatformInfo); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_OK + + /** + * @desc Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB, + v_headers, + m_http_message_body_json( + m_body_json_iot_iot_platform_info( + m_iot_platform_info_error( + PX_IOT_PLTF_ID_1 + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_BR + + /** + * @desc Check that the IUT returns the IoT platform information when requested by Service Consumer specifying the IoT platform identifier + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_iot_platform_info( + m_iot_platform_info( + PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct IotPlatformInfo entry ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_OK + + /** + * @desc Check that the IUT returns error when Service Consumer request to retrieve a not registered IoT platform + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_UNKNOWN, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_NF + + } // End of group subscribe + + group patch { + + /** + * @desc Check that the IUT updates the information about a registered IoT platform when requested by a Service Consumer + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_2, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_iot_iot_platform_info( + m_iot_platform_info( + PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1 & "_patch", + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1, PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_iot_platform_info( + m_iot_platform_info( + PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1 & "_patch", + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1, PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct IotPlatformInfo entry ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_OK + + /** + * @desc Check that the IUT returns an error when a Service Consumer requests to update a not registered IoT platform + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_UNKNOWN, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_iot_iot_platform_info( + m_iot_platform_info( + PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1 & "_patch", + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1, PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct IotPlatformInfo entry ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_NF + + } // End of group patch + + group delete { + + /** + * @desc Check that the IUT deregisters an IoT platform information when requested by a Service Consumer specifying the registered IoT platform identifier + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct success code ***"); + v_iot_platform_list[1].iotPlatformId := ""; + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_OK + + /** + * @desc Check that the IUT returns an error when a Service Consumer request to deregister an IoT platform using incorrect parameters + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_UNKNOWN, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_NF + + } // End of group delete + + } // End of group iotpltf + +} // End of module AtsMec_IoTAPI_TestCases diff --git a/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..70941a0c912b294507c98a31114d540c13b7b3ea --- /dev/null +++ b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn @@ -0,0 +1,53 @@ +module AtsMec_IoTAPI_TestControl { + + // LibMec/IoTAPI + import from IoTAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec_IoTAPI + import from AtsMec_IoTAPI_TestCases all; + + control { + + if (PICS_IOT_API_SUPPORTED) { + + if (PICS_MEC_PLAT and PICS_SERVICES) { + execute(TC_MEC_MEC033_IOTS_IOTDEV_001_OK_01()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_001_OK_02()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_001_OK_03()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_001_OK_04()); + + execute(TC_MEC_MEC033_IOTS_IOTDEV_002_OK()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_002_BR()); + + execute(TC_MEC_MEC033_IOTS_IOTDEV_003_OK()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_003_NF()); + + execute(TC_MEC_MEC033_IOTS_IOTDEV_004_OK()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_004_NF()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_004_BR()); + + execute(TC_MEC_MEC033_IOTS_IOTDEV_005_OK()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_005_NF()); + + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_001_OK()); + + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_OK()); + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_BR()); + + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_OK()); + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_NF()); + + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_OK()); + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_NF()); + + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_OK()); + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_NF()); + } + } + + } // End of 'control' statement + +} // End of module AtsMec_IoTAPI_TestControl diff --git a/ttcn/AtsMec_IoT/module.mk b/ttcn/AtsMec_IoT/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..36152a9c0d348614edd3513af12eb479fbf1ac10 --- /dev/null +++ b/ttcn/AtsMec_IoT/module.mk @@ -0,0 +1,39 @@ +suite := AtsMec_IoT + +sources := \ + AtsMec_IoTAPI_TestCases.ttcn \ + AtsMec_IoTAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/IoTAPI \ + ../LibMec/FederationEnablementAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..23c045234dbac6e3387b2d1c6a81b1f9daea6580 --- /dev/null +++ b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn @@ -0,0 +1,4991 @@ +/** + * @author ETSI / STF569 / TTF T027 + * @version $URL:$ + * $ID:$ + * @desc This module provides the MEC test cases. + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * @see ETSI GS MEC 003, Draft ETSI GS MEC 013 V3.1.1 (2018-10) + */ +module AtsMec_LocationAPI_TestCases { + + // Libcommon + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec/LocationAPI + import from LocationAPI_TypesAndValues all; + import from LocationAPI_Templates all; + import from LocationAPI_Functions all; + import from LocationAPI_Pics all; + import from LocationAPI_Pixits all; + + // LibMec + import from LibMec_Functions all; + import from LibMec_Templates all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + group radioNodeLocationLookup { + + /** + * @desc Check that the IUT responds with the list of radio nodes currently associated with the MEC host and the location of each radio node when queried by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")) & "/accessPoints", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_access_point_list( + mw_access_point_list( + PX_ZONE_ID + )))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an AccessPoint list containing a ZoneId ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_OK + + /** + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_ZONE_ID, "UTF-8")) & "/accessPoints", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found() + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_NF + + /** + * @desc Check that the IUT responds with the radio nodes when queried by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_RLOCLOOK_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_url := PICS_ROOT_API & PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")) & "/accessPoints/" & oct2char(unichar2oct(PX_ACCESS_POINT_ID, "UTF-8")); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + v_url, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_access_point_info( + mw_access_point_info( + PX_ACCESS_POINT_ID, + PX_CONNECTION_TYPE, + -, -, + pattern "http?+" & v_url + )))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an AccessPointInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_RLOCLOOK_002_OK + + /** + * @desc Check that the IUT responds with an error when the radio nodes does not exist + */ + testcase TC_MEC_MEC013_SRV_RLOCLOOK_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_ZONE_ID, "UTF-8")) & "/accessPoints/" & oct2char(unichar2oct(PX_NON_EXISTENT_ZONE_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found() + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_RLOCLOOK_002_NF + + } // End of group radioNodeLocationLookup + + group ueAreaLookup { + + /** + * @desc Check that the IUT responds with a list of UE area subscriptions when queried by a MEC Application - No filter + */ + testcase TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserAreaSubscription v_user_area_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_area_subscription(v_user_area_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + { href := pattern "http?+" & PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI }, + superset( + mw_subscription( + "UserAreaSubscription", + v_user_area_subscription.links_.self_.href + )))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of UserAreaSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_area_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_01 + + /** + * @desc Check that the IUT responds with a list of UE area subscriptions when queried by a MEC Application - Event filter + */ + testcase TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserAreaSubscription v_user_area_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_area_subscription(v_user_area_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "?event", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + { href := pattern "http?+" & PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI }, + superset( + mw_subscription( + "UserAreaSubscription", + v_user_area_subscription.links_.self_.href + )))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of UserAreaSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_area_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid filter + */ + testcase TC_MEC_MEC013_SRV_UEAREALOOK_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserAreaSubscription v_user_area_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_area_subscription(v_user_area_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "?filter(dummy, "")", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_area_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREALOOK_001_BR + + /** + * @desc Check that the IUT acknowledges the change of UE area subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEAREALOOK_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserAreaSubscription v_user_area_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_area_subscription(v_user_area_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_area_subscription( + v_user_area_subscription + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct UserAreaNotification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_area_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREALOOK_002_OK + + /** + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEAREALOOK_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREALOOK_002_NF + + } // End of group ueAreaLookup + + group ueAreaSubscribe { + + /** + * @desc Check that the IUT acknowledges the creation of UE area subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_area_subscription( + m_user_area_subscription( + PX_AREA_SUB_CALLBACK_URI, // callbackReference + PX_USER, + m_area_info( + ELLIPSOID_POINT_UNCERT_CIRCLE, + { + m_point(PX_UE_COORD_LAT, PX_UE_COORD_LONG) + }, + PX_RADIUS + ), // AreaInfo + { PX_IP_ADDRESS }, + PX_TRACKIMNG_ACCURACY, + PX_CLIENT_ID, // TrackingAccuracy + -, -, -, + { ENTERING_AREA_EVENT } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_area_subscription( + mw_user_area_subscription( + PX_AREA_SUB_CALLBACK_URI, // callbackReference + PX_USER, + -, + m_area_info( + ELLIPSOID_POINT_UNCERT_CIRCLE, + { + m_point(PX_UE_COORD_LAT, PX_UE_COORD_LONG) + }, + PX_RADIUS + ), // AreaInfo + { PX_IP_ADDRESS }, + PX_TRACKIMNG_ACCURACY, + PX_CLIENT_ID //clientCorrelator + )))))) -> value v_response { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_LOC_API_AREA_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userAreaNotification, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_area_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK_01 + + /** + * @desc Check that the IUT acknowledges the creation of UE area subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var UserAreaSubscription v_user_area_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_create_user_area_subscription(v_user_area_subscription, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_user_area_notification( + mw_user_area_notification( + v_user_area_subscription.addressList[0], + v_user_area_subscription.locationEventCriteria[0], + v_user_area_subscription.links_ + )))))) { + tc_ac.stop; + + // Send response + var Headers v_headers; + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userAreaNotification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_area_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided + */ + testcase TC_MEC_MEC013_SRV_UEAREASUB_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_area_subscription( + m_user_area_subscription( + "", // callbackReference + PX_USER, + m_area_info( + ELLIPSOID_POINT_UNCERT_CIRCLE, + { + m_point(PX_UE_COORD_LAT, PX_UE_COORD_LONG) + } + // No radius + ), + { PX_IP_ADDRESS }, // AreaInfo + PX_TRACKIMNG_ACCURACY, + PX_CLIENT_ID //clientCorrelator + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_001_BR + + /** + * @desc Check that the IUT acknowledges the change of UE area subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEAREASUB_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserAreaSubscription v_user_area_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_area_subscription(v_user_area_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + v_user_area_subscription.callbackReference := PX_UE_NEW_SUB_CALLBACK_URI; + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_user_area_subscription( + v_user_area_subscription + + + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_area_subscription( + v_user_area_subscription + ))))) { + + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with updated subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_area_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_002_OK + + /** + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEAREASUB_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserAreaSubscription v_user_area_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_area_subscription(v_user_area_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_user_area_subscription( + m_user_area_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, // callbackReference + PX_USER, + m_area_info( + ELLIPSOID_POINT_UNCERT_CIRCLE, + { m_point(PX_UE_COORD_LAT, PX_UE_COORD_LONG) }, + PX_RADIUS + ), // AreaInfo + { PX_IP_ADDRESS }, + PX_TRACKIMNG_ACCURACY, // TrackingAccuracy + v_user_area_subscription.clientCorrelator, + v_user_area_subscription.requestTestNotification, + v_user_area_subscription.links_ + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_002_NF + + /** + * @desc Check that the IUT acknowledges the cancellation of UE area change notifications when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEAREASUB_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserAreaSubscription v_user_area_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_area_subscription(v_user_area_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_003_OK + + /** + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEAREASUB_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_003_NF + + } // End of group ueAreaSubscribe + + group ueDistanceLookup { + + /** + * @desc Check that the IUT responds with the list of UE distance subscriptions to a UE when queried by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserDistanceSubscription v_user_distance_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_distance_subscription(v_user_distance_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, + superset( + mw_subscription( + "UserDistanceSubscription", + v_user_distance_subscription.links_.self_.href + )))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 200 OK ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_distance_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "&event", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 200 OK ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_BR + + /** + * @desc Check that the IUT responds with the distance to a UE when queried by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEDISTLOOK_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserDistanceSubscription v_user_distance_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_distance_subscription(v_user_distance_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_distance_subscription( + v_user_distance_subscription + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct UserDistanceNotification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_distance_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTLOOK_002_OK + + /** + * @desc Check that the IUT responds with an error when inconsistent request was sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEDISTLOOK_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserDistanceSubscription v_user_distance_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_distance_subscription(v_user_distance_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_distance_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTLOOK_002_NF + + } // End of group ueDistanceLookup + + group ueDistanceSubscribe { + + /** + * @desc Check that the IUT acknowledges the UE distance subscription request when commanded by a MEC Application and notifies it when (all) the requested UE(s) is (are) within the specified distance + */ + testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_distance_subscription( + m_user_distance_subscription( + PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference + PX_USER, + { PX_UE_MONITORED_IP_ADDRESS }, // monitoredAddress + PX_DISTANCE, + PX_TRACKIMNG_ACCURACY, + AllWithinDistance, + -, // checkImmediate + PX_CLIENT_ID, //clientCorrelator + { PX_UE_REFERENCED_IP_ADDRESS } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_distance_subscription( + mw_user_distance_subscription( + PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference + -, + PX_USER, + { PX_UE_MONITORED_IP_ADDRESS }, // monitoredAddressPX_CLIENT_ID, //clientCorrelator + PX_DISTANCE, + PX_TRACKIMNG_ACCURACY, + AllWithinDistance, + -, // checkImmediate + PX_CLIENT_ID //clientCorrelator + )))))) -> value v_response { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_LOC_API_DISTANCE_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userDistanceSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_distance_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_01 + + /** + * @desc Check that the IUT acknowledges the UE distance subscription request when commanded by a MEC Application and notifies it when (all) the requested UE(s) is (are) within the specified distance + */ + testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var UserDistanceSubscription v_user_distance_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_create_user_distance_subscription(v_user_distance_subscription, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_user_distance_subscription( + v_user_distance_subscription + ))))) { + tc_ac.stop; + + // Send response + var Headers v_headers; + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userDistanceNotification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_distance_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided + */ + testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_distance_subscription( + m_user_distance_subscription( + "", // callbackReference + PX_USER, + { }, // monitoredAddress is empty + PX_DISTANCE, + PX_TRACKIMNG_ACCURACY, + AllWithinDistance, + -, // checkImmediate + PX_CLIENT_ID //clientCorrelator + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_BR + + /** + * @desc Check that the IUT acknowledges the cancellation of UE distance notifications when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserDistanceSubscription v_user_distance_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_distance_subscription(v_user_distance_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_OK + + /** + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found() + )) { + + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_NF + + } // End of group ueDistanceSubscribe + + group ueInfLook { + + /** + * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - No Filter + */ + testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLATand PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_list( + mw_user_list( + pattern "http?+" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI, + ? + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_01 + + /** + * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - Filter with one address + */ + testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLATand PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?address=" & oct2char(unichar2oct(PX_IP_ADDRESS, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_list( + mw_user_list( + pattern "http?+" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI, + superset( + mw_user_info( + PX_IP_ADDRESS, + PX_ACCESS_POINT_ID, + PX_ZONE_ID, + -, + pattern "http?+" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?address=" & PX_IP_ADDRESS + )))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_02 + + /** + * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - Filter with several addresses + */ + testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLATand PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?address=" & oct2char(unichar2oct(PX_IP_ADDRESS, "UTF-8")) & "&address=" & oct2char(unichar2oct(PX_IP_ADDRESS_1, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_list( + mw_user_list( + pattern "http?+" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI, + superset( + mw_user_info( + PX_IP_ADDRESS, + -, -, -, + pattern "http?+" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?address=" & PX_IP_ADDRESS + ), + mw_user_info( + PX_IP_ADDRESS_1, + -, -, -, + pattern "http?+" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?address=" & PX_IP_ADDRESS_1 + ) + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_03 + + /** + * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - Filter with several zoneIds + */ + testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLATand PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")) & "&zoneId=" & oct2char(unichar2oct(PX_ZONE_ID_1, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_list( + mw_user_list( + pattern "http?+" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI, + superset( + mw_user_info( + PX_IP_ADDRESS, + -, + PX_ZONE_ID, + -, + pattern "http?+" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?address=" & PX_IP_ADDRESS + ), + mw_user_info( + PX_IP_ADDRESS_1, + -, + PX_ZONE_ID_1, + -, + pattern "http?+" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?address=" & PX_IP_ADDRESS_1 + ) + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_04 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?addr=" & oct2char(unichar2oct(PX_IP_ADDRESS, "UTF-8")), // Wrong name should trigger an error response. + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_BR + + /** + * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?address=" & oct2char(unichar2oct(PX_ACR_UNKNOWN_IP, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_001_NF + + } // End of group ueInfLook + + group ueLocationLookup { + + /** + * @desc Check that the IUT responds with a list for the location of User Equipments when queried by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventSubscription v_user_location_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + { href := pattern "http?+" & PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI }, + superset( + mw_subscription( + v_user_location_event_subscription.subscriptionType, + v_user_location_event_subscription.links_.self_.href + )))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of notification subscriptions ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventSubscription v_user_location_event_subscription; + var charstring v_user_location_event_subscription_id; + var UserLocationPeriodicSubscription v_user_location_periodic_subscription; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_subscription, v_user_location_event_subscription_id); + f_create_user_location_periodic_subscription(v_user_location_periodic_subscription, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "?event", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + { href := pattern "http?+" & PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI }, + superset( + mw_subscription( + v_user_location_event_subscription.subscriptionType, + v_user_location_event_subscription.links_.self_.href + )))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of notification subscriptions ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_user_location_event_subscription_id); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_01 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Periodic + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventSubscription v_user_location_event_subscription; + var charstring v_user_location_event_subscription_id; + var UserLocationPeriodicSubscription v_user_location_periodic_subscription; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_subscription, v_user_location_event_subscription_id); + f_create_user_location_periodic_subscription(v_user_location_periodic_subscription, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "?periodic", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + { href := pattern "http?+" & PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI }, + superset( + mw_subscription( + v_user_location_event_subscription.subscriptionType, + v_user_location_event_subscription.links_.self_.href + )))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of notification subscriptions ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_user_location_event_subscription_id); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_02 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event and address + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventSubscription v_user_location_event_subscription_1; + var charstring v_user_location_event_subscription_id_1; + var UserLocationEventSubscription v_user_location_event_subscription_2; + var charstring v_user_location_event_subscription_id_2; + var UserLocationPeriodicSubscription v_user_location_periodic_subscription; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_subscription_1, v_user_location_event_subscription_id_1); + f_create_user_location_event_subscription(v_user_location_event_subscription_2, v_user_location_event_subscription_id_2, PX_USER_2); + f_create_user_location_periodic_subscription(v_user_location_periodic_subscription, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "?event&adress=" & oct2char(unichar2oct(PX_USER_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + { href := pattern "http?+" & PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI }, + superset( + mw_subscription( + v_user_location_event_subscription_2.subscriptionType, + v_user_location_event_subscription_2.links_.self_.href + )))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of notification subscriptions ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_user_location_event_subscription_id_1); + f_delete_user_location_event_subscription(v_user_location_event_subscription_id_2); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_03 + + /** + * @desc Check that the IUT responds with an error when inconsistent request was sent by a MEC Application - Invalid filter + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventSubscription v_user_location_event_subscription; + var charstring v_user_location_event_subscription_id; + var UserLocationPeriodicSubscription v_user_location_periodic_subscription; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_subscription, v_user_location_event_subscription_id); + f_create_user_location_periodic_subscription(v_user_location_periodic_subscription, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "?dummy", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_user_location_event_subscription_id); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_BR + + /** + * @desc Check that the IUT responds with an error when inconsistent request was sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_NF_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_NF_01 + + /** + * @desc Check that the IUT responds with an error when inconsistent request was sent by a MEC Application - Using filter + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_NF_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventSubscription v_user_location_event_subscription; + var charstring v_user_location_event_subscription_id; + var UserLocationPeriodicSubscription v_user_location_periodic_subscription; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_subscription, v_user_location_event_subscription_id); + f_create_user_location_periodic_subscription(v_user_location_periodic_subscription, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "?event&address=" & oct2char(unichar2oct(PX_USER_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_user_location_event_subscription_id); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_NF_02 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventSubscription v_user_location_event_subscription; + var charstring v_user_location_event_subscription_id; + var UserLocationPeriodicSubscription v_user_location_periodic_subscription; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_subscription, v_user_location_event_subscription_id); + f_create_user_location_periodic_subscription(v_user_location_periodic_subscription, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_user_location_event_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_location_event_subscription( + mw_user_location_event_subscription( + v_user_location_event_subscription.callbackReference + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct userLocationEventSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_user_location_event_subscription_id); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_01 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Periodoc + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventSubscription v_user_location_event_subscription; + var charstring v_user_location_event_subscription_id; + var UserLocationPeriodicSubscription v_user_location_periodic_subscription; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_subscription, v_user_location_event_subscription_id); + f_create_user_location_periodic_subscription(v_user_location_periodic_subscription, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_user_location_periodic_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_location_periodic_subscription( + mw_user_location_periodic_subscription( + v_user_location_periodic_subscription.callbackReference + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct userLocationEventSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_user_location_event_subscription_id); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_02 + + /** + * @desc Check that the IUT responds with an error when the non existing subscription is queried by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct userLocationEventSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_003_NF + + } // End of group ueLocationLookup + + group ueLocSub { + + /** + * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications user location event + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + PX_CLIENT_ID + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_location_event_subscription( + mw_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + -, + PX_CLIENT_ID + )))))) -> value v_response { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userLocationEventSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_01 + + /** + * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications user location event + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var UserLocationEventSubscription v_user_location_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_subscription, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, -, + mw_http_message_body_json( + mw_body_json_user_location_event_notification( + mw_user_location_event_notification( + -, -, + v_user_location_event_subscription.links_ + )))))) { + tc_ac.stop; + + // Send response + var Headers v_headers; + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userLocationEventNotification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_02 + + /** + * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications user location periodic + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_location_periodic_subscription( + m_user_location_periodic_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + -, + PX_CLIENT_ID + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_location_periodic_subscription( + mw_user_location_periodic_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + -, -, + PX_CLIENT_ID + )))))) -> value v_response { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userLocationPeriodicSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_periodic_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_01 + + /** + * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications user location periodic + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var UserLocationPeriodicSubscription v_user_location_periodic_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_periodic_subscription(v_user_location_periodic_subscription, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, -, + mw_http_message_body_json( + mw_body_json_user_location_periodic_notification( + mw_user_location_periodic_notification( + -, -, + v_user_location_periodic_subscription.links_ + )))))) { + tc_ac.stop; + + // Send response + var Headers v_headers; + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userLocationPeriodicNotification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_periodic_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + "", + PX_USER, + PX_CLIENT_ID + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_location_periodic_subscription( + m_user_location_periodic_subscription( + "", + PX_USER, + -, + PX_CLIENT_ID + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR_02 + + /** + * @desc Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventSubscription v_user_location_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_subscription, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_subscription_id, + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 No Content ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_002_OK + + /** + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_002_NF + + /** + * @desc Check that the IUT acknowledges a request to modify an existing subscription by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_003_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventSubscription v_user_location_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + v_user_location_event_subscription.callbackReference := PX_UE_NEW_SUB_CALLBACK_URI; + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + v_user_location_event_subscription + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_location_event_subscription( + v_user_location_event_subscription + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates userLocationPeriodicSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_periodic_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_OK_01 + + /** + * @desc Check that the IUT acknowledges a request to modify an existing subscription by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_003_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationPeriodicSubscription v_user_location_periodic_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_periodic_subscription(v_user_location_periodic_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + v_user_location_periodic_subscription.callbackReference := PX_UE_NEW_SUB_CALLBACK_URI; + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_user_location_periodic_subscription( + v_user_location_periodic_subscription + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_location_periodic_subscription( + v_user_location_periodic_subscription + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates userLocationPeriodicSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_periodic_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_OK_02 + + /** + * @desc Check that the IUT responds with an error when received an inconsistent request + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_003_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventSubscription v_user_location_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + "", + PX_USER, + PX_CLIENT_ID + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_periodic_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_BR_01 + + /** + * @desc Check that the IUT responds with an error when received an inconsistent request + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_003_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationPeriodicSubscription v_user_location_periodic_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_periodic_subscription(v_user_location_periodic_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_user_location_periodic_subscription( + m_user_location_periodic_subscription( + "", + PX_USER, + -, + PX_CLIENT_ID + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_periodic_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_BR_02 + + /** + * @desc Check that the IUT responds with an error when received a request to modify a not existing subscription by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_003_NF_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventSubscription v_user_location_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + v_user_location_event_subscription.callbackReference := PX_UE_NEW_SUB_CALLBACK_URI; + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + v_user_location_event_subscription + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_periodic_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_NF_01 + + /** + * @desc Check that the IUT responds with an error when received an inconsistent request + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_003_NF_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationPeriodicSubscription v_user_location_periodic_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_periodic_subscription(v_user_location_periodic_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + v_user_location_periodic_subscription.callbackReference := PX_UE_NEW_SUB_CALLBACK_URI; + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_user_location_periodic_subscription( + v_user_location_periodic_subscription + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_periodic_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_NF_02 + + } // End of group ueLocSub + + group ueTestNot { + + /** + * @desc Check that the IUT provides a test notification when requested by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UETESTNOT_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + PX_CLIENT_ID, + true + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_location_event_subscription( + mw_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + -, + PX_CLIENT_ID, + true + )))))) -> value v_response { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": INFO: IUT successfully responds with a userLocationEventSubscription, SubscriptionId: ", v_subscription_id," ***"); + repeat; // Wait for test notification + } + } + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_test_notification( + mw_test_notification( + v_response.response.body.json_body.userLocationEventNotification.links_ + )))))) { + tc_ac.stop; + + // Send response + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userAreaNotification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UETESTNOT_001_OK + + /** + * @desc Check that the IUT terminates notifications after time expiration + */ + testcase TC_MEC_MEC013_SRV_UETESTNOT_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + var boolean v_notification_received_after_expiry := false; + timer tc_expiry := PX_NOTIF_EXPIRY; + timer tc_expiry_guard := PX_NOTIF_EXPIRY / 2.0; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + PX_CLIENT_ID, + -, -, -, -, + m_time_stamp( + float2int(PX_NOTIF_EXPIRY) + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + tc_expiry.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_location_event_subscription( + mw_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + -, + PX_CLIENT_ID + )))))) -> value v_response { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": INFO: IUT successfully responds with a userLocationEventSubscription, SubscriptionId: ", v_subscription_id," ***"); + tc_ac.start; + repeat; // Wait for test notification + } + } + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_test_notification( + mw_test_notification( + v_response.response.body.json_body.userLocationEventNotification.links_ + )))))) { + tc_ac.stop; + + // Send response + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + + log("*** " & testcasename() & ": INFO: Receive new notification ***"); + + v_notification_received_after_expiry := true; + tc_ac.start; + repeat; + } + [] tc_expiry.timeout { + v_notification_received_after_expiry := false; + tc_expiry_guard.start; + repeat; + } + [] tc_expiry_guard.timeout { + if (v_notification_received_after_expiry) { + log("*** " & testcasename() & ": FAIL: Received notification after expiration time ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + log("*** " & testcasename() & ": PASS: No more notification received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UETESTNOT_002_OK + + } // End of group ueTestNot + + group ueZoneLook { + + /** + * @desc Check that the IUT responds with a list zones when queried by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ZoneSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_001_OK + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - Zone location Event + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneLocationEventNotification v_zone_location_event_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "?event", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "ZoneLocationEventSubscription", + v_zone_location_event_notification.links_.subscription.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ZoneSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_location_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_01 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - Zone Status + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "?status", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "ZoneStatusSubscription", + v_zone_status_notification.links_.subscription.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ZoneSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_status_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_02 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event and address + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneLocationEventNotification v_zone_location_event_notification_1, v_zone_location_event_notification_2; + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id_event_1, v_subscription_id_event_2; + var charstring v_subscription_id_status; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification_1, v_subscription_id_event_1); + f_create_zone_location_event_subscription(v_zone_location_event_notification_2, v_subscription_id_event_2, PX_USER_2); + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id_status); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "?event&address=" & oct2char(unichar2oct(PX_USER_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "ZoneLocationEventSubscription.", + v_zone_location_event_notification_2.links_.subscription.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ZoneSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_location_event_subscription(v_subscription_id_event_1); + f_delete_zone_location_event_subscription(v_subscription_id_event_2); + f_delete_zone_status_subscription(v_subscription_id_status); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_03 + + /** + * @desc Check that the IUT responds with an error when inconsistent request was sent by a MEC Application - Invalid filter + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneLocationEventNotification v_zone_location_event_notification_1, v_zone_location_event_notification_2; + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id_event_1, v_subscription_id_event_2; + var charstring v_subscription_id_status; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification_1, v_subscription_id_event_1); + f_create_zone_location_event_subscription(v_zone_location_event_notification_2, v_subscription_id_event_2, PX_USER_2); + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id_status); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "?event&address", // Invalid filter + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ZoneSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_location_event_subscription(v_subscription_id_event_1); + f_delete_zone_location_event_subscription(v_subscription_id_event_2); + f_delete_zone_status_subscription(v_subscription_id_status); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_BR + + /** + * @desc Check that the IUT responds with an error when inconsistent request was sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneLocationEventNotification v_zone_location_event_notification; + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id_event; + var charstring v_subscription_id_status; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id_event); + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id_status); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "?event&address=" & oct2char(unichar2oct(PX_USER_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_location_event_subscription(v_subscription_id_event); + f_delete_zone_status_subscription(v_subscription_id_status); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_NF + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - Zone location Event + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneLocationEventNotification v_zone_location_event_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "ZoneLocationEventSubscription.", + v_zone_location_event_notification.links_.subscription.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct ZoneSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_location_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_01 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - Zone status Event + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "ZoneLocationEventSubscription.", + v_zone_status_notification.links_.subscription.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct ZoneSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_status_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_02 + + /** + * @desc Check that the IUT responds with an error when the non existing subscription is queried by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_003_NF + + } // End of group ueZoneLook + + group ueZoneSub { + + /** + * @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_zone_location_event_subscription( + m_zone_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_CLIENT_ID, + PX_ZONE_ID + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_zone_location_event_notification( + mw_zone_location_event_notification( + // FIXME + )))))) -> value v_response { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_LOC_API_ZONES_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_location_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_01 + + /** + * @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var ZoneLocationEventNotification v_zone_location_event_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, -, + mw_http_message_body_json( + mw_body_json_zone_location_event_notification( + mw_zone_location_event_notification( + -, + v_zone_location_event_notification.links_ + )))))) { + tc_ac.stop; + + // Send response + var Headers v_headers; + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventNotification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_location_event_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_02 + + /** + * @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application - OperationStatus constraint + */ + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_zone_status_subscription( + m_zone_status_subscription( + PX_AREA_SUB_CALLBACK_URI, + -, + PX_ZONE_ID, + -, -, -, -, -, -, -, + Serviceable + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_zone_status_notification( + mw_zone_status_notification( + -, -, + Serviceable + )))))) -> value v_response { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_LOC_API_ZONES_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_status_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_01 + + /** + * @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application - OperationStatus constraint + */ + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, -, + mw_http_message_body_json( + mw_body_json_zone_status_notification( + mw_zone_status_notification( + v_zone_status_notification.links_ + )))))) { + tc_ac.stop; + + // Send response + var Headers v_headers; + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventNotification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_status_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_02 + + /** + * @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application - UserNumEvent constraint + */ + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_zone_status_subscription( + m_zone_status_subscription( + PX_AREA_SUB_CALLBACK_URI, + -, + PX_ZONE_ID, + -, -, -, + PX_UPPER_NUM_USER_THRESHOLD, + PX_LOWER_NUM_USER_THRESHOLD + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_zone_status_notification( + mw_zone_status_notification( + // FIXME + )))))) -> value v_response { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_LOC_API_ZONES_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_status_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_01 + + /** + * @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application - UserNumEvent constraint + */ + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id, omit, PX_UPPER_NUM_USER_THRESHOLD, PX_LOWER_NUM_USER_THRESHOLD); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, -, + mw_http_message_body_json( + mw_body_json_zone_status_notification( + v_zone_status_notification + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventNotification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_status_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided + */ + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_zone_location_event_subscription( + m_zone_location_event_subscription( + "", + PX_CLIENT_ID, + PX_ZONE_ID + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_BR + + /** + * @desc Check that the IUT acknowledges the change of UE area subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEZONESUB_002_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneLocationEventNotification v_zone_location_event_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_zone_location_event_subscription( + m_zone_location_event_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_CLIENT_ID, + PX_ZONE_ID + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_zone_location_event_subscription( + mw_zone_location_event_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_CLIENT_ID, + PX_ZONE_ID + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates the zoneLocationEventSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_location_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_002_OK_01 + + /** + * @desc Check that the IUT acknowledges the change of UE area subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEZONESUB_002_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_zone_status_subscription( + m_zone_status_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + -, + PX_ZONE_ID + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_zone_status_subscription( + mw_zone_status_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + -, + PX_ZONE_ID + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates with a zoneStatusSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_status_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_002_OK_02 + + /** + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEZONESUB_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_zone_location_event_subscription( + m_zone_location_event_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_CLIENT_ID, + PX_ZONE_ID + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_002_NF + + /** + * @desc Check that the IUT acknowledges the cancellation of UE area change notifications when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEZONESUB_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneLocationEventNotification v_zone_location_event_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 No Content ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_003_OK + + /** + * @desc Check that the IUT acknowledges the cancellation of UE information change notifications when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEZONESUB_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_003_NF + + } // End of group ueZoneSub + +} // End of module AtsMec_LocationAPI_TestCases diff --git a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4b8c31f0d1c6468add07bb2581c50d800eb9e887 --- /dev/null +++ b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn @@ -0,0 +1,108 @@ +module AtsMec_LocationAPI_TestControl { + + // LibMec/LocationAPI + import from LocationAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec_LocationAPI + import from AtsMec_LocationAPI_TestCases all; + + control { + + if (PICS_MEC_PLAT and PICS_SERVICES) { + if (PICS_LOCATION_API_SUPPORTED) { + execute(TC_MEC_MEC013_SRV_RLOCLOOK_001_OK()); + execute(TC_MEC_MEC013_SRV_RLOCLOOK_001_NF()); + execute(TC_MEC_MEC013_SRV_RLOCLOOK_002_OK()); + execute(TC_MEC_MEC013_SRV_RLOCLOOK_002_NF()); + + execute(TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_01()); + execute(TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_02()); + execute(TC_MEC_MEC013_SRV_UEAREALOOK_001_BR()); + execute(TC_MEC_MEC013_SRV_UEAREALOOK_002_OK()); + execute(TC_MEC_MEC013_SRV_UEAREALOOK_002_NF()); + + execute(TC_MEC_MEC013_SRV_UEAREASUB_001_OK_01()); + execute(TC_MEC_MEC013_SRV_UEAREASUB_001_OK_02()); + execute(TC_MEC_MEC013_SRV_UEAREASUB_001_BR()); + execute(TC_MEC_MEC013_SRV_UEAREASUB_002_OK()); + execute(TC_MEC_MEC013_SRV_UEAREASUB_002_NF()); + execute(TC_MEC_MEC013_SRV_UEAREASUB_003_OK()); + execute(TC_MEC_MEC013_SRV_UEAREASUB_003_NF()); + + execute(TC_MEC_MEC013_SRV_UEDISTLOOK_001_OK()); + execute(TC_MEC_MEC013_SRV_UEDISTLOOK_001_BR()); + execute(TC_MEC_MEC013_SRV_UEDISTLOOK_002_OK()); + execute(TC_MEC_MEC013_SRV_UEDISTLOOK_002_NF()); + + execute(TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_01()); + execute(TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_02()); + execute(TC_MEC_MEC013_SRV_UEDISTSUB_001_BR()); + execute(TC_MEC_MEC013_SRV_UEDISTSUB_002_OK()); + execute(TC_MEC_MEC013_SRV_UEDISTSUB_002_NF()); + + execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_01()); + execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_02()); + execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_03()); + execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_04()); + execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_BR()); + execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_NF()); + + execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_01()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_02()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_03()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_BR()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_NF_01()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_NF_02()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_01()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_02()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_003_NF()); + + execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_01()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_02()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_01()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_02()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR_02()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_002_OK()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_002_NF()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_003_OK_01()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_003_OK_02()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_003_BR_01()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_003_BR_02()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_003_NF_01()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_003_NF_02()); + + execute(TC_MEC_MEC013_SRV_UETESTNOT_001_OK()); + execute(TC_MEC_MEC013_SRV_UETESTNOT_002_OK()); + + execute(TC_MEC_MEC013_SRV_UEZONELOOK_001_OK()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_01()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_02()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_03()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_BR()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_NF()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_01()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_02()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_003_NF()); + + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_01()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_02()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_01()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_02()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_01()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_02()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_BR()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_002_OK_01()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_002_OK_02()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_002_NF()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_003_OK()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_003_NF()); + } + } + } // End of 'control' statement + +} // End of module AtsMec_TestControl diff --git a/ttcn/AtsMec_Location/module.mk b/ttcn/AtsMec_Location/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..a60174076397598ea5e84d6ace87d6aaa1aa49cb --- /dev/null +++ b/ttcn/AtsMec_Location/module.mk @@ -0,0 +1,39 @@ +suite := AtsMec_Location + +sources := \ + AtsMec_LocationAPI_TestCases.ttcn \ + AtsMec_LocationAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn b/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn similarity index 96% rename from ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn rename to ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn index 5821f34e12777e50ad6689e423972c2e2d38e930..7fd34ac954231c1db79ef38cd5c5974274dcda10 100644 --- a/ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn +++ b/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn @@ -17,13 +17,13 @@ module AtsMec_RnisAPI_TestCases { import from LibCommon_Sync all; // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_JsonMessageBodyTypes all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; - import from LibItsHttp_Pics all; + import from LibHttp_TypesAndValues all; + import from LibHttp_JsonMessageBodyTypes all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + import from LibHttp_Pics all; // LibMec/RnisAPI import from RnisAPI_TypesAndValues all; @@ -37,12 +37,35 @@ module AtsMec_RnisAPI_TestCases { import from LibMec_Functions all; import from LibMec_Pics all; import from LibMec_Pixits all; + + testcase tc_HelloW() runs on HttpComponent system HttpTestAdapter { + var charstring v_str; // Used for Query path update + var integer v_start; // Used for Query path update + var integer v_count; // Used for Query path update + + var charstring v_uri := "/queries/zones/{zoneId}/accessPoints/{accessPointId}"; + + var charstring v_zoneId := "zoneId"; + v_str := regexp(v_uri, charstring: "(?+)({zoneId})?+", 0); + v_start := lengthof(v_str); + v_count := lengthof(v_uri) - (v_start + lengthof(v_zoneId)); + log("lengthof(v_uri): ", lengthof(v_uri)); + log("v_str: ", v_str); + log("v_start: ", v_start); + log("v_count: ", v_count); + v_uri := substr(v_uri, 0, v_start) & v_zoneId & substr(v_uri, v_start + lengthof(v_zoneId) , v_count) + log("v_uri: ", v_uri); + + v_str := "/queries/zones/status=[0,1,2,"; + log("v_str: ", substr(v_str, 0, lengthof(v_str) - 1) & "]"); + setverdict(pass); + } + group rnis_notifications { /** - * @desc Check that the RNIS service sends an RNIS notification about cell change if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 + * @desc Check that the RNIS service sends an RNIS notification about cell change if the RNIS service has an associated subscription and the event is generated */ testcase TC_MEC_MEC012_SRV_RNIS_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -77,7 +100,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -142,7 +165,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about RAB establishment if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -203,7 +225,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about RAB modification if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -265,7 +286,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about RAB release if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -327,7 +347,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about UE measurement report if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_005_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -387,7 +406,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about UE timing advance if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_006_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -423,9 +441,9 @@ module AtsMec_RnisAPI_TestCases { mw_meas_ta_subscription( PX_CALLBACK_REFERENCE, PX_LINKS_SELF, - mw_filter_criteria_ho( - PX_APP_INS_ID, - -//TODO PX_E_RAB_ID + mw_filter_criteria( + PX_APP_INS_ID, + -//TODO PX_E_RAB_ID ))))))) { tc_wait.stop; @@ -447,7 +465,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about UE carrier aggregation reconfiguration if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_007_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -507,7 +524,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about S1-U bearer if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_008_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -565,7 +581,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about 5G NR UE measurement report if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_009_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -621,6 +636,59 @@ module AtsMec_RnisAPI_TestCases { f_cf_01_http_notif_down(); } // End of testcase TC_MEC_MEC012_SRV_RNIS_009_OK + /** + * @desc Check that the RNIS service sends an RNIS notification on subscription expiration if the RNIS service has an associated subscription and the event is generated + */ + testcase TC_MEC_MEC012_SRV_RNIS_010_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_RNIS) or not(PICS_RNIS_NOTIFICATIONS)) { + log("*** " & testcasename() & ": PICS_RNIS and PICS_RNIS_NOTIFICATIONS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + action("Wait for subscription expiration"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PX_CALLBACK_URI, + -, + mw_http_message_body_json( + mw_body_json_expiry_notification_rnis + )))) { + tc_wait.stop; + + // Send 204 No Content + httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully sends RAB release notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC012_SRV_RNIS_010_OK + } // End of group rnis_notifications group all_subscriptions { @@ -636,8 +704,7 @@ module AtsMec_RnisAPI_TestCases { * - MeasTaSubscription * - CaReconfSubscription * - S1BearerSubscription - * - NrMeasRepUeSubscription" - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 + * - NrMeasRepUeSubscription */ testcase TC_MEC_MEC012_SRV_RNIS_011_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -705,8 +772,7 @@ module AtsMec_RnisAPI_TestCases { * - MeasTaSubscription * - CaReconfSubscription * - S1BearerSubscription - * - NrMeasRepUeSubscription" - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 + * - NrMeasRepUeSubscription */ testcase TC_MEC_MEC012_SRV_RNIS_012_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -743,7 +809,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ))))))); @@ -788,7 +854,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions with a wrong subscription type - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_011_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -846,7 +911,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service responds with an error when it receives a request to create a new RNIS subscription with a wrong format - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_012_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -881,7 +945,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ))))))); @@ -928,8 +992,7 @@ module AtsMec_RnisAPI_TestCases { * - MeasTaSubscription * - CaReconfSubscription * - S1BearerSubscription - * - NrMeasRepUeSubscription" - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 + * - NrMeasRepUeSubscription */ testcase TC_MEC_MEC012_SRV_RNIS_013_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -965,7 +1028,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1017,7 +1080,7 @@ module AtsMec_RnisAPI_TestCases { { mw_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1052,8 +1115,7 @@ module AtsMec_RnisAPI_TestCases { * - MeasTaSubscription * - CaReconfSubscription * - S1BearerSubscription - * - NrMeasRepUeSubscription" - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 + * - NrMeasRepUeSubscription */ testcase TC_MEC_MEC012_SRV_RNIS_014_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1089,7 +1151,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1129,10 +1191,11 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ), + -, -, v_json_body.cellChangeSubscription.links ) ) @@ -1159,7 +1222,7 @@ module AtsMec_RnisAPI_TestCases { { mw_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1185,7 +1248,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service deletes a RNIS subscription when requested - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_015_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1221,7 +1283,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1282,7 +1344,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service responds with error when a not existing RNIS subscription is requested - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_013_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1336,7 +1397,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service responds with error when a modification for a not existing RNIS subscription is requested - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_014_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1372,7 +1432,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1412,7 +1472,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1452,7 +1512,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service responds with error when a modification for a not existing RNIS subscription is requested - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_014_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1487,7 +1546,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1523,7 +1582,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service responds with error when the deletion of a not existing RNIS subscription is requested - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_015_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1602,7 +1660,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")), v_headers ) ) @@ -1623,7 +1681,7 @@ module AtsMec_RnisAPI_TestCases { { *, mw_cell_user_info( mw_ecgi( mw_plmn, - PX_CELL_ID + PX_V2X_CELL_ID ), ? ), @@ -1746,7 +1804,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")), v_headers ) ) @@ -1768,7 +1826,7 @@ module AtsMec_RnisAPI_TestCases { -, // TODO use superset instead of { mw_associate_id }, mw_ecgi( mw_plmn, - PX_CELL_ID + PX_V2X_CELL_ID ) ) }, @@ -1814,7 +1872,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")), v_headers ) ) @@ -1887,7 +1945,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info_invalid?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info_invalid?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")), v_headers ) ) @@ -1941,7 +1999,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info?cell_id=" & oct2char(unichar2oct(PX_UNKNOWN_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info?cell_id=" & oct2char(unichar2oct(PX_V2X_UNKNOWN_CELL_ID, "UTF-8")), v_headers ) ) @@ -2103,7 +2161,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info_invalid?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info_invalid?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")), v_headers ) ) @@ -2157,7 +2215,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info?cell_id=" & oct2char(unichar2oct(PX_UNKNOWN_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info?cell_id=" & oct2char(unichar2oct(PX_V2X_UNKNOWN_CELL_ID, "UTF-8")), v_headers ) ) @@ -2211,7 +2269,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas_invalid?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas_invalid?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")), v_headers ) ) @@ -2265,7 +2323,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas?cell_id=" & oct2char(unichar2oct(PX_UNKNOWN_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas?cell_id=" & oct2char(unichar2oct(PX_V2X_UNKNOWN_CELL_ID, "UTF-8")), v_headers ) ) diff --git a/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestControl.ttcn b/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..02c7634bc92bb2df8da5e53504c403a3bee174fc --- /dev/null +++ b/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestControl.ttcn @@ -0,0 +1,62 @@ +module AtsMec_RnisAPI_TestControl { + + // LibMec/RnisAPI + import from RnisAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec + import from AtsMec_RnisAPI_TestCases all; + + control { + + if (PICS_RNIS) { + if (PICS_RNIS_NOTIFICATIONS) { + execute(TC_MEC_MEC012_SRV_RNIS_001_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_002_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_003_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_004_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_005_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_006_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_006_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_007_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_007_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_010_OK()); + } + + if (PICS_RNIS_ALL_SUBSCRIPTIONS) { + execute(TC_MEC_MEC012_SRV_RNIS_011_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_012_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_011_BR()); + execute(TC_MEC_MEC012_SRV_RNIS_012_BR()); + } + + if (PICS_RNIS_SPECIFIC_SUBSCRIPTION) { + execute(TC_MEC_MEC012_SRV_RNIS_013_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_013_NF()); + execute(TC_MEC_MEC012_SRV_RNIS_014_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_014_BR()); + execute(TC_MEC_MEC012_SRV_RNIS_014_NF()); + execute(TC_MEC_MEC012_SRV_RNIS_015_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_015_NF()); + } + + if (PICS_RNIS_QUERY) { + execute(TC_MEC_MEC012_SRV_RNIS_016_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_016_BR()); + execute(TC_MEC_MEC012_SRV_RNIS_016_NF()); + execute(TC_MEC_MEC012_SRV_RNIS_017_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_017_BR()); + execute(TC_MEC_MEC012_SRV_RNIS_017_NF()); + execute(TC_MEC_MEC012_SRV_RNIS_018_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_018_BR()); + execute(TC_MEC_MEC012_SRV_RNIS_018_NF()); + execute(TC_MEC_MEC012_SRV_RNIS_019_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_019_BR()); + execute(TC_MEC_MEC012_SRV_RNIS_019_NF()); + } + } + } // End of 'control' statement + +} // End of module AtsMec_TestControl diff --git a/ttcn/AtsMec_Rnis/module.mk b/ttcn/AtsMec_Rnis/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..5889511f550046f813715f03a50b68a311471a38 --- /dev/null +++ b/ttcn/AtsMec_Rnis/module.mk @@ -0,0 +1,39 @@ +suite := AtsMec_Rnis + +sources := \ + AtsMec_RnisAPI_TestCases.ttcn \ + AtsMec_RnisAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/LocationAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/AtsMec/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn similarity index 64% rename from ttcn/AtsMec/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn rename to ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn index 25a462202f054d10508aa87890d2ec59ce1e62e4..1026770d48daa8a45ed0539dcb05974e0a5b9316 100644 --- a/ttcn/AtsMec/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn @@ -12,7 +12,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // JSON - import from JSON all; + import from Json all; // Libcommon import from LibCommon_Time all; @@ -20,11 +20,11 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { import from LibCommon_Sync all; // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; // LibMec/TrafficManagementAPI import from TrafficManagementAPI_TypesAndValues all; @@ -43,17 +43,14 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { /** * @desc Check that the IUT responds with the Multi-access Traffic Steering information when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml */ testcase TC_MEC_MEC015_SRV_MTS_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -68,11 +65,9 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PX_ME_MTS_INFO_URI, + PICS_ROOT_API & PX_ME_MTS_INFO_URI, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -84,7 +79,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { mw_http_message_body_json( mw_body_json_mts_capability_info( mw_mts_capability_info - ))))) -> value v_response { + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of MtsCapabilityInfo ***"); @@ -101,18 +96,17 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of testcase TC_MEC_MEC015_SRV_MTS_001_OK /** - * @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - none */ - testcase TC_MEC_MEC015_SRV_MTS_002_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_MTS_002_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var charstring v_mts_session_id_1, v_mts_session_id_2; + var MtsSessionInfo v_mts_session_info_1, v_mts_session_info_2; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -123,15 +117,89 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id_1, v_mts_session_info_1); + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID_2, v_mts_session_id_2, v_mts_session_info_2); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PX_ME_MTS_SESSIONS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI, v_headers - ) - ) - ); + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_mts_session_info_list( + { + *, + mw_mts_session_info( + v_mts_session_info_1.appInsId, + v_mts_session_info_1.requestType, + -, -, -, + v_mts_session_info_1.sessionId + ), + mw_mts_session_info( + v_mts_session_info_2.appInsId, + v_mts_session_info_2.requestType, + -, -, -, + v_mts_session_info_2.sessionId + ), + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an MtsSessionInfo list ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id_1); + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID_2, v_mts_session_id_2); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK_01 + + /** + * @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - app_instance_id + */ + testcase TC_MEC_MEC015_SRV_MTS_002_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_mts_session_id + var MtsSessionInfo v_mts_session_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?app_instance_id=" & oct2char(unichar2oct(v_mts_session_info.appInsId, "UTF-8")), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -141,8 +209,13 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_mts_session_info_list - )))) -> value v_response { + mw_body_json_mts_session_info( + mw_mts_session_info( + v_mts_session_info.appInsId, + v_mts_session_info.requestType, + -, -, -, + v_mts_session_id + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an MtsSessionInfo list ***"); @@ -155,21 +228,146 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK + } // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK_02 + + /** + * @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - app_name + */ + testcase TC_MEC_MEC015_SRV_MTS_002_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_mts_session_id + var MtsSessionInfo v_mts_session_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?app_name=" & oct2char(unichar2oct(v_mts_session_info.appName, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_mts_session_info( + mw_mts_session_info( + v_mts_session_info.appInsId, + v_mts_session_info.requestType, + -, -, -, + v_mts_session_id, + v_mts_session_info.appName + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an MtsSessionInfo list ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK_03 + + /** + * @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - sessionId + */ + testcase TC_MEC_MEC015_SRV_MTS_002_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_mts_session_id + var MtsSessionInfo v_mts_session_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?session_id=" & oct2char(unichar2oct(v_mts_session_info.sessionId, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_mts_session_info( + mw_mts_session_info( + v_mts_session_info.appInsId, + v_mts_session_info.requestType, + -, -, -, + v_mts_session_info.sessionId, + v_mts_session_info.appName + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an MtsSessionInfo list ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK_04 /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml */ testcase TC_MEC_MEC015_SRV_MTS_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -184,11 +382,9 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PX_ME_MTS_SESSIONS_URI & "/app_instance_id=" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), // 'app_instance_id=' is a wrong parameter + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?appInsId=" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), // 'appInsId=' is a wrong parameter v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -201,10 +397,10 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { mw_body_json_problem_details( mw_problem_details( -, -, 400 - )))))) { + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -219,16 +415,16 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml */ testcase TC_MEC_MEC015_SRV_MTS_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var charstring v_mts_session_id + var MtsSessionInfo v_mts_session_info; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -239,15 +435,14 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PX_ME_MTS_SESSIONS_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?app_instance_id=" & oct2char(unichar2oct(PX_UNKNOWN_APP_INSTANCE_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -259,11 +454,11 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { mw_http_message_body_json( mw_body_json_problem_details( mw_problem_details( - -, -, 404 - )))))) { + -, -, 404 + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -273,22 +468,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC015_SRV_MTS_002_NF /** - * @desc Check that the IUT responds with a registration and initialisation approval for the requested MTS session requirements sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT creates a MTS session when queried by a MEC Application */ - testcase TC_MEC_MEC015_SRV_MTS_003_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_MTS_003_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; + var charstring v_mts_session_id; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -303,29 +498,98 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PX_ME_MTS_SESSIONS_URI, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI, v_headers, m_http_message_body_json( m_body_json_mts_session_info( m_mts_session_info( PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type + APPLICATION_SPECIFIC_MTS_SESSION, // Request type + m_qosd, // QoS + LowCost, // MtsMode + Downlink // TrafficDirection + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_mts_session_info( + mw_mts_session_info( + PX_APP_INSTANCE_ID + )))))) -> value v_response { + tc_ac.stop; + + if (f_check_headers(valueof(v_response.response.header)) == false) { + log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(valueof(v_response.response.header), "Location", v_header_location); + v_mts_session_id := regexp( + v_header_location[0], + "?+" & PX_ME_MTS_SESSIONS_URI & "/(?*)", + 0 + ); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a MtsSessionInfo, v_mts_session_id: ", v_mts_session_id, " ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_MTS_003_OK_01 + + /** + * @desc Check that the IUT creates a MTS session when queried by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_MTS_003_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_mts_session_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI, + v_headers, + m_http_message_body_json( + m_body_json_mts_session_info( + m_mts_session_info( + PX_APP_INSTANCE_ID, + FLOW_SPECIFIC_MTS_SESSION, // Request type m_qosd, // QoS LowCost, // MtsMode Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"1010"} - ) - } // FlowFilter + -, -, + { m_flow_filter("10.10.10.10", 1010) } // FIXME Use PIXITs - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -337,17 +601,23 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { mw_http_message_body_json( mw_body_json_mts_session_info( mw_mts_session_info( - PX_APP_INSTANCE_ID - )))))) -> value v_response { + PX_APP_INSTANCE_ID, + FLOW_SPECIFIC_MTS_SESSION + )))))) -> value v_response { tc_ac.stop; if (f_check_headers(valueof(v_response.response.header)) == false) { log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } else { - var charstring_list v_mts_session_id; - f_get_header(valueof(v_response.response.header), "Location", v_mts_session_id); - log("*** " & testcasename() & ": PASS: IUT successfully responds with a MtsSessionInfo, MtsSessionInfoId: ", v_mts_session_id[0], " ***"); + var charstring_list v_header_location; + f_get_header(valueof(v_response.response.header), "Location", v_header_location); + v_mts_session_id := regexp( + v_header_location[0], + "?+" & PX_ME_MTS_SESSIONS_URI & "/(?*)", + 0 + ); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a MtsSessionInfo, v_mts_session_id: ", v_mts_session_id, " ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } } @@ -358,21 +628,20 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_003_OK + } // End of testcase TC_MEC_MEC015_SRV_MTS_003_OK_02 /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml */ testcase TC_MEC_MEC015_SRV_MTS_003_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -387,29 +656,20 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PX_ME_MTS_SESSIONS_URI, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI, v_headers, m_http_message_body_json( m_body_json_mts_session_info( m_mts_session_info( PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type + APPLICATION_SPECIFIC_MTS_SESSION, // Request type m_qosd, // QoS LowCost, // MtsMode Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"10.10"} // Invalid port number - ) - } // FlowFilter + -, -, + { m_flow_filter("10.10.10.10", 1010) } // // MEC015 Clause 7.2.5 Type: MtsSessionInfo Table 7.2.5-1: Elements of MtsSessionInfo, flowFilter shall be omit - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -417,15 +677,11 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { + mw_http_response_400_bad_request + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -439,21 +695,17 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of testcase TC_MEC_MEC015_SRV_MTS_003_BR /** - * @desc Check that the IUT responds with a configured Multi-access Traffic Steering when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with a configured Multi-access Traffic Steering session when queried by a MEC Application */ testcase TC_MEC_MEC015_SRV_MTS_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; var charstring v_mts_session_id; var MtsSessionInfo v_mts_session_info; - var JSON.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -464,37 +716,32 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); - f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info); - if (v_mts_session_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body httpPort.send( m_http_request( m_http_request_get( - PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, v_headers - ) - ) - ); + ))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - PX_APP_INSTANCE_ID - )))))) -> value v_response { + mw_body_json_mts_session_info( + mw_mts_session_info( + v_mts_session_info.appInsId, + v_mts_session_info.requestType, + -, -, -, + v_mts_session_info.sessionId + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo ***"); - f_delete_mts_session_info_resource(v_app_instance_id, v_mts_session_id); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -504,24 +751,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC015_SRV_MTS_004_OK /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TC_MEC_MEC015_SRV_MTS_004_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_MTS_004_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring v_mts_session_id; var MtsSessionInfo v_mts_session_info; - var JSON.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -532,6 +777,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -539,7 +785,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PX_ME_MTS_SESSIONS_URI & "/Unknown_bw_allocation_id", + PICS_ROOT_API & "mts/v0/mts_sessions/" & PX_UNKNOWN_APP_INSTANCE_ID, // Wrong version number v_headers ) ) @@ -556,7 +802,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -566,25 +812,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_004_NF + } // End of testcase TC_MEC_MEC015_SRV_MTS_004_BR /** - * @desc - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application */ - testcase TC_MEC_MEC015_SRV_MTS_005_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_MTS_004_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; var charstring v_mts_session_id; var MtsSessionInfo v_mts_session_info; - var JSON.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -595,37 +838,16 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); - f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info); - if (v_mts_session_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body httpPort.send( m_http_request( - m_http_request_put( - PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, - v_headers, - m_http_message_body_json( - m_body_json_mts_session_info( - m_mts_session_info( - PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type - m_qosd_1, // QoS - LowCost, // MtsMode - Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"1010"} - ) - } // FlowFilter - ) - ) - ) + m_http_request_get( + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & PX_UNKNOWN_APP_INSTANCE_ID, + v_headers ) ) ); @@ -633,26 +855,15 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_mts_session_info( - mw_mts_session_info( - PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type - mw_qosd_1, // QoS - LowCost, // MtsMode - Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"1010"} - ) - } // FlowFilter - )))))) -> value v_response { + mw_http_response_404_not_found( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, -, 404 + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated MtsSessionInfo ***"); - f_delete_mts_session_info_resource(v_app_instance_id, v_mts_session_id); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -662,24 +873,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_005_OK + } // End of testcase TC_MEC_MEC015_SRV_MTS_004_NF /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT updates the information about an individual MTS session when commanded by a MEC Application */ - testcase TC_MEC_MEC015_SRV_MTS_005_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_MTS_005_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring v_mts_session_id; var MtsSessionInfo v_mts_session_info; - var JSON.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -690,54 +899,41 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); - f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info); - if (v_mts_session_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body httpPort.send( m_http_request( m_http_request_put( - PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, v_headers, m_http_message_body_json( m_body_json_mts_session_info( m_mts_session_info( PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type + APPLICATION_SPECIFIC_MTS_SESSION, // Request type m_qosd_1, // QoS LowCost, // MtsMode - Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"10.10"} // Invalid port - ) - } // FlowFilter - ) - ) - ) - ) - ) - ); + Downlink // TrafficDirection + )))))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_mts_session_info( + mw_mts_session_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_MTS_SESSION, // Request type + mw_qosd_1, // QoS + LowCost, // MtsMode + Downlink // TrafficDirection + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_delete_mts_session_info_resource(v_app_instance_id, v_mts_session_id); + log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated MtsSessionInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -747,22 +943,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_005_BR + } // End of testcase TC_MEC_MEC015_SRV_MTS_005_OK /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TC_MEC_MEC015_SRV_MTS_005_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_MTS_005_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var JSON.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("003")); + var charstring v_mts_session_id; + var MtsSessionInfo v_mts_session_info; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -773,48 +969,37 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body httpPort.send( m_http_request( m_http_request_put( - PX_ME_MTS_SESSIONS_URI & "/InvalidAllocationId", + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, v_headers, m_http_message_body_json( m_body_json_mts_session_info( - m_mts_session_info( + m_mts_session_info( // MEC015 Clause 7.2.5 Type: MtsSessionInfo Table 7.2.5-1: Elements of MtsSessionInfo, flowFilter shall be omit PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type + FLOW_SPECIFIC_MTS_SESSION, // Request type m_qosd_1, // QoS LowCost, // MtsMode - Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"1010"} - ) - } // FlowFilter - ) - ) - ) - ) - ) - ); + Downlink // TrafficDirection + )))))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 404 - )))))) { + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -824,24 +1009,20 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_005_NF + } // End of testcase TC_MEC_MEC015_SRV_MTS_005_BR /** - * @desc Check that the IUT deregisters a MTS session when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TC_MEC_MEC015_SRV_MTS_006_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_MTS_005_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var charstring v_mts_session_id; - var MtsSessionInfo v_mts_session_info; - var JSON.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("005")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -853,31 +1034,36 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); - f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info); - if (v_mts_session_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body httpPort.send( m_http_request( - m_http_request_delete( - PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, - v_headers - ) - ) - ); + m_http_request_put( + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/PX_UNKNOWN_APP_INSTANCE_ID", + v_headers, + m_http_message_body_json( + m_body_json_mts_session_info( + m_mts_session_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_MTS_SESSION, // Request type + m_qosd_1, // QoS + LowCost, // MtsMode + Downlink // TrafficDirection + )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_204_no_content - )) { + mw_http_response_404_not_found( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, -, 404 + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -888,23 +1074,20 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_006_OK + } // End of testcase TC_MEC_MEC015_SRV_MTS_005_NF /** - * @desc Check that the IUT responds with an error when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT deregisters a MTS session when commanded by a MEC Application */ - testcase TC_MEC_MEC015_SRV_MTS_006_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_MTS_006_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring v_mts_session_id; var MtsSessionInfo v_mts_session_info; - var JSON.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("005")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -915,29 +1098,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); - f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info); - if (v_mts_session_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body httpPort.send( m_http_request( m_http_request_delete( - PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, v_headers - ) - ) - ); + ))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) { + mw_http_response_204_no_content + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***"); @@ -951,23 +1127,20 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_006_BR + } // End of testcase TC_MEC_MEC015_SRV_MTS_006_OK /** - * @desc Check that the IUT deregisters a MTS session when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application */ testcase TC_MEC_MEC015_SRV_MTS_006_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring v_mts_session_id; var MtsSessionInfo v_mts_session_info; - var JSON.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("005")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -978,29 +1151,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); - f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info); - if (v_mts_session_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body httpPort.send( m_http_request( m_http_request_delete( - PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & PX_UNKNOWN_APP_INSTANCE_ID, v_headers - ) - ) - ); + ))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***"); @@ -1013,6 +1179,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC015_SRV_MTS_006_NF diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f3b601d76972bdb8b9851b73a9e21f774ad69631 --- /dev/null +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn @@ -0,0 +1,1418 @@ +/** + * @author ETSI / STF569 + * @version $URL:$ + * $ID:$ + * @desc This module provides the MEC test cases. + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * @see ETSI GS MEC 015, Draft ETSI GS MEC 015 V2.2.1 (2020-06) + */ +module AtsMec_TrafficManagementAPI_TestCases { + + // JSON + import from Json all; + + // Libcommon + import from LibCommon_Time all; + import from LibCommon_VerdictControl all; + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec/TrafficManagementAPI + import from TrafficManagementAPI_TypesAndValues all; + import from TrafficManagementAPI_Templates all; + import from TrafficManagementAPI_Functions all; + import from TrafficManagementAPI_Pics all; + import from TrafficManagementAPI_Pixits all; + + // LibMec + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + group me_app_role { + + /** + * @desc Check that the IUT responds with the list of configured bandwidth allocations when queried by a MEC Application - none + */ + testcase TC_MEC_MEC015_SRV_TM_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_info_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of BwInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_001_OK + + /** + * @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - app_instance_id + */ + testcase TC_MEC_MEC015_SRV_TM_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI & "?app_instance_id=" & PX_APP_INSTANCE_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_info( + mw_bw_info( + PX_APP_INSTANCE_ID + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_001_OK_02 + + /** + * @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - app_name + */ + testcase TC_MEC_MEC015_SRV_TM_001_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI & "?app_name=" & PX_APP_NAME, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_info( + mw_bw_info( + PX_APP_INSTANCE_ID, + -, -, -, + PX_APP_NAME + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_001_OK_03 + + /** + * @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - session_id + */ + testcase TC_MEC_MEC015_SRV_TM_001_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI & "?session_id=" & PX_APP_ALLOCATION_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_info( + mw_bw_info( + PX_APP_INSTANCE_ID, + -, -, -, + PX_APP_NAME, + PX_APP_ALLOCATION_ID + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_001_OK_04 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - app_instance_id + */ + testcase TC_MEC_MEC015_SRV_TM_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI & "?appInstId=" & PX_APP_INSTANCE_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_001_BR + + /** + * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - app_instance_id + */ + testcase TC_MEC_MEC015_SRV_TM_001_NF_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI & "?app_instance_id=" & PX_UNKNOWN_APP_INSTANCE_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_001_NF_01 + + /** + * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - app_name + */ + testcase TC_MEC_MEC015_SRV_TM_001_NF_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI & "?app_name=" & PX_UNKNOWN_APP_NAME, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_001_NF_02 + + /** + * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - session_id + */ + testcase TC_MEC_MEC015_SRV_TM_001_NF_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI & "?session_id=" & PX_UNKNOWN_APP_ALLOCATION_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_001_NF_03 + + /** + * @desc Check that the IUT acknowledges a creation of a bandwidthAllocation resource + */ + testcase TC_MEC_MEC015_SRV_TM_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_bw_allocation_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + m_bw_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION, + "1024", + Downlink, + PX_APP_NAME, + PX_APP_ALLOCATION_ID + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_bw_info( + mw_bw_info( + PX_APP_INSTANCE_ID, + -, -, -, + PX_APP_NAME, + PX_APP_ALLOCATION_ID + )))))) -> value v_response { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_bw_allocation_id := regexp( + v_header_location[0], + "?+" & PX_ME_BWM_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo, CreationID: ", v_bw_allocation_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_002_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted + */ + testcase TC_MEC_MEC015_SRV_TM_002_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + m_bw_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION, + "1024", + Downlink, + PX_APP_NAME, + PX_APP_ALLOCATION_ID, + { m_session_filter("10.10.10.10", 1010) } // FIXME Use PIXITs + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_002_BR_01 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present + */ + testcase TC_MEC_MEC015_SRV_TM_002_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + m_bw_info( + PX_APP_INSTANCE_ID, + SESSION_SPECIFIC_BW_ALLOCATION, + "1024", + Downlink, + PX_APP_NAME, + PX_APP_ALLOCATION_ID, + - // Session shall be present + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_002_BR_02 + + /** + * @desc Check that the IUT responds with the configured bandwidth allocation when queried by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_TM_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_bw_allocation_id; + var BwInfo v_bw_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); + if (v_bw_allocation_id == "") { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_info( + mw_bw_info( + PX_APP_INSTANCE_ID, + -, -, -, + v_bw_allocation_id + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct BwInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_003_OK + + /** + * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_TM_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_003_NF + + /** + * @desc Check that the IUT updates the requested bandwidth requirements when commanded by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_TM_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_bw_allocation_id; + var BwInfo v_bw_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); + if (v_bw_allocation_id == "") { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + m_bw_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type + "2048", // FixedAllocation + Downlink // AllocationDirection + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_info( + mw_bw_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type + "2048", // FixedAllocation + Downlink // AllocationDirection + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated BwInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_004_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted + */ + testcase TC_MEC_MEC015_SRV_TM_004_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_bw_allocation_id; + var BwInfo v_bw_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); + if (v_bw_allocation_id == "") { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_init_default_headers_list(-, -, v_headers); + v_bw_info.sessionFilter := { valueof(m_session_filter("10.10.10.10", 1010)) }; // FIXME Use PIXITs + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + v_bw_info + ))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_004_BR_01 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present + */ + testcase TC_MEC_MEC015_SRV_TM_004_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_bw_allocation_id; + var BwInfo v_bw_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); + if (v_bw_allocation_id == "") { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_init_default_headers_list(-, -, v_headers); + v_bw_info.requestType := SESSION_SPECIFIC_BW_ALLOCATION; + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + v_bw_info + ))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_004_BR_02 + + /** + * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_TM_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID, + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + m_bw_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION, + "2048", // FixedAllocation + Downlink + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_004_NF + + /** + * @desc Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_TM_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_bw_allocation_id; + var BwInfo v_bw_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); + if (v_bw_allocation_id == "") { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers, + m_http_message_body_json( + m_body_json_bw_info_deltas( + m_bw_info_deltas( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_info( + mw_bw_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type + "5096", // FixedAllocation + Downlink // AllocationDirection + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a patched BwInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_005_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted + */ + testcase TC_MEC_MEC015_SRV_TM_005_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_bw_allocation_id; + var BwInfo v_bw_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); + if (v_bw_allocation_id == "") { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers, + m_http_message_body_json( + m_body_json_bw_info_deltas( + m_bw_info_deltas( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION, + v_bw_info.allocationId, + { m_session_filter("10.10.10.10", 1010) } // FIXME Use PIXITs + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error message ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_005_BR_01 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present + */ + testcase TC_MEC_MEC015_SRV_TM_005_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_bw_allocation_id; + var BwInfo v_bw_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); + if (v_bw_allocation_id == "") { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers, + m_http_message_body_json( + m_body_json_bw_info_deltas( + m_bw_info_deltas( + PX_APP_INSTANCE_ID, + SESSION_SPECIFIC_BW_ALLOCATION, + v_bw_info.allocationId + //{ m_session_filter("10.10.10.10", 1010) } sessionFilter shall be present + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error message ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_005_BR_02 + + /** + * @desc Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_TM_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID, + v_headers, + m_http_message_body_json( + m_body_json_bw_info_deltas( + m_bw_info_deltas( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a patched BwInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_005_NF + + /** + * @desc Check that the IUT unregisters from the Bandwidth Management Service when commanded by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_TM_006_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_bw_allocation_id; + var BwInfo v_bw_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); + if (v_bw_allocation_id == "") { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers + ) + ) + ); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_006_OK + + /** + * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_TM_006_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_bw_allocation_id; + var BwInfo v_bw_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); + if (v_bw_allocation_id == "") { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID, + v_headers + ))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_006_NF + + } // End of group me_app_role + +} // End of module AtsMec_TrafficManagementAPI_TestCases diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..842fd6f4f7ab4614a5f20d835d06cf00df3dc81f --- /dev/null +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn @@ -0,0 +1,71 @@ +module AtsMec_TrafficManagementAPI_TestControl { + + // LibMec/TrafficManagementAPI + import from TrafficManagementAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec + import from AtsMec_TrafficManagementAPI_TestCases all; + + control { + + if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED) { + execute(TC_MEC_MEC015_SRV_TM_001_OK_01()); + execute(TC_MEC_MEC015_SRV_TM_001_OK_02()); + execute(TC_MEC_MEC015_SRV_TM_001_OK_03()); + execute(TC_MEC_MEC015_SRV_TM_001_OK_04()); + execute(TC_MEC_MEC015_SRV_TM_001_BR()); + execute(TC_MEC_MEC015_SRV_TM_001_NF_01()); + execute(TC_MEC_MEC015_SRV_TM_001_NF_02()); + execute(TC_MEC_MEC015_SRV_TM_001_NF_03()); + + execute(TC_MEC_MEC015_SRV_TM_002_OK()); + execute(TC_MEC_MEC015_SRV_TM_002_BR_01()); + execute(TC_MEC_MEC015_SRV_TM_002_BR_02()); + + execute(TC_MEC_MEC015_SRV_TM_003_OK()); + execute(TC_MEC_MEC015_SRV_TM_003_NF()); + + execute(TC_MEC_MEC015_SRV_TM_004_OK()); + execute(TC_MEC_MEC015_SRV_TM_004_BR_01()); + execute(TC_MEC_MEC015_SRV_TM_004_BR_02()); + execute(TC_MEC_MEC015_SRV_TM_004_NF()); + + execute(TC_MEC_MEC015_SRV_TM_005_OK()); + execute(TC_MEC_MEC015_SRV_TM_005_BR_01()); + execute(TC_MEC_MEC015_SRV_TM_005_BR_02()); + execute(TC_MEC_MEC015_SRV_TM_005_NF()); + + execute(TC_MEC_MEC015_SRV_TM_006_OK()); + execute(TC_MEC_MEC015_SRV_TM_006_NF()); + } + if (PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED) { + execute(TC_MEC_MEC015_SRV_MTS_001_OK()); + + execute(TC_MEC_MEC015_SRV_MTS_002_OK_01()); + execute(TC_MEC_MEC015_SRV_MTS_002_OK_02()); + execute(TC_MEC_MEC015_SRV_MTS_002_OK_03()); + execute(TC_MEC_MEC015_SRV_MTS_002_OK_04()); + execute(TC_MEC_MEC015_SRV_MTS_002_BR()); + execute(TC_MEC_MEC015_SRV_MTS_002_NF()); + + execute(TC_MEC_MEC015_SRV_MTS_003_OK_01()); + execute(TC_MEC_MEC015_SRV_MTS_003_OK_02()); + execute(TC_MEC_MEC015_SRV_MTS_003_BR()); + + execute(TC_MEC_MEC015_SRV_MTS_004_OK()); + execute(TC_MEC_MEC015_SRV_MTS_004_BR()); + execute(TC_MEC_MEC015_SRV_MTS_004_NF()); + + execute(TC_MEC_MEC015_SRV_MTS_005_OK()); + execute(TC_MEC_MEC015_SRV_MTS_005_BR()); + execute(TC_MEC_MEC015_SRV_MTS_005_NF()); + + execute(TC_MEC_MEC015_SRV_MTS_006_OK()); + execute(TC_MEC_MEC015_SRV_MTS_006_NF()); + } + } // End of 'control' statement + +} // End of module AtsMec_TrafficManagementAPI_TestControl diff --git a/ttcn/AtsMec_TrafficManagement/module.mk b/ttcn/AtsMec_TrafficManagement/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..b24f6e67199837784cd80a079844a37c172c6c5c --- /dev/null +++ b/ttcn/AtsMec_TrafficManagement/module.mk @@ -0,0 +1,40 @@ +suite := AtsMec_TrafficManagement + +sources := \ + AtsMec_TrafficManagementAPI_TestCases.ttcn \ + AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \ + AtsMec_TrafficManagementAPI_TestControl + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/AtsMec/AtsMec_UEidentityAPI_TestCases.ttcn b/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn similarity index 84% rename from ttcn/AtsMec/AtsMec_UEidentityAPI_TestCases.ttcn rename to ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn index 5e8a7e842094f7d243ea93ee02ad53a4f42384d1..7c4418c71fdd841f97470fe31f351dcfe844e597 100644 --- a/ttcn/AtsMec/AtsMec_UEidentityAPI_TestCases.ttcn +++ b/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn @@ -1,5 +1,5 @@ /** - * @author ETSI / STF569 + * @author ETSI / STF569 / TTF T027 * @version $URL:$ * $ID:$ * @desc This module provides the MEC test cases. @@ -7,7 +7,7 @@ * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. - * @see ETSI GS MEC 003, ETSI GS MEC 014 V2.1.1 + * @see ETSI GS MEC 003, ETSI GS MEC 014 V3.1.1 */ module AtsMec_UEidentityAPI_TestCases { @@ -15,16 +15,17 @@ module AtsMec_UEidentityAPI_TestCases { import from LibCommon_Sync all; // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; // LibMec/UEidentityAPI import from UEidentityAPI_Templates all; import from UEidentityAPI_Pics all; import from UEidentityAPI_Pixits all; + import from UEidentityAPI_Functions all; // LibMec import from LibMec_TypesAndValues all; @@ -37,7 +38,6 @@ module AtsMec_UEidentityAPI_TestCases { /** * @desc Check that the IUT responds with the information on a UE Identity tag when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/UETAG/PlatUeIdentity.tplan2 */ testcase TC_MEC_MEC014_SRV_UETAG_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -60,11 +60,9 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")), + PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -77,7 +75,7 @@ module AtsMec_UEidentityAPI_TestCases { mw_body_json_ue_identity_tag_info( mw_ue_identity_tag_info( { *, mw_ue_identity_tag_item(PX_UE_IDENTITY_TAG), * } - )))))) { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a UeIdentityTag ***"); @@ -95,7 +93,6 @@ module AtsMec_UEidentityAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2 */ testcase TC_MEC_MEC014_SRV_UETAG_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -118,11 +115,9 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/invalid/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")), + PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/invalid/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -135,7 +130,7 @@ module AtsMec_UEidentityAPI_TestCases { mw_body_json_problem_details( mw_problem_details( -, -, 400 - )))))) { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); @@ -153,7 +148,6 @@ module AtsMec_UEidentityAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2 */ testcase TC_MEC_MEC014_SRV_UETAG_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -176,11 +170,9 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")), + PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -193,7 +185,7 @@ module AtsMec_UEidentityAPI_TestCases { mw_body_json_problem_details( mw_problem_details( -, -, 404 - )))))) { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); @@ -211,15 +203,14 @@ module AtsMec_UEidentityAPI_TestCases { /** * @desc Check that the IUT registers a tag (representing a UE) or a list of tags when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2 */ testcase TC_MEC_MEC014_SRV_UETAG_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_UE_IDENTITY_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_UE_IDENTITY_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -239,7 +230,7 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", + PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", v_headers, m_http_message_body_json( m_body_json_ue_identity_tag_info( @@ -250,12 +241,7 @@ module AtsMec_UEidentityAPI_TestCases { REGISTERED ) } - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -268,7 +254,7 @@ module AtsMec_UEidentityAPI_TestCases { mw_body_json_ue_identity_tag_info( mw_ue_identity_tag_info( { *, mw_ue_identity_tag_item(PX_UE_IDENTITY_TAG, REGISTERED), * } - )))))) { + )))))) { tc_ac.stop; if (f_check_user_register_state(-, v_headers) == 1) { @@ -291,7 +277,6 @@ module AtsMec_UEidentityAPI_TestCases { /** * @desc Check that the IUT responds with an error when an unauthorised request is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2 */ testcase TC_MEC_MEC014_SRV_UETAG_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -319,7 +304,7 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", + PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", v_headers, m_http_message_body_json( m_body_json_ue_identity_tag_info( @@ -330,12 +315,7 @@ module AtsMec_UEidentityAPI_TestCases { INVALID_STATE ) } - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -348,7 +328,7 @@ module AtsMec_UEidentityAPI_TestCases { mw_body_json_problem_details( mw_problem_details( -, -, 400 - ))))*/)) { + ))))*/)) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 403 Forbidden ***"); @@ -366,7 +346,6 @@ module AtsMec_UEidentityAPI_TestCases { /** * @desc Check that the IUT responds with ProblemDetails on information an invalid URI - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2 */ testcase TC_MEC_MEC014_SRV_UETAG_002_PF() runs on HttpComponent system HttpTestAdapter { // FIXME Which IE protocol should be invalid? // Local variables @@ -389,7 +368,7 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", + PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", v_headers, m_http_message_body_json( m_body_json_ue_identity_tag_info( @@ -400,12 +379,7 @@ module AtsMec_UEidentityAPI_TestCases { UNREGISTERED ) } - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -418,7 +392,7 @@ module AtsMec_UEidentityAPI_TestCases { mw_body_json_problem_details( mw_problem_details( -, -, 412 - )))))) { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 412 Precondition Failed ***"); @@ -464,7 +438,7 @@ module AtsMec_UEidentityAPI_TestCases { // httpPort.send( // m_http_request( // m_http_request_post( -// "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", +// PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", // v_headers, // m_http_message_body_json( // m_body_json_ue_identity_tag_info( @@ -542,7 +516,7 @@ module AtsMec_UEidentityAPI_TestCases { // httpPort.send( // m_http_request( // m_http_request_post( -// "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", +// PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", // v_headers, // m_http_message_body_json( // m_body_json_ue_identity_tag_info( diff --git a/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestControl.ttcn b/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..97dcc2ee81c5bd9b46a35a0df852b4225d929004 --- /dev/null +++ b/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestControl.ttcn @@ -0,0 +1,26 @@ +module AtsMec_UEidentityAPI_TestControl { + + // LibMec/UEidentityAPI + import from UEidentityAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec_UEidentityAPI + import from AtsMec_UEidentityAPI_TestCases all; + + control { + + if (PICS_MEC_PLAT and PICS_SERVICES and PICS_UE_IDENTITY_API_SUPPORTED) { + execute(TC_MEC_MEC014_SRV_UETAG_001_OK()); + execute(TC_MEC_MEC014_SRV_UETAG_001_BR()); + execute(TC_MEC_MEC014_SRV_UETAG_001_NF()); + + execute(TC_MEC_MEC014_SRV_UETAG_002_OK()); + execute(TC_MEC_MEC014_SRV_UETAG_002_BR()); + execute(TC_MEC_MEC014_SRV_UETAG_002_PF()); + } + + } // End of 'control' statement + +} // End of module AtsMec_UEidentityAPI_TestControl diff --git a/ttcn/AtsMec_UEidentity/module.mk b/ttcn/AtsMec_UEidentity/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..9fc9bb454415f9b78dfe7158153937db9a87784a --- /dev/null +++ b/ttcn/AtsMec_UEidentity/module.mk @@ -0,0 +1,39 @@ +suite := AtsMec_UEidentity + +sources := \ + AtsMec_UEidentityAPI_TestCases.ttcn \ + AtsMec_UEidentityAPI_TestControl.ttcn \ + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f94289ef1de39b9bcc46037d96384bb94f66922f --- /dev/null +++ b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn @@ -0,0 +1,3495 @@ +/** + * @author ETSI / TTF T012 + * @version $URL:$ + * $ID:$ + * @desc This module provides the MEC test cases. + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * @see ETSI GS MEC 002, Draft ETSI GS MEC 030 V2.1.1 (2020-04) + */ +module AtsMec_V2XInformationServiceAPI_TestCases { + + // JSON + import from Json all; + + // Libcommon + import from LibCommon_Time all; + import from LibCommon_VerdictControl all; + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec/V2XInformationServiceAPI + import from V2XInformationServiceAPI_TypesAndValues all; + import from V2XInformationServiceAPI_Pics all; + import from V2XInformationServiceAPI_Pixits all; + import from V2XInformationServiceAPI_Templates all; + import from V2XInformationServiceAPI_Functions all; + + // LibMec + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + group me_app_role { + + /** + * @desc Check that the IUT responds with a configured provisioning information over Uu unicast when queried by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=ecgi," & PX_V2X_ECGI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_uu_unicast_provisioning_info( + mw_uu_unicast_provisioning_info( + { + mw_proInfoUuUnicast( + mw_location_info( + mw_ecgi( + PX_V2X_CELL_ID, + mw_plmn( + PX_MCC, + PX_MNC + )), + mw_location_info_geo_area( + PX_V2X_ECGI_LAT, + PX_V2X_ECGI_LONG + )), + mw_v2x_application_server( + PX_V2X_MC_SERVER, + PX_V2X_MC_PORT) + ) + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuUnicastProvisioningInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_001_OK_01 + + /** + * @desc Check that the IUT responds with a configured provisioning information over Uu unicast when queried by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=" & PX_V2X_LATITUDE, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_uu_unicast_provisioning_info( + mw_uu_unicast_provisioning_info( + { + mw_proInfoUuUnicast( + mw_location_info( + mw_ecgi( + PX_V2X_CELL_ID, + mw_plmn( + PX_MCC, + PX_MNC + )), + mw_location_info_geo_area( + PX_V2X_ECGI_LAT, + PX_V2X_ECGI_LONG + )), + mw_v2x_application_server( + PX_V2X_MC_SERVER, + PX_V2X_MC_PORT) + ) + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuUnicastProvisioningInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_001_OK_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?info=" & PX_V2X_LATITUDE, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_001_BR + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_001_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=ecgi," & PX_V2X_UNKNOWN_ECGI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_001_NF + + /** + * @desc Check that the IUT responds with a configured provisioning information over Uu MBMS when queried by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_002_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=ecgi," & PX_V2X_ECGI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_uu_mbms_provisioning_info( + mw_uu_mbms_provisioning_info + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuMbmsProvisioningInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_002_OK_01 + + /** + * @desc Check that the IUT responds with a configured provisioning information over Uu MBMS when queried by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_002_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=" & PX_V2X_LATITUDE, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_uu_mbms_provisioning_info( + mw_uu_mbms_provisioning_info + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuMbmsProvisioningInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_002_OK_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/invalid_uu_mbms_provisioning_info?location_info=" & PX_V2X_LATITUDE, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_002_BR + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=ecgi," & PX_V2X_UNKNOWN_ECGI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_002_NF + + /** + * @desc Check that the IUT responds with a configured provisioning information over PC5 when queried by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_003_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=ecgi," & PX_V2X_ECGI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_pc5_provisioning_info( + mw_pc5_provisioning_info + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Pc5ProvisioningInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_003_OK_01 + + /** + * @desc Check that the IUT responds with a configured provisioning information over PC5 when queried by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_003_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=" & PX_V2X_LATITUDE, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_pc5_provisioning_info( + mw_pc5_provisioning_info + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Pc5ProvisioningInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_003_OK_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_003_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/invalid_pc5_provisioning_info?location_info=" & PX_V2X_LATITUDE, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_003_BR + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=ecgi," & PX_V2X_UNKNOWN_ECGI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_003_NF + + /** + * @desc Check that the IUT processes properly a request to information of V2X Message Distribution servers + */ + testcase TC_MEC_MEC030_SRV_V2X_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI & "/provide_v2x_msg_distribution_server_info", + v_headers, + m_http_message_body_json( + m_body_json_v2x_msg_distribution_server_info( + m_v2x_msg_distribution_server_info( + { + m_v2x_msg_distribution_server( + m_info_protocol + ) + } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_v2x_msg_distribution_server_info( + mw_v2x_msg_distribution_server_info( + { + mw_v2x_msg_distribution_server( + m_info_protocol, + mw_info_connection( + PX_V2X_MC_SERVER, + str2int(PX_V2X_MC_PORT) + )) + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct connection information ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_004_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_004_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI & "/provide_v2x_msg_distribution_server_info", + v_headers, + m_http_message_body_json( + m_body_json_v2x_msg_distribution_server_info( + m_v2x_msg_distribution_server_info( + { + m_v2x_msg_distribution_server( + m_info_protocol, + m_info_connection( // Wrong field value: Shall only be included in the response + PX_V2X_MSG_DISTRIBUTION_SERVER_IP_ADDRESS, + PX_V2X_MSG_DISTRIBUTION_SERVER_PORT + )) + } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_004_BR + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI & "/provide_v2x_msg_distribution_server_info", + v_headers, + m_http_message_body_json( + m_body_json_v2x_msg_distribution_server_info( + m_v2x_msg_distribution_server_info( + { + m_v2x_msg_distribution_server( + m_info_protocol({ AMQP_1_0 }) + ) + } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_004_NF + + /** + * @desc Check that the IUT sends a request about QoS information for a vehicular UE when queried by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI & "/provide_predicted_qos", + v_headers, + m_http_message_body_json( + m_body_json_v2x_predicted_qos( + m_predicted_qos( + -, + PX_LOC_GRANULARITY, + m_qos( + { + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), // FIXME To be refined + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }) + } + )/*, + { + m_predicted_qos_routes( + { + m_route_info( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.72, 10.41) + ), + -, + 128, + 128 + ), + m_route_info( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.75, 10.5) + ), + -, + 128, + 128 + ) + } + ) + }*/ + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_v2x_predicted_qos( + mw_predicted_qos( + -, + PX_LOC_GRANULARITY + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a PredictedQos ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_005_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_005_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI & "/provide_predicted_qos", + v_headers, + m_http_message_body_json( + m_body_json_v2x_predicted_qos( + m_predicted_qos( + -, + PX_LOC_GRANULARITY & "InvalidSemantic", + m_qos( + { + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), // FIXME To be refined + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }) + } + )/*, + { + m_predicted_qos_routes( + { + m_route_info( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.72, 10.41) + ), + -, + 128, + 128 + ), + m_route_info( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.75, 10.5) + ), + -, + 128, + 128 + ) + } + ) + }*/ + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_005_BR + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI & "/provide_predicted_qos", + v_headers, + m_http_message_body_json( + m_body_json_v2x_predicted_qos( + m_predicted_qos( + -, + PX_LOC_GRANULARITY, + m_qos( + { + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), // FIXME To be refined + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }) + } + )/*, + { + m_predicted_qos_routes( + { + m_route_info( + m_location_info( + m_ecgi( + PX_V2X_UNKNOWN_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.72, 10.41) + ), + -, + 128, + 128 + ), + m_route_info( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID, + m_plmn(PX_UNKNOWN_MCC, PX_UNKNOWN_MNC) + ), + m_location_info_geo_area(43.75, 10.5) + ), + -, + 128, + 128 + ) + } + ) + }*/ + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_005_NF + + /** + * @desc Check that the IUT processes properly a request to publish a V2X message + */ + testcase TC_MEC_MEC030_SRV_V2X_006_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI & "/publish_v2x_message", + v_headers, + m_http_message_body_json( + m_body_json_v2x_message( + m_v2x_message( + m_v2x_msg_properties_values( + -, -, -, + m_location_info( + m_ecgi( + PX_V2X_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.72, 10.41) // FIXME Use PIXITs + )))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct status code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_006_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_006_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI & "/publish_v2x_message", + v_headers, + m_http_message_body_json( + m_body_json_v2x_message( + m_v2x_message( + m_v2x_msg_properties_values( + -, -, -, + m_location_info( + m_ecgi( + PX_V2X_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.72, 10.41) + )), + "UnknownEncodeFormat" + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_006_BR + + /** + * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - prov_chg_uu_uni + */ + testcase TC_MEC_MEC030_SRV_V2X_007_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "?subscription_type=prov_chg_uu_uni", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_v2x_subscription_link_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_uni_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_01 + + /** + * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - prov_chg_uu_mbms + */ + testcase TC_MEC_MEC030_SRV_V2X_007_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "?subscription_type=prov_chg_uu_mbms", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_v2x_subscription_link_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_mbms_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_02 + + /** + * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - prov_chg_pc5 + */ + testcase TC_MEC_MEC030_SRV_V2X_007_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ProvChgPc5Subscription v_prov_chg_pc5_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_pc5_subscription(v_prov_chg_pc5_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "?subscription_type=prov_chg_pc5", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_v2x_subscription_link_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_pc5_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_03 + + /** + * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - v2x_msg + */ + testcase TC_MEC_MEC030_SRV_V2X_007_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var V2xMsgSubscription v_v2x_msg_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_v2x_msg_subscription(v_v2x_msg_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "?subscription_type=v2x_msg", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_v2x_subscription_link_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_v2x_msg_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_04 + + /** + * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - pred_qos + */ + testcase TC_MEC_MEC030_SRV_V2X_007_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var PredQosSubscription v_pred_qos; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_pred_qos_subscription(v_pred_qos, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "?subscription_type=pred_qos", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_v2x_subscription_link_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_pred_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_05 + + /** + * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_007_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/_prov_chg_uu_uni_", // Invalid subscription type + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLink ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_007_BR + + /** + * @desc Check that the IUT responds with the requested to create a subscription - ProvChgUuUniSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_008_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + PX_PROV_UU_UNI_SUB_CALLBACK + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_prov_chg_uu_uni_subscription( + mw_prov_chg_uu_uni_subscription( + -, + PX_PROV_UU_UNI_SUB_CALLBACK, + ? + )))))) -> value v_response{ + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in ProvChgUuUniSubscription subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a provChgUuUniSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_uni_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_01 + + /** + * @desc Check that the IUT responds with the requested to create a subscription - ProvChgUuMbmsSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_008_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_mbms_subscription( + m_prov_chg_uu_mbms_subscription( + m_prov_chg_uu_mbms_filter_criteria( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_server_usd( + { PX_V2X_MBMS_SERVICE_ID }, + m_sdp_info( + PX_V2X_MC_SERVER, + PX_V2X_MC_PORT + ), + m_tmgi( + PX_V2X_SERVICE_AREA_ID, + PX_MCC, + PX_MNC + ))), + PX_PROV_UU_MBMS_SUB_CALLBACK + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_prov_chg_uu_mbms_subscription( + mw_prov_chg_uu_mbms_subscription( + -, + PX_PROV_UU_MBMS_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a provChgUuMbmsSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_mbms_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_02 + + /** + * @desc Check that the IUT responds with the requested to create a subscription - + */ + testcase TC_MEC_MEC030_SRV_V2X_008_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configurationProvChgPc5Subscription + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_pc5_subscription( + m_prov_chg_pc5_subscription( + m_filter_criteria( + PX_V2X_DST_LAYER_2_ID, + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + ))), + PX_PROV_PC5_SUB_CALLBACK + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_prov_chg_pc5_subscription( + mw_prov_chg_pc5_subscription( + -, + PX_PROV_PC5_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a provChgPc5Subscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_pc5_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_0078_OK_03 + + /** + * @desc Check that the IUT responds with the requested to create a subscription - V2xMsgSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_008_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_v2x_msg_subscription( + m_v2x_msg_subscription( + m_v2x_msg_subscription_filter_criteria, + PX_PROV_V2X_SUB_CALLBACK + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_v2x_msg_subscription( + mw_v2x_msg_subscription( + -, + PX_PROV_V2X_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a v2xMsgSubscription, SubscriptionId: ", v_subscription_id," ***"); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_v2x_msg_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_04 + + /** + * @desc Check that the IUT responds with the requested to create a subscription - PredQosSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_008_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_pred_qos_subscription( + m_pred_qos_subscription( + m_qos_pred_filter_criteria, + PX_PRED_QOS_SUB_CALLBACK + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_pred_qos_subscription( + mw_pred_qos_subscription( + -, + PX_PRED_QOS_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a predQosSubscription, SubscriptionId: ", v_subscription_id," ***"); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_pred_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_05 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Wrong SubscriptionType + */ + testcase TC_MEC_MEC030_SRV_V2X_008_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_subscription_invalid( + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + PX_PROV_UU_UNI_SUB_CALLBACK + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_008_BR_01 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - No Callback neitheir WebSocket + */ + testcase TC_MEC_MEC030_SRV_V2X_008_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + "" + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_008_BR_02 + + /** + * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgUuUniSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_009_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_prov_chg_uu_uni_subscription( + mw_prov_chg_uu_uni_subscription( + -, + PX_PROV_UU_UNI_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully retrieves the provChgUuUniSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_uni_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_01 + + /** + * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgUuMbmsSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_009_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_prov_chg_uu_mbms_subscription( + mw_prov_chg_uu_mbms_subscription( + -, + PX_PROV_UU_MBMS_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully retrives the provChgUuMbmsSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_mbms_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_02 + + /** + * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgPc5Subscription + */ + testcase TC_MEC_MEC030_SRV_V2X_009_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgPc5Subscription v_prov_chg_pc5_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_pc5_subscription(v_prov_chg_pc5_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_prov_chg_pc5_subscription( + mw_prov_chg_pc5_subscription( + -, + PX_PROV_PC5_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully retrives the provChgPc5Subscriptions ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_pc5_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_03 + + /** + * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - V2xMsgSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_009_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var V2xMsgSubscription v_v2x_msg_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_v2x_msg_subscription(v_v2x_msg_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_v2x_msg_subscription( + mw_v2x_msg_subscription( + -, + PX_PROV_V2X_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully retrieves the v2xMsgSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_v2x_msg_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_04 + + /** + * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - PredQosSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_009_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var PredQosSubscription v_pred_qos_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_pred_qos_subscription(v_pred_qos_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_pred_qos_subscription( + mw_pred_qos_subscription( + -, + PX_PRED_QOS_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully retrieves the predQosSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_pred_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_05 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_009_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var V2xMsgSubscription v_v2x_msg_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_v2x_msg_subscription(v_v2x_msg_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "?sub="& v_subscription_id, // Wrong URL + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_v2x_msg_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_009_BR + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_009_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var V2xMsgSubscription v_v2x_msg_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_v2x_msg_subscription(v_v2x_msg_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_v2x_msg_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_009_NF + + /** + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - ProvChgUuUniSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_010_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.77, + 10.46 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + PX_PROV_UU_UNI_SUB_CALLBACK, + v_prov_chg_uu_uni_subscription.links + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_prov_chg_uu_uni_subscription( + mw_prov_chg_uu_uni_subscription( + -, + PX_PROV_UU_UNI_SUB_CALLBACK, + v_prov_chg_uu_uni_subscription.links + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_uni_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_01 + + /** + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - ProvChgUuMbmsSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_010_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_mbms_subscription( + m_prov_chg_uu_mbms_subscription( + m_prov_chg_uu_mbms_filter_criteria( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.77, + 10.46 + )), + m_v2x_server_usd( + { PX_V2X_MBMS_SERVICE_ID }, + m_sdp_info( + PX_V2X_MC_SERVER, + PX_V2X_MC_PORT + ), + m_tmgi( + PX_V2X_SERVICE_AREA_ID, + PX_MCC, + PX_MNC + ))), + PX_PROV_UU_MBMS_SUB_CALLBACK, + v_prov_chg_uu_mbms_subscription.links + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_prov_chg_uu_mbms_subscription( + mw_prov_chg_uu_mbms_subscription( + -, + PX_PROV_UU_MBMS_SUB_CALLBACK, + v_prov_chg_uu_mbms_subscription.links + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_mbms_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_02 + + /** + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - ProvChgPc5Subscription + */ + testcase TC_MEC_MEC030_SRV_V2X_010_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgPc5Subscription v_prov_chg_pc5_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_pc5_subscription(v_prov_chg_pc5_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_pc5_subscription( + m_prov_chg_pc5_subscription( + m_filter_criteria( + PX_V2X_DST_LAYER_2_ID, + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.77, + 10.46 + ))), + PX_PROV_PC5_SUB_CALLBACK, + v_prov_chg_pc5_subscription.links + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_prov_chg_pc5_subscription( + mw_prov_chg_pc5_subscription( + -, + PX_PROV_PC5_SUB_CALLBACK, + v_prov_chg_pc5_subscription.links + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_pc5_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_03 + + /** + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - V2xMsgSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_010_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var V2xMsgSubscription v_v2x_msg_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_v2x_msg_subscription(v_v2x_msg_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_v2x_msg_subscription( + m_v2x_msg_subscription( + m_v2x_msg_subscription_filter_criteria, + PX_PROV_V2X_SUB_CALLBACK, + v_v2x_msg_subscription.links + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_v2x_msg_subscription( + mw_v2x_msg_subscription( + -, + PX_PROV_V2X_SUB_CALLBACK, + v_v2x_msg_subscription.links + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_v2x_msg_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_04 + + /** + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - PredQosSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_010_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var PredQosSubscription v_pred_qos_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_pred_qos_subscription(v_pred_qos_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_pred_qos_subscription( + m_pred_qos_subscription( + m_qos_pred_filter_criteria, + PX_PRED_QOS_SUB_CALLBACK, + v_pred_qos_subscription.links + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_pred_qos_subscription( + mw_pred_qos_subscription( + -, + PX_PRED_QOS_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully udates the predQosSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_pred_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_05 + + /** + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_010_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_subscription_invalid( + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + PX_PROV_UU_UNI_SUB_CALLBACK, + v_prov_chg_uu_uni_subscription.links + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_uni_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_010_BR + + /** + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_010_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_subscription_invalid( + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + PX_PROV_UU_UNI_SUB_CALLBACK, + v_prov_chg_uu_uni_subscription.links + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_uni_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_010_NF + + /** + * @desc Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - ProvChgUuUniSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_011_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_011_OK_01 + + /** + * @desc Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - ProvChgUuMbmsSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_011_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_011_OK_02 + + /** + * @desc Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - ProvChgPc5Subscription + */ + testcase TC_MEC_MEC030_SRV_V2X_011_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgPc5Subscription v_prov_chg_pc5_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_pc5_subscription(v_prov_chg_pc5_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_011_OK_03 + + /** + * @desc Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - V2xMsgSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_011_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var V2xMsgSubscription v_v2x_msg_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_v2x_msg_subscription(v_v2x_msg_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_011_OK_04 + + /** + * @desc Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - PredQosSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_011_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var PredQosSubscription v_pred_qos_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_pred_qos_subscription(v_pred_qos_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_011_OK_05 + + /** + * @desc Check that the IUT responds with the requested of removing subscription when queried by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_011_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_011_NF + + } // End of group me_app_role + +} // End of module AtsMec_V2XInformationServiceAPI_TestCases diff --git a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5b6023314553055f7efcb6faedc31b7ca824325e --- /dev/null +++ b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn @@ -0,0 +1,81 @@ +module AtsMec_V2XInformationServiceAPI_TestControl { + + // LibMec/LocationAPI + import from V2XInformationServiceAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec + import from AtsMec_V2XInformationServiceAPI_TestCases all; + + control { + + if (PICS_MEC_PLAT and PICS_SERVICES) { + execute(TC_MEC_MEC030_SRV_V2X_001_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_001_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_001_BR()); + execute(TC_MEC_MEC030_SRV_V2X_001_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_002_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_002_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_002_BR()); + execute(TC_MEC_MEC030_SRV_V2X_002_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_003_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_003_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_003_BR()); + execute(TC_MEC_MEC030_SRV_V2X_003_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_004_OK()); + execute(TC_MEC_MEC030_SRV_V2X_004_BR()); + execute(TC_MEC_MEC030_SRV_V2X_004_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_005_OK()); + execute(TC_MEC_MEC030_SRV_V2X_005_BR()); + execute(TC_MEC_MEC030_SRV_V2X_005_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_006_OK()); + execute(TC_MEC_MEC030_SRV_V2X_006_BR()); + + execute(TC_MEC_MEC030_SRV_V2X_007_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_007_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_007_OK_03()); + execute(TC_MEC_MEC030_SRV_V2X_007_OK_04()); + execute(TC_MEC_MEC030_SRV_V2X_007_OK_05()); + execute(TC_MEC_MEC030_SRV_V2X_007_BR()); + + execute(TC_MEC_MEC030_SRV_V2X_008_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_008_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_008_OK_03()); + execute(TC_MEC_MEC030_SRV_V2X_008_OK_04()); + execute(TC_MEC_MEC030_SRV_V2X_008_OK_05()); + execute(TC_MEC_MEC030_SRV_V2X_008_BR_01()); + execute(TC_MEC_MEC030_SRV_V2X_008_BR_02()); + + execute(TC_MEC_MEC030_SRV_V2X_009_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_009_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_009_OK_03()); + execute(TC_MEC_MEC030_SRV_V2X_009_OK_04()); + execute(TC_MEC_MEC030_SRV_V2X_009_OK_05()); + execute(TC_MEC_MEC030_SRV_V2X_009_BR()); + execute(TC_MEC_MEC030_SRV_V2X_009_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_010_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_010_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_010_OK_03()); + execute(TC_MEC_MEC030_SRV_V2X_010_OK_04()); + execute(TC_MEC_MEC030_SRV_V2X_010_OK_05()); + execute(TC_MEC_MEC030_SRV_V2X_010_BR()); + execute(TC_MEC_MEC030_SRV_V2X_010_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_011_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_011_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_011_OK_03()); + execute(TC_MEC_MEC030_SRV_V2X_011_OK_04()); + execute(TC_MEC_MEC030_SRV_V2X_011_OK_05()); + execute(TC_MEC_MEC030_SRV_V2X_011_NF()); + } + } // End of 'control' statement + +} // End of module AtsMec_V2XInformationServiceAPI_TestControl diff --git a/ttcn/AtsMec_V2XInformationService/module.mk b/ttcn/AtsMec_V2XInformationService/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..4e4bc434dc0aa80d046e527f314d9bc756e6e3f3 --- /dev/null +++ b/ttcn/AtsMec_V2XInformationService/module.mk @@ -0,0 +1,39 @@ +suite := AtsMec_V2XInformationService + +sources := \ + AtsMec_V2XInformationServiceAPI_TestCases.ttcn \ + AtsMec_V2XInformationServiceAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..975a4207746a3f4f46ff3e243eb5868b35f703c2 --- /dev/null +++ b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn @@ -0,0 +1,1894 @@ +/** + * @author ETSI / TTF T012 / TTF T027 + * @version $URL:$ + * $ID:$ + * @desc This module provides the MEC test cases. + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * @see ETSI GS MEC 002, Draft ETSI GS MEC 028 V2.3.1 (2022-07) + */ +module AtsMec_WlanInformationAPI_TestCases { + + // JSON + import from Json all; + + // Libcommon + import from LibCommon_Time all; + import from LibCommon_VerdictControl all; + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec/WlanInformationAPI + import from WlanInformationAPI_TypesAndValues all; + import from WlanInformationAPI_Pics all; + import from WlanInformationAPI_Pixits all; + import from WlanInformationAPI_Templates all; + import from WlanInformationAPI_Functions all; + + // LibMec + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + group me_app_role { + + /** + * @desc Check that the IUT responds with the list of WLAN Access Point + */ + testcase TC_MEC_MEC028_SRV_WAI_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/ap/ap_information", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ap_info_list( + superset( + mw_ap_info( + mw_ap_identity( + PX_MAC_ID + )))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ApInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_001_OK + + /** + * @desc Check that the IUT responds with the list of WLAN Access Point filtered by the macId provided as query parameter + */ + testcase TC_MEC_MEC028_SRV_WAI_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/ap/ap_information?filter=(eq," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ap_info_list( + superset( + mw_ap_info( + mw_ap_identity( + PX_MAC_ID + )))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ApInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_002_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC028_SRV_WAI_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/apId/ap_information?filter=(ee," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", // Invalid query + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_002_BR + + /** + * @desc Check that the IUT responds with the list of Station Point + */ + testcase TC_MEC_MEC028_SRV_WAI_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/sta/sta_information", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_sta_info_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a StaInfo list ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_003_OK + + /** + * @desc Check that the IUT responds with the list of Station Point filtered by the macId provided as query parameter + */ + testcase TC_MEC_MEC028_SRV_WAI_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/sta/sta_information?filter=(eq," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_sta_info_list( + superset( + mw_sta_info( + mw_sta_identity( + PX_WLAN_FILTER_VALUE + )))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a StaInfo list ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_004_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC028_SRV_WAI_004_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/staId/sta_information?filter=(ee," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", // Invalid query + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_004_BR + + /** + * @desc Check that the IUT responds with the requested list of subscription + */ + testcase TC_MEC_MEC028_SRV_WAI_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription, v_assoc_sta_subscription_1; + var Json.String v_subscription_id, v_subscription_id_1; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_create_assoc_sta_subscription(v_assoc_sta_subscription_1, v_subscription_id_1); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_wlan_subscription_link_list( + mw_subscription_link_list( + -, + { + *, + mw_subscription( + v_assoc_sta_subscription.links.self_.href, + "AssocStaSubscription" + ), + mw_subscription( + v_assoc_sta_subscription_1.links.self_.href, + "AssocStaSubscription" + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_assoc_sta_subscription(v_subscription_id); + f_delete_assoc_sta_subscription(v_subscription_id_1); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_005_OK + + /** + * @desc Check that the IUT responds with the requested list of subscription when the MEC Platform is queried using a filter on subscription type + */ + testcase TC_MEC_MEC028_SRV_WAI_006_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "?" & "subscription_type=assoc_sta", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_wlan_subscription_link_list( + mw_subscription_link_list( + -, + { + *, + mw_subscription( + v_assoc_sta_subscription.links.self_.href, + "AssocStaSubscription" + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of AssocStaSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_006_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC028_SRV_WAI_006_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions?assoc_sta", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_006_BR + + /** + * @desc Check that the IUT responds with an error when a request with not existing parameters is sent + */ + testcase TC_MEC_MEC028_SRV_WAI_006_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB, + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_006_NF + + /** + * @desc Check that the IUT responds with a Notification Subscription + */ + testcase TC_MEC_MEC028_SRV_WAI_007_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var Json.String v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_assoc_sta_subscription( + m_assoc_sta_subscription( + PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, + m_ap_identity( + PX_MAC_ID + ), + -, -, -, + 10, // notificationPeriod - Table 6.3.2-1: Attributes of the AssocStaSubscription Note 2 + -, + m_time_stamp( + f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_assoc_sta_subscription( + mw_assoc_sta_subscription( + PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, + -, -, -, + ? + )))))) -> value v_response { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_WLAN_URI_SUB & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds to the subscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_007_OK + + /** + * @desc Check that the IUT responds with an error when an invalid Subscription request is sent + */ + testcase TC_MEC_MEC028_SRV_WAI_007_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_assoc_sta_subscription( + m_assoc_sta_subscription_invalid( + PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, + m_ap_identity( + PX_MAC_ID + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_007_BR + + /** + * @desc Check that the IUT responds with an error when a request with not existing parameters is sent + */ + testcase TC_MEC_MEC028_SRV_WAI_007_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "&filter=(eq,ap/macId,00:01:02:03:04:04)", + v_headers, + m_http_message_body_json( + m_body_json_assoc_sta_subscription( + m_assoc_sta_subscription( + PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, + m_ap_identity( + PX_MAC_ID + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_007_NF + + /** + * @desc Check that the IUT responds with the list of Subscription + */ + testcase TC_MEC_MEC028_SRV_WAI_008_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_assoc_sta_subscription( + mw_assoc_sta_subscription( + v_assoc_sta_subscription.callbackReference, + -, + -, -, + v_assoc_sta_subscription.links + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_008_OK + + /** + * @desc Check that the IUT responds with an error when a request for existing subscription with incorrect parameters is sent + */ + testcase TC_MEC_MEC028_SRV_WAI_008_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/unknown", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_008_NF + + /** + * @desc Check that the IUT responds with a Notification Subscription when it is modified + */ + testcase TC_MEC_MEC028_SRV_WAI_009_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_assoc_sta_subscription( + m_assoc_sta_subscription( + v_assoc_sta_subscription.callbackReference, + m_ap_identity( + PX_MAC_ID + ), + -, -, + v_assoc_sta_subscription.links, + 12, + m_time_stamp( + f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_assoc_sta_subscription( + mw_assoc_sta_subscription( + v_assoc_sta_subscription.callbackReference, + ?, + -, -, + v_assoc_sta_subscription.links + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds to the AssocStatSubscription update ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_009_OK + + /** + * @desc Check that the IUT responds with an error when an invalid field is set in the subscription modification request + */ + testcase TC_MEC_MEC028_SRV_WAI_009_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_assoc_sta_subscription( + m_assoc_sta_subscription( + "", // No callback reference + m_ap_identity( + PX_MAC_ID + ), + -, -, + v_assoc_sta_subscription.links, + 12, + m_time_stamp( + f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_009_BR + + /** + * @desc Check that the IUT responds with an error when an unknown subscription modification request + */ + testcase TC_MEC_MEC028_SRV_WAI_009_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/unknown", + v_headers, + m_http_message_body_json( + m_body_json_assoc_sta_subscription( + m_assoc_sta_subscription( + v_assoc_sta_subscription.callbackReference, + m_ap_identity( + PX_MAC_ID + ), + -, -, + v_assoc_sta_subscription.links, + 12, + m_time_stamp( + f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds to the AssocStatSubscription update ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_009_NF + + /** + * @desc Check that the IUT responds with 204 when an existing subscription is correctly deleted + */ + testcase TC_MEC_MEC028_SRV_WAI_010_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_010_OK + + /** + * @desc Check that the IUT responds with an error when an not existing subscription cannot be deleted + */ + testcase TC_MEC_MEC028_SRV_WAI_010_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "unknown", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_010_NF + + /** + * @desc Check that the IUT sends a notification about WLAN event notification if the MEC service has an associated subscription and the event is generated + */ + testcase TC_MEC_MEC028_SRV_WAI_011_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_assoc_sta_notification( + mw_assoc_sta_notification( + mw_ap_identity( + PX_MAC_ID + ))))))) { + tc_wait.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_011_OK + + /** + * @desc Check that the IUT responds with the list of WLAN Access Point + */ + testcase TC_MEC_MEC028_SRV_WAI_012_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/queries/measurements", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_wlan_measurement_config_link_list + )))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of measurement config ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_012_OK + + /** + * @desc Check that the IUT responds with a new measurement configuration + */ + testcase TC_MEC_MEC028_SRV_WAI_013_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var Json.String v_measurement_config_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS, + v_headers, + m_http_message_body_json( + m_body_json_wlan_measurement_config( + m_measurement_config( + -, + { + m_sta_identity( + PX_MAC_ID, + {PX_SSID}, + -, + {PX_IP_ADDRESS} + ) + }, + PX_MEASUREMENT_ID, + m_measurement_info(1000, 10) + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_wlan_measurement_config( + mw_measurement_config( + ?, + {mw_sta_identity(PX_MAC_ID, + {PX_SSID}, + -, + {PX_IP_ADDRESS} + )}, + PX_MEASUREMENT_ID, + mw_measurement_info + )))))) -> value v_response { + tc_ac.stop; + + v_measurement_config_id := regexp( + oct2char(unichar2oct(v_response.response.body.json_body.measurementConfig.links.self_.href)), + "?+" & PX_ME_WLAN_URI_MEAS & "/" & "(?*)", + 0 + ); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_measurement_config(v_measurement_config_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_013_OK + + /** + * @desc Check that the IUT responds with an error when an invalid request is sent + */ + testcase TC_MEC_MEC028_SRV_WAI_013_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS, + v_headers, + m_http_message_body_json( + m_body_json_wlan_measurement_config( + m_measurement_config( + -, + { + m_sta_identity( + PX_MAC_ID & ":00", // Invalid MAC address + {PX_SSID}, + -, + {PX_IP_ADDRESS} + ) + }, + PX_MEASUREMENT_ID, + m_measurement_info(1000, 10) + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_013_BR + + /** + * @desc Check that the IUT responds with the specified measurement configuration + */ + testcase TC_MEC_MEC028_SRV_WAI_014_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MeasurementConfig v_measurement_config; + var Json.String v_measurement_config_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_measurement_config(v_measurement_config, v_measurement_config_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements" & "/" & v_measurement_config_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_wlan_measurement_config( + mw_measurement_config( + ?, + { + mw_sta_identity( + PX_MAC_ID, + {PX_SSID}, + -, + {PX_IP_ADDRESS} + ) + }, + PX_MEASUREMENT_ID, + mw_measurement_info + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_measurement_config(v_measurement_config_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_014_OK + + /** + * @desc Check that the IUT responds with an error when an invalid request is sent + */ + testcase TC_MEC_MEC028_SRV_WAI_014_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MeasurementConfig v_measurement_config; + var Json.String v_measurement_config_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_measurement_config(v_measurement_config, v_measurement_config_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements"& "/" & v_measurement_config_id & "_Invalid", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_measurement_config(v_measurement_config_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_014_NF + + /** + * @desc Check that the IUT responds with the modified measurement configuration + */ + testcase TC_MEC_MEC028_SRV_WAI_015_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MeasurementConfig v_measurement_config; + var Json.String v_measurement_config_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_measurement_config(v_measurement_config, v_measurement_config_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id, + v_headers, + m_http_message_body_json( + m_body_json_wlan_measurement_config( + m_measurement_config( + -, + { + m_sta_identity( + PX_MAC_ID, + {PX_SSID}, + -, + {PX_IP_ADDRESS} + ) + }, + PX_MEASUREMENT_ID, + m_measurement_info(2000, 20) + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_wlan_measurement_config( + mw_measurement_config( + ?, + {mw_sta_identity( + PX_MAC_ID, + {PX_SSID}, + -, + {PX_IP_ADDRESS} + )}, + PX_MEASUREMENT_ID, + mw_measurement_info(2000, 20) + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_measurement_config(v_measurement_config_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_015_OK + + /** + * @desc Check that the IUT responds with an error when an invalid request is sent + */ + testcase TC_MEC_MEC028_SRV_WAI_015_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MeasurementConfig v_measurement_config; + var Json.String v_measurement_config_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_measurement_config(v_measurement_config, v_measurement_config_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id & "_Invalid", + v_headers, + m_http_message_body_json( + m_body_json_wlan_measurement_config( + m_measurement_config( + -, + { + m_sta_identity( + PX_MAC_ID, + {PX_SSID}, + -, + {PX_IP_ADDRESS} + ) + }, + PX_MEASUREMENT_ID, + m_measurement_info(2000, 20) + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_measurement_config(v_measurement_config_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_015_NF + + /** + * @desc Check that the IUT responds with with 204 when requested to delete the specified measurement configuration + */ + testcase TC_MEC_MEC028_SRV_WAI_016_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MeasurementConfig v_measurement_config; + var Json.String v_measurement_config_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_measurement_config(v_measurement_config, v_measurement_config_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_016_OK + + /** + * @desc Check that the IUT responds with an error when an invalid request is sent + */ + testcase TC_MEC_MEC028_SRV_WAI_016_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MeasurementConfig v_measurement_config; + var Json.String v_measurement_config_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_measurement_config(v_measurement_config, v_measurement_config_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id & "_invalid", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_measurement_config(v_measurement_config_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_016_NF + + } // End of group me_app_role + +} // End of module AtsMec_WlanInformationAPI_TestCases diff --git a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestControl.ttcn b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d66759baebbab0cb4dc7c706108bcd140551fddf --- /dev/null +++ b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestControl.ttcn @@ -0,0 +1,61 @@ +module AtsMec_WlanInformationAPI_TestControl { + + // LibMec/WlanInformationAPI + import from WlanInformationAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec + import from AtsMec_WlanInformationAPI_TestCases all; + + control { + + if (PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED) { + execute(TC_MEC_MEC028_SRV_WAI_001_OK()); + execute(TC_MEC_MEC028_SRV_WAI_002_OK()); + execute(TC_MEC_MEC028_SRV_WAI_002_BR()); + + execute(TC_MEC_MEC028_SRV_WAI_003_OK()); + execute(TC_MEC_MEC028_SRV_WAI_004_OK()); + execute(TC_MEC_MEC028_SRV_WAI_004_BR()); + + execute(TC_MEC_MEC028_SRV_WAI_005_OK()); + execute(TC_MEC_MEC028_SRV_WAI_006_OK()); + execute(TC_MEC_MEC028_SRV_WAI_006_BR()); + execute(TC_MEC_MEC028_SRV_WAI_006_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_007_OK()); + execute(TC_MEC_MEC028_SRV_WAI_007_BR()); + execute(TC_MEC_MEC028_SRV_WAI_007_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_008_OK()); + execute(TC_MEC_MEC028_SRV_WAI_008_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_009_OK()); + execute(TC_MEC_MEC028_SRV_WAI_009_BR()); + execute(TC_MEC_MEC028_SRV_WAI_009_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_010_OK()); + execute(TC_MEC_MEC028_SRV_WAI_010_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_011_OK()); + + execute(TC_MEC_MEC028_SRV_WAI_012_OK()); + + execute(TC_MEC_MEC028_SRV_WAI_013_OK()); + execute(TC_MEC_MEC028_SRV_WAI_013_BR()); + + execute(TC_MEC_MEC028_SRV_WAI_014_OK()); + execute(TC_MEC_MEC028_SRV_WAI_014_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_015_OK()); + execute(TC_MEC_MEC028_SRV_WAI_015_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_016_OK()); + execute(TC_MEC_MEC028_SRV_WAI_016_NF()); + } + + } // End of 'control' statement + +} // End of module AtsMec_WlanInformationAPI_TestControl diff --git a/ttcn/AtsMec_WlanInformation/module.mk b/ttcn/AtsMec_WlanInformation/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..f5432313efa46742fdb7eb52abebae2558eb40c9 --- /dev/null +++ b/ttcn/AtsMec_WlanInformation/module.mk @@ -0,0 +1,39 @@ +suite := AtsMec_WlanInformation + +sources := \ + AtsMec_WlanInformationAPI_TestCases.ttcn \ + AtsMec_WlanInformationAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/LibIts b/ttcn/LibIts deleted file mode 160000 index 913d130353cf716ab620edbafcb56d2213dc344d..0000000000000000000000000000000000000000 --- a/ttcn/LibIts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 913d130353cf716ab620edbafcb56d2213dc344d diff --git a/ttcn/LibMec/Ams/module.mk b/ttcn/LibMec/Ams/module.mk deleted file mode 100644 index bce6cc104631075fe5d883c9140d2be52798ae85..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/Ams/module.mk +++ /dev/null @@ -1,7 +0,0 @@ -sources := \ - ttcn/Ams_Pics.ttcn \ - ttcn/Ams_Pixits.ttcn \ - ttcn/Ams_EncdecDeclarations.ttcn \ - ttcn/Ams_Templates.ttcn \ - ttcn/Ams_TypesAndValues.ttcn \ - diff --git a/ttcn/LibMec/Ams/ttcn/Ams_EncdecDeclarations.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_EncdecDeclarations.ttcn deleted file mode 100644 index 2a189e1beb32fc04781d52b6b7c3ab84fda704f8..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/Ams/ttcn/Ams_EncdecDeclarations.ttcn +++ /dev/null @@ -1,22 +0,0 @@ -module Ams_EncdecDeclarations { - - import from Ams_TypesAndValues all; - - external function enc_AppMobilityServiceInfo(in AppMobilityServiceInfo p_app_mobility_service_info) return octetstring - with { extension "prototype (convert) encode(JSON)"; extension "printing(pretty)" }; - external function dec_AppMobilityServiceInfo(in octetstring p_pdu) return AppMobilityServiceInfo - with { extension "prototype (convert) decode(JSON)" }; - - external function enc_RegistrationRequest(in RegistrationRequest p_registration_request) return octetstring - with { extension "prototype (convert) encode(JSON)"; extension "printing(pretty)" }; - external function dec_RegistrationRequest(in octetstring p_pdu) return RegistrationRequest - with { extension "prototype (convert) decode(JSON)" }; - - - external function enc_RegistrationInfo(in RegistrationInfo p_registration_info) return octetstring - with { extension "prototype (convert) encode(JSON)"; extension "printing(pretty)" }; - external function dec_Registrationinfo(in octetstring p_pdu) return RegistrationInfo - with { extension "prototype (convert) decode(JSON)" }; - - -} // End of module Ams_EncdecDeclarations diff --git a/ttcn/LibMec/Ams/ttcn/Ams_Pics.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_Pics.ttcn deleted file mode 100644 index 89089fac5ec1c00a037da9864348d6fedfe27022..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/Ams/ttcn/Ams_Pics.ttcn +++ /dev/null @@ -1,8 +0,0 @@ -module Ams_Pics { - - /** - * @desc Does the IUT support LocationAPI? - */ - modulepar boolean PICS_AMS_API_SUPPORTED := true; - -} // End of module LocationAPI_Pics diff --git a/ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn deleted file mode 100644 index 17763e1c120d714de91e39dd4c08fe1e305b6cf5..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn +++ /dev/null @@ -1,27 +0,0 @@ -module Ams_Pixits { - - // JSON - import from JSON all; - - // LibMec/LocationAPI - import from Ams_TypesAndValues all; - - modulepar JSON.String PX_APP_MOBILITY_SERVICE_ID := "KtRGymNQ84dG3mQfRepa"; - - modulepar JSON.String PX_APP_INS_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"; - - modulepar SubscriptionType PX_SUBSCRIPTION_TYPE := MobilityProcedureSubscription; - - modulepar JSON.String PX_SUBSCRIPTION_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3"; - - modulepar JSON.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID"; - - modulepar JSON.String PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID := "PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID"; - - modulepar JSON.String PX_CALLBACK_REFERENCE := "http://127.0.0.1/callback"; - - modulepar charstring PX_CALLBACK_URI := "http://127.0.0.1/callback"; - - modulepar JSON.String PX_MEP_ID := ""; - -} // End of module LocationAPI_Pixits diff --git a/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn deleted file mode 100644 index 7d94af282eba8984e1d1f3f075302d79f45294ee..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn +++ /dev/null @@ -1,267 +0,0 @@ -module Ams_Templates { - - // JSON - import from JSON all; - - // LibCommon - import from LibCommon_BasicTypesAndValues all; - - // LibMec/LocationAPI - import from Ams_TypesAndValues all; - import from Ams_Pixits all; - - template (omit) AppMobilityServiceInfo m_app_mobility_service_info( - in String p_app_mobility_service_id := PX_APP_MOBILITY_SERVICE_ID, - in template (omit) RegistrationInfos p_registration_info := omit - ) := { - registeredAppMobilityService := p_registration_info, - appMobilityServiceId := p_app_mobility_service_id - } // End of template m_app_mobility_service_info - - - template (present) AppMobilityServiceInfo mw_app_mobility_service_info( - template (present) RegistrationInfos p_registration_info := ?, - template (present) String p_app_mobility_service_id := ? - ) := { - registeredAppMobilityService := p_registration_info, - appMobilityServiceId := p_app_mobility_service_id - } - - template (omit) RegistrationInfo m_app_mobility_registration_info( - in template (value) ServiceConsumerId p_serviceConsumerId, - in template (omit) DeviceInformations p_deviceInformation := omit, - in template (omit) UInt32 p_expiryTime := omit - ) := { - serviceConsumerId := p_serviceConsumerId, - deviceInformation := p_deviceInformation, - expiryTime := p_expiryTime - } - - template RegistrationInfo mw_app_mobility_registration_info( - template (present) ServiceConsumerId p_serviceConsumerId := ?, - template DeviceInformations p_deviceInformation := *, - template UInt32 p_expiryTime := * - ) := { - serviceConsumerId := p_serviceConsumerId, - deviceInformation := p_deviceInformation, - expiryTime := p_expiryTime - } - - template (omit) ServiceConsumerId m_service_consumer_id( - in template (omit) String p_appInstanceId := omit, - in template (omit) String p_mepId := omit - ) := { - appInstanceId := p_appInstanceId, - mepId := p_mepId - } - - template (omit) ServiceConsumerIdWithError m_service_consumer_id_with_error( - in template (omit) String p_appId := omit, - in template (omit) String p_mepId := omit - ) := { - appId := p_appId, - mepId := p_mepId - } - - template (omit) ServiceConsumer m_service_consumer_error( - in template (omit) String p_appInstance := omit, - in template (omit) String p_mepId := omit - ) := { - appInstance := p_appInstance, - mepId := p_mepId - } - - template ServiceConsumerId mw_service_consumer_id( - template String p_appInstanceId := *, - template String p_mepId := * - ) := { - appInstanceId := p_appInstanceId, - mepId := p_mepId - } - - template (omit) RegistrationRequest m_registration_request ( - in template (omit) ServiceConsumerId p_service_consumer_id := omit, - in template (omit) DeviceInformations p_device_info := omit, - in template (omit) UInt32 p_expire_time := omit - ) := { - serviceConsumerId := p_service_consumer_id, - deviceInformation := p_device_info, - expiryTime := p_expire_time - } - - - template (omit) RegistrationRequestWithError m_registration_request_with_error ( - in template (omit) ServiceConsumerIdWithError p_service_consumer_id_with_error := omit, - in template (omit) DeviceInformations p_device_info := omit, - in template (omit) UInt32 p_expire_time := omit - ) := { - serviceConsumerIdWithError := p_service_consumer_id_with_error, - deviceInformation := p_device_info, - expiryTime := p_expire_time - } - - - template (omit) RegistrationRequest m_registration_request_error ( - in template (omit) ServiceConsumer p_service_consumer := omit, - in template (omit) DeviceInformations p_device_info := omit, - in template (omit) UInt32 p_expire_time := omit - ) := { - serviceConsumerId := p_service_consumer, - deviceInformation := p_device_info, - expiryTime := p_expire_time - } - - - template RegistrationRequest mw_registration_request( - template ServiceConsumerId p_service_consumer_id := ?, - template DeviceInformations p_device_info := omit, - template UInt32 p_expire_time := omit - ) := { - serviceConsumerId := p_service_consumer_id, - deviceInformation := p_device_info, - expiryTime := p_expire_time - } - - - template (value) RegistrationInfo m_registration_info ( - in template (omit) ServiceConsumerId p_service_consumer_id := omit, - in template (omit) DeviceInformations p_device_info := omit, - in UInt32 p_expire_time - ) := { - serviceConsumerId := p_service_consumer_id, - deviceInformation := p_device_info, - expiryTime := p_expire_time - } - - template (present) RegistrationInfos mw_registration_info( - template (present) ServiceConsumerId p_service_consumer_id := ?, - template (present) DeviceInformations p_device_info := ?, - template (present) UInt32 p_expire_time := ? - ) := { - - } - - - template (value) ServiceConsumer m_service_consumer ( - in String p_app_instance, - in String p_mep_id - ) := { - appInstance := p_app_instance, - mepId := p_mep_id - } - - template (omit) ServiceConsumer mw_service_consumer ( - in String p_app_instance, - in template (omit) String p_mep_id := omit - ) := { - appInstance := p_app_instance, - mepId := p_mep_id - } - - template (value) DeviceInformation m_device_info ( - in String p_associate_id - ) := { - associateId := p_associate_id - } - - template (omit) DeviceInformation mw_device_info ( - in String p_associate_id - ) := { - associateId := p_associate_id - } - type record AmsSubscriptionLinkList { - JSON.AnyURI links, - Subscription subscription - } - - template (value) AdjacentAppInfoSubscription_ mw_adjacent_application_info_notification ( - in template (omit) SubscriptionType p_subscriptionType := omit, - in JSON.AnyURI p_callbackReference, - in template (omit) JSON.AnyURI p_links := omit, - in template (omit) AdjacentFilterCriteria p_filterCriteria := omit, - in template (omit) TimeStamp p_expiryDeadline := omit - - ) := { - subscriptionType := p_subscriptionType , - callbackReference := p_callbackReference, - links := p_links, - filterCriteria := p_filterCriteria, - expiryDeadline := p_expiryDeadline - } - - - template (value) MobilityProcedureSubscription_ m_ams_subscription ( - in SubscriptionType p_subscriptionType := PX_SUBSCRIPTION_TYPE, - in JSON.AnyURI p_callbackReference, - in template (omit) JSON.AnyURI p_links := omit, - in template (omit) FilterCriteria p_filterCriteria := omit, - in template (omit) TimeStamp p_expiryDeadline := omit - - ) := { - subscriptionType := p_subscriptionType , - callbackReference := p_callbackReference, - links := p_links, - filterCriteria := p_filterCriteria, - expiryDeadline := p_expiryDeadline - } - - - - template (value) MobilityProcedureSubscription_ mw_mobility_procedure_notification ( - in template (omit) SubscriptionType p_subscriptionType := omit, - in JSON.AnyURI p_callbackReference, - in template (omit) JSON.AnyURI p_links := omit, - in template (omit) FilterCriteria p_filterCriteria := omit, - in template (omit) TimeStamp p_expiryDeadline := omit - - ) := { - subscriptionType := p_subscriptionType , - callbackReference := p_callbackReference, - links := p_links, - filterCriteria := p_filterCriteria, - expiryDeadline := p_expiryDeadline - } - - template (value) MobilityProcedureSubscriptionError m_ams_subscription_error ( - in SubscriptionType p_subscriptionType, - in JSON.AnyURI p_callbackReference, - in template (omit) JSON.AnyURI p_links := omit, - in template (omit) FilterCriteria p_filterCriteria := omit, - in template (omit) TimeStamp p_expiryDeadline := omit - - ) := { - subscriptionType := p_subscriptionType, - callbackReference := p_callbackReference, - links := p_links, - filterCriteria := p_filterCriteria, - expiryDeadline := p_expiryDeadline - } - - template (present) MobilityProcedureSubscription_ mw_ams_subscription ( - in SubscriptionType p_subscriptionType, - in template (omit) JSON.AnyURI p_callbackReference := omit, - in template (omit) JSON.AnyURI p_links := omit, - in template (omit) FilterCriteria p_filterCriteria := omit, - in template (omit) TimeStamp p_expiryDeadline := omit - ) := { - subscriptionType := p_subscriptionType , - callbackReference := p_callbackReference, - links := p_links, - filterCriteria := p_filterCriteria, - expiryDeadline := p_expiryDeadline - } - - template (present) ExpiryNotification mw_expire_notification ( - in template (omit) TimeStamp p_timestamp := omit, - in template (omit) JSON.AnyURI p_links := omit, - in TimeStamp p_expiryDeadline - ) := { - timeStamp := p_timestamp, - links := p_links, - expiryDeadline := p_expiryDeadline - } - - - - -} // End of module LocationAPI_Templates diff --git a/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn deleted file mode 100644 index 17959aa7fe3ff76aa09df65978a9f1101deffc1e..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn +++ /dev/null @@ -1,567 +0,0 @@ -module Ams_TypesAndValues { - -// JSON -import from JSON all; - -// LibCommon -import from LibCommon_BasicTypesAndValues all; - - -type record of AppMobilityServiceInfo AppMobilityServiceInfos; -type record AppMobilityServiceInfo { - RegistrationInfos registeredAppMobilityService , - String appMobilityServiceId -} - -type record of RegistrationInfo RegistrationInfos; -type record RegistrationInfo { - ServiceConsumerId serviceConsumerId, - DeviceInformations deviceInformation optional, - UInt32 expiryTime optional -} - - -type record RegistrationRequest { - ServiceConsumerId serviceConsumerId, - DeviceInformations deviceInformation optional, - UInt32 expiryTime optional -} - - -type record RegistrationRequestWithError { - ServiceConsumerIdWithError serviceConsumerIdWithError, - DeviceInformations deviceInformation optional, - UInt32 expiryTime optional -} - - -type record of ServiceConsumerId ServiceConsumerIds; -type record ServiceConsumerId { - String appInstanceId optional, - String mepId optional -} - -type record ServiceConsumerIdWithError { - String appId optional, - String mepId optional -} - -// Erroneous parameter: appInstance should be appInstanceId -type record of ServiceConsumer ServiceConsumers; -type record ServiceConsumer { - String appInstance optional, - String mepId optional -} - -type record of DeviceInformation DeviceInformations; -type record DeviceInformation { - String associateId -} - - -type JSON.AnyURI links; - -type enumerated SubscriptionType { - MobilityProcedureSubscription, - AdjacentAppInfoSubscription -} - -type record Subscription { - JSON.AnyURI href, - SubscriptionType subscriptionType -} - - -type record of AmsSubscriptionLinkList AmsSubscriptionLinkLists; -type record AmsSubscriptionLinkList { - JSON.AnyURI links, - Subscription subscription -} - - -type record MobilityProcedureSubscriptionError { - SubscriptionType subscriptionType, - JSON.AnyURI callbackReference, - JSON.AnyURI links optional, - FilterCriteria filterCriteria, - TimeStamp expiryDeadline optional -} - - - - -type record of MobilityProcedureSubscription_ MobilityProcedureSubscriptions; -type record MobilityProcedureSubscription_ { - SubscriptionType subscriptionType, - JSON.AnyURI callbackReference, - JSON.AnyURI links optional, - FilterCriteria filterCriteria, - TimeStamp expiryDeadline optional -} - -type enumerated MobilityStatusType { - INTERHOST_MOVEOUT_TRIGGERED, - TARGET_APPINST_CONFIRMED, - TARGET_TRAFFIC_RULE_ACTIVATED, - INTERHOST_MOVEOUT_COMPLETED, - INTERHOST_MOVEOUT_FAILED -} - -type record AssociateIdList { - String associateId -} - -type record of FilterCriteria FilterCriterias; -type record FilterCriteria { - String appInstanceId optional, - AssociateIdList associateId optional, - MobilityStatusType mobilityStatus -} - - - -type record AdjacentFilterCriteria { - String appInstanceId optional -} - - -type record of ExpiryNotification ExpiryNotifications; -type record ExpiryNotification { - TimeStamp timeStamp, - JSON.AnyURI links optional, - TimeStamp expiryDeadline -} - -type record of AdjacentAppInfoSubscription_ AdjacentAppInfoSubscriptions; -type record AdjacentAppInfoSubscription_ { - SubscriptionType subscriptionType, - JSON.AnyURI callbackReference, - JSON.AnyURI links optional, - AdjacentFilterCriteria filterCriteria, - TimeStamp expiryDeadline optional -} - - /** - * @desc - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } - - - /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type UInt32 Seconds; - - /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type UInt32 NanoSeconds; - -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// /** -// * @desc -// * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC -// * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC -// */ -// type record TimeStamp { -// Seconds seconds, -// NanoSeconds nanoSeconds -// } -// -// /** -// * @desc A type containing list of users. -// * @member user Collection of the zone information list. -// * @member resourceURL Self referring URL. -// */ -// type record of UserInfo UserInfos; -// type record UserList { -// UserInfos user optional, -// ResourceURL resourceURL -// } -// -// /** -// * @desc A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided. -// * @member latitude -// * @member longitude -// * @member altitude -// * @member accuracy -// */ -// type record LocationInfo { -// JSON.Number latitude, -// JSON.Number longitude, -// JSON.Number altitude optional, -// UInt32 accuracy -// } // End of type LocationInfo -// -// /** -// * @desc A type containing zone information. -// * @member zoneId Identifier of zone -// * @member numberOfAccessPoints The number of access points within the zone -// * @member numberOfUnservicableAccessPoints Number of inoperable access points within the zone. -// * @member numberOfUsers The number of users currently on the access point. -// * @member resourceURL Self referring URL. -// */ -// type record ZoneInfo { -// ZoneId zoneId, -// NumberOfAccessPoints numberOfAccessPoints, -// NumberOfUnserviceableAccessPoints numberOfUnservicableAccessPoints, -// NumberOfUsers numberOfUsers, -// ResourceURL resourceURL -// } -// -// /** -// * @desc Collection of the zone information list. -// * @member zone Collection of the zone information list. -// * @member resourceURL Self referring URL. -// */ -// type record of ZoneInfo ZoneInfos; -// type record ZoneList { -// ZoneInfos zone optional, -// ResourceURL resourceURL -// } -// -// /** -// * @desc Identifier of access point, (reference ETSI TS 129 171). Where the E-CGI is made up of the PLMN and Cell Identity (28 bit string). Then the PLMN is made up of the 3 digit MCC & 2 or 3 digit MNC. The Cell Portion is an optional element -// */ -// type JSON.String AccessPointId; -// -// /** -// * @desc A type containing access point information. -// * @member accessPointId -// * @member connectionType The connection type for the access poin -// * @member operationStatus The operation status of the access point -// * @member numberOfUsers The number of users currently on the access point. -// * @member resourceURL Self referring URL. -// */ -// type record AccessPointInfo { -// AccessPointId accessPointId, -// LocationInfo locationInfo optional, -// ConnectionType connectionType, -// OperationStatus operationStatus, -// NumberOfUsers numberOfUsers, -// InterestRealm interestRealm, -// ResourceURL resourceURL -// } -// type record of AccessPointInfo AccessPointInfos; -// -// /** -// * @desc A type containing list of access points. -// * @member zoneId -// * @member accessPoint Collection of the access point information list. -// * @member resourceURL -// */ -// type record AccessPointList { -// ZoneId zoneId, -// AccessPointInfos accessPoint optional, -// ResourceURL resourceURL -// } -// -// /** -// * @desc Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI). -// */ -// type JSON.String Address -// -// /** -// * @desc Reserved for future use. -// */ -// type JSON.String AncillaryInfo; -// -// /** -// * @desc CallBackData if passed by the application during the associated ZonalTrafficSubscription and UserTrackingSubscription operation. See [\ -//REST_NetAPI_Common]. -// */ -// type JSON.String CallbackData; -// -// /** -// * @desc Notification callback definition. -// * @member notifyURL -// */ -// type record CallbackReference { -// NotifyURL notifyURL -// } -// -// /** -// * @desc Uniquely identifies this create subscription request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid creating a duplicate subscription. -// */ -// type JSON.String ClientCorrelator; -// -// /** -// * @desc The connection type for the access point -// */ -// type enumerated ConnectionType { -// Femto, -// LTE_femto, -// Smallcell, -// LTE_smallcell, -// Wifi, -// Pico, -// Micro, -// Macro, -// Wimax, -// Unknown -// } -// -// /** -// * @desc Contextual information of a user location (e.g., aisle, floor, room number, etc.) -// */ -// type JSON.String ContextLocationInfo; -// -// /** -// * @desc Zone ID -// */ -// type JSON.String CurrentAccessPointId; -// -// /** -// * @desc Period (in seconds) of time notifications are provided for. If set to \"0\" (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications. This element MAY be given by the client during resource creation in order to signal the desired lifetime of the subscription. The server MUST return in this element the period of time for which the subscription will still be valid. -// */ -// type JSON.Date Duration; -// -// /** -// * @desc Interest realm of access point (e.g. geographical area, a type of industry etc.). -// */ -// type JSON.String InterestRealm; -// -// /** -// * @desc Link to other resources -// * @member rel Describes the relationship between the URI and the resource. -// * @member href UTI -// */ -// type record Link { -// JSON.String rel, -// JSON.String href -// } -// -// /** -// * @desc The URL of your own listener application. -// */ -// type JSON.String NotifyURL; -// -// /** -// * @desc The number of access points within the zone -// */ -// type UInt32 NumberOfAccessPoints; -// -// /** -// * @desc Number of inoperable access points within the zone. -// */ -// type UInt32 NumberOfUnserviceableAccessPoints; -// -// /** -// * @desc The number of users currently on the access point. -// */ -// type UInt32 NumberOfUsers; -// -// /** -// * @desc Threshold number of users in an access point which if crossed shall cause a notification. -// */ -// type UInt32 NumberOfUsersAPThreshold; -// -// /** -// * @desc This element shall be present when ZoneStatusSubscription includes numberOfUsersAPThreshold element and the number of users in an access point exceeds the threshold defined in the subscription. -// */ -// type UInt32 NumberOfUsersInAP; -// -// /** -// * @desc Threshold number of users in a zone which if crossed shall cause a notification. -// */ -// type UInt32 NumberOfUsersInZone; -// -// /** -// * @desc Threshold number of users in a zone which if crossed shall cause a notification. -// */ -// type UInt32 NumberOfUsersZoneThreshold; -// -// /** -// * @desc The operation status of the access point -// */ -// type enumerated OperationStatus { -// Serviceable, -// Unserviceable, -// Unknown -// } -// -// /** -// * @desc Zone ID -// */ -// type JSON.String PreviousAccessPointId; -// -// /** -// * @desc Self referring URL -// */ -// type JSON.AnyURI ResourceURL; -// -// /** -// * @desc Indicates the time of day for zonal presence notification. -// */ -// type JSON.String Timestamp; -// -// /** -// * @desc Time zone of access point -// */ -// type JSON.String Timezone; -// -// /** -// * @desc User event -// */ -// type enumerated UserEventType { -// Entering, -// Leaving, -// Transferring -// } -// -// /** -// * @desc List of user event values to generate notifications for (these apply to address specified). If this element is missing, a notification is requested to be generated for any change in user event. -// */ -// type record of UserEventType UserEventCriteria; -// -// /** -// * @desc A type containing user information. -// * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI). -// * @member accessPointId Identifier of access point, (reference ETSI TS 129 171). -// * @member zoneId Identifier of zone -// * @member resourceURL Self referring URL. -// * @member locationInfo A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided. -// * @member contextLocationInfo -// * @member ancillaryInfo -// */ -// type record UserInfo { -// Address address_, -// AccessPointId accessPointId, -// ZoneId zoneId, -// ResourceURL resourceURL, -// LocationInfo locationInfo optional, -// ContextLocationInfo contextLocationInfo optional, -// AncillaryInfo ancillaryInfo optional -// } with { -// variant (address_) "name as 'address'"; -// } // End of type UserInfo -// -// /** -// * @desc A type containing user tracking subscription. -// * @member -// */ -// type record UserTrackingSubscription { -// ClientCorrelator clientCorrelator optional, -// CallbackReference callbackReference, -// Address address_, -// UserEventCriteria userEventCriteria optional, -// ResourceURL resourceURL optional -// } with { -// variant (address_) "name as 'address'"; -// } -// -// /** -// * @desc A type containing zonal presence notification -// * @member -// * @member link Link to other resources that are in relationship with this notification. The server SHOULD include a link to the related subscription. No other links are required or suggested by this specification. -// */ -// type record ZonalPresenceNotification { -// CallbackReference callbackReference optional, -// ZoneId zoneId, -// Address address_, -// InterestRealm interestRealm optional, -// UserEventType userEventType, -// CurrentAccessPointId currentAccessPointId, -// PreviousAccessPointId previousAccessPointId optional, -// Timestamp timestamp_, -// Link link optional -// } with { -// variant (address_) "name as 'address'"; -// variant (timestamp_) "name as 'timestamp'"; -// } -// -// /** -// * @desc A type containing zonal traffic subscription -// * @member -// * @member interestRealm Interest realms of access points within a zone (e.g. geographical area, a type of industry etc.). -// * @member userEventCriteria List of user event values to generate notifications for (these apply to zone identifier or all interest realms within zone identifier specified). If this element is missing, a notification is requested to be generated for any change in user event. -// * @member resourceURL -// */ -// type record ZonalTrafficSubscription { -// ClientCorrelator clientCorrelator optional, -// CallbackReference callbackReference, -// ZoneId zoneId, -// InterestRealm interestRealm optional, -// UserEventCriteria userEventCriteria optional, -// Duration duration optional, -// ResourceURL resourceURL optional -// } -// -// /** -// * @desc Identifier of zone -// */ -// type JSON.String ZoneId; -// -// /** -// * @desc A type containing zone status notification. -// * @member zoneId -// * @member -// */ -// type record ZoneStatusNotification { -// CallbackData callbackData optional, -// ZoneId zoneId, -// AccessPointId accessPointId optional, -// NumberOfUsersInZone numberOfUsersInZone optional, -// NumberOfUsersInAP numberOfUsersInAP optional, -// OperationStatus operationStatus optional, -// Timestamp timestamp_, -// Link link -// } with { -// variant (timestamp_) "name as 'timestamp'"; -// } -// -// /** -// * @desc A type containing zone status subscription. -// * @member zoneId -// * @member -// * @member -// * @member -// * @member operationStatus List of operation status values to generate notifications for (these apply to all access points within a zone). -// */ -// type record ZoneStatusSubscription { -// ClientCorrelator clientCorrelator optional, -// ResourceURL resourceURL optional, -// CallbackReference callbackReference, -// ZoneId zoneId, -// NumberOfUsersZoneThreshold numberOfUsersZoneThreshold optional, -// NumberOfUsersAPThreshold numberOfUsersAPThreshold optional, -// OperationStatus operationStatus optional -// } -// -// /** -// * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC -// */ -// type UInt32 Seconds; -// -// /** -// * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC -// */ -// type UInt32 NanoSeconds; - -} with { -encode "JSON" -} diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/module.mk b/ttcn/LibMec/ApplicationMobilityServiceAPI/module.mk index 46b5cab7d7abdebb65bf9ec7995ab94799aa009f..37bd881607c6f37e769ca2da8a72eb8964965791 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/module.mk +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/module.mk @@ -5,3 +5,4 @@ sources := \ ttcn/ApplicationMobilityServiceAPI_Templates.ttcn \ ttcn/ApplicationMobilityServiceAPI_Functions.ttcn \ +modules := ../RnisAPI diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Functions.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Functions.ttcn index 3e2f38a05dc5c2baa059769171239dd62de9ea85..443257a3999569ecce71e4c1a56e42add4becfeb 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Functions.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Functions.ttcn @@ -1,6 +1,343 @@ module ApplicationMobilityServiceAPI_Functions { // JSON - import from JSON all; + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + import from LibCommon_Time all; + import from LibCommon_VerdictControl all; + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec/ApplicationMobilityServiceAPI + import from ApplicationMobilityServiceAPI_TypesAndValues all; + import from ApplicationMobilityServiceAPI_Templates all; + import from ApplicationMobilityServiceAPI_Pixits all; + + // LibMec + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + function f_create_application_mobility_services( + in Json.String p_app_instance_id := PX_APP_INS_ID, + out RegistrationInfo p_registration_info + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + m_registration_info( + -, + m_service_consumer_id( + p_app_instance_id + ))))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_registration_info( + mw_registration_info( + ?, + mw_service_consumer_id( + p_app_instance_id + ))))))) -> value v_response { + tc_ac.stop; + + p_registration_info := v_response.response.body.json_body.registrationInfo; + log("f_create_application_mobility_services: INFO: IUT successfully responds to the registration: ", p_registration_info); + } + [] tc_ac.timeout { + log("f_create_application_mobility_services: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_application_mobility_services + + function f_delete_application_mobility_services( + in Json.String p_app_mobility_service_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(p_app_mobility_service_id, "UTF-8")), + v_headers + ))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_application_mobility_services: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_delete_application_mobility_services + + function f_create_adjacent_app_instance_info( + in Json.String p_app_instance_id := PX_APP_INS_ID, + in Json.String p_app_id := PX_APP_ID, + in template (value) CommunicationInterface p_communication_interface, + out AdjacentAppInstanceInfo p_adjacent_app_instance_info + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers, + m_http_message_body_json( + m_body_json_ams_adjacent_app_instance_info( + m_adjacent_app_instance_info( + p_app_instance_id, + p_app_id, + p_communication_interface + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_adjacent_app_instance_info( + mw_adjacent_app_instance_info( + p_app_instance_id, + p_app_id + )))))) -> value v_response { + tc_ac.stop; + + p_adjacent_app_instance_info := v_response.response.body.json_body.adjacentAppInstanceInfo; + log("f_create_adjacent_app_instance_info: INFO: IUT successfully responds to the adjacentAppInstanceInfo: ", p_adjacent_app_instance_info); + } + [] tc_ac.timeout { + log("f_create_adjacent_app_instance_info: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_adjacent_app_instance_info + + function f_delete_adjacent_app_instance_info( + in Json.String p_app_instance_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(p_app_instance_id, "UTF-8")), + v_headers + ))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_adjacent_app_instance_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_delete_adjacent_app_instance_info + + function f_create_mobility_procedure_subscription( + out MobilityProcedureSubscription p_mobility_procedure_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + m_filter_criteria, + -, -, -, + { seconds := (f_get_current_timestamp_utc() / 1000) + 60, nanoSeconds := 0 } + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_mobility_procedure_subscription( + mw_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + mw_filter_criteria, + mw_links + )))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_APP_AMS_SUBS & "/(?*)", + 0 + ); + p_mobility_procedure_subscription := v_response.response.body.json_body.mobilityProcedureSubscription; + log("f_create_mobility_procedure_subscription: INFO: IUT successfully responds to the subscription: ", p_mobility_procedure_subscription); + log("f_create_mobility_procedure_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_mobility_procedure_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_mobility_procedure_subscription + + function f_delete_mobility_procedure_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & p_subscription_id, + v_headers + ))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + } + [] tc_ac.timeout { + log("f_delete_mobility_procedure_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_delete_mobility_procedure_subscription + + function f_create_adjacent_appInfo_subscription( + out AdjacentAppInfoSubscription p_adjacent_appInfo_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_ams_adjacent_appInfo_subscription( + m_adjacent_app_info_subscription( + PX_CALLBACK_REFERENCE, + m_adjacent_filter_criteria + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_adjacent_appInfo_subscription( + mw_adjacent_app_info_subscription( + PX_CALLBACK_REFERENCE, + mw_adjacent_filter_criteria, + mw_links + )))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_APP_AMS_SUBS & "/(?*)", + 0 + ); + p_adjacent_appInfo_subscription := v_response.response.body.json_body.adjacentAppInfoSubscription; + log("f_create_adjacent_appInfo_subscription: INFO: IUT successfully responds to the subscription: ", p_adjacent_appInfo_subscription); + log("f_create_adjacent_appInfo_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_adjacent_appInfo_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_adjacent_appInfo_subscription + + function f_delete_adjacent_appInfo_subscription( // FIXME To be merged with f_delete_mobility_procedure_subscription into f_delete_subscription + in charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & p_subscription_id, + v_headers + ))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + } + [] tc_ac.timeout { + log("f_delete_adjacent_appInfo_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_delete_adjacent_appInfo_subscription } // End of module ApplicationMobilityServiceAPI_Functions diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pics.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pics.ttcn index 640f0884c5de5193e42e5e725921c34a01b21659..89a128a697a30490df4c971e7ee96e6cd1d98644 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pics.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pics.ttcn @@ -1,6 +1,11 @@ module ApplicationMobilityServiceAPI_Pics { // JSON - import from JSON all; + import from Json all; + /** + * @desc Does the IUT support LocationAPI? + */ + modulepar boolean PICS_AMS_API_SUPPORTED := true; + } // End of module ApplicationMobilityServiceAPI_Pics diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn index 18403eff705c32b3b94cb7c859d5f372533411fd..6b6d4858fb06245c067deeb7df5bd8212815b7d1 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn @@ -1,6 +1,33 @@ module ApplicationMobilityServiceAPI_Pixits { // JSON - import from JSON all; + import from Json all; + + // LibMec/ApplicationMobilityServiceAPI + import from ApplicationMobilityServiceAPI_TypesAndValues all; + + modulepar Json.String PX_APP_INS_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"; + + modulepar Json.String PX_APP_INS_ID_2 := "4e92055c-c594-11ee-8535-13445063b38e"; + + modulepar Json.String PX_APP_INS_ID_NEW := "d1e24122-c596-11ee-9ffa-33159308a999"; + + modulepar Json.String PX_APP_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"; + + modulepar Json.String PX_APP_ID_2 := "4e92055c-c594-11ee-8535-13445063b38e"; + + modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID"; + + modulepar Json.String PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID := "PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID"; + + modulepar Json.String PX_CALLBACK_REFERENCE := "http://127.0.0.1/callback"; + + modulepar charstring PX_CALLBACK_URI := "http://127.0.0.1/callback"; + + modulepar Json.String PX_MEP_ID := ""; + + modulepar Json.String PX_HOST := ""; + + modulepar UInt16 PX_PORT := 12345 } // End of module ApplicationMobilityServiceAPI_Pixits diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn index b1085637496ab58e95e38c3002d6965155d2281e..6426d0688a3496be95018da208f2dc818eb35499 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn @@ -1,9 +1,341 @@ module ApplicationMobilityServiceAPI_Templates { // JSON - import from JSON all; + import from Json all; + + // MEC 012 + import from RnisAPI_TypesAndValues all; // LibMec/ApplicationMobilityServiceAPI import from ApplicationMobilityServiceAPI_TypesAndValues all; + import from ApplicationMobilityServiceAPI_Pixits all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + template (omit) RegistrationInfo m_registration_info( + in template (omit) Json.String p_app_mobility_service_id := omit, + in template (value) ServiceConsumerId p_serviceConsumerId, + in template (omit) DeviceInformation p_deviceInformation := omit, + in template (omit) UInt32 p_expiryTime := omit + ) := { + appMobilityServiceId := p_app_mobility_service_id, + serviceConsumerId := p_serviceConsumerId, + deviceInformation := p_deviceInformation, + expiryTime := p_expiryTime + } // End of template m_registration_info + + template (present) RegistrationInfo mw_registration_info( + template (present) Json.String p_app_mobility_service_id := ?, + template (present) ServiceConsumerId p_serviceConsumerId := ?, + template DeviceInformation p_deviceInformation := *, + template UInt32 p_expiryTime := * + ) := { + appMobilityServiceId := p_app_mobility_service_id, + serviceConsumerId := p_serviceConsumerId, + deviceInformation := p_deviceInformation, + expiryTime := p_expiryTime + } // End of template m_registration_info + + template (omit) ServiceConsumerId m_service_consumer_id( + in template (omit) Json.String p_appInstanceId := omit, + in template (omit) Json.String p_mepId := omit + ) := { + appInstanceId := p_appInstanceId, + mepId := p_mepId + } // End of template m_service_consumer_id + + template ServiceConsumerId mw_service_consumer_id( + template String p_appInstanceId := *, + template String p_mepId := * + ) := { + appInstanceId := p_appInstanceId, + mepId := p_mepId + } // End of template mw_service_consumer_id + + template (omit) DeviceInformation_ m_device_info( + in Json.String p_associate_id, + in template (omit) AppMobilityServiceLevel p_appMobilityServiceLevel := omit, + in template (omit) ContextTransferState p_contextTransferState := omit + ) := { + associateId := p_associate_id, + appMobilityServiceLevel := p_appMobilityServiceLevel, + contextTransferState := p_contextTransferState + } // End of template m_device_info + + template (present) DeviceInformation_ mw_device_info( + template (present) Json.String p_associate_id := ?, + template AppMobilityServiceLevel p_appMobilityServiceLevel := *, + template ContextTransferState p_contextTransferState := * + ) := { + associateId := p_associate_id, + appMobilityServiceLevel := p_appMobilityServiceLevel, + contextTransferState := p_contextTransferState + } // End of template mw_device_info + + template (omit) MobilityProcedureSubscription m_mobility_procedure_subscription( + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (value) FilterCriteria p_filterCriteria, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "MobilityProcedureSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } // End of template m_mobility_procedure_subscription + + template (omit) MobilityProcedureSubscription m_mobility_procedure_subscription_error( + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (value) FilterCriteria p_filterCriteria, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) modifies m_mobility_procedure_subscription := { + subscriptionType := "MobilityProcedureSub" + } // End of template m_mobility_procedure_subscription_error + + template (present) MobilityProcedureSubscription mw_mobility_procedure_subscription( + template Json.AnyURI p_callbackReference := *, + template (present) FilterCriteria p_filterCriteria := ?, + template ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "MobilityProcedureSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } // End of template mw_mobility_procedure_subscription + + template (omit) FilterCriteria m_filter_criteria( + in template (omit) Json.String p_appInstanceId := omit, + in template (omit) AssociateId p_associateId := omit, + in template (omit) MobilityStatus p_mobilityStatus := omit + ) := { + appInstanceId := p_appInstanceId, + associateId := p_associateId, + mobilityStatus := p_mobilityStatus + } // End of template m_filter_criteria + + template FilterCriteria mw_filter_criteria( + template Json.String p_appInstanceId := *, + template AssociateId p_associateId := *, + template MobilityStatus p_mobilityStatus := * + ) := { + appInstanceId := p_appInstanceId, + associateId := p_associateId, + mobilityStatus := p_mobilityStatus + } // End of template mw_filter_criteria + + template (omit) AdjacentAppInstanceInfo m_adjacent_app_instance_info( + in template (value) Json.String p_appInstanceId, + in template (value) Json.String p_appDId, + in template (value) CommunicationInterface p_appInstanceCommLink, + in template (omit) MECHostInformation p_mecHostInformation := omit, + in template (omit) Json.String p_registeredInstanceId := omit + ) := { + appInstanceId := p_appInstanceId, + appDId := p_appDId, + appInstanceCommLink := p_appInstanceCommLink, + mecHostInformation := p_mecHostInformation, + registeredInstanceId := p_registeredInstanceId + } // End of template m_adjacent_app_instance_info + + template (present) AdjacentAppInstanceInfo mw_adjacent_app_instance_info( + template (present) Json.String p_appInstanceId := ?, + template (present) Json.String p_appDId := ?, + template (present) CommunicationInterface p_appInstanceCommLink := ?, + template MECHostInformation p_mecHostInformation := *, + template Json.String p_registeredInstanceId := * + ) := { + appInstanceId := p_appInstanceId, + appDId := p_appDId, + appInstanceCommLink := p_appInstanceCommLink, + mecHostInformation := p_mecHostInformation, + registeredInstanceId := p_registeredInstanceId + } // End of template mw_adjacent_app_instance_info + + template (omit) CommunicationInterface m_communication_interface( + in template (omit) IpAddresses p_ipAddresses := omit + ) := { + ipAddresses := p_ipAddresses + } // End of template m_communication_interface + + template CommunicationInterface mw_communication_interface( + template IpAddresses p_ipAddresses := * + ) := { + ipAddresses := p_ipAddresses + } // End of template mw_communication_interface + + template (omit) AdjacentAppInfoSubscription m_adjacent_app_info_subscription( + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (value) AdjacentFilterCriteria p_filterCriteria, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "AdjacentAppInfoSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } // End of template m_adjacent_app_info_subscription + + template (present) AdjacentAppInfoSubscription mw_adjacent_app_info_subscription( + template Json.AnyURI p_callbackReference := *, + template (present) AdjacentFilterCriteria p_filterCriteria := ?, + template ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "AdjacentAppInfoSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } // End of template mw_adjacent_app_info_subscription + + template (omit) AdjacentFilterCriteria m_adjacent_filter_criteria( + in template (omit) Json.String p_appInstanceId := omit + ) := { + appInstanceId := p_appInstanceId + } // End of template m_adjacent_filter_criteria + + template AdjacentFilterCriteria mw_adjacent_filter_criteria( + template Json.String p_appInstanceId := * + ) := { + appInstanceId := p_appInstanceId + } // End of template mw_adjacent_filter_criteria + + template (value) MobilityProcedureNotification m_mobility_procedure_notification( + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links, + in template (value) AssociateId p_associateId, + in template (value) MobilityStatus p_mobilityStatus, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) TargetAppInfo p_targetAppInfo := omit + ) := { + notificationType := "MobilityProcedureNotification", + timeStamp := p_timeStamp, + associateId := p_associateId, + mobilityStatus := p_mobilityStatus, + targetAppInfo := p_targetAppInfo, + links := p_links + } // End of template m_mobility_procedure_notification + + template (present) MobilityProcedureNotification mw_mobility_procedure_notification( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := ?, + template (present) AssociateId p_associateId := ?, + template (present) MobilityStatus p_mobilityStatus := ?, + template TimeStamp p_timeStamp := *, + template TargetAppInfo p_targetAppInfo := * + ) := { + notificationType := "MobilityProcedureNotification", + timeStamp := p_timeStamp, + associateId := p_associateId, + mobilityStatus := p_mobilityStatus, + targetAppInfo := p_targetAppInfo, + links := p_links + } // End of template mw_mobility_procedure_notification + + template (omit) AdjacentAppInfoNotification m_adjacent_app_info_notification( + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links, + in template (omit) AdjacentAppInfo p_adjacentAppInfo := omit, + in template (omit) TimeStamp p_timeStamp := omit + ) :={ + notificationType := "AdjacentAppInfoNotification", + timeStamp := p_timeStamp, + adjacentAppInfo := p_adjacentAppInfo, + links := p_links + } // End of template m_adjacent_app_info_notification + + template (present) AdjacentAppInfoNotification mw_adjacent_app_info_notification( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := ?, + template AdjacentAppInfo p_adjacentAppInfo := *, + template TimeStamp p_timeStamp := * + ) :={ + notificationType := "AdjacentAppInfoNotification", + timeStamp := p_timeStamp, + adjacentAppInfo := p_adjacentAppInfo, + links := p_links + } // End of template mw_adjacent_app_info_notification + + template (omit) ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification m_expire_notification( + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links, + in template (omit) TimeStamp p_timestamp := omit + ) := { + notificationType := "ExpiryNotification", + timeStamp := p_timestamp, + links := p_links + } // End of template m_expire_notification + + template (present) ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification mw_expire_notification( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := ?, + template TimeStamp p_timestamp := * + ) := { + notificationType := "ExpiryNotification", + timeStamp := p_timestamp, + links := p_links + } // End of template mw_expire_notification + + template (value) ApplicationMobilityServiceAPI_TypesAndValues.SubscriptionLinkList m_subscription_link_list( + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links, + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Subscription p_subscription + ) := { + links := p_links, + subscription := p_subscription + } // End of template m_subscription_link_list + + template (present) ApplicationMobilityServiceAPI_TypesAndValues.SubscriptionLinkList mw_subscription_link_list( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := ?, + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Subscription p_subscription := ? + ) := { + links := p_links, + subscription := p_subscription + } // End of template mw_subscription_link_list + + template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links m_links( + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.LinkType p_self_ + ) := { + self_ := p_self_ + } // End of template m_links + + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links mw_links( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.LinkType p_self_ := ? + ) := { + self_ := p_self_ + } // End of template mw_links + + template (value) ApplicationMobilityServiceAPI_TypesAndValues.Subscription m_subscription( + in template (value) Json.AnyURI p_href, + in template (value) Json.String p_subscriptionType + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template m_subscription + + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Subscription mw_subscription( + template (present) Json.AnyURI p_href := ?, + template (present) Json.String p_subscriptionType := ? + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template mw_subscription } // End of module ApplicationMobilityServiceAPI_Templates diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn index b60fc87de50b9e48a72c0369058f0fbfbc8a63c9..c9b400f6eda38d593f6887c80d559871050be082 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn @@ -1,15 +1,313 @@ +/** + * @author ETSI / STF569 / TTF T027 + * @version $Url$ + * $Id$ + * @desc Types and Values for ETSI GS MEC 021 V3.1.1 (2023-10) + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + */ module ApplicationMobilityServiceAPI_TypesAndValues { // JSON - import from JSON all; + import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; + // MEC 012 + import from RnisAPI_TypesAndValues all; + + /** + * @desc This data type represents the registration information used in the registration API of Application Mobility Service + * @member appMobilityServiceId The identifier of registered Application Mobility Service + * @member serviceConsumerId The identifier of service consumer requesting the Application Mobility Service + * @member deviceInformation Specifies the device served by the application instance which is registering the Application Mobility Service + * @member expiryTime Indicates the time of Application Mobility Service expiration from the time of registration accepted + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo + */ + type record RegistrationInfo { + Json.String appMobilityServiceId, + ServiceConsumerId serviceConsumerId, + DeviceInformation deviceInformation optional, + Json.UInteger expiryTime optional + } + type set of RegistrationInfo RegistrationInfos; + + /** + * @desc The identifier of service consumer requesting the Application Mobility Service + * @member appInstanceId Represents the identifier of the application instance registering the Application Mobility Service + * @member mepId Represents the identifier of the MEC platform registering the Application Mobility Service + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo + */ + type record ServiceConsumerId { + Json.String appInstanceId optional, + Json.String mepId optional + } + type set of ServiceConsumerId ServiceConsumerIds; + + /** + * @desc Specifies the device served by the application instance which is registering the Application Mobility Service + * @member associateId Represents the identifier of the device + * @member appMobilityServiceLevel If the application is stateful, this attribute shall be included + * @member contextTransferState If present, it represents the state of transferring the user context to another application instance + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo + */ + type record DeviceInformation_ { + Json.String associateId, + AppMobilityServiceLevel appMobilityServiceLevel optional, + ContextTransferState contextTransferState optional + } + type set of DeviceInformation_ DeviceInformation; + + /** + * @desc Represents the state of transferring the user context to another application instance + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo + */ + type enumerated ContextTransferState { + NOT_TRANSFERRED, + USER_CONTEXT_TRANSFER_COMPLETED + } with { + variant "JSON: as number" + } + + /** + * @desc This data type represents the adjacent application instance information of the adjacent_app_instances resource + * @member appInstanceId Identifier of the application instance + * @member appDId Identifier of the application descriptor + * @member appInstanceCommLink It specifies the communication interface of application instance + * @member mecHostInformation The MEC host where the application instance is running on + * @member registeredInstanceId Identifier of the application instance that registers to the AMS, which is instantiated from the application descriptor identified by the attribute "appDId" + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.3-1: Attributes of AdjacentAppInstanceInfo + */ + type record AdjacentAppInstanceInfo { + Json.String appInstanceId, + Json.String appDId, + CommunicationInterface appInstanceCommLink, + MECHostInformation mecHostInformation optional, + Json.String registeredInstanceId optional + } + type set of AdjacentAppInstanceInfo AdjacentAppInstanceInfos; + + /** + * @desc This type represents a subscription to mobility procedure notifications from AMS + * @member subscriptionType Shall be set to "MobilityProcedureSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteria List of filtering criteria for the subscription + * @member expiryDeadline Identifies a boundary after which the subscription will expire + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription + */ + type record MobilityProcedureSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteria filterCriteria, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + type set of MobilityProcedureSubscription MobilityProcedureSubscriptions; + + /** + * @desc Hyperlink related to the resource + * @member self_ Self-referring URI + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription + */ + type record Links { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + /** + * @desc List of filtering criteria for the subscription + * @member appInstanceId Identifier of the application instance that registers to the Application Mobility Service + * @member associateId Identifiers to associate the information for specific UE(s) and flow(s) + * @member mobilityStatus In case mobilityStatus is not included in the subscription request + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription + */ + type record FilterCriteria { + Json.String appInstanceId optional, + AssociateId associateId optional, + MobilityStatus mobilityStatus optional + } + type set of FilterCriteria FilterCriterias; + + /** + * @desc This type represents a subscription to notification about the change on adjacent application instance information from AMS + * @member subscriptionType Shall be set to "AdjacentAppInfoSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteria List of filtering criteria for the subscription + * @member expiryDeadline Identifies a boundary after which the subscription will expire + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.3-1: Attributes of the AdjacentAppInfoSubscription + */ + type record AdjacentAppInfoSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + AdjacentFilterCriteria filterCriteria, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + type set of AdjacentAppInfoSubscription AdjacentAppInfoSubscriptions; + + /** + * @desc List of filtering criteria for the subscription + * @member appInstanceId Identifier of the application instance that registers to the Application Mobility Service + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.3-1: Attributes of the AdjacentAppInfoSubscription + */ + type record AdjacentFilterCriteria { + Json.String appInstanceId optional + } + + /** + * @desc This type represents a list of links related to currently existing subscriptions for the service consumer + * @member links The URI referring to the subscription + * @member subscription The service consumer's subscriptions + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.4-1: Attributes of the SubscriptionLinkList + */ + type record SubscriptionLinkList { + Links links, + Subscription subscription + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc The service consumer's subscriptions + * @member href The URI referring to the subscription + * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.4-1: Attributes of the SubscriptionLinkList + */ + type record Subscription { + Json.AnyURI href, + Json.String subscriptionType + } + + /** + * @desc This type represents a notification from AMS with regards to mobility procedure + * @member notificationType Shall be set to "MobilityProcedureNotification" + * @member timeStamp Date and time of the generation of the notification + * @member associateId Identifiers to associate the information for specific UE(s) and flow(s) + * @member mobilityStatus Indicate the status of the UE mobility + * @member targetAppInfo Identifiers to associate the information of target application instance + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.2-1: Attributes of the MobilityProcedureNotification + */ + type record MobilityProcedureNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + AssociateId associateId, + MobilityStatus mobilityStatus, + TargetAppInfo targetAppInfo optional, + Links links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Identifiers to associate the information of target application instance + * @member appInstanceId Identifiers of the target application instance + * @member CommunicationInterface It specifies the communication interface of the application instance + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.2-1: Attributes of the MobilityProcedureNotification + */ + type record TargetAppInfo { + Json.String appInstanceId, + CommunicationInterface commInterface optional + } + + /** + * @desc Indicate the status of the UE mobility + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.2-1: Attributes of the MobilityProcedureNotification + */ + type enumerated MobilityStatus { + INTERHOST_MOVEOUT_TRIGGERED (1), + INTERHOST_MOVEOUT_COMPLETED (2), + INTERHOST_MOVEOUT_FAILED (3) + } with { + variant "JSON: as number" + } + + /** + * @desc This type represents a notification from AMS with regards to change on adjacent application instances information + * @member notificationType Shall be set to "MobilityProcedureNotification" + * @member timeStamp Date and time of the generation of the notification + * @member adjacentAppInfo 0 to N identifiers to associate the information for adjacent application instances + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.3-1: Attributes of the AdjacentAppInfoNotification + */ + type record AdjacentAppInfoNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + AdjacentAppInfo adjacentAppInfo optional, + Links links + } with { + variant (links) "name as '_links'"; + } + + type set of TargetAppInfo AdjacentAppInfo; + + /** + * @desc This data type represents a notification from AMS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "ExpiryNotification" + * @member timeStamp Date and time of the generation of the notification + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.4-1: Attributes of the ExpiryNotification + */ + type record ExpiryNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Links links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This data type represents the Application Mobility Service level information used in the Application Mobility Service APIs + * @member appMobilityServiceLevel Provides an option for the application instance (server) to communicate with the application client before relocating this application instance to another MEC host + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.5-1: Attributes of AppMobilityServiceLevel + */ + type record AppMobilityServiceLevel { + AppMobilityServiceLevelEnmu appMobilityServiceLevel + } + + /** + * @desc Provides an option for the application instance (server) to communicate with the application client before relocating this application instance to another MEC host + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.5-1: Attributes of AppMobilityServiceLevel + */ + type enumerated AppMobilityServiceLevelEnmu { + APP_MOBILITY_NOT_ALLOWED (1), + APP_MOBILITY_WITH_CONFIRMATION (2), + APP_MOBILITY_WITHOUT_CONFIRMATION (3) + } with { + variant "JSON: as number" + } + + /** + * @desc This data type represents a notification from AMS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "TestNotification" + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.6-1: Attributes of the TestNotification + */ + type record TestNotification { + Json.String notificationType, + Links links + } with { + variant (links) "name as '_links'"; + } /** * @desc This type represents the communication interface of an application instance * @member ipAddresses Entry point information of the service as one or more pairs of IP address and port - * @see ETSI GS MEC 021 Clause 7.5.2 Type: CommunicationInterface + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 7.5.2 Type: CommunicationInterface */ type record CommunicationInterface { IpAddresses ipAddresses optional @@ -19,15 +317,59 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @desc Entry point information of the service as one or more pairs of IP address and port * @member host Host portion of the address * @member port Port portion of the address - * @see ETSI GS MEC 021 Clause 7.5.2 Type: CommunicationInterface + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 7.5.2 Type: CommunicationInterface */ type record IpAddress { - JSON.String host, - UInt32 port_ + Json.String host, + Json.UInteger port_ } with { variant (port_) "name as 'port'"; } - type record length(1..infinity) of IpAddress IpAddresses; + /** + * @desc This type represents a type of link + * @member href URI referring to a resource + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 7.5.4 Type: LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc The type represents the parameters of MEC host information + * @member hostName Human-readable name of MEC host + * @member hostId Deployment-specific information to identify a MEC host + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.5.5-1: Attributes of MECHostInformation + */ + type record MECHostInformation { + Json.String hostName optional, + KeyValuePairs hostId + } + + /** + * @desc This data type represents a list of key-value pairs + * @member key_name + * @member key_value + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 6.2.5.3 Type: KeyValuePairs + */ + type record KeyValuePairs { + Json.String key_name, + anytype key_value // FIXME To be refined + } + + /** + * @desc This type represents configuration for the delivery of subscription notifications over Websockets + * @member websocketUri Set by location server to indicate to the service consumer the Websocket URI to be used for delivering notifications + * @member requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 7.5.7 Type: WebsockNotifConfig + */ + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional + } + +} with { + extension "anytype integer, float, boolean, universal charstring"; + encode "JSON" } // End of module ApplicationMobilityServiceAPI_TypesAndValues diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn index ba95c97ee03e3c7d973e0a6f1b44695b5e7bb767..ecff7dd1a8cc6cf36b974ddb100d60fef232b788 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn @@ -1,3 +1,510 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Functions { + // JSON + import from Json all; + + // Libcommon + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Templates all; + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pics all; + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits all; + + // LibMec + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + function f_create_grant_request( + out Grant p_grant + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEO_GRANT_URI, + v_headers, + m_http_message_body_json( + m_body_json_grant_request( + m_grant_request( + PX_APP_INSTANCE_ID, + PX_APP_LCM_OP_OCC_ID, + PX_APP_ID, + INSTANTIATE, + m_grant_request_link( + m_link_type(PX_APP_LCM_OP_OCC_ID_URI), + m_link_type(PX_APP_INSTANCE_ID_URI) + ), + { + m_resource_definition( + "", // TODO + -, + { "" }, // TODO + m_resource_definition_resource( + m_vim_connection_info( + "", // TODO + "" // TODO + ), + "" // TODO + )) + } + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_grant_response( + mw_grant + ))))) -> value v_response { + tc_ac.stop; + p_grant := v_response.response.body.json_body.grantResponse; + log("f_create_grant_request: INFO: IUT successfully responds to the GrantRequest: ", p_grant); + } + [] tc_ac.timeout { + log("f_create_grant_request: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_grant_request + + function f_delete_grant_request( + out Json.String p_grant_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(p_grant_id)), + v_headers + ))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_grant_request: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_grant_request + + function f_create_package_management( + out AppPkgInfo p_app_pkg_info, + in boolean p_onboarded := false + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEO_PKGM_URI, + v_headers, + m_http_message_body_json( + m_body_json_create_package_management( + m_create_package_management( + PX_APP_PKG_NAME, + PX_APP_PKG_VERSION, + m_checksum(-, PX_CHECKSUM), + PX_APP_PKG_PATH + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_pkg_info( + mw_app_pkg_info( + -, -, + PX_APP_PKG_NAME, + PX_APP_PKG_VERSION, + -, + mw_checksum + )))))) -> value v_response { + tc_ac.stop; + + p_app_pkg_info := v_response.response.body.json_body.appPkgInfo; + log("f_create_package_management: INFO: IUT successfully responds to the CreateAppPkg: ", p_app_pkg_info); + } + [] tc_ac.timeout { + log("f_create_package_management: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_package_management + + function f_delete_package_management( + in Json.String p_pkg_info_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_MEO_PKGM_URI & oct2char(unichar2oct(p_pkg_info_id)), + v_headers + ))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_package_management: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_delete_package_management + + function f_create_app_pkg_subscription( + out AppPkgSubscriptionInfo p_app_pkg_subscription_info, + in charstring p_uri := PX_MEO_PKGM_SUBS, + in Json.AnyURI p_callback_uri := PX_CALLBACK_URI + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & p_uri, + v_headers, + m_http_message_body_json( + m_body_json_pkgm_subscription( + m_app_pkg_info_subscription( + p_callback_uri + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_pkgm_subscription_info( + mw_app_pkg_subscription_info( + -, + -, + PX_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; + p_app_pkg_subscription_info := v_response.response.body.json_body.appPkgSubscriptionInfo; + log("f_create_app_pkg_subscription: INFO: IUT responds to the AppPkgSubscriptionInfo: ", p_app_pkg_subscription_info); + } + [] tc_ac.timeout { + log("f_create_app_pkg_subscription: INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_create_app_pkg_subscription + + function f_delete_app_pkg_subscription( + in Json.String p_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_MEO_PKGM_SUBS & oct2char(unichar2oct(p_id)), + v_headers + ))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_app_pkg_subscription: INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_delete_app_pkg_subscription + + function f_create_app_instance( + out AppPkgInfo p_app_pkg_info, + out AppInstanceInfo p_app_instance_info + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + f_create_package_management(p_app_pkg_info); + if (not(isbound(p_app_pkg_info))) { + log("f_create_app_instance: Failed to create pkg"); + return; + } + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI, + v_headers, + m_http_message_body_json( + m_body_json_create_app_instance_request( + m_create_app_instance_request( + p_app_pkg_info.appDId, + p_app_pkg_info.appName & "_1" + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_instance_info( + mw_app_instance_info( + -, + p_app_pkg_info.appDId + )))))) -> value v_response { + tc_ac.stop; + p_app_instance_info := v_response.response.body.json_body.appInstanceInfo; + log("f_create_app_pkg_subscription: INFO: IUT responds to the AppInstanceInfo: ", p_app_instance_info); + } + [] tc_ac.timeout { + log("f_create_app_pkg_subscription: : INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_create_app_instance + + function f_delete_app_instance( + in Json.String p_app_pkg_info_id, + in Json.String p_app_instance_info_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(p_app_instance_info_id)), + v_headers + ))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_app_instance: : INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + f_delete_package_management(p_app_pkg_info_id); + } // End of function f_delete_app_instance + + function f_instanciate_app_instance( + out AppPkgInfo p_app_pkg_info, + out AppInstanceInfo p_app_instance_info, + out charstring p_app_lcm_op_occ_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + + f_create_app_instance(v_app_pkg_info, v_app_instance_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "instantiate", + v_headers, + m_http_message_body_json( + m_body_json_instantiate_app_request( + m_instantiate_app_request( + m_selected_mec_host_info( + { + { key_name := PX_ONBOARD_HOSTID_NAME, key_value := { universal charstring := PX_ONBOARD_HOSTID_VALUE } } + } + ))))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) -> value v_response { + tc_ac.stop; + + var charstring_list v_header_value; + if (f_check_headers(v_response.response.header)) { + f_get_header(v_response.response.header, "Location", v_header_value); + p_app_lcm_op_occ_id := regexp( + v_header_value[0], + PX_MEX_LCM_OP_OCC_URI & "/(?*)", + 0 + ); + log("f_instanciate_app_instance: IUT successfully responds with the correct header Location ", p_app_lcm_op_occ_id); + } + } + [] tc_ac.timeout { + log("f_instanciate_app_instance: INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_instanciate_app_instance + + function f_terminate_app_instance( + in Json.String p_app_pkg_info_id, + in Json.String p_app_instance_info_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "instantiate", + v_headers, + m_http_message_body_json( + m_body_json_terminate_app_request( + m_terminate_app_request + ))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_terminate_app_instance: INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + f_delete_app_instance(p_app_pkg_info_id, p_app_instance_info_id); + } // End of function f_terminate_app_instance + + function f_create_app_instance_subscription( + out AppInstSubscriptionInfo p_app_inst_subscription_info + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_app_inst_subscription_request( + m_app_inst_subscription_request( + PX_APP_INST_SUBSCRIPTION_REQUEST, // Wrong subscription request + PX_CALLBACK_URI + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_inst_subscription_info( + mw_app_inst_subscription_info( + -, + PX_APP_INST_SUBSCRIPTION_REQUEST, + PX_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; + + p_app_inst_subscription_info := v_response.response.body.json_body.appInstSubscriptionInfo; + log("f_create_app_pkg_subscription: IUT responds to the AppInstSubscriptionInfo: ", p_app_inst_subscription_info); + } + [] tc_ac.timeout { + log("f_create_app_pkg_subscription: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_create_app_instance_subscription + + function f_delete_app_instance_subscription( + in Json.String p_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_MEX_LCM_SUBS & oct2char(unichar2oct(p_id)), + v_headers + ))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + ))) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_create_app_pkg_subscription: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_delete_app_instance_subscription + } // End of ApplicationPackageLifecycleAndOperationGrantingAPI_Functions diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pics.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pics.ttcn index 6ca4b5049e16d4c5ae23f8df159159ae0a1b2502..813a09832bc1b64fcf4241feaa8b4333bb0a736a 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pics.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pics.ttcn @@ -1,5 +1,11 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Pics { + modulepar boolean PICS_IUT_MEO := true; + + modulepar boolean PICS_IUT_MEPM := false; + + modulepar boolean PICS_IUT_MEX := false; + /** * @desc Does the IUT support GRANT? */ diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn index b80eed4e26ee4550dbf94983016a86765ea49643..027b5cc26de1b7a01049a4b03b3da2a6b7d6accc 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn @@ -1,55 +1,86 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits { // JSON - import from JSON all; + import from Json all; // LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; - modulepar JSON.String PX_APP_INSTANCE_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1a"; + modulepar Json.String PX_APP_INSTANCE_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1a"; - modulepar JSON.String PX_NON_EXISTING_APP_INSTANCE_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1b"; + modulepar Json.String PX_NON_EXISTING_APP_INSTANCE_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1b"; - modulepar JSON.String PX_APP_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1c"; + modulepar Json.String PX_APP_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1c"; - modulepar OperationType PX_APP_OPERATION := INSTANTIATE; + modulepar OperationType PX_APP_OPERATION := OPERATE; modulepar OperationType PX_APP_OPERATION_ERROR := INSTANTIATE; - modulepar JSON.String PX_APP_LCM_OP_OCC_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1c" + modulepar Json.String PX_APP_LCM_OP_OCC_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1c" - modulepar JSON.String PX_GRANTING_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3"; + modulepar Json.String PX_APP_NON_EXISTANT_LCM_OP_OCC_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1c" + + modulepar Json.AnyURI PX_APP_LCM_OP_OCC_ID_URI := "/app_lcm/v1/app_lcm_op_occs/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1c"; + + modulepar Json.AnyURI PX_APP_INSTANCE_ID_URI := ""; + + modulepar Json.String PX_GRANTING_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3"; - modulepar JSON.String PX_NON_EXISTANT_GRANTING_ID := "PX_NON_EXISTANT_GRANTING_ID"; + modulepar Json.String PX_NON_EXISTANT_GRANTING_ID := "PX_NON_EXISTANT_GRANTING_ID"; + modulepar Json.String PX_TRAFFIC_RULE_ID := "PX_TRAFFIC_RULE_ID"; + modulepar FilterType PX_TRAFFIC_FILTERTYPE := FLOW; - modulepar JSON.String PX_APP_PKG_NAME := "APP_PKG_NAME" + modulepar Json.Integer PX_TRAFFIC_RULE_PRIORITY := 0; - modulepar JSON.String PX_APP_PKG_VERSION := "APP_PKG_VERSION" + modulepar Action PX_TRAFFIC_RULE_ACTION := PASSTHROUGH; - modulepar JSON.String PX_CHECKSUM := "CHECKSUM" + modulepar Json.String PX_TRAFFIC_FILTER_SRC_ADDRESS := ""; - modulepar JSON.String PX_APP_PKG_PATH := "APP_PKG_PATH" + modulepar Json.String PX_TRAFFIC_FILTER_DST_ADDRESS := ""; - modulepar OperationalState PX_OPERATIONAL_STATE := STARTED + modulepar Json.String PX_TRAFFIC_FILTER_SRC_PORT := "12345"; - modulepar UsageState PX_USAGE_STATE := NOT_IN_USE + modulepar Json.String PX_TRAFFIC_FILTER_DST_PORT := "12346"; - modulepar JSON.String PX_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f" + modulepar Json.String PX_TRAFFIC_FILTER_PROTOCOL := ""; + + modulepar Json.String PX_APP_PKG_NAME := "APP_PKG_NAME"; + + modulepar Json.String PX_APP_PKG_VERSION := "APP_PKG_VERSION"; + + modulepar Json.String PX_CHECKSUM := "CHECKSUM"; + + modulepar Json.String PX_APP_PKG_PATH := "APP_PKG_PATH"; - modulepar JSON.String PX_ON_BOARDED_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f" + modulepar OperationalState PX_OPERATIONAL_STATE := STARTED; - modulepar JSON.String PX_NON_EXISTENT_APP_PKG_ID := "NON_EXISTENT_APP_PKG_ID" + modulepar UsageState PX_USAGE_STATE := NOT_IN_USE; - modulepar JSON.String PX_NON_EXISTENT_ON_BOARDED_APP_PKG_ID := "NON_ON_BOARDED_EXISTENT_APP_PKG_ID" + modulepar Json.String PX_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"; - modulepar JSON.AnyURI PX_CALLBACK_URI := "http://127.0.0.1/callback" + modulepar Json.String PX_ON_BOARDED_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"; - modulepar JSON.String PX_SUBSCRIPTION_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3" + modulepar Json.String PX_NON_EXISTENT_APP_PKG_ID := "NON_EXISTENT_APP_PKG_ID"; + + modulepar Json.String PX_NON_EXISTENT_ON_BOARDED_APP_PKG_ID := "NON_ON_BOARDED_EXISTENT_APP_PKG_ID"; + + modulepar Json.AnyURI PX_CALLBACK_URI := "http://127.0.0.1/callback"; - modulepar JSON.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID" + modulepar Json.String PX_APP_INST_SUBSCRIPTION_REQUEST := "AppInstSubscriptionRequest"; + // AppLcmOpOccSubscriptionRequest + // AppInstIdCreationSubscriptionRequest + // AppInstIdDeletionSubscriptionRequest - modulepar JSON.AnyURI PX_APP_PKG_HREF := ""; + modulepar Json.String PX_SUBSCRIPTION_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3"; + + modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID"; + modulepar Json.AnyURI PX_APP_PKG_HREF := ""; + + modulepar Json.String PX_ONBOARD_HOSTID_NAME := ""; + + modulepar Json.String PX_ONBOARD_HOSTID_VALUE := ""; + } // End of module ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn index a4ea336bac9c69c9231006a3e25d9903c1e8112b..b914cc021008429ac735901d7b606e3d6184bc1a 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn @@ -1,12 +1,15 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { // JSON - import from JSON all; + import from Json all; - // LibMec_EdgePlatformApplicationEnablementAPI + // LibMec + import from LibMec_TypesAndValues all; + + // LibMec/LibMec_EdgePlatformApplicationEnablementAPI import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; - // LibMec_ApplicationMobilityServiceAPI + // LibMec/LibMec_ApplicationMobilityServiceAPI import from ApplicationMobilityServiceAPI_TypesAndValues all; // LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI @@ -15,18 +18,19 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { group granting { - template (value) GrantRequest m_grant_request( - in String p_app_instance_id := PX_APP_INSTANCE_ID, - in String p_appLcmOpOccId := PX_APP_LCM_OP_OCC_ID, - in String p_appDId := PX_APP_ID, - in OperationType p_operation := PX_APP_OPERATION, - in template (value) GrantRequest_Link p_links - ) := { + template (omit) GrantRequest m_grant_request( + in String p_app_instance_id := PX_APP_INSTANCE_ID, + in String p_appLcmOpOccId := PX_APP_LCM_OP_OCC_ID, + in String p_appDId := PX_APP_ID, + in OperationType p_operation := PX_APP_OPERATION, + in template (value) GrantRequest_Link p_links, + in template (omit) ResourceDefinitions p_addResources := omit + ) := { appInstanceId := p_app_instance_id, appLcmOpOccId := p_appLcmOpOccId, appDId := p_appDId, operation := p_operation, - addResources := omit, + addResources := p_addResources, tempResources := omit, updateResources := omit, additionalParams := omit, @@ -54,7 +58,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { template (present) Grant mw_grant( template (present) String p_id := ?, template (present) String p_app_instance_id := PX_APP_INSTANCE_ID, - template (present) String p_appLcmOpOccId := ?, + template (present) String p_appLcmOpOccId := PX_APP_LCM_OP_OCC_ID, template (present) Grant_Link p_links := ? ) := { id := p_id, @@ -90,17 +94,93 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { } // End of template mw_grant_request_link template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType m_link_type( - in template (value) JSON.AnyURI p_href + in template (value) Json.AnyURI p_href ) := { href := p_href } // End of template m_link_type template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType mw_link_type( - template (present) JSON.AnyURI p_href := ? + template (present) Json.AnyURI p_href := ? ) := { href := p_href } // End of template mw_link_type - + + template (omit) ResourceDefinition m_resource_definition( + in Json.String p_id, + in ResourceDefinition_Type p_type_ := OSCONTAINER, + in template (value) ResourceTemplateId p_resourceTemplateId, + in template (value) ResourceDefinition_Resource p_resource, + in template (omit) Json.String p_vduId := omit + ) := { + id := p_id, + type_ := p_type_, + vduId := p_vduId, + resourceTemplateId := p_resourceTemplateId, + resource := p_resource + } // End of template m_resource_definition + + template (present) ResourceDefinition mw_resource_definition( + template (present) Json.String p_id := ?, + template (present) ResourceDefinition_Type p_type_ := ?, + template (present) ResourceTemplateId p_resourceTemplateId := ?, + template (present) ResourceDefinition_Resource p_resource := ?, + template Json.String p_vduId := * + ) := { + id := p_id, + type_ := p_type_, + vduId := p_vduId, + resourceTemplateId := p_resourceTemplateId, + resource := p_resource + } // End of template mw_resource_definition + + template (value) ResourceDefinition_Resource m_resource_definition_resource( + in template (value) VimConnectionInfo p_vimConnectionInfo, + in Json.String p_resourceId + ) := { + vimConnectionInfo := p_vimConnectionInfo, + resourceId := p_resourceId + } // End of template m_resource_definition_resource + + template (present) ResourceDefinition_Resource mw_resource_definition_resource( + template (present) VimConnectionInfo p_vimConnectionInfo := ?, + template (present) Json.String p_resourceId := ? + ) := { + vimConnectionInfo := p_vimConnectionInfo, + resourceId := p_resourceId + } // End of template mw_resource_definition_resource + + template (omit) VimConnectionInfo m_vim_connection_info( + in Json.String p_id, + in Json.String p_vimType, + in template (omit) Json.String p_vimId := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_interfaceInfo := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_accessInfo := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_extra := omit + ) := { + id := p_id, + vimId := p_vimId, + vimType := p_vimType, + interfaceInfo := p_interfaceInfo, + accessInfo := p_accessInfo, + extra := p_extra + } // End of template m_vim_connection_info + + template (present) VimConnectionInfo mw_vim_connection_info( + template (present) Json.String p_id := ?, + template (present) Json.String p_vimType := ?, + template Json.String p_vimId := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_interfaceInfo := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_accessInfo := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_extra := * + ) := { + id := p_id, + vimId := p_vimId, + vimType := p_vimType, + interfaceInfo := p_interfaceInfo, + accessInfo := p_accessInfo, + extra := p_extra + } // End of template mw_vim_connection_info + } // End of group granting group pkgmgt { @@ -133,18 +213,52 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { appPkgPath := p_appPkgPath } // End of template mw_create_package_management + template (omit) AppPkgInfo m_app_pkg_info( + in template (value) Json.String p_id, + in template (value) Json.String p_appDId, + in template (value) Json.String p_appName, + in template (value) Json.String p_appSoftwareVersion, + in template (value) Json.String p_appDVersion, + in template (value) Checksum p_checksum, + in template (value) AppPkgSWImageInfo p_softwareImages, + in template (value) OnboardingState p_onboardingState, + in template (value) AppPkgInfo_OperationalState p_operationalState, + in template (value) UsageState p_usageState, + in template (value) AppPkgInfo_MecInfo p_mecInfo, + in template (value) AppPkgInfo_Links p_links, + in template (omit) Json.String p_appProvider := omit + ) := { + id := p_id, + appDId := p_appDId, + appProvider := p_appProvider, + appName := p_appName, + appSoftwareVersion := p_appSoftwareVersion, + appDVersion := p_appDVersion, + checksum := p_checksum, + signingCertificate := omit, + softwareImages := p_softwareImages, + additionalArtifacts := omit, + onboardingState := p_onboardingState, + operationalState := p_operationalState, + usageState := p_usageState, + mecInfo := p_mecInfo, + userDefinedData := omit, + onboardingFailureDetails := omit, + links := p_links + } // End of template m_app_pkg_info + template (present) AppPkgInfo mw_app_pkg_info( - template (present) JSON.String p_id:= ?, - template (present) JSON.String p_appDId:= ?, - template (present) JSON.String p_appName:= ?, - template (present) JSON.String p_appSoftwareVersion:= ?, - template (present) JSON.String p_appDVersion:= ?, - template (present) Checksum p_checksum:= ?, - template (present) AppPkgSWImageInfo p_softwareImages:= ?, - template (present) OnboardingState p_onboardingState:= ?, - template (present) AppPkgInfo_OperationalState p_operationalState:= ?, - template (present) UsageState p_usageState:= ?, - template (present) AppPkgInfo_MecInfo p_mecInfo:= ?, + template (present) Json.String p_id := ?, + template (present) Json.String p_appDId := ?, + template (present) Json.String p_appName := ?, + template (present) Json.String p_appSoftwareVersion := ?, + template (present) Json.String p_appDVersion := ?, + template (present) Checksum p_checksum := ?, + template (present) AppPkgSWImageInfo p_softwareImages := ?, + template (present) OnboardingState p_onboardingState := ?, + template (present) AppPkgInfo_OperationalState p_operationalState := ?, + template (present) UsageState p_usageState := ?, + template (present) AppPkgInfo_MecInfo p_mecInfo := ?, template (present) AppPkgInfo_Links p_links := ? ) := { id := p_id, @@ -167,16 +281,16 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { } // End of template mw_app_pkg_info template (value) Checksum m_checksum( - in JSON.String p_algorithm := "SHA256", - in JSON.String p_hash + in Json.String p_algorithm := "SHA256", + in Json.String p_hash ) := { algorithm := p_algorithm, hash := p_hash } // End of template m_checksum template (present) Checksum mw_checksum( - template (present) JSON.String p_algorithm := ?, - template (present) JSON.String p_hash := ? + template (present) Json.String p_algorithm := ?, + template (present) Json.String p_hash := ? ) := { algorithm := p_algorithm, hash := p_hash @@ -195,7 +309,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { } // End of template mw_app_pkg_info_modification template (omit) AppPkgSubscription m_app_pkg_info_subscription( - in template (value) JSON.AnyURI p_callbackUri, + in template (value) Json.AnyURI p_callbackUri, in template (value) AppPkgSubscriptionType p_subscriptionType := "AppPackageOnBoardingSubscription", in template (omit) AppPkgFilter p_appPkgFilter := omit ) := { @@ -205,9 +319,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { } // End of template m_app_pkg_info_subscription template (value) AppPkgSubscriptionInfo m_app_pkg_subscription_info( - in template (value) JSON.String p_id, + in template (value) Json.String p_id, in template (value) AppPkgSubscriptionType p_subscriptionType := "AppPackageOnBoardingSubscription", - in template (value) JSON.AnyURI p_callbackUri, + in template (value) Json.AnyURI p_callbackUri, in template (value) AppPkgSubscriptionInfo_Link p_links ):= { id := p_id, @@ -217,9 +331,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { } // End of template m_app_pkg_subscription_info template (present) AppPkgSubscriptionInfo mw_app_pkg_subscription_info( - template (present) JSON.String p_id := ?, + template (present) Json.String p_id := ?, template (present) AppPkgSubscriptionType p_subscriptionType := "AppPackageOnBoardingSubscription", - template (present) JSON.AnyURI p_callbackUri := ?, + template (present) Json.AnyURI p_callbackUri := ?, template (present) AppPkgSubscriptionInfo_Link p_links := ? ):= { id := p_id, @@ -229,12 +343,12 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { } // End of template mw_app_pkg_subscription_info template (present) AppPkgNotification mw_app_pkg_notification( - template (present) JSON.String p_id := ?, - template (present) JSON.String p_notificationType := ?, - template (present) JSON.String p_subscriptionId := ?, - template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TimeStamp p_timeStamp := ?, - template (present) JSON.String p_appPkgId := ?, - template (present) JSON.String p_appDId := ?, + template (present) Json.String p_id := ?, + template (present) Json.String p_notificationType := ?, + template (present) Json.String p_subscriptionId := ?, + template (present) TimeStamp p_timeStamp := ?, + template (present) Json.String p_appPkgId := ?, + template (present) Json.String p_appDId := ?, template (present) AppPkgInfo_OperationalState p_operationalState := ?, template (present) AppPkgNotification_Link p_links := ? ) := { @@ -249,30 +363,74 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { } // End of template mw_app_pkg_notification template (value) AppPkgSubscriptionInfo_Link m_app_pkg_link( - in JSON.AnyURI p_href + in Json.AnyURI p_href ) := { self_ := { href := p_href } } // End of template m_app_pkg_link template (present) AppPkgSubscriptionInfo_Link mw_app_pkg_link( - template (present) JSON.AnyURI p_href := ? + template (present) Json.AnyURI p_href := ? ) := { self_ := { href := p_href } } // End of template mw_app_pkg_link - + + template (value) AppPkgSubscriptionLinkList m_app_pkg_ubscription_link_list( + in template (value) AppPkgSubscriptionLinkList_Link p_links + ) := { + links := p_links + } // End of template m_app_pkg_ubscription_link_list + + template (present) AppPkgSubscriptionLinkList mw_app_pkg_ubscription_link_list( + template (present) AppPkgSubscriptionLinkList_Link p_links := ? + ) := { + links := p_links + } // End of template mw_app_pkg_ubscription_link_list + + template (omit) AppPkgSubscriptionLinkList_Link m_app_pkg_subscription_link_list_link( + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_self_, + in template (omit) AppPkgSubscriptionLinkList_Link_Subscriptions p_subscriptions := omit + ) := { + self_ := p_self_, + subscriptions := p_subscriptions + } // End of template m_app_pkg_subscription_link_list_link + + template (present) AppPkgSubscriptionLinkList_Link mw_app_pkg_subscription_link_list_link( + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_self_ := ?, + template AppPkgSubscriptionLinkList_Link_Subscriptions p_subscriptions := * + ) := { + self_ := p_self_, + subscriptions := p_subscriptions + } // End of template mw_app_pkg_subscription_link_list_link + + template (value) AppPkgSubscriptionLinkList_Link_Subscription m_app_pkg_subscription_link_list_link_subscription( + in Json.AnyURI p_href, + in AppPkgSubscriptionType p_subscriptionType + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template m_app_pkg_subscription_link_list_link_subscription + + template (present) AppPkgSubscriptionLinkList_Link_Subscription mw_app_pkg_subscription_link_list_link_subscription( + template (present) Json.AnyURI p_href := ?, + template (present) AppPkgSubscriptionType p_subscriptionType := ? + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template mw_app_pkg_subscription_link_list_link_subscription + } // End of group pkgmgt group mepm_lifcyclemgt { template (omit) ConfigPlatformForAppRequest m_config_platform_for_app_request( - in template (value) ServiceDependency p_appServiceRequired, - in template (omit) ServiceDependency p_appServiceOptional := omit, - in template (omit) ServiceDependency p_appServiceProduced := omit, - in template (omit) FeatureDependency p_appFeatureRequired := omit, - in template (omit) FeatureDependency p_appFeatureOptional := omit, - in template (omit) TransportDependency p_transportDependencies := omit, - in template (omit) TrafficRuleDescriptor p_appTrafficRule := omit, - in template (omit) DNSRuleDescriptor p_appDNSRule := omit, + in template (value) ServiceDependencies p_appServiceRequired, + in template (omit) ServiceDependencies p_appServiceOptional := omit, + in template (omit) ServiceDependencies p_appServiceProduced := omit, + in template (omit) FeatureDependencies p_appFeatureRequired := omit, + in template (omit) FeatureDependencies p_appFeatureOptional := omit, + in template (omit) TransportDependencies p_transportDependencies := omit, + in template (omit) TrafficRuleDescriptors p_appTrafficRule := omit, + in template (omit) DNSRuleDescriptors p_appDNSRule := omit, in template (omit) LatencyDescriptor p_appLatency := omit, in template (omit) UserContextTransferCapability p_userContextTransferCapability := omit, in template (omit) AppNetworkPolicy p_appNetworkPolicy := omit @@ -291,14 +449,14 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { } // End of template m_config_platform_for_app_request template (present) ConfigPlatformForAppRequest mw_config_platform_for_app_request( - template (present) ServiceDependency p_appServiceRequired := ?, - template ServiceDependency p_appServiceOptional := *, - template ServiceDependency p_appServiceProduced := *, - template FeatureDependency p_appFeatureRequired := *, - template FeatureDependency p_appFeatureOptional := *, - template TransportDependency p_transportDependencies := *, - template TrafficRuleDescriptor p_appTrafficRule := *, - template DNSRuleDescriptor p_appDNSRule := *, + template (present) ServiceDependencies p_appServiceRequired := ?, + template ServiceDependencies p_appServiceOptional := *, + template ServiceDependencies p_appServiceProduced := *, + template FeatureDependencies p_appFeatureRequired := *, + template FeatureDependencies p_appFeatureOptional := *, + template TransportDependencies p_transportDependencies := *, + template TrafficRuleDescriptors p_appTrafficRule := *, + template DNSRuleDescriptors p_appDNSRule := *, template LatencyDescriptor p_appLatency := *, template UserContextTransferCapability p_userContextTransferCapability := *, template AppNetworkPolicy p_appNetworkPolicy := * @@ -317,11 +475,11 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { } // End of template mw_config_platform_for_app_request template (omit) ServiceDependency m_service_dependency( - in JSON.String p_serName, - in JSON.String p_version, + in Json.String p_serName, + in Json.String p_version, in template (omit) CategoryRef p_serCategory := omit, in template (omit) TransportDependency p_serTransportDependencies := omit, - in template (omit) JSON.String p_requestedPermissions := omit + in template (omit) Json.String p_requestedPermissions := omit ) := { serName := p_serName, serCategory := p_serCategory, @@ -331,11 +489,11 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { } // End of template m_service_dependency template (present) ServiceDependency mw_service_dependency( - template (present) JSON.String p_serName := ?, - template (present) JSON.String p_version := ?, + template (present) Json.String p_serName := ?, + template (present) Json.String p_version := ?, template CategoryRef p_serCategory := *, template TransportDependency p_serTransportDependencies := *, - template JSON.String p_requestedPermissions := * + template Json.String p_requestedPermissions := * ) := { serName := p_serName, serCategory := p_serCategory, @@ -343,15 +501,187 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { serTransportDependencies := p_serTransportDependencies, requestedPermissions := p_requestedPermissions } // End of template mw_service_dependency - + + template (value) FeatureDependency m_feature_dependency( + in Json.String p_featureName, + in Json.String p_version + ) := { + featureName := p_featureName, + version := p_version + } // End of template m_feature_dependency + + template (present) FeatureDependency mw_feature_dependency( + template (present) Json.String p_featureName := ?, + template (present) Json.String p_version := ? + ) := { + featureName := p_featureName, + version := p_version + } // End of template mw_feature_dependency + + template (value) TransportDependency m_transport_dependency( + in template (value) TransportDescriptor p_transport, + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SerializerType p_serializers, + in template (value) Labels p_labels + ) := { + transport := p_transport, + serializers := p_serializers, + labels := p_labels + } // End of template m_transport_dependency + + template (present) TransportDependency mw_transport_dependency( + template (present) TransportDescriptor p_transport := ?, + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SerializerType p_serializers := ?, + template (present) Labels p_labels := ? + ) := { + transport := p_transport, + serializers := p_serializers, + labels := p_labels + } // End of template mw_transport_dependency + + template (omit) TransportDescriptor m_transport_descriptor( + in Json.String p_name, + in ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TransportType p_type_ := REST_HTTP, + in Json.String p_protocol, + in Json.String p_version, + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SecurityInfo p_security, + in template (omit) Json.String p_description := omit, + in template (omit) Json.String p_implSpecificInfo := omit + ) := { + name := p_name, + description := p_description, + type_ := p_type_, + protocol := p_protocol, + version := p_version, + security := p_security, + implSpecificInfo := p_implSpecificInfo + } // End of template m_transport_descriptor + + template (present) TransportDescriptor mw_transport_descriptor( + template (present) Json.String p_name := ?, + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TransportType p_type_ := ?, + template (present) Json.String p_protocol := ?, + template (present) Json.String p_version := ?, + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SecurityInfo p_security := ?, + template Json.String p_description := *, + template Json.String p_implSpecificInfo := * + ) := { + name := p_name, + description := p_description, + type_ := p_type_, + protocol := p_protocol, + version := p_version, + security := p_security, + implSpecificInfo := p_implSpecificInfo + } // End of template mw_transport_descriptor + + template (omit) TrafficRuleDescriptor m_traffic_rule_descriptor( + in template (value) Json.String p_trafficRuleId, + in template (value) FilterType p_filterType, + in template (value) Json.Integer p_priority, + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter p_trafficFilter, + in template (value) Action p_action, + in template (omit) InterfaceDescriptor p_dstInterface := omit + ) := { + trafficRuleId := p_trafficRuleId, + filterType := p_filterType, + priority := p_priority, + trafficFilter := p_trafficFilter, + action_ := p_action, + dstInterface := p_dstInterface + } // End of template m_traffic_rule_descriptor + + template (present) TrafficRuleDescriptor mw_traffic_rule_descriptor( + template (present) Json.String p_trafficRuleId := ?, + template (present) FilterType p_filterType := ?, + template (present) Json.Integer p_priority := ?, + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter p_trafficFilter := ?, + template (present) Action p_action := ?, + template InterfaceDescriptor p_dstInterface := * + ) := { + trafficRuleId := p_trafficRuleId, + filterType := p_filterType, + priority := p_priority, + trafficFilter := p_trafficFilter, + action_ := p_action, + dstInterface := p_dstInterface + } // End of template mw_traffic_rule_descriptor + + template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter m_traffic_filter( + in template (omit) Json.String p_srcAddress := omit, + in template (omit) Json.String p_dstAddress := omit, + in template (omit) Json.String p_srcPort := omit, + in template (omit) Json.String p_dstPort := omit, + in template (omit) Json.String p_protocol := omit, + in template (omit) Json.String p_tag := omit, + in template (omit) Json.String p_uri := omit, + in template (omit) Json.String p_packetLabel := omit, + in template (omit) Json.String p_srcTunnelAddress := omit, + in template (omit) Json.String p_tgtTunnelAddress := omit, + in template (omit) Json.String p_srcTunnelPort := omit, + in template (omit) Json.String p_dstTunnelPort := omit, + in template (omit) Json.Integer p_qCI := omit, + in template (omit) Json.Integer p_dSCP := omit, + in template (omit) Json.Integer p_tC := omit + ) :={ + srcAddress := p_srcAddress, + dstAddress := p_dstAddress, + srcPort := p_srcPort, + dstPort := p_dstPort, + protocol := p_protocol, + tag := p_tag, + uri := p_uri, + packetLabel := p_packetLabel, + srcTunnelAddress := p_srcTunnelAddress, + tgtTunnelAddress := p_tgtTunnelAddress, + srcTunnelPort := p_srcTunnelPort, + dstTunnelPort := p_dstTunnelPort, + qCI := p_qCI, + dSCP := p_dSCP, + tC := p_tC + } // End of template m_traffic_filter + + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter mw_traffic_filter( + template Json.String p_srcAddress := *, + template Json.String p_dstAddress := *, + template Json.String p_srcPort := *, + template Json.String p_dstPort := *, + template Json.String p_protocol := *, + template Json.String p_tag := *, + template Json.String p_uri := *, + template Json.String p_packetLabel := *, + template Json.String p_srcTunnelAddress := *, + template Json.String p_tgtTunnelAddress := *, + template Json.String p_srcTunnelPort := *, + template Json.String p_dstTunnelPort := *, + template Json.Integer p_qCI := *, + template Json.Integer p_dSCP := *, + template Json.Integer p_tC := * + ) :={ + srcAddress := p_srcAddress, + dstAddress := p_dstAddress, + srcPort := p_srcPort, + dstPort := p_dstPort, + protocol := p_protocol, + tag := p_tag, + uri := p_uri, + packetLabel := p_packetLabel, + srcTunnelAddress := p_srcTunnelAddress, + tgtTunnelAddress := p_tgtTunnelAddress, + srcTunnelPort := p_srcTunnelPort, + dstTunnelPort := p_dstTunnelPort, + qCI := p_qCI, + dSCP := p_dSCP, + tC := p_tC + } // End of template mw_traffic_filter + } // End of group mepm_lifcyclemgt group mex_lifcyclemgt { template (omit) CreateAppInstanceRequest m_create_app_instance_request( - in JSON.String p_appDId, - in template (omit) JSON.String p_appInstanceName := omit, - in template (omit) JSON.String p_appInstanceDescription := omit, + in Json.String p_appDId, + in template (omit) Json.String p_appInstanceName := omit, + in template (omit) Json.String p_appInstanceDescription := omit, in template (omit) MepInformation p_appPlacementInfo := omit ) := { appDId := p_appDId, @@ -361,9 +691,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { } // End of template m_create_app_instance_request template (present) CreateAppInstanceRequest mw_create_app_instance_request( - template (present) JSON.String p_appDId := ?, - template JSON.String p_appInstanceName := *, - template JSON.String p_appInstanceDescription := *, + template (present) Json.String p_appDId := ?, + template Json.String p_appInstanceName := *, + template Json.String p_appInstanceDescription := *, template MepInformation p_appPlacementInfo := * ) := { appDId := p_appDId, @@ -373,20 +703,20 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { } // End of template mw_create_app_instance_request template (omit) AppInstanceInfo m_app_instance_info( - in JSON.String p_id, - in JSON.String p_appDId, - in JSON.String p_appProvider, - in JSON.String p_appName, - in JSON.String p_appSoftVersion, - in JSON.String p_appDVersion, + in Json.String p_id, + in Json.String p_appDId, + in Json.String p_appProvider, + in Json.String p_appName, + in Json.String p_appSoftVersion, + in Json.String p_appDVersion, in InstantiationState p_instantiationState, - in JSON.String p_appPkgId, + in Json.String p_appPkgId, in template (value) Link p_links, - in template (omit) JSON.String p_appInstanceName := omit, - in template (omit) JSON.String p_appInstanceDescription := omit, + in template (omit) Json.String p_appInstanceName := omit, + in template (omit) Json.String p_appInstanceDescription := omit, in template (omit) VimConnectionInfo p_vimConnectionInfo := omit, - in template (omit) JSON.String p_nsInstanceId := omit, - in template (omit) JSON.String p_vnfInstanceId := omit, + in template (omit) Json.String p_nsInstanceId := omit, + in template (omit) Json.String p_vnfInstanceId := omit, in template (omit) InstantiatedAppState p_instantiatedAppState := omit, in template (omit) CommunicationInterface p_communicationInterface := omit ) := { @@ -409,20 +739,20 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { } // End of template m_app_instance_info template (present) AppInstanceInfo mw_app_instance_info( - template (present) JSON.String p_id := ?, - template (present) JSON.String p_appDId := ?, - template (present) JSON.String p_appProvider := ?, - template (present) JSON.String p_appName := ?, - template (present) JSON.String p_appSoftVersion := ?, - template (present) JSON.String p_appDVersion := ?, - template (present) JSON.String p_appPkgId := ?, + template (present) Json.String p_id := ?, + template (present) Json.String p_appDId := ?, + template (present) Json.String p_appProvider := ?, + template (present) Json.String p_appName := ?, + template (present) Json.String p_appSoftVersion := ?, + template (present) Json.String p_appDVersion := ?, + template (present) Json.String p_appPkgId := ?, template (present) InstantiationState p_instantiationState := ?, template (present) Link p_links := ?, - template JSON.String p_appInstanceName := *, - template JSON.String p_appInstanceDescription := *, + template Json.String p_appInstanceName := *, + template Json.String p_appInstanceDescription := *, template VimConnectionInfo p_vimConnectionInfo := *, - template JSON.String p_nsInstanceId := *, - template JSON.String p_vnfInstanceId := *, + template Json.String p_nsInstanceId := *, + template Json.String p_vnfInstanceId := *, template InstantiatedAppState p_instantiatedAppState := *, template CommunicationInterface p_communicationInterface := * ) := { @@ -447,9 +777,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { template (omit) Link m_link( in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_self, in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_instantiate := omit, - in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_terminate := omit, - in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_operate := omit, - in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_configure_platform_for_app := omit + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_terminate := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_operate := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_configure_platform_for_app := omit ) := { self_ := p_self, instantiate := p_instantiate, @@ -471,7 +801,287 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { operate := p_operate, configure_platform_for_app := p_configure_platform_for_app } // End of template mw_link - + + template (omit) InstantiateAppRequest m_instantiate_app_request( + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.MECHostInformation p_selectedMECHostInfo, + in template (omit) VirtualComputeDescriptor p_virtualComputeDescriptor := omit, + in template (omit) OsContainerDescriptors p_osContainerDescriptor := omit, + in template (omit) VirtualStorageDescriptor p_virtualStorageDescriptor := omit, + in template (omit) LocationConstraints p_locationConstraints := omit, + in template (omit) VimConnectionInfos p_vimConnectionInfo := omit, + in template (omit) AppTermCandsForCoord p_appTermCandsForCoord := omit + ) :={ + virtualComputeDescriptor := p_virtualComputeDescriptor, + osContainerDescriptor := p_osContainerDescriptor, + virtualStorageDescriptor := p_virtualStorageDescriptor, + selectedMECHostInfo := p_selectedMECHostInfo, + locationConstraints := p_locationConstraints, + vimConnectionInfo := p_vimConnectionInfo, + appTermCandsForCoord := p_appTermCandsForCoord + } // End of template m_instantiate_app_request + + template (present) InstantiateAppRequest mw_instantiate_app_request( + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.MECHostInformation p_selectedMECHostInfo := ?, + template VirtualComputeDescriptor p_virtualComputeDescriptor := *, + template OsContainerDescriptors p_osContainerDescriptor := *, + template VirtualStorageDescriptor p_virtualStorageDescriptor := *, + template LocationConstraints p_locationConstraints := *, + template VimConnectionInfos p_vimConnectionInfo := *, + template AppTermCandsForCoord p_appTermCandsForCoord := * + ) :={ + virtualComputeDescriptor := p_virtualComputeDescriptor, + osContainerDescriptor := p_osContainerDescriptor, + virtualStorageDescriptor := p_virtualStorageDescriptor, + selectedMECHostInfo := p_selectedMECHostInfo, + locationConstraints := p_locationConstraints, + vimConnectionInfo := p_vimConnectionInfo, + appTermCandsForCoord := p_appTermCandsForCoord + } // End of template mw_instantiate_app_request + + template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.MECHostInformation m_selected_mec_host_info( + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_hostId, + in template (omit) Json.String p_hostName := omit + ) := { + hostName := p_hostName, + hostId := p_hostId + } // End of template m_selected_mec_host_info + + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.MECHostInformation mw_selected_mec_host_info( + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_hostId := ?, + template Json.String p_hostName := * + ) := { + hostName := p_hostName, + hostId := p_hostId + } // End of template mw_selected_mec_host_info + + template (omit) TerminateAppRequest m_terminate_app_request( + in TerminationType p_termination_type := GRACEFUL, + in template (omit) Json.UInteger p_graceful_termination_timeout := omit + ) := { + terminationType := p_termination_type, + gracefulTerminationTimeout := p_graceful_termination_timeout + } // End of template m_terminate_app_request + + template (present) TerminateAppRequest mw_terminate_app_request( + template (present) TerminationType p_termination_type := ?, + template Json.UInteger p_graceful_termination_timeout := * + ) := { + terminationType := p_termination_type, + gracefulTerminationTimeout := p_graceful_termination_timeout + } // End of template mw_terminate_app_request + + template (omit) OperateAppRequest m_operate_app_request( + in OperationalState p_change_state_to := STOPPED, + in template (omit) StopType p_stop_type := omit, + in template (omit) Json.UInteger p_graceful_stop_timeout := omit + ) := { + changeStateTo := p_change_state_to, + stopType := p_stop_type, + gracefulStopTimeout := p_graceful_stop_timeout + } // End of template m_operate_app_request + + template (present) OperateAppRequest mw_operate_app_request( + template (present) OperationalState p_change_state_to := STOPPED, + template StopType p_stop_type := *, + template Json.UInteger p_graceful_stop_timeout := * + ) := { + changeStateTo := p_change_state_to, + stopType := p_stop_type, + gracefulStopTimeout := p_graceful_stop_timeout + } // End of template mw_operate_app_request + + template (omit) AppLcmOpOcc m_app_lcm_op_occ( + in Json.String p_id, + in OperationState p_operationState, + in template (value) TimeStamp p_stateEnteredTime, + in template (value) TimeStamp p_startTime, + in OperationType p_lcmOperation, + in template (value) AppLcmOpOcc_Link p_links, + in template (omit) OperationParams p_operationParams := omit, + in template (omit) Json.Bool p_isCancelPending := omit, + in template (omit) CancelMode p_cancelMode := omit + ) := { + id := p_id, + operationState := p_operationState, + stateEnteredTime := p_stateEnteredTime, + startTime := p_startTime, + lcmOperation := p_lcmOperation, + operationParams := p_operationParams, + isCancelPending := p_isCancelPending, + cancelMode := p_cancelMode, + links := p_links + } // End of template m_app_lcm_op_occ + + template (present) AppLcmOpOcc mw_app_lcm_op_occ( + template (present) Json.String p_id := ?, + template (present) OperationState p_operationState := ?, + template (present) TimeStamp p_stateEnteredTime := ?, + template (present) TimeStamp p_startTime := ?, + template (present) OperationType p_lcmOperation := ?, + template (present) AppLcmOpOcc_Link p_links := ?, + template OperationParams p_operationParams := *, + template Json.Bool p_isCancelPending := *, + template CancelMode p_cancelMode := * + ) := { + id := p_id, + operationState := p_operationState, + stateEnteredTime := p_stateEnteredTime, + startTime := p_startTime, + lcmOperation := p_lcmOperation, + operationParams := p_operationParams, + isCancelPending := p_isCancelPending, + cancelMode := p_cancelMode, + links := p_links + } // End of template mw_app_lcm_op_occ + + template (value) AppLcmOpOcc_Link m_app_lcm_op_occ_link( + in Json.AnyURI p_href, + in Json.AnyURI p_app_instance + ) := { + self_ := { href := p_href }, + appInstance := { href := p_app_instance } + } // End of template m_app_lcm_op_occ_link + + template (present) AppLcmOpOcc_Link mw_app_lcm_op_occ_link( + template (present) Json.AnyURI p_href := ?, + template (present) Json.AnyURI p_app_instance := ? + ) := { + self_ := { href := p_href }, + appInstance := { href := p_app_instance } + } // End of template mw_app_lcm_op_occ_link + + template (omit) AppInstSubscriptionRequest m_app_inst_subscription_request( + in Json.String p_subscriptionType, + in Json.AnyURI p_callbackUri, + in template (omit) AppInstanceState p_appInstanceState := omit, + in template (omit) AppInstanceSubscriptionFilter p_appInstanceSubscriptionFilter := omit + ) := { + subscriptionType := p_subscriptionType, + callbackUri := p_callbackUri, + appInstanceState := p_appInstanceState, + appInstanceSubscriptionFilter := p_appInstanceSubscriptionFilter + } // End of template m_app_inst_subscription_request + + template (present) AppInstSubscriptionRequest mw_app_inst_subscription_request( + template (present) Json.String p_subscriptionType := ?, + template (present) Json.AnyURI p_callbackUri := ?, + template AppInstanceState p_appInstanceState := *, + template AppInstanceSubscriptionFilter p_appInstanceSubscriptionFilter := * + ) := { + subscriptionType := p_subscriptionType, + callbackUri := p_callbackUri, + appInstanceState := p_appInstanceState, + appInstanceSubscriptionFilter := p_appInstanceSubscriptionFilter + } // End of template mw_app_inst_subscription_request + + template (omit) AppInstSubscriptionInfo m_app_inst_subscription_info( + in Json.String p_id, + in Json.String p_subscriptionType, + in Json.AnyURI p_callbackUri, + in template (value) AppInstSubscriptionInfo_Link p_links, + in template (omit) AppInstanceState p_appInstanceState := omit, + in template (omit) AppInstanceSubscriptionFilter p_appInstanceSubscriptionFilter := omit + ) := { + id := p_id, + subscriptionType := p_subscriptionType, + appInstanceState := p_appInstanceState, + appInstanceSubscriptionFilter := p_appInstanceSubscriptionFilter, + callbackUri := p_callbackUri, + links := p_links + } // End of template m_app_inst_subscription_info + + template (present) AppInstSubscriptionInfo mw_app_inst_subscription_info( + template (present) Json.String p_id := ?, + template (present) Json.String p_subscriptionType := ?, + template (present) Json.AnyURI p_callbackUri := ?, + template (present) AppInstSubscriptionInfo_Link p_links := ?, + template AppInstanceState p_appInstanceState := *, + template AppInstanceSubscriptionFilter p_appInstanceSubscriptionFilter := * + ) := { + id := p_id, + subscriptionType := p_subscriptionType, + appInstanceState := p_appInstanceState, + appInstanceSubscriptionFilter := p_appInstanceSubscriptionFilter, + callbackUri := p_callbackUri, + links := p_links + } // End of template mw_app_inst_subscription_info + + template (value) AppInstanceSubscriptionLinkList m_app_instance_subscription_link_list( + in template (value) AppInstanceSubscriptionLinkList_Link p_links + ) := { + links := p_links + } // End of template m_app_instance_subscription_link_list + + template (present) AppInstanceSubscriptionLinkList mw_app_instance_subscription_link_list( + template (present) AppInstanceSubscriptionLinkList_Link p_links := ? + ) := { + links := p_links + } // End of template mw_app_instance_subscription_link_list + + template (omit) AppInstanceSubscriptionLinkList_Link m_app_instance_subscription_link_list_link( + in Json.AnyURI p_href, + in template (omit) AppInstanceSubscriptionLinkList_Link_Subscriptions p_subscriptions := omit + ) := { + self_ := { href := p_href }, + subscriptions := p_subscriptions + } // End of template m_app_instance_subscription_link_list_link + + template (present) AppInstanceSubscriptionLinkList_Link mw_app_instance_subscription_link_list_link( + template (present) Json.AnyURI p_href := ?, + template AppInstanceSubscriptionLinkList_Link_Subscriptions p_subscriptions := * + ) := { + self_ := { href := p_href }, + subscriptions := p_subscriptions + } // End of template mw_app_instance_subscription_link_list_link + + template (omit) AppInstNotification m_app_inst_notification( + in Json.String p_id, + in ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.NotificationType p_notificationType, + in Json.String p_subscriptionId, + in template (value) TimeStamp p_timeStamp, + in Json.String p_appInstanceId, + in Json.String p_appPkgId, + in Json.String p_appDId, + in template (value) AppInstNotification_Links p_links, + in template (omit) AppInstanceState p_appInstanceState := omit, + in template (omit) LocationInformation p_appInstLocation := omit + ) := { + id := p_id, + notificationType := p_notificationType, + appInstanceState := p_appInstanceState, + subscriptionId := p_subscriptionId, + timeStamp := p_timeStamp, + appInstanceId := p_appInstanceId, + appPkgId := p_appPkgId, + appDId := p_appDId, + appInstLocation := p_appInstLocation, + links := p_links + } // End of template m_app_inst_notification + + template (present) AppInstNotification mw_app_inst_notification( + template (present) Json.String p_id := ?, + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.NotificationType p_notificationType := ?, + template (present) Json.String p_subscriptionId := ?, + template (present) TimeStamp p_timeStamp := ?, + template (present) Json.String p_appInstanceId := ?, + template (present) Json.String p_appPkgId := ?, + template (present) Json.String p_appDId := ?, + template (present) AppInstNotification_Links p_links := ?, + template AppInstanceState p_appInstanceState := *, + template LocationInformation p_appInstLocation := * + ) := { + id := p_id, + notificationType := p_notificationType, + appInstanceState := p_appInstanceState, + subscriptionId := p_subscriptionId, + timeStamp := p_timeStamp, + appInstanceId := p_appInstanceId, + appPkgId := p_appPkgId, + appDId := p_appDId, + appInstLocation := p_appInstLocation, + links := p_links + } // End of template mw_app_inst_notification + } // End of group mex_lifcyclemgt } // End of module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn index 2513e204edb7ab206a8589a3e8e8341b66fd5c5a..1a945263c24025d9c1e64dfaf4bc1b5646d5b845 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn @@ -1,10 +1,17 @@ +/** + * @author ETSI / TTF T012 / TTF T027 + * @version $Url$ + * $Id$ + * @desc Types ANd Values for ETSI GS MEC 010-2 V3.2.1 (2023-06) + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + */ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { // JSON - import from JSON all; - - // LibCommon - import from LibCommon_BasicTypesAndValues all; + import from Json all; // LibMec import from LibMec_TypesAndValues all; @@ -15,1701 +22,1994 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { // LibMec_ApplicationMobilityServiceAPI import from ApplicationMobilityServiceAPI_TypesAndValues all; - group application_descriptor_information_model { - - /** - * @desc An application Descriptor (AppD) is a part of application package, and describes application requirements and rules required by application provider - * @member appDid Identifier of this MEC application descriptor. This attribute shall be globally unique - * @member appName Name to identify the MEC application - * @member appProvider Provider of the application and of the AppD - * @member appSoftVersion Identifies the version of software of the MEC application - * @member appDVersion Identifies the version of the application descriptor - * @member mecVersion Identifies version(s) of MEC system compatible with the MEC application described in this version of the AppD - * @member appInfoName Human readable name for the MEC application - * @member appDescription Human readable description of the MEC application - * @member virtualComputeDescriptor Describes CPU and memory requirements, as well as optional additional requirements, such as disk and acceleration related capabilities, of the virtualisation container used to realize this MEC application - * @member swImageDescriptor Describes the descriptors of the software image to be used by the virtualisation container used to realize this MEC application - * @member appExtCpd Describes external interface(s) exposed by this MEC application - * @member appServiceRequired Describes services a MEC application requires to run - * @member appServiceOptional Describes services a MEC application may use if available - * @member appServiceProduced Describes services a MEC application is able to produce to the platform or other MEC applications - * @member appFeatureRequired Describes features a MEC application requires to run - * @member appFeatureOptional Describes features a MEC application may use if available - * @member transportDependencies Transports, if any, that this application requires to be provided by the platform - * @member appTrafficRule Describes traffic rules the MEC application requires - * @member appDNSRule Describes DNS rules the MEC application requires - * @member appLatency Describes the maximum latency tolerated by the MEC application - * @member terminateAppInstanceOpConfig Configuration parameters for the Terminate application instance operation - * @member changeAppInstanceStateOpConfig Configuration parameters for the change application instance state operation - * @member userContextTransferCapability If the application supports the user context transfer capability - * @member appNetworkPolicy It represents the application network policy of carrying the application traffic - * @see ETSI GS MEC 010-2 Clause 6.2.1.2.2 - */ - type record AppD { - JSON.String appDId, - JSON.String appName, - JSON.String appProvider, - JSON.String appSoftVersion, - JSON.String appDVersion, - JSON.String mecVersion, - JSON.String appInfoName optional, - JSON.String appDescription, - VirtualComputeDescriptor virtualComputeDescriptor, - SwImageDescriptor virtualStorageDescriptor optional, - AppExternalCpd appExtCpd optional, - ServiceDependency appServiceRequired optional, - ServiceDependency appServiceOptional optional, - ServiceDescriptor appServiceProduced optional, - FeatureDependency appFeatureRequired optional, - FeatureDependency appFeatureOptional optional, - TransportDependency transportDependencies optional, - TrafficRuleDescriptor appTrafficRule optional, - DNSRuleDescriptor appDNSRule optional, - LatencyDescriptor appLatency optional, - TerminateAppInstanceOpConfig terminateAppInstanceOpConfig optional, - ChangeAppInstanceStateOpConfig changeAppInstanceStateOpConfig optional, - UserContextTransferCapability userContextTransferCapability optional, - AppNetworkPolicy appNetworkPolicy optional - } - - /** - * @desc The VirtualComputeDescriptor data type supports the specification of requirements related to virtual compute resources - * @member - * @see ETSI GS MEC 010-2 Clause 6.2.1.3 Type: VirtualComputeDescriptor - */ - type record VirtualComputeDescriptor { - // FIXME shall follow the definition in clause 7.1.9.2.2 of ETSI GS NFV‑IFA 011 [0], with the following consideration: - } - - /** - * @desc The SwImageDescriptor data type describes the software image of a MEC application - * @member - * @see ETSI GS MEC 010-2 Clause 6.2.1.4 Type: SwImageDescriptor - */ - type record SwImageDescriptor { - // FIXME shall follow the definition in clause 7.1.6.5 of ETSI GS NFV‑IFA 011 [0], with the following consideration: - } - - /** - * @desc The VirtualStorageDescriptor data type describes the virtual storage required by a MEC application - * @member - * @see ETSI GS MEC 010-2 Clause 6.2.1.5 Type: VirtualStorageDescriptor - */ - type record VirtualStorageDescriptor { - // FIXME shall follow the definition in clause 7.1.9.4 of ETSI GS NFV‑IFA 011 [0], with the following consideration: - } - - /** - * @desc The AppExternalCpd data type supports the specification of MEC application requirements related to external connection point - * @member virtualNetworkInterfaceRequirements Specifies requirements on a virtual network interface realizing the CPs instantiated from this CPD - * @see ETSI GS MEC 010-2 Clause 6.2.1.6 Type: AppExternalCpd - */ - type record AppExternalCpd { - VirtualNetworkInterfaceRequirements virtualNetworkInterfaceRequirements optional - } - - type record VirtualNetworkInterfaceRequirement { - // FIXME For the definition of the VirtualNetworkInterfaceRequirements, please refer to clause 7.1.6.6 of ETSI GS NFV-IFA 011 [0]. For the definition of Cpd, please refer to clause 7.1.6.3 of ETSI GS NFV-IFA 011 [0] - } - - type record length(1..infinity) of VirtualNetworkInterfaceRequirement VirtualNetworkInterfaceRequirements; - - /** - * @desc The ServiceDescriptor data type describes a MEC service produced by a service-providing MEC applicationt - * @member serName The name of the service, for example, RNIS, LocationService, etc - * @member serCategory A Category reference of the service, defined in ETSI GS MEC 011 [17]i.0 - * @member version The version of the service - * @member transportsSupported Indicates transports and serialization formats supported made available to the service-consuming application - * @see ETSI GS MEC 010-2 Clause 6.2.1.7 Type: ServiceDescriptor - */ - type record ServiceDescriptor { - JSON.String serName, - CategoryRef serCategory optional, - JSON.String version, - TransportsSupported transportsSupported optional - } - - /** - * @desc Indicates transports and serialization formats supported made available to the service-consuming application - * @member transport Information about the transport in this binding - * @member serializers Information about the serializers in this binding, as defined in the SerializerType type in ETSI GS MEC 011 [17]i.0 - * @see ETSI GS MEC 010-2 Clause 6.2.1.7 Type: ServiceDescriptor - */ - type record TransportsSupported { - TransportDescriptor transport, - SerializerType serializers - } - - /** - * @desc The FeatureDependency data type supports the specification of requirements of a MEC application related to a feature of MEC platform - * @member featureName The name of the feature, for example, UserApps, UEIdentity, etc - * @member version The version of the feature - * @see ETSI GS MEC 010-2 Clause 6.2.1.8 Type: FeatureDependency - */ - type record FeatureDependency { - JSON.String featureName, - JSON.String version - } - - /** - * @desc The TrafficRuleDescriptor data type describes traffic rules related to a MEC application - * @member trafficRuleId Identifies the traffic rule - * @member filterType Definition of filter type: per FLOW or PACKET - * @member priority Priority of this traffic rule within the range 0 to 255. If traffic rule conflicts, the one with higher priority take precedence - * @member trafficFilter The filter used to identify specific flow/packets that need to be handled by the MEC host - * @member action_ Identifies the action of the MEC host data plane, when a packet matches the trafficFilter - * @member dstInterface Describes the destination interface information - * @see ETSI GS MEC 010-2 Clause 6.2.1.9 Type: TrafficRuleDescriptor - */ - type record TrafficRuleDescriptor { - JSON.String trafficRuleId, - FilterType filterType, - integer priority, - TrafficFilter trafficFilter, - Action action_, - InterfaceDescriptor dstInterface optional - } with { - variant (action_) "name as 'action'"; - } - - type enumerated FilterType { - FLOW, - PACKET - } with { - variant "JSON: as number" - } - - type enumerated Action { - DROP, - FORWARD_DECAPSULATED, - FORWARD_AS_IS, - PASSTHROUGH, - DUPLICATED_DECAPSULATED, - DUPLICATE_AS_IS - } with { - variant "JSON: as number" - } - - /** - * @desc The TrafficFilter data type supports the specification of MEC application requirements related to traffic rules - * @member srcAddress An IP address or a range of IP addresses - * @member dstAddress A IP address or a range of IP addresses - * @member srcPort A port or a range of ports - * @member dstPort A port or a range of ports - * @member protocol Specify the protocol of the traffic filter - * @member tag Used for tag based traffic rule - * @member uri An URI label, in application layer - * @member packetLabel A customized packet label in network layer, as defined by the owner of the MEC platform, is used to filter the traffic - * @member srcTunnelAddressUsed for GTP tunnel based traffic rule - * @member tgtTunnelAddress Used for GTP tunnel based traffic rule - * @member srcTunnelPort Used for GTP tunnel based traffic rule - * @member qCI Used to match all packets that have the same QCI - * @member dSCP Used to match all IPv4 packets that have the same DSCP - * @member tC Used to match all IPv6 packets that have the same TC - * @see ETSI GS MEC 010-2 Clause 6.2.1.10 Type: TrafficFilter - */ - type record TrafficFilter { - JSON.String srcAddress optional, - JSON.String dstAddress optional, - JSON.String srcPort optional, - JSON.String dstPort optional, - JSON.String protocol optional, - JSON.String tag optional, - JSON.String uri optional, - JSON.String packetLabel optional, - JSON.String srcTunnelAddress optional, - JSON.String tgtTunnelAddress optional, - JSON.String srcTunnelPort optional, - JSON.String dstTunnelPort optional, - integer qCI optional, - integer dSCP optional, - integer tC optional - } - - /** - * @desc The InterfaceDescriptor data type describes an interface of a MEC application - * @member interfaceType Type of interface - * @member tunnelInfo Included only if the destination address type is tunnel - * @member srcMACAddress The source address identifies the MAC address of the interface - * @member dstMACAddress The destination address identifies the MAC address of the destination - * @see ETSI GS MEC 010-2 Clause 6.2.1.11 Type: InterfaceDescriptor - */ - type record InterfaceDescriptor { - InterfaceType interfaceType, - TunnelInfo tunnelInfo optional, - JSON.String srcMACAddress optional, - JSON.String dstMACAddress optional - } - - type enumerated InterfaceType { - TUNNEL, - MAC, - IP - } with { - variant "JSON: as number" - } - - /** - * @desc The TunnelInfo data type supports the specification of MEC application requirements related to traffic rules - * @member tunnelType Type of tunnel - * @member tunnelDstAddress Destination address of the tunnel - * @member tunnelSrcAddress Source address of the tunnel - * @member tunnelSpecificData Parameters specific to the tunnel - * @see ETSI GS MEC 010-2 Clause 6.2.1.12 Type: TunnelInfo - */ - type record TunnelInfo { - TunnelType tunnelType, - JSON.String tunnelDstAddress, - JSON.String tunnelSrcAddress, - JSON.String tunnelSpecificData optional - } - - type enumerated TunnelType { - GTP_U, - GRE - } with { - variant "JSON: as number" - } - - /** - * @desc The DNSRuleDescriptor data type describes DNS rules associated with a MEC application - * @member dnsRuleId Identifies the DNS Rule - * @member domainName FQDN of the DNS rule - * @member ipAddressType Specifies the IP address type - * @member ttl Time-to-live value - * @see ETSI GS MEC 010-2 Clause 6.2.1.13 Type: DNSRuleDescriptor - */ - type record DNSRuleDescriptor { - JSON.String dnsRuleId, - JSON.String domainName, - JSON.String ipAddressType, - IpAddress ipAddress, - integer ttl optional - } - - /** - * @desc The LatencyDescriptor data type describes latency requirements for a MEC application - * @member maxLatency The value of the maximum latency in nano seconds tolerated by the MEC application - * @see ETSI GS MEC 010-2 Clause 6.2.1.14 Type: LatencyDescriptor - */ - type record LatencyDescriptor { - UInt32 maxLatency - } - - /** - * @desc The TerminateAppInstanceOpConfig data type supports the specification of MEC application requirements related to terminate application instance operation configuration - * @member - * @see ETSI GS MEC 010-2 Clause 6.2.1.15 Type: TerminateAppInstanceOpConfig - */ - type record TerminateAppInstanceOpConfig { - // FIXME shall follow the definition in clause 7.1.5.7 of ETSI GS NFV‑IFA 011 [0]. - } - - /** - * @desc The ChangeAppInstanceStateOpConfig data type supports the specification of MEC application requirements related to change application instance state operation configuration - * @member - * @see ETSI GS MEC 010-2 Clause 6.2.1.16 Type: ChangeAppInstanceStateOpConfig - */ - type record ChangeAppInstanceStateOpConfig { - // FIXME shall follow the definition in clause 7.1.5.8 of ETSI GS NFV‑IFA 011 [0]. - } - - /** - * @desc The ServiceDependency data type supports the specification of requirements of a service-consuming MEC application related to a MEC service - * @member serName The name of the service - * @member serCategory A Category reference of the service - * @member version The version of the service - * @member serTransportDependencies Indicates transport and serialization format dependencies of consuming the service - * @member requestedPermissions - * @see ETSI GS MEC 010-2 Clause 6.2.1.17 Type: ServiceDependency - */ - type record ServiceDependency { - JSON.String serName, - CategoryRef serCategory optional, - JSON.String version, - TransportDependency serTransportDependencies optional, - JSON.String requestedPermissions optional - } - - /** - * @desc The TransportDependency data type supports the specification of requirements of a MEC application related to supported transport bindings (each being a combination of a transport with one or more serializers) - * @member transport Information about the transport in this transport binding - * @member serializers Information about the serializers in this transport binding, as defined in the SerializerType type in ETSI GS MEC 011 [17]i.0 - * @member labels Set of labels that allow to define groups of transport bindings - * @see ETSI GS MEC 010-2 Clause 6.2.1.18 Type: TransportDependency - */ - type record TransportDependency { - TransportDescriptor transport, - SerializerType serializers, - Labels labels - } - - type record length(1..infinity) of JSON.String Labels; - - /** - * @desc The TransportDescriptor data type describes a transport - * @member name The name of this transport - * @member description Human-readable description of this transport - * @member type_ Type of the transport, as defined in the TransportTypes type in ETSI GS MEC 011 [17]i.0 - * @member protocol The name of the protocol used. Shall be set to "HTTP" for a REST API - * @member version The version of the protocol used - * @member security Information about the security used by the transport in ETSI GS MEC 011 [17]i.0 - * @member implSpecificInfo Additional implementation specific details of the transport - * @see ETSI GS MEC 010-2 Clause 6.2.1.19 Type: TransportDescriptor - */ - type record TransportDescriptor { - JSON.String name, - JSON.String description optional, - TransportTypes type_, - JSON.String protocol, - JSON.String version, - SecurityInfo security, - JSON.String implSpecificInfo optional - } - - /** - * @desc This data type represents the information of user context transfer capability of application - * @member statefulApplication If the application is stateful, this attribute shall be set to true - * @member userContextTransferSupport This attribute shall be present if the application is stateful and shall be absent otherwise - * @see ETSI GS MEC 010-2 Clause 6.2.1.20 Type: UserContextTransferCapability - */ - type record UserContextTransferCapability { - JSON.Bool statefulApplication, - JSON.Bool userContextTransferSupport optional - } - - /** - * @desc This data type represents the network policy in the application instantiation and operation - * @member steeredNetwork This attribute provides an option for the application to specify a type of network to carry the application traffic - * @member steeredNetwork Provides an option for the application to specify a type of network to carry the application traffic - * @see ETSI GS MEC 010-2 Clause 6.2.1.21 Type: AppNetworkPolicy - */ - type record AppNetworkPolicy { - SteeredNetwork steeredNetwork - } - - /** - * @desc Provides an option for the application to specify a type of network to carry the application traffic - * @member cellularNetwork The application prefers to a cellular network to carry its traffic - * @member wi_fiNetwork The application prefers to a Wi-Fi network to carry its traffic - * @member fixedAccessNetwork The application prefers to a fixed access network to carry its traffic - * @see ETSI GS MEC 010-2 Clause 6.2.1.21 Type: AppNetworkPolicy - */ - type record SteeredNetwork { - JSON.Bool cellularNetwork optional, - JSON.Bool wi_fiNetwork optional, - JSON.Bool fixedAccessNetwork optional - } with { - variant (wi_fiNetwork) "name as 'wi-fiNetwork'"; - } - - } // End of group application_descriptor_information_model - - group application_lifecycle_management_information_model { - - /** - * @desc The LocationConstraints data type supports the specification of MEC application requirements related to MEC application deployment location constraints - * @member countryCode The two-letter ISO 3166 [0] country code in capital letters - * @member civicAddressElement Zero or more elements comprising the civic address - * @member area Geographic area - * @see ETSI GS MEC 010-2 Clause 6.2.2.2 Type: LocationConstraints - */ - type record LocationConstraints { - JSON.String countryCode optional, - CivicAddressElement civicAddressElement optional, - Polygon area optional - } - - type record CivicAddressElement { - integer caType, - JSON.String caValue - } - - type record Geometry { - JSON.String type_, - Coordinates coordinates - } with { - variant (type_) "name as 'type'"; - } - type record of JSON.Number Coordinate; - type record of Coordinate Coordinates; - type record Property { - JSON.String key, - JSON.String value_ - } with { - variant (value_) "name as 'value'"; - } - type record of Property Properties; - type record Polygon { - JSON.String type_, - Geometry geometry, - Properties properties, - JSON.String this_ - } with { - variant (type_) "name as 'type'"; - variant (this_) "name as 'this'"; - } - - /** - * @desc The data type of CreateAppInstanceRequest represents the parameters for creating a new application instance resource - * @member appDId The application descriptor identifier - * @member appInstanceName Human-readable name of the application instance to be created - * @member appInstanceDescription Human-readable description of the application instance to be created - * @member appPlacementInfo Describes the information of selected MEC platform for the application instance to associate - * @see ETSI GS MEC 010-2 Clause 6.2.2.3 Type: CreateAppInstanceRequest - */ - type record CreateAppInstanceRequest { - JSON.String appDId, - JSON.String appInstanceName optional, - JSON.String appInstanceDescription optional, - MepInformation appPlacementInfo optional - } - - /** - * @desc The data type of AppInstanceInfo represents the parameters of instantiated application instance resources - * @member id Identifier of the application instance represented by this data type - * @member appInstanceName Name of the application instance - * @member appInstanceDescription Human-readable description of the application instance to be created - * @member appDId The application descriptor identifier is managed by the application provider to identify the application descriptor in a globally unique way - * @member appProvider The onboarded application package provider name - * @member appName The onboarded application name - * @member appSoftVersion The application software version - * @member appDVersion Version of the application descriptor - * @member appPkgId Identifier of the onboarded application package - * @member vimConnectionInfo Information about VIM connections to be used for managing the resources for the application instance - * @member nsInstanceId Identifier of the NS instance created by NFVO in which the MEC application has been instantiated as a VNF instance - * @member vnfInstanceId Identifier of the VNF instance created by VNFM that the MEC application has been instantiated as - * @member instantiationState Instantiation state of the application instance - * @member instantiatedAppState Information specific to an instantiated application. This attribute shall be present if the instantiationState attribute value is INSTANTIATED - * @member instantiatedAppState Operational state is applicable in the instantiation state INSTANTIATED - * @member _links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.4 Type: AppInstanceInfo - */ - type record AppInstanceInfo { - JSON.String id, - JSON.String appInstanceName optional, - JSON.String appInstanceDescription optional, - JSON.String appDId, - JSON.String appProvider, - JSON.String appName, - JSON.String appSoftVersion, - JSON.String appDVersion, - JSON.String appPkgId, - VimConnectionInfo vimConnectionInfo optional, - JSON.String nsInstanceId optional, - JSON.String vnfInstanceId optional, - InstantiationState instantiationState, - InstantiatedAppState instantiatedAppState optional, - CommunicationInterface communicationInterface optional, - Link links - } with { - variant (links) "name as '_links'"; - } - type record of AppInstanceInfo AppInstanceInfoList; - - type record Link { - LinkType self_, - LinkType instantiate optional, - LinkType terminate optional, - LinkType operate optional, - LinkType configure_platform_for_app optional - } with { - variant (self_) "name as 'self'"; - } - - type record InstantiatedAppState { - OperationalState operationalState optional, - LocationInformation appInstLocation optional - } - - type enumerated InstantiationState { - INSTANTIATED, - NOT_INSTANTIATED - } - - type enumerated OperationalState { - STARTED, - STOPPED - } - - /** - * @desc The data type of AppInstanceInfo represents the parameters of instantiated application instance resources - * @member appInstSelectorType - * @member appInstances - * @member appsFromProviders Match existing application instances, or those created in the future whilst the subscription is active, that belong to applications from certain providers - * @see ETSI GS MEC 010-2 Clause 6.2.2.5 Type: AppInstanceSubscriptionFilter - */ - type record AppInstanceSubscriptionFilter { - AppInstSelectorType appInstSelectorType, - AppInstances appInstances optional, - appsFromProviders appsFromProviders optional - } - - type enumerated AppInstSelectorType { - VOID (0), - APP_IDENTITY (1), - APP_NAME (2), - APP_D_ID (3), - APP_FROM_PROVIDER (4) - } with { - variant "JSON: as number" - } - - type record length(1..infinity) of JSON.String AppInstances; - - /** - * @desc Match existing application instances, or those created in the future whilst the subscription is active, that belong to applications from certain providers - * @member appProvider Name of the application provider to match - * @member appProducts Match application instances that belong to application products with certain product names, from one particular provider - * @see ETSI GS MEC 010-2 Clause 6.2.2.5 Type: AppInstanceSubscriptionFilter - */ - type record AppsFromProvider { - JSON.String appProvider, - AppProducts appProducts optional - } - - type record length(1..infinity) of AppsFromProvider appsFromProviders; - - type record AppProduct { - JSON.String appName, - Versions versions optional - } - - type record length(1..infinity) of AppProduct AppProducts; - - type record Version { - JSON.String appSoftVersion, - JSON.String appDVersion optional - } - - type record length(1..infinity) of Version Versions; - - /** - * @desc This data type represents a subscription filter criteria to match an application LCM operation occurrence - * @member appInstanceSubscriptionFilter this attribute contains filter criteria that selects one or more application instances on which to receive "LCM operation occurrence" notifications - * @member notificationTypes Match particular notification types - * @member operationTypes Type of the LCM operation represented by this application instance LCM operation occurrence - * @member operationStates Type of the LCM operation state represented by this application instance LCM operation occurrence - * @see ETSI GS MEC 010-2 Clause 6.2.2.6 Type: AppLcmOpOccSubscriptionFilter - */ - type record AppLcmOpOccSubscriptionFilter { - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, - JSON.String notificationTypes optional, - OperationTypes operationTypes optional, - OperationStates operationStates optional - } - - type enumerated OperationType { - INSTANTIATE, - OPERATE, - TERMINATE, - INVALID_OPERATE // For BI purpose only - } - - type record length(1..infinity) of OperationType OperationTypes; - - type enumerated OperationState { - STARTING, - PROCESSING, - COMPLETED, - FAILED, - FAILED_TEMP - } - - type record length(1..infinity) of OperationState OperationStates; - - /** - * @desc This data type represents request parameters of the "Instantiate Application" operation - * @member virtualComputeDescriptor Describes CPU and memory requirements, as well as optional additional requirements, such as disk and acceleration related capabilities, of the virtualisatio n container used to realize the application instance to be created - * @member virtualStorageDescriptor Defines descriptors of virtual storage resources to be used by the application instance to be created - * @member selectedMECHostInfo Describes the information of selected host for the application instance - * @member locationConstraints Defines the location constraints for the application instance to be created - * @member vimConnectionInfo Information about VIM connections to be used for managing the resources for the application instance, or refer to external/externally-managed virtual links - * @member appTermCandsForCoord Provides sets of applications as termination candidate alternatives that the MEO/MEAO shall select from when utilizing the coordinate LCM operation exchange - * @see ETSI GS MEC 010-2 Clause 6.2.2.7 Type: InstantiateAppRequest - */ - type record InstantiateAppRequest { - VirtualComputeDescriptor virtualComputeDescriptor optional, - VirtualStorageDescriptor virtualStorageDescriptor optional, - MECHostInformation selectedMECHostInfo, - LocationConstraints locationConstraints optional, - VimConnectionInfo vimConnectionInfo optional, - AppTermCandsForCoord appTermCandsForCoord optional - } - - /** - * @desc This data type represents request parameters of the "Operate Application" operation - * @member changeStateTo The desired operational state - * @member stopType The stop type - * @member gracefulStopTimeout The time interval (in seconds) to wait for the application instance to be taken out of service during graceful stop, before stopping the application - * @see ETSI GS MEC 010-2 Clause 6.2.2.8 Type: OperateAppRequest - */ - type record OperateAppRequest { - OperationalState changeStateTo, - StopType stopType optional, - UInt32 gracefulStopTimeout optional - } - - type enumerated StopType { - FORCEFUL, - GRACEFUL - } - - /** - * @desc This data type represents request parameters of the "Terminate Application Request" operation - * @member terminationType Indicates whether forceful or graceful termination is requested - * @member gracefulTerminationTimeout This attribute is only applicable in case of graceful termination - * @see ETSI GS MEC 010-2 Clause 6.2.2.9 Type: TerminateAppRequest - */ - type record TerminateAppRequest { - TerminationType terminationType, - UInt32 gracefulTerminationTimeout optional - } - - type StopType TerminationType; - - /** - * @desc The data type represents a subscription to notification of application instance operational state change - * @member id Identifier of the subscription to application instance operational state change notification - * @member subscriptionType Shall be set to "AppInstanceStateChangeSubscription" - * @member appInstanceState Application instance state subscribed to - * @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.10 Type: AppInstSubscriptionInfo - */ - type record AppInstSubscriptionInfo { - JSON.String id, - JSON.String subscriptionType, - AppInstanceState appInstanceState optional, - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, - JSON.AnyURI callbackUri, - AppInstSubscriptionInfo_Link links - } with { - variant (links) "name as '_links'"; - } - - type enumerated AppInstanceState { - NOT_INSTANTIATED, - STARTED, - STOPPED - } - - type record AppInstSubscriptionInfo_Link { - LinkType self_ - } with { - variant (self_) "name as 'self'"; - } - - /** - * @desc This data type represents an application instance notification for informing the subscribers about operational state of application instance resources - * @member id Identifier of this notification - * @member notificationType Discriminator for the different notification types - * @member appInstanceState Application instance state - * @member subscriptionId Identifier of the subscription related to this notification - * @member timeStamp Date and time of the notification generation - * @member appInstanceId Identifier of application instance - * @member appPkgId Identifier of the onboarded application package - * @member appDId The application descriptor identifier identifies the application package and the application descriptor in a globally unique way - * @member appInstLocation Location of the MEC application instance - * @member links A link to the related subscription - * @see ETSI GS MEC 010-2 Clause 6.2.2.11 Type: AppInstNotification - */ - type record AppInstNotification { - JSON.String id, - NotificationType notificationType, - AppInstanceState appInstanceState optional, - JSON.String subscriptionId, - TimeStamp timeStamp, - JSON.String appInstanceId, - JSON.String appPkgId, - JSON.String appDId, - LocationInformation appInstLocation optional, - AppInstNotification_Links links - } with { - variant (links) "name as '_links'"; - } - - type record AppInstNotification_Links { - LinkType subscription - } - - /** - * @desc The data type represents the input parameters of "subscription operation" to notification of application lifecycle management for the operational state change of application instance - * @member subscriptionType Shall be set to "AppInstanceStateChangeSubscription" - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member appInstanceState Only send notifications for application instances that are in one of the states listed in this attribute - * @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription - * @see ETSI GS MEC 010-2 Clause 6.2.2.12 Type: AppInstSubscriptionRequest - */ - type record AppInstSubscriptionRequest { - JSON.String subscriptionType, - JSON.AnyURI callbackUri, - AppInstanceState appInstanceState optional, - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional - } - - /** - * @desc This data type represents an application lifecycle management operation occurrence - * @member id Identifier of the subscription to application LCM operation occurrence notification - * @member operationState Operation state - * @member stateEnteredTime Date and time when the current state was entered - * @member startTime Date and time of the start of the operation - * @member lcmOperationType of the actual LCM operation represented by this application instance LCM operation occurrence - * @member operationParams Input parameters of the LCM operation - * @member isCancelPending If the application LCM operation occurrence operationState is in "PROCESSING" state and the operation is being cancelled, this attribute shall be set to true - * @member cancelMode The mode of an cancellation - * @member links Link to the application instance that the operation applies to - * @see ETSI GS MEC 010-2 Clause 6.2.2.13 Type: AppLcmOpOcc - */ - type record AppLcmOpOcc { - JSON.String id, - OperationState operationState, - TimeStamp stateEnteredTime, - TimeStamp startTime, - LcmOperation lcmOperation, - OperationParams operationParams optional, - JSON.Bool isCancelPending optional, - CancelMode cancelMode optional, - AppLcmOpOcc_Link links - } with { - variant (links) "name as '_links'"; - } - - type OperationType LcmOperation; - - type union OperationParams { - InstantiateAppRequest instantiateAppRequest, - OperateAppRequest operateAppRequest, - TerminateAppRequest terminateAppRequest - } - - type record AppLcmOpOcc_Link { - LinkType self_, - LinkType appInstance - } with { - variant (self_) "name as 'self'"; - } - - /** - * @desc This data type represents a subscription request to notification of application life cycle management operation occurrence - * @member subscriptionType Shall be set to "AppLcmOpOccStateChangeSubscription" - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member appLcmOpOccSubscriptionFilter Subscription filter criteria to match specific application LCM operation occurrences - * @see ETSI GS MEC 010-2 Clause 6.2.2.14 Type: AppLcmOpOccSubscriptionRequest - */ - type record AppLcmOpOccSubscriptionRequest { - JSON.String subscriptionType, - JSON.AnyURI callbackUri, - AppLcmOpOccSubscriptionFilter appLcmOpOccSubscriptionFilter optional - } - - /** - * @desc This data type represents a subscription to notifications of application life cycle management operation occurrence - * @member id Identifier of this subscription resource - * @member subscriptionType Shall be set to "AppLcmOpOccStateChangeSubscription" - * @member appLcmOpOccSubscriptionFilter Criteria used to select application LCM operation occurrences on which to send notifications related to this subscription - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.15 Type: AppLcmOpOccSubscriptionInfo - */ - type record AppLcmOpOccSubscriptionInfo { - JSON.String id, - JSON.String subscriptionType, - JSON.AnyURI callbackUri, - AppLcmOpOccSubscriptionFilter appLcmOpOccSubscriptionFilter optional, - AppLcmOpOccSubscriptionInfo_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppLcmOpOccSubscriptionInfo_Link { - LinkType self_ - } with { - variant (self_) "name as 'self'"; - } - - /** - * @desc This data type represents a notification related to state changes of an application LCM operation occurrence which informs the subscribers - * @member id Identifier of this notification - * @member notificationType Discriminator for the different notification types - * @member operationType Discriminator for the different notification types - * @member operationState Operation state - * @member subscriptionId Identifier of the subscription to this notification - * @member timeStamp Date and time of the notification generation - * @member appLcmOpOccId Identifier of application lifecycle management operation occurrence - * @member appInstanceId Identifier of application instance - * @member links Links to resources related to this notification - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.16 Type: AppLcmOpOccNotification - */ - type record AppLcmOpOccNotification { - JSON.String id, - NotificationType notificationType, - OperationType operationType, - OperationState operationState, - JSON.String subscriptionId, - TimeStamp timeStamp, - JSON.String appInstanceId, - AppLcmOpOccNotification_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppLcmOpOccNotification_Link { - LinkType appInstance, - LinkType subscription, - LinkType appLcmOpOcc - } - - /** - * @desc The data type represents the parameters of MEC host information - * @member hostName Human-readable name of MEC host - * @member hostId KeyValuePairs - * @see ETSI GS MEC 010-2 Clause 6.2.2.17 Type: MECHostInformation - */ - type record MECHostInformation { - JSON.String hostName optional, - KeyValuePairs hostId - } - - /** - * @desc The VimConnectionInfo data type specifies the connection information of VIM for managing the resources of the application instance - * @member id The identifier of the VIM Connection - * @member vimId The identifier of the VIM instance - * @member vimType Discriminator for the different types of the VIM information - * @member interfaceInfo Information about the interface or interfaces to the VIM, if applicable, such as the URI of an interface endpoint to communicate with the VIM - * @member accessInfo Authentication credentials for accessing the VIM, and other access-related information such as tenants or infrastructure resource groups - * @member extra VIM type specific additional information - * @see ETSI GS MEC 010-2 Clause 6.2.2.18 Type: VimConnectionInfo - */ - type record VimConnectionInfo { - JSON.String id, - JSON.String vimId optional, - JSON.String vimType, - KeyValuePairs interfaceInfo optional, - KeyValuePairs accessInfo optional, - KeyValuePairs extra optional - } - - /** - * @desc The data type represents a subscription link list of notification on application lifecycle management - * @member links List of hyperlinks related to the resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.19 Type: AppInstanceSubscriptionLinkList - */ - type record SubscriptionLinkList { - SubscriptionLinkList_Link links - } with { - variant (links) "name as '_links'"; - } - - type record SubscriptionLinkList_Link { - LinkType self_, - SubscriptionLinkList_Link_Subscriptions subscriptions optional - } with { - variant (self_) "name as 'self'"; - } - - type record SubscriptionLinkList_Link_Subscription { - JSON.AnyURI href, - AppInstanceSubscriptionType subscriptionType - } - - type record length(1..infinity) of SubscriptionLinkList_Link_Subscription SubscriptionLinkList_Link_Subscriptions; - - /** - * @desc String representing the type of a subscription - * @see ETSI GS MEC 010-2 Clause 6.2.2.20.2 Simple data types - */ - type JSON.String AppInstanceSubscriptionType; - - /** - * @desc This data type represents the parameters for configuring the MEP to run an application instance - * @member appServiceRequired Describes services a MEC application requires to run - * @member appServiceOptional Describes services a MEC application may use if available - * @member appServiceProduced Describes services a MEC application is able to produce to the platform or other MEC applications - * @member appFeatureRequired Describes features a MEC application requires to run - * @member transportDependencies Transports, if any, that this application requires to be provided by the platform - * @member appTrafficRule Describes traffic rules the MEC application requires - * @member appDNSRule Describes DNS rules the MEC application requires - * @member appLatency Describes the maximum latency tolerated by the MEC application - * @member userContextTransferCapability If the application supports the user context transfer capability, this attribute shall be included - * @member appNetworkPolicy If present, it represents the application network policy of carrying the application traffic - * @see ETSI GS MEC 010-2 Clause 6.2.2.21 Type: ConfigPlatformForAppRequest - */ - type record ConfigPlatformForAppRequest { - ServiceDependency appServiceRequired optional, - ServiceDependency appServiceOptional optional, - ServiceDependency appServiceProduced optional, - FeatureDependency appFeatureRequired optional, - FeatureDependency appFeatureOptional optional, - TransportDependency transportDependencies optional, - TrafficRuleDescriptor appTrafficRule optional, - DNSRuleDescriptor appDNSRule optional, - LatencyDescriptor appLatency optional, - UserContextTransferCapability userContextTransferCapability optional, - AppNetworkPolicy appNetworkPolicy optional - } - - /** - * @desc The data type represents the parameters of MEC platform information - * @member mepName Human-readable name of MEC platform - * @member mepId Deployment-specific identifier of MEC platform - * @see ETSI GS MEC 010-2 Clause 6.2.2.22 Type: MepInformation - */ - type record MepInformation { - JSON.String mepName optional, - JSON.String mepId optional - } - - /** - * @desc The AppTermCandsForCoord data type represents the parameters to provide candidates of applications to terminate in pre-emption situations for LCM coordination exchanges - * @member terminationOptions Sets of application options for the MEO/MEAO to select from as candidates for termination - * @see ETSI GS MEC 010-2 Clause 6.2.2.23 Type: AppTermCandsForCoord - */ - type record AppTermCandsForCoord { - TerminationOptions terminationOptions - } - - type record TerminationOption { - AppInstIdTerminationCands appInstIdTerminationCands - } - - type record length(1..infinity) of JSON.String AppInstIdTerminationCands; - - type record length(1..infinity) of TerminationOption TerminationOptions; - - /** - * @desc The data type represents the input parameters of "subscription operation" to notification of application instance identifier creation - * @member subscriptionType Shall be set to "AppIdentifierCreationSubscription" - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription - * @see ETSI GS MEC 010-2 Clause 6.2.2.25 Type: AppInstIdCreationSubscriptionRequest - */ - type record AppInstIdCreationSubscriptionRequest { - JSON.String subscriptionType, - JSON.AnyURI callbackUri, - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional - } - - /** - * @desc The data type represents a subscription to notification of application instance identifier creation - * @member id Identifier of the subscription to application instance operational state change notification - * @member subscriptionType Shall be set to "AppIdentifierCreationSubscription" - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.26 Type: AppInstIdCreationSubscriptionInfo - */ - type record AppInstIdCreationSubscriptionInfo { - JSON.String id, - JSON.String subscriptionType, - JSON.AnyURI callbackUri, - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, - AppInstIdCreationSubscriptionInfo_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppInstIdCreationSubscriptionInfo_Link { - LinkType self_ - } with { - variant (self_) "name as 'self'"; - } - - /** - * @desc This data type represents a notification for informing the subscribers about the creation of a new "individual application instance" resource and the associated application instance identifier - * @member id Identifier of this notification - * @member notificationType Discriminator for the different notification types - * @member subscriptionId Identifier of the subscription related to this notification - * @member timeStamp Date and time of the notification generation - * @member appInstanceId The created application instance Identifier - * @member links Links to resources related to this notification - * @see ETSI GS MEC 010-2 Clause 6.2.2.27 Type: AppInstanceIdentifierCreationNotification - */ - type record AppInstanceIdentifierCreationNotification { - JSON.String id, - NotificationType notificationType, - TimeStamp timeStamp, - JSON.String appInstanceId, - AppInstanceIdentifierCreationNotification_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppInstanceIdentifierCreationNotification_Link { - LinkType subscription, - LinkType appInstance - } - - /** - * @desc The data type represents the input parameters of "subscription operation" to notification of application instance identifier deletion - * @member subscriptionType Shall be set to "AppIdentifierDeletionSubscription" - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription - * @see ETSI GS MEC 010-2 Clause 6.2.2.28 Type: AppInstIdDeletionSubscriptionRequest - */ - type record AppInstIdDeletionSubscriptionRequest { - JSON.String subscriptionType, - JSON.AnyURI callbackUri, - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional - } - - /** - * @desc The data type represents a subscription to notification of application instance identifier deletion - * @member id Identifier of the subscription to application instance operational state change notification - * @member subscriptionType Shall be set to "AppIdentifierDeletionSubscription" - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.29 Type: AppInstIdDeletionSubscriptionInfo - */ - type record AppInstIdDeletionSubscriptionInfo { - JSON.String id, - JSON.String subscriptionType, - JSON.AnyURI callbackUri, - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, - AppInstIdDeletionSubscriptionInfo_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppInstIdDeletionSubscriptionInfo_Link { - LinkType self_ - } with { - variant (self_) "name as 'self'"; - } - - /** - * @desc This data type represents a notification for informing the subscribers about the deletion of an "individual application instance" resource and the associated application instance identifier - * @member id Identifier of this notification - * @member notificationType Discriminator for the different notification types - * @member subscriptionId Identifier of the subscription related to this notification - * @member timeStamp Date and time of the notification generation - * @member appInstanceId The deleted application instance Identifier - * @member links Links to resources related to this notification - * @see ETSI GS MEC 010-2 Clause 6.2.2.30 Type: AppInstanceIdentifierDeletionNotification - */ - type record AppInstanceIdentifierDeletionNotification { - JSON.String id, - NotificationType notificationType, - JSON.String subscriptionId, - TimeStamp timeStamp, - JSON.String appInstanceId, - AppInstanceIdentifierDeletionNotification_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppInstanceIdentifierDeletionNotification_Link { - LinkType subscription, - LinkType appInstance - } - - /** - * @desc The LocationInformation data type represents the location information of the site hosting the MEC application instance - * @member countryCode The two-letter ISO 3166 [3] country code in capital letters where an instance is deployed - * @member civicAddress Provides the civic address of the site hosting the MEC application instance - * @member Geographical position (i.e. latitude and longitude) where an instance is deployed - * @see ETSI GS MEC 010-2 Clause 6.2.2.31 Type: LocationInformation - */ - type record LocationInformation { - JSON.String countryCode, - CivicAddressElement civicAddress optional, - JSON.String geographicalPosition optional - } - - /** - * @desc This data type represents the valid modes of cancelling an application LCM operation - * @see ETSI GS MEC 010-2 Clause 6.2.2.32 Type: CancelMode - */ - type StopType CancelMode; - - } // End of group application_lifecycle_management_information_model - - group application_package_information_model { - - /** - * @desc The data type CreateAppPkg represents the parameters for creating a new application package resource - * @member appPkgName Name of the application package to be onboarded - * @member appPkgVersion Version of the application package to be onboarded - * @member appProvider The provider's name of the application package to be onboarded - * @member checksum Checksum of the onboarded application package - * @member userDefinedData User defined data for the application package - * @member appPkgPath Address information of the application package - * @see ETSI GS MEC 010-2 Clause 6.2.3.2 Type: CreateAppPkg - */ - type record CreateAppPkg { - JSON.String appPkgName, - JSON.String appPkgVersion, - JSON.String appProvider optional, - Checksum checksum, - KeyValuePairs userDefinedData optional, - JSON.AnyURI appPkgPath - } - - /** - * @desc The data type AppPkgInfo represents the parameters for an application package resource - * @member id Identifier of the application package resource - * @member appDId The application descriptor identifier - * @member appProvider The provider's name of the onboarded application package - * @member appName Name of the onboarded application - * @member appSoftwareVersion Software version of the application. This is updated when there is any change to the software in the onboarded application package - * @member appDVersion Version of the application descriptor - * @member checksum Checksum of the onboarded application package - * @member signingCertificate The singleton signing certificate if it is included as a file in the AppD archive - * @member softwareImages Information of application software image in application package - * @member additionalArtifacts Additional information of application package artifacts that are not application software images - * @member onboardingState Onboarding state of application package - * @member operationalState Operational state of the onboarded application package - * @member usageState Usage state of the onboarded instance of the application package - * @member mecInfo The MEC version that compatible with this application - * @member userDefinedData User defined data for the application package - * @member onboardingFailureDetails Failure details of current onboarding procedure - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.3.3 Type: AppPkgInfo - */ - type record AppPkgInfo { - JSON.String id, - JSON.String appDId, - JSON.String appProvider optional, - JSON.String appName, - JSON.String appSoftwareVersion, - JSON.String appDVersion, - Checksum checksum, - JSON.String signingCertificate optional, - AppPkgSWImageInfo softwareImages, - AppPkgArtifactInfo additionalArtifacts optional, - OnboardingState onboardingState, - AppPkgInfo_OperationalState operationalState, - UsageState usageState, - AppPkgInfo_MecInfo mecInfo, - KeyValuePairs userDefinedData optional, - ProblemDetails onboardingFailureDetails optional, - AppPkgInfo_Links links - } with { - variant (links) "name as '_links'"; - } - type record of AppPkgInfo AppPkgInfoList; - - type record AppPkgSWImageInfo_ { - // FIXME The data type of application software image information data model is related to virtualisation method and needs for further study - } - type record length(1..infinity) of AppPkgSWImageInfo_ AppPkgSWImageInfo; - type record AppPkgArtifactInfo { - // FIXME The data type of additional information of application package artifacts is not specified in the present document - } - - type enumerated OnboardingState { - CREATED, - UPLOADING, - PROCESSING, - ONBOARDED - } - - type enumerated AppPkgInfo_OperationalState { - ENABLED, - DISABLED, - UNKNOWN // Used for BI purpose only - } - - type enumerated UsageState { - IN_USE, - NOT_IN_USE - } - - type record length(1..infinity) of JSON.String AppPkgInfo_MecInfo; - - type record AppPkgInfo_Links { - LinkType self_, - LinkType appD, - LinkType appPkgContent, - LinkType vnfPkgInfo optional - } with { - variant (self_) "name as 'self'"; - } - - /** - * @desc The data type represents a subscription to notification of application package management for the onboarding, or operational state change of application package - * @member id Identifier of the subscription to application package notification - * @member subscriptionType Type of subscription - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.3.4 Type: AppPkgSubscriptionInfo - */ - type record AppPkgSubscriptionInfo { - JSON.String id, - AppPkgSubscriptionType subscriptionType, - JSON.AnyURI callbackUri, - AppPkgSubscriptionInfo_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppPkgSubscriptionInfo_Link { - LinkType self_ - } with { - variant (self_) "name as 'self'" - } - - /** - * @desc The data type represents a subscription link list of notification on application package management - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList - */ - type record AppPkgSubscriptionLinkList { - AppPkgSubscriptionLinkList_Link links + /** + * @desc An application Descriptor (AppD) is a part of application package, and describes application requirements and rules required by application provider + * @member appDid Identifier of this MEC application descriptor. This attribute shall be globally unique + * @member appName Name to identify the MEC application + * @member appProvider Provider of the application and of the AppD + * @member appSoftVersion Identifies the version of software of the MEC application + * @member appDVersion Identifies the version of the application descriptor + * @member mecVersion Identifies version(s) of MEC system compatible with the MEC application described in this version of the AppD + * @member appInfoName Human readable name for the MEC application + * @member appDescription Human readable description of the MEC application + * @member virtualComputeDescriptor Describes CPU and memory requirements, as well as optional additional requirements, such as disk and acceleration related capabilities, of the virtualisation container used to realize this MEC application + * @member osContainerDescriptor Describes CPU, memory requirements and limits, and software images of the OS Containers realizing this MEC application corresponding to OS Containers sharing the same host and same network namespace + * @member swImageDescriptor Describes the descriptors of the software image to be used by the virtualisation container used to realize this MEC application + * @member virtualStorageDescriptor Defines descriptors of virtual storage resources to be used by the MEC application + * @member appExtCpd Describes external interface(s) exposed by this MEC application + * @member appServiceRequired Describes services a MEC application requires to run + * @member appServiceOptional Describes services a MEC application may use if available + * @member appServiceProduced Describes services a MEC application is able to produce to the platform or other MEC applications + * @member appFeatureRequired Describes features a MEC application requires to run + * @member appFeatureOptional Describes features a MEC application may use if available + * @member transportDependencies Transports, if any, that this application requires to be provided by the platform + * @member appTrafficRule Describes traffic rules the MEC application requires + * @member appDNSRule Describes DNS rules the MEC application requires + * @member appLatency Describes the maximum latency tolerated by the MEC application + * @member terminateAppInstanceOpConfig Configuration parameters for the Terminate application instance operation + * @member changeAppInstanceStateOpConfig Configuration parameters for the change application instance state operation + * @member userContextTransferCapability If the application supports the user context transfer capability + * @member appNetworkPolicy It represents the application network policy of carrying the application traffic + * @member mciopId Identifies the MCIOP in the application package, used in containerized workload management, when the application is realized by a set of OS containers + * @member mcioIdentificationData Name and type of the Managed Container Infrastructure Object (MCIO) that realizes this application. It allows the VNFM to identify the MCIO e.g. when querying the Container Infrastructure Service Management (CISM). + * @member logicalNode The logical node requirements + * @member requestAdditionalCapabilities Specifies requirements for additional capabilities. These can be for a range of purposes + * @member mcioConstraintParams The parameter names for constraints expected to be assigned to MCIOs realizing this application + * @see ETSI GS MEC 010-2 Clause 6.2.1.2.2 + */ + type record AppD { + Json.String appDId, + Json.String appName, + Json.String appProvider, + Json.String appSoftVersion, + Json.String appDVersion, + Json.String mecVersion, + Json.String appInfoName optional, + Json.String appDescription, + VirtualComputeDescriptor virtualComputeDescriptor optional, + OsContainerDescriptors osContainerDescriptor optional, + SwImageDescriptors swImageDescriptor, + VirtualStorageDescriptors virtualStorageDescriptor optional, + AppExternalCpds appExtCpd optional, + ServiceDependencies appServiceRequired optional, + ServiceDependencies appServiceOptional optional, + ServiceDescriptors appServiceProduced optional, + FeatureDependencies appFeatureRequired optional, + FeatureDependencies appFeatureOptional optional, + TransportDependencies transportDependencies optional, + TrafficRuleDescriptors appTrafficRule optional, + DNSRuleDescriptors appDNSRule optional, + LatencyDescriptor appLatency optional, + TerminateAppInstanceOpConfig terminateAppInstanceOpConfig optional, + ChangeAppInstanceStateOpConfig changeAppInstanceStateOpConfig optional, + UserContextTransferCapability userContextTransferCapability optional, + AppNetworkPolicy appNetworkPolicy optional, + Json.String mciopId optional, + McioIdentificationData mcioIdentificationData optional, + LogicalNodeRequirements logicalNode optional, + RequestedAdditionalCapabilityData requestAdditionalCapabilities optional, + McioConstraintParams mcioConstraintParams optional + } // End of type AppD + + /** + * @desc Parameter names for constraints expected to be assigned to MCIOs realizing this application + * @see ETSI GS MEC 010-2 Clause 6.2.1.2.2 + */ + type enumerated McioConstraintParams { + localAffinityCisNode (0), + nodeAdditionalCapabilitySsd (1), + nodeAdditionalCapabilityDpdk (2), + nodeAdditionalCapabilitySriov (3), + nodeAdditionalCapabilityGpu (4), + nodeAdditionalCapabilityFpga (5), + nodeAdditionalCapabilityCpuPin (6), + nodeCapabilityLogicalNuma (7), + nodePool + } with { + variant "JSON: as number" + } + + /** + * @desc The VirtualComputeDescriptor data type supports the specification of requirements related to virtual compute resources + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.3 Type: VirtualComputeDescriptor + */ + type record VirtualComputeDescriptor { + // FIXME shall follow the definition in clause 7.1.9.2.2 of ETSI GS NFV‑IFA 011 [0], with the following consideration: + } + + /** + * @desc The SwImageDescriptor data type describes the software image of a MEC application + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.4 Type: SwImageDescriptor + */ + type record SwImageDescriptor { + // FIXME shall follow the definition in clause 7.1.6.5 of ETSI GS NFV‑IFA 001 [1], with the following consideration: + } + type set of SwImageDescriptor SwImageDescriptors; + + /** + * @desc The VirtualStorageDescriptor data type describes the virtual storage required by a MEC application + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.5 Type: VirtualStorageDescriptor + */ + type record VirtualStorageDescriptor { + // FIXME shall follow the definition in clause 7.1.9.4 of ETSI GS NFV‑IFA 011 [0], with the following consideration: + } + type set of VirtualStorageDescriptor VirtualStorageDescriptors; + + /** + * @desc The AppExternalCpd data type supports the specification of MEC application requirements related to external connection point + * @member virtualNetworkInterfaceRequirements Specifies requirements on a virtual network interface realizing the CPs instantiated from this CPD + * member additionalServiceData Additional service identification data of the external CP + * @see ETSI GS MEC 010-2 Clause 6.2.1.6 Type: AppExternalCpd + */ + type record AppExternalCpd { + VirtualNetworkInterfaceRequirements virtualNetworkInterfaceRequirements optional, + AdditionalServiceData additionalServiceData optional + // FIXME inherited attributes + } + type set of AppExternalCpd AppExternalCpds; + + type record VirtualNetworkInterfaceRequirement { + // FIXME For the definition of the VirtualNetworkInterfaceRequirements, please refer to clause 7.1.6.6 of ETSI GS NFV-IFA 001 [1]. For the definition of Cpd, please refer to clause 7.1.6.3 of ETSI GS NFV-IFA 001 [1] + } + + type record AdditionalServiceData { + // FIXME For the definition of the VirtualNetworkInterfaceRequirements, please refer to clause 7.1.18.3 of ETSI GS NFV IFA 011 [1]. + } + + type record length(1..infinity) of VirtualNetworkInterfaceRequirement VirtualNetworkInterfaceRequirements; + + /** + * @desc The ServiceDescriptor data type describes a MEC service produced by a service-providing MEC applicationt + * @member serName The name of the service, for example, RNIS, LocationService, etc + * @member serCategory A Category reference of the service, defined in ETSI GS MEC 011 [17]i.0 + * @member version The version of the service + * @member transportsSupported Indicates transports and serialization formats supported made available to the service-consuming application + * @see ETSI GS MEC 010-2 Clause 6.2.1.7 Type: ServiceDescriptor + */ + type record ServiceDescriptor { + Json.String serName, + CategoryRef serCategory optional, + Json.String version, + TransportsSupported transportsSupported optional + } + type set of ServiceDescriptor ServiceDescriptors; + + /** + * @desc Indicates transports and serialization formats supported made available to the service-consuming application + * @member transport Information about the transport in this binding + * @member serializers Information about the serializers in this binding, as defined in the SerializerType type in ETSI GS MEC 011 [17]i.0 + * @see ETSI GS MEC 010-2 Clause 6.2.1.7 Type: ServiceDescriptor + */ + type record TransportsSupported { + TransportDescriptor transport, + ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SerializerType serializers + } + + /** + * @desc The FeatureDependency data type supports the specification of requirements of a MEC application related to a feature of MEC platform + * @member featureName The name of the feature, for example, UserApps, UEIdentity, etc + * @member version The version of the feature + * @see ETSI GS MEC 010-2 Clause 6.2.1.8 Type: FeatureDependency + */ + type record FeatureDependency { + Json.String featureName, + Json.String version + } + type set of FeatureDependency FeatureDependencies; + + /** + * @desc The TrafficRuleDescriptor data type describes traffic rules related to a MEC application + * @member trafficRuleId Identifies the traffic rule + * @member filterType Definition of filter type: per FLOW or PACKET + * @member priority Priority of this traffic rule within the range 0 to 255. If traffic rule conflicts, the one with higher priority take precedence + * @member trafficFilter The filter used to identify specific flow/packets that need to be handled by the MEC host + * @member action_ Identifies the action of the MEC host data plane, when a packet matches the trafficFilter + * @member dstInterface Describes the destination interface information + * @see ETSI GS MEC 010-2 Clause 6.2.1.9 Type: TrafficRuleDescriptor + */ + type record TrafficRuleDescriptor { + Json.String trafficRuleId, + FilterType filterType, + Json.Integer priority, + TrafficFilter trafficFilter, + Action action_, + InterfaceDescriptor dstInterface optional + } with { + variant (action_) "name as 'action'"; + } + type set of TrafficRuleDescriptor TrafficRuleDescriptors; + + /** + * @desc Definition of filter type: per FLOW or PACKET + */ + type enumerated FilterType { + FLOW, + PACKET + } with { + variant "JSON: as number" + } + + /** + * @desc Identifies the action of the MEC host data plane, when a packet matches the trafficFilter + */ + type enumerated Action { + DROP (0), + FORWARD_DECAPSULATED (1), + FORWARD_ENCAPSULATED (2), + PASSTHROUGH (3), + DUPLICATED_DECAPSULATED (4), + DUPLICATE_ENCAPSULATED (5) + } with { + variant "JSON: as number" + } + + /** + * @desc The TrafficFilter data type supports the specification of MEC application requirements related to traffic rules + * @member srcAddress An IP address or a range of IP addresses + * @member dstAddress A IP address or a range of IP addresses + * @member srcPort A port or a range of ports + * @member dstPort A port or a range of ports + * @member protocol Specify the protocol of the traffic filter + * @member tag Used for tag based traffic rule + * @member uri An URI label, in application layer + * @member packetLabel A customized packet label in network layer, as defined by the owner of the MEC platform, is used to filter the traffic + * @member srcTunnelAddressUsed for GTP tunnel based traffic rule + * @member tgtTunnelAddress Used for GTP tunnel based traffic rule + * @member srcTunnelPort Used for GTP tunnel based traffic rule + * @member qCI Used to match all packets that have the same QCI + * @member dSCP Used to match all IPv4 packets that have the same DSCP + * @member tC Used to match all IPv6 packets that have the same TC + * @see ETSI GS MEC 010-2 Clause 6.2.1.10 Type: TrafficFilter + */ + type record TrafficFilter { + Json.String srcAddress optional, + Json.String dstAddress optional, + Json.String srcPort optional, + Json.String dstPort optional, + Json.String protocol optional, + Json.String tag optional, + Json.String uri optional, + Json.String packetLabel optional, + Json.String srcTunnelAddress optional, + Json.String tgtTunnelAddress optional, + Json.String srcTunnelPort optional, + Json.String dstTunnelPort optional, + Json.Integer qCI optional, + Json.Integer dSCP optional, + Json.Integer tC optional + } + + /** + * @desc The InterfaceDescriptor data type describes an interface of a MEC application + * @member interfaceType Type of interface + * @member tunnelInfo Included only if the destination address type is tunnel + * @member srcMACAddress The source address identifies the MAC address of the interface + * @member dstMACAddress The destination address identifies the MAC address of the destination + * @member dstIPAddressIf the interface type is IP, the destination address identifies the IP address of the destination + * @see ETSI GS MEC 010-2 Clause 6.2.1.11 Type: InterfaceDescriptor + */ + type record InterfaceDescriptor { + InterfaceType interfaceType, + TunnelInfo tunnelInfo optional, + Json.String srcMACAddress optional, + Json.String dstMACAddress optional, + Json.String dstIPAddress optional + } + + type enumerated InterfaceType { + TUNNEL (0), + MAC (1), + IP (2) + } with { + variant "JSON: as number" + } + + /** + * @desc The TunnelInfo data type supports the specification of MEC application requirements related to traffic rules + * @member tunnelType Type of tunnel + * @member tunnelDstAddress Destination address of the tunnel + * @member tunnelSrcAddress Source address of the tunnel + * @member tunnelSpecificData Parameters specific to the tunnel + * @see ETSI GS MEC 010-2 Clause 6.2.1.12 Type: TunnelInfo + */ + type record TunnelInfo { + TunnelType tunnelType, + Json.String tunnelDstAddress, + Json.String tunnelSrcAddress, + Json.String tunnelSpecificData optional + } + + type enumerated TunnelType { + GTP_U (0), + GRE (1) + } with { + variant "JSON: as number" + } + + /** + * @desc The DNSRuleDescriptor data type describes DNS rules associated with a MEC application + * @member dnsRuleId Identifies the DNS Rule + * @member domainName FQDN of the DNS rule + * @member ipAddressType Specifies the IP address type + * @member ttl Time-to-live value + * @see ETSI GS MEC 010-2 Clause 6.2.1.13 Type: DNSRuleDescriptor + */ + type record DNSRuleDescriptor { + Json.String dnsRuleId, + Json.String domainName, + Json.String ipAddressType, + IpAddress ipAddress, + Json.Integer ttl optional + } + type set of DNSRuleDescriptor DNSRuleDescriptors; + + /** + * @desc The LatencyDescriptor data type describes latency requirements for a MEC application + * @member maxLatency The value of the maximum latency in nano seconds tolerated by the MEC application + * @see ETSI GS MEC 010-2 Clause 6.2.1.14 Type: LatencyDescriptor + */ + type record LatencyDescriptor { + Json.UInteger maxLatency + } + + /** + * @desc The TerminateAppInstanceOpConfig data type supports the specification of MEC application requirements related to terminate application instance operation configuration + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.15 Type: TerminateAppInstanceOpConfig + */ + type record TerminateAppInstanceOpConfig { + // FIXME shall follow the definition in clause 7.1.5.7 of ETSI GS NFV‑IFA 001 [1]. + } + + /** + * @desc The ChangeAppInstanceStateOpConfig data type supports the specification of MEC application requirements related to change application instance state operation configuration + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.16 Type: ChangeAppInstanceStateOpConfig + */ + type record ChangeAppInstanceStateOpConfig { + // FIXME shall follow the definition in clause 7.1.5.8 of ETSI GS NFV‑IFA 001 [1]. + } + + /** + * @desc The ServiceDependency data type supports the specification of requirements of a service-consuming MEC application related to a MEC service + * @member serName The name of the service + * @member serCategory A Category reference of the service + * @member version The version of the service + * @member serTransportDependencies Indicates transport and serialization format dependencies of consuming the service + * @member requestedPermissions + * @see ETSI GS MEC 010-2 Clause 6.2.1.17 Type: ServiceDependency + */ + type record ServiceDependency { + Json.String serName, + CategoryRef serCategory optional, + Json.String version, + TransportDependency serTransportDependencies optional, + Json.String requestedPermissions optional + } + type set of ServiceDependency ServiceDependencies; + + /** + * @desc The TransportDependency data type supports the specification of requirements of a MEC application related to supported transport bindings (each being a combination of a transport with one or more serializers) + * @member transport Information about the transport in this transport binding + * @member serializers Information about the serializers in this transport binding, as defined in the SerializerType type in ETSI GS MEC 011 [17]i.0 + * @member labels Set of labels that allow to define groups of transport bindings + * @see ETSI GS MEC 010-2 Clause 6.2.1.18 Type: TransportDependency + */ + type record TransportDependency { + TransportDescriptor transport, + ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SerializerType serializers, + Labels labels + } + type set of TransportDependency TransportDependencies; + + type record length(1..infinity) of Json.String Labels; + + /** + * @desc The TransportDescriptor data type describes a transport + * @member name The name of this transport + * @member description Human-readable description of this transport + * @member type_ Type of the transport, as defined in the TransportType type in ETSI GS MEC 011 [17]i.0 + * @member protocol The name of the protocol used. Shall be set to "HTTP" for a REST API + * @member version The version of the protocol used + * @member security Information about the security used by the transport in ETSI GS MEC 011 [17]i.0 + * @member implSpecificInfo Additional implementation specific details of the transport + * @see ETSI GS MEC 010-2 Clause 6.2.1.19 Type: TransportDescriptor + */ + type record TransportDescriptor { + Json.String name, + Json.String description optional, + ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TransportType type_, + Json.String protocol, + Json.String version, + ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SecurityInfo security, + Json.String implSpecificInfo optional + } with { + variant (type_) "name as 'type'"; + } + + /** + * @desc This data type represents the information of user context transfer capability of application + * @member statefulApplication If the application is stateful, this attribute shall be set to true + * @member userContextTransferSupport This attribute shall be present if the application is stateful and shall be absent otherwise + * @see ETSI GS MEC 010-2 Clause 6.2.1.20 Type: UserContextTransferCapability + */ + type record UserContextTransferCapability { + Json.Bool statefulApplication, + Json.Bool userContextTransferSupport optional + } + + /** + * @desc This data type represents the network policy in the application instantiation and operation + * @member steeredNetwork This attribute provides an option for the application to specify a type of network to carry the application traffic + * @member steeredNetwork Provides an option for the application to specify a type of network to carry the application traffic + * @see ETSI GS MEC 010-2 Clause 6.2.1.21 Type: AppNetworkPolicy + */ + type record AppNetworkPolicy { + SteeredNetwork steeredNetwork + } + + /** + * @desc Provides an option for the application to specify a type of network to carry the application traffic + * @member cellularNetwork The application prefers to a cellular network to carry its traffic + * @member wi_fiNetwork The application prefers to a Wi-Fi network to carry its traffic + * @member fixedAccessNetwork The application prefers to a fixed access network to carry its traffic + * @see ETSI GS MEC 010-2 Clause 6.2.1.21 Type: AppNetworkPolicy + */ + type record SteeredNetwork { + Json.Bool cellularNetwork optional, + Json.Bool wi_fiNetwork optional, + Json.Bool fixedAccessNetwork optional + } with { + variant (wi_fiNetwork) "name as 'wi-fiNetwork'"; + } + + /** + * @desc The OsContainerDescriptor data type supports the specification of requirements of container compute resources when a MEC application is intended to be realized by one or a set of OS Containers sharing the same host and same networking namespace + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.22 Type: OsContainerDescriptor + */ + type record OsContainerDescriptor { + // FIXME shall follow the definition in clause 7.1.6.2 of ETSI GS NFV‑IFA 001 [1]. + } + type set of OsContainerDescriptor OsContainerDescriptors; + + /** + * @desc The McioIdentificationData data type contains data needed to identify an MCIO when interworking with the CISM + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.23 Type: McioIdentificationData + */ + type record McioIdentificationData { + // FIXME shall follow the definition in clause 6.2.75.2 of ETSI GS NFV-SOL 001 [19]. + } + + /** + * @desc The LogicalNodeRequirements data type describes compute, memory and I/O requirements that are to be associated with the logical node of infrastructure + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.24 Type: LogicalNodeRequirements + */ + type record LogicalNodeRequirements { + // FIXME shall follow the definition in clause 7.1.9.6.2 of ETSI GS NFV-IFA 011 [1]. + } + + /** + * @desc The RequestedAdditionalCapabilityData data type supports the specification of requested additional capability for a particular application. Such a capability may be for acceleration or specific tasks + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.25 Type: RequestedAdditionalCapabilityData + */ + type record RequestedAdditionalCapabilityData { + // FIXME shall follow the definition in clause 7.1.9.5.2 of ETSI GS NFV-IFA 011 [1]. + } + + /** + * @desc The LocationConstraints data type supports the specification of MEC application requirements related to MEC application deployment location constraints + * @member countryCode The two-letter ISO 3166 [0] country code in capital letters + * @member civicAddressElement Zero or more elements comprising the civic address + * @member area Geographic area + * @see ETSI GS MEC 010-2 Clause 6.2.2.2 Type: LocationConstraints + */ + type record LocationConstraints { + Json.String countryCode optional, + CivicAddressElement civicAddressElement optional, + Polygon area optional + } + + type record CivicAddressElement_ { + Json.Integer caType, + Json.String caValue + } + type set of CivicAddressElement_ CivicAddressElement; + + type record Geometry { + Json.String type_, + Coordinates coordinates + } with { + variant (type_) "name as 'type'"; + } + type set of Json.Number Coordinate; + type set of Coordinate Coordinates; + type record Property { + Json.String key, + Json.String value_ } with { - variant (links) "name as '_links'"; - } - - /** - * @desc Links to resources related to this resource - * @member self_ URI of this resource - * @member subscriptions A link list to the subscriptions to an application package - * @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList - */ - type record AppPkgSubscriptionLinkList_Link { - LinkType self_, - AppPkgSubscriptionLinkList_Link_Subscriptions subscriptions optional + variant (value_) "name as 'value'"; + } + type set of Property Properties; + type record Polygon { + Json.String type_, + Geometry geometry, + Properties properties, + Json.String this_ } with { - variant (self_) "name as 'self'"; - } + variant (type_) "name as 'type'"; + variant (this_) "name as 'this'"; + } + + /** + * @desc The data type of CreateAppInstanceRequest represents the parameters for creating a new application instance resource + * @member appDId The application descriptor identifier + * @member appInstanceName Human-readable name of the application instance to be created + * @member appInstanceDescription Human-readable description of the application instance to be created + * @member appPlacementInfo Describes the information of selected MEC platform for the application instance to associate + * @see ETSI GS MEC 010-2 Clause 6.2.2.3 Type: CreateAppInstanceRequest + */ + type record CreateAppInstanceRequest { + Json.String appDId, + Json.String appInstanceName optional, + Json.String appInstanceDescription optional, + MepInformation appPlacementInfo optional + } + + /** + * @desc The data type of AppInstanceInfo represents the parameters of instantiated application instance resources + * @member id Identifier of the application instance represented by this data type + * @member appInstanceName Name of the application instance + * @member appInstanceDescription Human-readable description of the application instance to be created + * @member appDId The application descriptor identifier is managed by the application provider to identify the application descriptor in a globally unique way + * @member appProvider The onboarded application package provider name + * @member appName The onboarded application name + * @member appSoftVersion The application software version + * @member appDVersion Version of the application descriptor + * @member appPkgId Identifier of the onboarded application package + * @member vimConnectionInfo Information about VIM connections to be used for managing the resources for the application instance + * @member nsInstanceId Identifier of the NS instance created by NFVO in which the MEC application has been instantiated as a VNF instance + * @member vnfInstanceId Identifier of the VNF instance created by VNFM that the MEC application has been instantiated as + * @member instantiationState Instantiation state of the application instance + * @member instantiatedAppState Information specific to an instantiated application. This attribute shall be present if the instantiationState attribute value is INSTANTIATED + * @member communicationInterface Interface for communication with other application instances + * @member _links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.4 Type: AppInstanceInfo + */ + type record AppInstanceInfo { + Json.String id, + Json.String appInstanceName optional, + Json.String appInstanceDescription optional, + Json.String appDId, + Json.String appProvider, + Json.String appName, + Json.String appSoftVersion, + Json.String appDVersion, + Json.String appPkgId, + VimConnectionInfo vimConnectionInfo optional, + Json.String nsInstanceId optional, + Json.String vnfInstanceId optional, + InstantiationState instantiationState, + InstantiatedAppState instantiatedAppState optional, + CommunicationInterface communicationInterface optional, + Link links + } with { + variant (links) "name as '_links'"; + } + type set of AppInstanceInfo AppInstanceInfoList; + + type enumerated InstantiationState { + INSTANTIATED (0), + NOT_INSTANTIATED (1) + } + + type record InstantiatedAppState { + OperationalState operationalState optional, + LocationInformation appInstLocation optional, + McioInfo mcioInfo optional + } + + type enumerated OperationalState { + STARTED (0), + STOPPED (1) + } + + /** + * @desc Links to resources related to this resource + * @member self_ Self referring URI + * @member instantiate Link to the "instantiate" task resource, if the related operation is possible based on the current status of this application instance resource + * @member terminate Link to the "terminate" task resource, if the related operation is possible based on the current status of this application instance resource + * @member operate Link to the "operate" task resource, if the related operation is supported for this application instance, and is possible based on the current status of this application instance resource + * @member appPrconfigure_platform_for_appovider Link to the "configure_platform_for_app" task resource, if the related operation is supported for this application instance, and is possible based on the current status of this application instance resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.4 Type: AppInstanceInfo + */ + type record Link { + LinkType self_, + LinkType instantiate optional, + LinkType terminate optional, + LinkType operate optional, + LinkType configure_platform_for_app optional + } with { + variant (self_) "name as 'self'"; + } + /** + * @desc The data type of AppInstanceInfo represents the parameters of instantiated application instance resources + * @member appInstSelectorType + * @member appInstances + * @member appsFromProviders Match existing application instances, or those created in the future whilst the subscription is active, that belong to applications from certain providers + * @see ETSI GS MEC 010-2 Clause 6.2.2.5 Type: AppInstanceSubscriptionFilter + */ + type record AppInstanceSubscriptionFilter { + AppInstSelectorType appInstSelectorType, + AppInstances appInstances optional, + appsFromProviders appsFromProviders optional + } + + type enumerated AppInstSelectorType { + VOID (0), + APP_IDENTITY (1), + APP_NAME (2), + APP_D_ID (3), + APP_FROM_PROVIDER (4) + } with { + variant "JSON: as number" + } + + type record length(1..infinity) of Json.String AppInstances; + + /** + * @desc Match existing application instances, or those created in the future whilst the subscription is active, that belong to applications from certain providers + * @member appProvider Name of the application provider to match + * @member appProducts Match application instances that belong to application products with certain product names, from one particular provider + * @see ETSI GS MEC 010-2 Clause 6.2.2.5 Type: AppInstanceSubscriptionFilter + */ + type record AppsFromProvider { + Json.String appProvider, + AppProducts appProducts optional + } + + type record length(1..infinity) of AppsFromProvider appsFromProviders; + + type record AppProduct { + Json.String appName, + Versions versions optional + } + + type record length(1..infinity) of AppProduct AppProducts; + + type record Version { + Json.String appSoftVersion, + AppDVersion appDVersion optional + } + type set of Json.String AppDVersion; + + type record length(1..infinity) of Version Versions; + + /** + * @desc This data type represents a subscription filter criteria to match an application LCM operation occurrence + * @member appInstanceSubscriptionFilter this attribute contains filter criteria that selects one or more application instances on which to receive "LCM operation occurrence" notifications + * @member notificationTypes Match particular notification types + * @member operationTypes Type of the LCM operation represented by this application instance LCM operation occurrence + * @member operationStates Type of the LCM operation state represented by this application instance LCM operation occurrence + * @see ETSI GS MEC 010-2 Clause 6.2.2.6 Type: AppLcmOpOccSubscriptionFilter + */ + type record AppLcmOpOccSubscriptionFilter { + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, + Json.String notificationTypes optional, + OperationTypes operationTypes optional, + OperationStates operationStates optional + } + + type enumerated OperationType { + INSTANTIATE (0), + OPERATE (1), + TERMINATE (2) + } + + type record length(1..infinity) of OperationType OperationTypes; + + type enumerated OperationState { + STARTING (0), + PROCESSING (1), + COMPLETED (2), + FAILED (3), + FAILED_TEMP (4) + } + + type record length(1..infinity) of OperationState OperationStates; + + /** + * @desc This data type represents request parameters of the "Instantiate Application" operation + * @member virtualComputeDescriptor Describes CPU and memory requirements, as well as optional additional requirements, such as disk and acceleration related capabilities, of the virtualisatio n container used to realize the application instance to be created + * @member virtualStorageDescriptor Defines descriptors of virtual storage resources to be used by the application instance to be created + * @member osContainerDescriptor Describes CPU, memory requirements and limits, and software images of the OS Containers realizing this MEC application corresponding to OS Containers sharing the same host and same network namespace + * @member selectedMECHostInfo Describes the information of selected host for the application instance + * @member locationConstraints Defines the location constraints for the application instance to be created + * @member vimConnectionInfo Information about VIM connections to be used for managing the resources for the application instance, or refer to external/externally-managed virtual links + * @member appTermCandsForCoord Provides sets of applications as termination candidate alternatives that the MEO/MEAO shall select from when utilizing the coordinate LCM operation exchange + * @see ETSI GS MEC 010-2 Clause 6.2.2.7 Type: InstantiateAppRequest + */ + type record InstantiateAppRequest { + VirtualComputeDescriptor virtualComputeDescriptor optional, + OsContainerDescriptors osContainerDescriptor optional, + VirtualStorageDescriptor virtualStorageDescriptor optional, + MECHostInformation selectedMECHostInfo, + LocationConstraints locationConstraints optional, + VimConnectionInfos vimConnectionInfo optional, + AppTermCandsForCoord appTermCandsForCoord optional + } + + /** + * @desc This data type represents request parameters of the "Operate Application" operation + * @member changeStateTo The desired operational state + * @member stopType The stop type + * @member gracefulStopTimeout The time interval (in seconds) to wait for the application instance to be taken out of service during graceful stop, before stopping the application + * @see ETSI GS MEC 010-2 Clause 6.2.2.8 Type: OperateAppRequest + */ + type record OperateAppRequest { + OperationalState changeStateTo, + StopType stopType optional, + Json.UInteger gracefulStopTimeout optional + } + + type enumerated StopType { + FORCEFUL (0), + GRACEFUL (1), + ERROR_CASE (3) // In case of Bad Request tests + } + + /** + * @desc This data type represents request parameters of the "Terminate Application Request" operation + * @member terminationType Indicates whether forceful or graceful termination is requested + * @member gracefulTerminationTimeout This attribute is only applicable in case of graceful termination + * @see ETSI GS MEC 010-2 Clause 6.2.2.9 Type: TerminateAppRequest + */ + type record TerminateAppRequest { + TerminationType terminationType, + Json.UInteger gracefulTerminationTimeout optional + } + + type StopType TerminationType; + + /** + * @desc The data type represents a subscription to notification of application instance operational state change + * @member id Identifier of the subscription to application instance operational state change notification + * @member subscriptionType Shall be set to "AppInstanceStateChangeSubscription" + * @member appInstanceState Application instance state subscribed to + * @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.10 Type: AppInstSubscriptionInfo + */ + type record AppInstSubscriptionInfo { + Json.String id, + Json.String subscriptionType, + AppInstanceState appInstanceState optional, + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, + Json.AnyURI callbackUri, + AppInstSubscriptionInfo_Link links + } with { + variant (links) "name as '_links'"; + } + + type enumerated AppInstanceState { + NOT_INSTANTIATED (0), + STARTED (1), + STOPPED (2) + } + + /** + * @desc Links to resources related to this resource + * @member self_ URI of this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.10 Type: AppInstSubscriptionInfo + */ + type record AppInstSubscriptionInfo_Link { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc This data type represents an application instance notification for informing the subscribers about operational state of application instance resources + * @member id Identifier of this notification + * @member notificationType Discriminator for the different notification types + * @member appInstanceState Application instance state + * @member subscriptionId Identifier of the subscription related to this notification + * @member timeStamp Date and time of the notification generation + * @member appInstanceId Identifier of application instance + * @member appPkgId Identifier of the onboarded application package + * @member appDId The application descriptor identifier identifies the application package and the application descriptor in a globally unique way + * @member appInstLocation Location of the MEC application instance + * @member links Links to resources related to this notification + * @see ETSI GS MEC 010-2 Clause 6.2.2.11 Type: AppInstNotification + */ + type record AppInstNotification { + Json.String id, + NotificationType notificationType, + AppInstanceState appInstanceState optional, + Json.String subscriptionId, + TimeStamp timeStamp, + Json.String appInstanceId, + Json.String appPkgId, + Json.String appDId, + LocationInformation appInstLocation optional, + AppInstNotification_Links links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this notification + * @member subscription A link to the related subscription + * @see ETSI GS MEC 010-2 Clause 6.2.2.11 Type: AppInstNotification + */ + type record AppInstNotification_Links { + LinkType subscription + } + + /** + * @desc The data type represents the input parameters of "subscription operation" to notification of application lifecycle management for the operational state change of application instance + * @member subscriptionType Shall be set to "AppInstanceStateChangeSubscription" + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member appInstanceState Only send notifications for application instances that are in one of the states listed in this attribute + * @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription + * @see ETSI GS MEC 010-2 Clause 6.2.2.12 Type: AppInstSubscriptionRequest + */ + type record AppInstSubscriptionRequest { + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppInstanceState appInstanceState optional, + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional + } + type set of AppInstSubscriptionRequest AppInstSubscriptionRequestList; + + /** + * @desc This data type represents an application lifecycle management operation occurrence + * @member id Identifier of the subscription to application LCM operation occurrence notification + * @member operationState Operation state + * @member stateEnteredTime Date and time when the current state was entered + * @member startTime Date and time of the start of the operation + * @member lcmOperationType of the actual LCM operation represented by this application instance LCM operation occurrence + * @member operationParams Input parameters of the LCM operation + * @member isCancelPending If the application LCM operation occurrence operationState is in "PROCESSING" state and the operation is being cancelled, this attribute shall be set to true + * @member cancelMode The mode of an cancellation + * @member links Link to the application instance that the operation applies to + * @see ETSI GS MEC 010-2 Clause 6.2.2.13 Type: AppLcmOpOcc + */ + type record AppLcmOpOcc { + Json.String id, + OperationState operationState, + TimeStamp stateEnteredTime, + TimeStamp startTime, + OperationType lcmOperation, + OperationParams operationParams optional, + Json.Bool isCancelPending optional, + CancelMode cancelMode optional, + AppLcmOpOcc_Link links + } with { + variant (links) "name as '_links'"; + } + type set of AppLcmOpOcc AppLcmOpOccList; + + /** + * @desc Input parameters of the LCM operation + * @see ETSI GS MEC 010-2 Clause 6.2.2.13 Type: AppLcmOpOcc + */ + type union OperationParams { + InstantiateAppRequest instantiateAppRequest, + OperateAppRequest operateAppRequest, + TerminateAppRequest terminateAppRequest + } + + /** + * @desc Link to the application instance that the operation applies to + * @member self_ URI of this resource + * @member appInstance Link to the application instance that the operation applies to + * @see ETSI GS MEC 010-2 Clause 6.2.2.13 Type: AppLcmOpOcc + */ + type record AppLcmOpOcc_Link { + LinkType self_, + LinkType appInstance + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc This data type represents a subscription request to notification of application life cycle management operation occurrence + * @member subscriptionType Shall be set to "AppLcmOpOccStateChangeSubscription" + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member appLcmOpOccSubscriptionFilter Subscription filter criteria to match specific application LCM operation occurrences + * @see ETSI GS MEC 010-2 Clause 6.2.2.14 Type: AppLcmOpOccSubscriptionRequest + */ + type record AppLcmOpOccSubscriptionRequest { + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppLcmOpOccSubscriptionFilter appLcmOpOccSubscriptionFilter optional + } + + /** + * @desc This data type represents a subscription to notifications of application life cycle management operation occurrence + * @member id Identifier of this subscription resource + * @member subscriptionType Shall be set to "AppLcmOpOccStateChangeSubscription" + * @member appLcmOpOccSubscriptionFilter Criteria used to select application LCM operation occurrences on which to send notifications related to this subscription + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.15 Type: AppLcmOpOccSubscriptionInfo + */ + type record AppLcmOpOccSubscriptionInfo { + Json.String id, + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppLcmOpOccSubscriptionFilter appLcmOpOccSubscriptionFilter optional, + AppLcmOpOccSubscriptionInfo_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this resource + * @member self_ URI of this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.15 Type: AppLcmOpOccSubscriptionInfo + */ + type record AppLcmOpOccSubscriptionInfo_Link { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc This data type represents a notification related to state changes of an application LCM operation occurrence which informs the subscribers + * @member id Identifier of this notification + * @member notificationType Discriminator for the different notification types + * @member operationType Discriminator for the different notification types + * @member operationState Operation state + * @member subscriptionId Identifier of the subscription to this notification + * @member timeStamp Date and time of the notification generation + * @member appLcmOpOccId Identifier of application lifecycle management operation occurrence + * @member appInstanceId Identifier of application instance + * @member links Links to resources related to this notification + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.16 Type: AppLcmOpOccNotification + */ + type record AppLcmOpOccNotification { + Json.String id, + NotificationType notificationType, + OperationType operationType, + OperationState operationState, + Json.String subscriptionId, + TimeStamp timeStamp, + Json.String appLcmOpOccId, + Json.String appInstanceId, + AppLcmOpOccNotification_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this resource + * @member appInstance Link to the resource representing the application instance to which the notified change applies + * @member subscription Link to the related subscription + * @member appLcmOpOcc Link to the application lifecycle management operation occurrence that this notification is related to + * @see ETSI GS MEC 010-2 Clause 6.2.2.16 Type: AppLcmOpOccNotification + */ + type record AppLcmOpOccNotification_Link { + LinkType appInstance, + LinkType subscription, + LinkType appLcmOpOcc + } + + /** + * @desc The data type represents the parameters of MEC host information + * @member hostName Human-readable name of MEC host + * @member hostId KeyValuePairs + * @see ETSI GS MEC 010-2 Clause 6.2.2.17 Type: MECHostInformation + */ + type record MECHostInformation { + Json.String hostName optional, + KeyValuePairs hostId + } + + /** + * @desc The VimConnectionInfo data type specifies the connection information of VIM for managing the resources of the application instance + * @member id The identifier of the VIM Connection + * @member vimId The identifier of the VIM instance + * @member vimType Discriminator for the different types of the VIM information + * @member interfaceInfo Information about the interface or interfaces to the VIM, if applicable, such as the URI of an interface endpoint to communicate with the VIM + * @member accessInfo Authentication credentials for accessing the VIM, and other access-related information such as tenants or infrastructure resource groups + * @member extra VIM type specific additional information + * @see ETSI GS MEC 010-2 Clause 6.2.2.18 Type: VimConnectionInfo + */ + type record VimConnectionInfo { + Json.String id, + Json.String vimId optional, + Json.String vimType, + KeyValuePairs interfaceInfo optional, + KeyValuePairs accessInfo optional, + KeyValuePairs extra optional + } + + type set of VimConnectionInfo VimConnectionInfos; + + /** + * @desc The data type represents a subscription link list of notification on application lifecycle management + * @member links List of hyperlinks related to the resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.19 Type: AppInstanceSubscriptionLinkList + */ + type record AppInstanceSubscriptionLinkList { + AppInstanceSubscriptionLinkList_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc List of hyperlinks related to the resource + * @member self_ URI of this resource + * @member subscriptions A link list to the subscriptions + * @see ETSI GS MEC 010-2 Clause 6.2.2.19 Type: AppInstanceSubscriptionLinkList + */ + type record AppInstanceSubscriptionLinkList_Link { + LinkType self_, + AppInstanceSubscriptionLinkList_Link_Subscriptions subscriptions optional + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc A link list to the subscriptions + * @member href The URI referring to the subscription + * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 010-2 Clause 6.2.2.19 Type: AppInstanceSubscriptionLinkList + */ + type record AppInstanceSubscriptionLinkList_Link_Subscription { + Json.AnyURI href, + AppInstanceSubscriptionType subscriptionType + } + + type record length(1..infinity) of AppInstanceSubscriptionLinkList_Link_Subscription AppInstanceSubscriptionLinkList_Link_Subscriptions; + + /** + * @desc String representing the type of a subscription + * @see ETSI GS MEC 010-2 Clause 6.2.2.20.2 Simple data types + */ + type Json.String AppInstanceSubscriptionType; + + /** + * @desc This data type represents the parameters for configuring the MEP to run an application instance + * @member appServiceRequired Describes services a MEC application requires to run + * @member appServiceOptional Describes services a MEC application may use if available + * @member appServiceProduced Describes services a MEC application is able to produce to the platform or other MEC applications + * @member appFeatureRequired Describes features a MEC application requires to run + * @member transportDependencies Transports, if any, that this application requires to be provided by the platform + * @member appTrafficRule Describes traffic rules the MEC application requires + * @member appDNSRule Describes DNS rules the MEC application requires + * @member appLatency Describes the maximum latency tolerated by the MEC application + * @member userContextTransferCapability If the application supports the user context transfer capability, this attribute shall be included + * @member appNetworkPolicy If present, it represents the application network policy of carrying the application traffic + * @see ETSI GS MEC 010-2 Clause 6.2.2.21 Type: ConfigPlatformForAppRequest + */ + type record ConfigPlatformForAppRequest { + ServiceDependencies appServiceRequired optional, + ServiceDependencies appServiceOptional optional, + ServiceDependencies appServiceProduced optional, + FeatureDependencies appFeatureRequired optional, + FeatureDependencies appFeatureOptional optional, + TransportDependencies transportDependencies optional, + TrafficRuleDescriptors appTrafficRule optional, + DNSRuleDescriptors appDNSRule optional, + LatencyDescriptor appLatency optional, + UserContextTransferCapability userContextTransferCapability optional, + AppNetworkPolicy appNetworkPolicy optional + } + + /** + * @desc The data type represents the parameters of MEC platform information + * @member mepName Human-readable name of MEC platform + * @member mepId Deployment-specific identifier of MEC platform + * @see ETSI GS MEC 010-2 Clause 6.2.2.22 Type: MepInformation + */ + type record MepInformation { + Json.String mepName optional, + Json.String mepId optional + } + + /** + * @desc The AppTermCandsForCoord data type represents the parameters to provide candidates of applications to terminate in pre-emption situations for LCM coordination exchanges + * @member terminationOptions Sets of application options for the MEO/MEAO to select from as candidates for termination + * @see ETSI GS MEC 010-2 Clause 6.2.2.23 Type: AppTermCandsForCoord + */ + type record AppTermCandsForCoord { + TerminationOptions terminationOptions + } + + /** + * @desc Sets of application options for the MEO/MEAO to select from as candidates for termination + * @member appInstIdTerminationCands List of application instance identifiers, constituting a candidate set for termination + * @see ETSI GS MEC 010-2 Clause 6.2.2.23 Type: AppTermCandsForCoord + */ + type record TerminationOption { + AppInstIdTerminationCands appInstIdTerminationCands + } + + type record length(1..infinity) of Json.String AppInstIdTerminationCands; + + type record length(1..infinity) of TerminationOption TerminationOptions; + + /** + * @desc The data type represents the input parameters of "subscription operation" to notification of application instance identifier creation + * @member subscriptionType Shall be set to "AppIdentifierCreationSubscription" + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription + * @see ETSI GS MEC 010-2 Clause 6.2.2.25 Type: AppInstIdCreationSubscriptionRequest + */ + type record AppInstIdCreationSubscriptionRequest { + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional + } + + /** + * @desc The data type represents a subscription to notification of application instance identifier creation + * @member id Identifier of the subscription to application instance operational state change notification + * @member subscriptionType Shall be set to "AppIdentifierCreationSubscription" + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.26 Type: AppInstIdCreationSubscriptionInfo + */ + type record AppInstIdCreationSubscriptionInfo { + Json.String id, + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, + AppInstIdCreationSubscriptionInfo_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this resource + * @member self_ URI of this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.26 Type: AppInstIdCreationSubscriptionInfo + */ + type record AppInstIdCreationSubscriptionInfo_Link { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc This data type represents a notification for informing the subscribers about the creation of a new "individual application instance" resource and the associated application instance identifier + * @member id Identifier of this notification + * @member notificationType Discriminator for the different notification types + * @member subscriptionId Identifier of the subscription related to this notification + * @member timeStamp Date and time of the notification generation + * @member appInstanceId The created application instance Identifier + * @member links Links to resources related to this notification + * @see ETSI GS MEC 010-2 Clause 6.2.2.27 Type: AppInstanceIdentifierCreationNotification + */ + type record AppInstanceIdentifierCreationNotification { + Json.String id, + NotificationType notificationType, + TimeStamp timeStamp, + Json.String appInstanceId, + AppInstanceIdentifierCreationNotification_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this notification + * @member subscription A link to the related subscription + * @member appInstance Link to the resource representing the created application instance + * @see ETSI GS MEC 010-2 Clause 6.2.2.27 Type: AppInstanceIdentifierCreationNotification + */ + type record AppInstanceIdentifierCreationNotification_Link { + LinkType subscription, + LinkType appInstance + } + + /** + * @desc The data type represents the input parameters of "subscription operation" to notification of application instance identifier deletion + * @member subscriptionType Shall be set to "AppIdentifierDeletionSubscription" + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription + * @see ETSI GS MEC 010-2 Clause 6.2.2.28 Type: AppInstIdDeletionSubscriptionRequest + */ + type record AppInstIdDeletionSubscriptionRequest { + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional + } + + /** + * @desc The data type represents a subscription to notification of application instance identifier deletion + * @member id Identifier of the subscription to application instance operational state change notification + * @member subscriptionType Shall be set to "AppIdentifierDeletionSubscription" + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.29 Type: AppInstIdDeletionSubscriptionInfo + */ + type record AppInstIdDeletionSubscriptionInfo { + Json.String id, + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, + AppInstIdDeletionSubscriptionInfo_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this resource + * @member self_ URI of this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.29 Type: AppInstIdDeletionSubscriptionInfo + */ + type record AppInstIdDeletionSubscriptionInfo_Link { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc This data type represents a notification for informing the subscribers about the deletion of an "individual application instance" resource and the associated application instance identifier + * @member id Identifier of this notification + * @member notificationType Discriminator for the different notification types + * @member subscriptionId Identifier of the subscription related to this notification + * @member timeStamp Date and time of the notification generation + * @member appInstanceId The deleted application instance Identifier + * @member links Links to resources related to this notification + * @see ETSI GS MEC 010-2 Clause 6.2.2.30 Type: AppInstanceIdentifierDeletionNotification + */ + type record AppInstanceIdentifierDeletionNotification { + Json.String id, + NotificationType notificationType, + Json.String subscriptionId, + TimeStamp timeStamp, + Json.String appInstanceId, + AppInstIdDeletionSubscriptionRequest links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc The LocationInformation data type represents the location information of the site hosting the MEC application instance + * @member countryCode The two-letter ISO 3166 [3] country code in capital letters where an instance is deployed + * @member civicAddress Provides the civic address of the site hosting the MEC application instance + * @member Geographical position (i.e. latitude and longitude) where an instance is deployed + * @see ETSI GS MEC 010-2 Clause 6.2.2.31 Type: LocationInformation + */ + type record LocationInformation { + Json.String countryCode, + CivicAddressElement civicAddress optional, + Json.String geographicalPosition optional + } + + /** + * @desc This data type represents the valid modes of cancelling an application LCM operation + * @see ETSI GS MEC 010-2 Clause 6.2.2.32 Type: CancelMode + */ + type StopType CancelMode; + + /** + * @desc This data type represents the information about an MCIO representing the application instance realized by one or a set of OS containers + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.2.31 Type: LocationInformation + */ + type record McioInfo { + // FIXME McioInfo shall follow the definition in clause 8.3.3.33.2 of ETSI GS NFV-IFA 013 [15]. + } + + + /** + * @desc The data type CreateAppPkg represents the parameters for creating a new application package resource + * @member appPkgName Name of the application package to be onboarded + * @member appPkgVersion Version of the application package to be onboarded + * @member appProvider The provider's name of the application package to be onboarded + * @member checksum Checksum of the onboarded application package + * @member userDefinedData User defined data for the application package + * @member appPkgPath Address information of the application package + * @see ETSI GS MEC 010-2 Clause 6.2.3.2 Type: CreateAppPkg + */ + type record CreateAppPkg { + Json.String appPkgName, + Json.String appPkgVersion, + Json.String appProvider optional, + Checksum checksum, + KeyValuePairs userDefinedData optional, + Json.AnyURI appPkgPath + } + + /** + * @desc The data type AppPkgInfo represents the parameters for an application package resource + * @member id Identifier of the application package resource + * @member appDId The application descriptor identifier + * @member appProvider The provider's name of the onboarded application package + * @member appName Name of the onboarded application + * @member appSoftwareVersion Software version of the application. This is updated when there is any change to the software in the onboarded application package + * @member appDVersion Version of the application descriptor + * @member checksum Checksum of the onboarded application package + * @member signingCertificate The singleton signing certificate if it is included as a file in the AppD archive + * @member softwareImages Information of application software image in application package + * @member additionalArtifacts Additional information of application package artifacts that are not application software images + * @member onboardingState Onboarding state of application package + * @member operationalState Operational state of the onboarded application package + * @member usageState Usage state of the onboarded instance of the application package + * @member mecInfo The MEC version that compatible with this application + * @member userDefinedData User defined data for the application package + * @member onboardingFailureDetails Failure details of current onboarding procedure + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.3.3 Type: AppPkgInfo + */ + type record AppPkgInfo { + Json.String id, + Json.String appDId, + Json.String appProvider optional, + Json.String appName, + Json.String appSoftwareVersion, + Json.String appDVersion, + Checksum checksum, + Json.String signingCertificate optional, + AppPkgSWImageInfo softwareImages, + AppPkgArtifactInfo additionalArtifacts optional, + OnboardingState onboardingState, + AppPkgInfo_OperationalState operationalState, + UsageState usageState, + AppPkgInfo_MecInfo mecInfo, + KeyValuePairs userDefinedData optional, + ProblemDetails onboardingFailureDetails optional, + AppPkgInfo_Links links + } with { + variant (links) "name as '_links'"; + } + type set of AppPkgInfo AppPkgInfoList; + + type record AppPkgSWImageInfo_ { + // FIXME The data type of application software image information data model is related to virtualisation method and needs for further study + } + type record length(1..infinity) of AppPkgSWImageInfo_ AppPkgSWImageInfo; + + type record AppPkgArtifactInfo { + // FIXME The data type of additional information of application package artifacts is not specified in the present document + } + + type enumerated OnboardingState { + CREATED (0), + UPLOADING (1), + PROCESSING (2), + ONBOARDED (3) + } + + type enumerated AppPkgInfo_OperationalState { + ENABLED (0), + DISABLED (1), + ERROR_BAD_REQUEST (2) + } + + type enumerated UsageState { + IN_USE (0), + NOT_IN_USE (1) + } + + type record length(1..infinity) of Json.String AppPkgInfo_MecInfo; + + /** + * @desc Links to resources related to this resource + * @member self_ Self referring URI + * @member appDId Link to the appD resource + * @member appPkgContent Link to the "Onboarded application package content" resource + * @member vnfPkgInfo Link to the corresponding VNF package resource at NFVO + * @see ETSI GS MEC 010-2 Clause 6.2.3.3 Type: AppPkgInfo + */ + type record AppPkgInfo_Links { + LinkType self_, + LinkType appD, + LinkType appPkgContent, + LinkType vnfPkgInfo optional + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc The data type represents a subscription to notification of application package management for the onboarding, or operational state change of application package + * @member id Identifier of the subscription to application package notification + * @member subscriptionType Type of subscription + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.3.4 Type: AppPkgSubscriptionInfo + */ + type record AppPkgSubscriptionInfo { + Json.String id, + AppPkgSubscriptionType subscriptionType, + Json.AnyURI callbackUri, + AppPkgSubscriptionInfo_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this resource + * @member self_ URI of this resource + * @see ETSI GS MEC 010-2 Clause 6.2.3.4 Type: AppPkgSubscriptionInfo + */ + type record AppPkgSubscriptionInfo_Link { + LinkType self_ + } with { + variant (self_) "name as 'self'" + } + + /** + * @desc The data type represents a subscription link list of notification on application package management + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList + */ + type record AppPkgSubscriptionLinkList { + AppPkgSubscriptionLinkList_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this resource + * @member self_ URI of this resource + * @member subscriptions A link list to the subscriptions to an application package + * @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList + */ + type record AppPkgSubscriptionLinkList_Link { + LinkType self_, + AppPkgSubscriptionLinkList_Link_Subscriptions subscriptions optional + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc A link list to the subscriptions to an application package + * @member href The URI referring to the subscription + * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList + */ + type record AppPkgSubscriptionLinkList_Link_Subscription { + Json.AnyURI href, + AppPkgSubscriptionType subscriptionType + } + + type record length(1..infinity) of AppPkgSubscriptionLinkList_Link_Subscription AppPkgSubscriptionLinkList_Link_Subscriptions; + + /** + * @desc This data type represents an application package management notification for informing the subscribers about onboarding application package resources + * @member id Identifier of this notification + * @member notificationType Discriminator for the different notification types + * @member subscriptionId Identifier of the subscription to this notification + * @member timeStamp Date and time of the notification generation + * @member appPkgId Identifier of the onboarded application package + * @member appDId The application descriptor identifier identifies the application package and the application descriptor in a globally unique way + * @member operationalState Operational state of the application package + * @member links Links to resources related to this notification + * @see ETSI GS MEC 010-2 Clause 6.2.3.6 Type: AppPkgNotification + */ + type record AppPkgNotification { + Json.String id, + Json.String notificationType, + Json.String subscriptionId, + TimeStamp timeStamp, + Json.String appPkgId, + Json.String appDId, + AppPkgInfo_OperationalState operationalState, + AppPkgNotification_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this notification + * @member subscription A link to the related subscription + * @see ETSI GS MEC 010-2 Clause 6.2.3.6 Type: AppPkgNotification + */ + type record AppPkgNotification_Link { + LinkType subscription + } + + /** + * @desc The data type represents the input parameters of "subscription operation" to notification of application package management for the onboarding, or operational state change of application package + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member subscriptionType Type of the subscription + * @member appPkgFilter The attribute-based filter is to filter application packages on which the query applies + * @see ETSI GS MEC 010-2 Clause 6.2.3.7 Type: AppPkgSubscription + */ + type record AppPkgSubscription { + Json.AnyURI callbackUri, + AppPkgSubscriptionType subscriptionType, + AppPkgFilter appPkgFilter optional + } + + /** + * @desc The data type represents modifications of the "AppPkgInfo" data type that can be requested to perform "application package operation" + * @member New value of the "operationalState" attribute of the "OnboardedAppPkgInfo" structure + * @see ETSI GS MEC 010-2 Clause 6.2.3.8 Type: AppPkgInfoModifications + */ + type record AppPkgInfoModifications { + AppPkgInfo_OperationalState operationalState + } + + /** + * @desc String representing the type of a subscription + * @see ETSI GS MEC 010-2 Clause 6.2.3.9.2 Simple data types + */ + type Json.String AppPkgSubscriptionType; + + /** + * @desc This data type represents subscription filter criteria to match application package + * @member appPkgInfoId Match the application package identifier which is allocated by the MEO + * @member appDId Match the application descriptor identifier which is allocated by the application provider + * @member appProvider Match the provider's name of the onboarded application + * @member appName Match the name of the onboarded application + * @member appSoftwareVersion Match the software version of the application package + * @member appDVersion Match the version of the application descriptor + * @member operationalState Match particular operational state of the application package + * @member usageState Match particular usage state of the application package + * @see ETSI GS MEC 010-2 Clause 6.2.3.10 Type: AppPkgFilter + */ + type record AppPkgFilter { + Json.String appPkgInfoId optional, + Json.String appDId optional, + Json.String appProvider optional, + Json.String appName optional, + Json.String appSoftwareVersion optional, + Json.String appDVersion optional, + AppPkgInfo_OperationalState operationalState optional, + UsageState usageState optional + } + + /** + * @desc This type represents a grant request + * @member appInstanceId Identifier of the application instance which this grant request is related to + * @member appLcmOpOccId The identifier of the application lifecycle management operation occurrence associated to the GrantRequest + * @member appDId Identifier of the AppD that defines the application for which the LCM operation is to be granted + * @member operation The lifecycle management operation for which granting is requested + * @member addResources List of resource definitions in the AppD for resources to be added by the LCM operation which is related to this grant request, with one entry per resource + * @member tempResources List of resource definitions in the AppD for resources to be temporarily instantiated during the runtime of the LCM operation which is related to this grant request + * @member removeResources Removed by the LCM operation which is related to this grant request, with one entry per resource + * @member updateResources Provides the definitions of resources to be modified by the LCM operation which is related to this grant request, with one entry per resource + * @member additionalParams MEPM, specific to the application and the LCM operation + * @member links Links to resources related to this request + * @see ETSI GS MEC 010-2 Clause 6.2.4 Granting information model + */ + type record GrantRequest { + Json.String appInstanceId, + Json.String appLcmOpOccId, + Json.String appDId, + OperationType operation, + ResourceDefinitions addResources optional, + ResourceDefinitions tempResources optional, + ResourceDefinitions updateResources optional, + KeyValuePairs additionalParams optional, + GrantRequest_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this request + * @member appLcmOpOcc Related lifecycle management operation occurrence + * @member appInstance Related application instance + * @see ETSI GS MEC 010-2 Clause 6.2.4 Granting information model + */ + type record GrantRequest_Link { + LinkType appLcmOpOcc, + LinkType appInstance + } + + /** + * @desc This type provides information of an existing or proposed resource used by the application + * @member id Identifier of this "ResourceDefinition" structure, unique at least within the scope of the "GrantRequest" structure + * @member type_ Type of the resource definition referenced + * @member vduId Reference to the related VDU in the AppD applicable to this resource + * @member resourceTemplateId Reference to a resource template, i.e. VirtualComputeDescriptor, AppExtCpd, VirtualStorageDescriptor in the AppD + * @member resource Resource information for an existing resource + * @see ETSI GS MEC 010-2 Clause 6.2.4.3 Type: ResourceDefinition + */ + type record ResourceDefinition { + Json.String id, + ResourceDefinition_Type type_, + Json.String vduId optional, + ResourceTemplateId resourceTemplateId, + ResourceDefinition_Resource resource + } with { + variant (type_) "name as 'type'"; + } + + type set of ResourceDefinition ResourceDefinitions; + + type enumerated ResourceDefinition_Type { + COMPUTE (0), + STORAGE (1), + LINKPORT (2), + OSCONTAINER (3) + } + + type set of Json.String ResourceTemplateId; + + /** + * @desc Resource information for an existing resource + * @member vimConnectionInfo Specifies the connection information of VIM for the resources of the application instance + * @member resourceId Identifier of the resource in the scope of the VIM + * @see ETSI GS MEC 010-2 Clause 6.2.4.3 Type: ResourceDefinition + */ + type record ResourceDefinition_Resource { + VimConnectionInfo vimConnectionInfo, + Json.String resourceId + } + + /** + * @desc This type represents a grant + * @member id Identifier of the Grant + * @member appInstanceId Identifier of the application instance which this Grant is related to + * @member appLcmOpOccId The identifier of the application lifecycle management operation occurrence associated to the Grant + * @member vimConnections Provides information regarding VIM connections that are approved to be used by the MEPM to allocate resources, and provides parameters of these VIM connections + * @member zones Identifies resource zones where the resources are approved to be allocated by the MEPM + * @member zoneGroups Information about groups of resource zones that are related and that the MEO has chosen to fulfil a zoneGroup constraint in the Grant request + * @member addResources List of resources that are approved to be added, with one entry per resource + * @member tempResources List of resources that are approved to be temporarily instantiated during the runtime of the lifecycle operation, with one entry per resource + * @member removeResources List of resources that are approved to be removed, with one entry per resource + * @member updateResources List of resources that are approved to be modified, with one entry per resource + * @member vimAssets Information about assets for the application that are managed by the MEO in the VIM, such as software images + * @member extVirtualLinks Information about external VLs to connect the application instance to + * @member MEPM, specific to the application and the LCM operation + * @member links Links to resources related to this request + * @see ETSI GS MEC 010-2 Clause 6.2.4.4 Type: Grant + */ + type record Grant { + Json.String id, + Json.String appInstanceId, + Json.String appLcmOpOccId, + VimConnectionInfos vimConnections optional, + ZoneInfos zones optional, + ZoneGroupInfos zoneGroups optional, + GrantInfos addResources optional, + GrantInfos tempResources optional, + GrantInfos removeResources optional, + GrantInfos updateResources optional, + VimAssets vimAssets optional, + ExtVirtualLinkDatas extVirtualLinks optional, + KeyValuePairs additionalParams optional, + Grant_Link links + } with { + variant (links) "name as '_links'"; + } + + type record VimAssets { + VimSoftwareImage softwareImages optional + } + + /** + * @desc Links to resources related to this request + * @member appLcmOpOcc Related lifecycle management operation occurrence + * @member appInstance Related application instance + * @see ETSI GS MEC 010-2 Clause 6.2.4.4 Type: Grant + */ + type record Grant_Link { + LinkType appLcmOpOcc, + LinkType appInstance + } + + /** + * @desc This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted + * @member resourceDefinitionId Identifier of the related "ResourceDefinition" structure from the related "GrantRequest" structure + * @member vimConnectionId Identifier of the VIM connection to be used to manage this resource + * @member zoneId Reference to the identifier of the "ZoneInfo" structure in the "Grant" structure defining the resource zone into which this resource is to be placed + * @member resourceGroupId Identifier of the "infrastructure resource group", logical grouping of virtual resources assigned to a tenant within an Infrastructure Domain, to be provided when allocating the resource + * @member mcioConstraints The constraint values to be assigned to MCIOs of an application with containerized components + * @see ETSI GS MEC 010-2 Clause 6.2.4.5 Type: GrantInfo + */ + type record GrantInfo { + Json.String resourceDefinitionId, + Json.String vimConnectionId optional, + Json.String zoneId optional, + Json.String resourceGroupId optional, + KeyValuePairs mcioConstraints optional + } + type set of GrantInfo GrantInfos; + + /** + * @desc This type provides information regarding a resource zone + * @member id The identifier of this ZoneInfo instance, for the purpose of referencing it from other structures in the "Grant" structure + * @member zoneId The identifier of the resource zone, as managed by the resource management layer (typically, the VIM) + * @member vimConnectionId Identifier of the connection to the VIM that manages the resource zone + * @see ETSI GS MEC 010-2 Clause 6.2.4.6 Type: ZoneInfo + */ + type record ZoneInfo { + Json.String id, + Json.String zoneId, + Json.String vimConnectionId optional + } + type set of ZoneInfo ZoneInfos; + + /** + * @desc This type provides information regarding a resource zone group + * @member zoneId References of identifiers of "ZoneInfo" structures, each of which provides information about a resource zone that belongs to this group + * @see ETSI GS MEC 010-2 Clause 6.2.4.7 Type: ZoneGroupInfo + */ + type record ZoneGroupInfo { + ZoneIds zoneId + } + type set of ZoneGroupInfo ZoneGroupInfos; + type set of Json.String ZoneIds; + + /** + * @desc This type represents an external VL + * @member id The identifier of the external VL instance + * @member vimConnectionId Identifier of the VIM connection to manage this resource + * @member resourceId The identifier of the resource in the scope of the VIM + * @member extCps External CPs of the application instance to be connected to this external VL + * @member extLinkPorts Externally provided link ports to be used to connect external connection points to this external VL + * @see ETSI GS MEC 010-2 Clause 6.2.4.8 Type: ExtVirtualLinkData + */ + type record ExtVirtualLinkData { + Json.String id, + Json.String vimConnectionId optional, + Json.String resourceId, + AppExtCpData extCps, + ExtLinkPortDatas extLinkPorts optional + } + type set of ExtVirtualLinkData ExtVirtualLinkDatas; + + /** + * @desc This type represents an externally provided link port to be used to connect an external connection point to an external VL + * @member id Identifier of this link port as provided by the entity that has created the link port + * @member resourceHandleReference to the virtualised resource realizing this link port + * @see ETSI GS MEC 010-2 Clause 6.2.4.9 Type: ExtLinkPortData + */ + type record ExtLinkPortData { + Json.String id, + ResourceHandle resourceHandle + } + type set of ExtLinkPortData ExtLinkPortDatas; + + /** + * @desc This type represents the information that allows addressing a virtualised resource that is used by an application instance + * @member vimConnectionId Identifier of the VIM connection to manage the resource + * @member resourceId Identifier of the resource in the scope of the VIM + * @member vimLevelResourceType Type of the resource in the scope of the VIM + * @see ETSI GS MEC 010-2 Clause 6.2.4.10 Type: ResourceHandle + */ + type record ResourceHandle { + Json.String vimConnectionId optional, + Json.String resourceId, + Json.String vimLevelResourceType optional + } + + /** + * @desc This type contains a mapping between a software image definition in the AppD and the corresponding software image managed by the MEO in the VIM which is needed during compute resource instantiation + * @member vimConnectionId Identifier of the VIM connection to access the software image referenced in this structure + * @member appDSoftwareImageId Identifier which references the software image descriptor in the AppD + * @member vimSoftwareImageId Identifier of the software image in the resource management layer (i.e. VIM) + * @see ETSI GS MEC 010-2 Clause 6.2.4.11 Type: VimSoftwareImage + */ + type record VimSoftwareImage { + Json.String vimConnectionId optional, + Json.String appDSoftwareImageId, + Json.String vimSoftwareImageId + } + + /** + * @desc This type represents configuration information for external CPs created from a CPD + * @member cpdId The identifier of the CPD in the AppD + * @member cpConfig List of instance data that need to be configured on the CP instances created from the respective CPD + * @see ETSI GS MEC 010-2 Clause 6.2.4.12 Type: AppExtCpData + */ + type record AppExtCpData_ { + Json.String cpdId, + AppExtCpConfig cpConfig + } + + type record length(1..infinity) of AppExtCpData_ AppExtCpData; + + /** + * @desc This type represents an externally provided link port or network address information per instance of an external connection point + * @member cpInstanceId Identifier of the external CP instance to which this set of configuration parameters is requested to be applied + * @member linkPortId Identifier of a pre-configured link port to which the external CP will be associated + * @member cpProtocolData Parameters for configuring the network protocols on the link port that connects the CP to a VL + * @see ETSI GS MEC 010-2 Clause 6.2.4.13 Type: AppExtCpConfig + */ + type record AppExtCpConfig_ { + Json.String cpInstanceId optional, + Json.String linkPortId optional, + CpProtocolData cpProtocolData optional + } + + type record length(1..infinity) of AppExtCpConfig_ AppExtCpConfig; + + /** + * @desc This type represents network protocol data + * @member layerProtocol Identifier of layer(s) and protocol(s) + * @member ipOverEthernet Network address data for IP over Ethernet to assign to the extCP instance + * @see ETSI GS MEC 010-2 Clause 6.2.4.14 Type: CpProtocolData + */ + type record CpProtocolData_ { + LayerProtocol layerProtocol, + IpOverEthernetAddressData ipOverEthernet optional + } + + type record length(1..infinity) of CpProtocolData_ CpProtocolData; + + type enumerated LayerProtocol { + IP_OVER_ETHERNET + } + + /** + * @desc This type represents network address data for IP over Ethernet + * @member macAddress MAC address + * @member ipAddresses List of IP addresses to assign to the CP instance + * @see ETSI GS MEC 010-2 Clause 6.2.4.15 Type: IpOverEthernetAddressData + */ + type record IpOverEthernetAddressData { + Json.String macAddress optional, + IpAddresses ipAddresses optional + } + + /** + * @desc IP addresses to assign to the CP instance + * @member type_ The type of the IP addresses + * @member fixedAddresses Fixed addresses to assign (from the subnet defined by "subnetId" if provided) + * @member numDynamicAddresses Number of dynamic addresses to assign (from the subnet defined by "subnetId" if provided) + * @member addressRange An IP address range to be used, e.g. in case of egress connections + * @see ETSI GS MEC 010-2 Clause 6.2.4.15 Type: IpOverEthernetAddressData + */ + type record IpAddress { + IpAddressType type_, + FixedAddresses fixedAddresses optional, + Json.Integer numDynamicAddresses optional, + AddressRange addressRange optional + } with { + variant (type_) "name as 'type'"; + } + + type record length(1..infinity) of IpAddress IpAddresses; + + type enumerated IpAddressType { + IPV4, + IPV6 + } + + type record length(1..infinity) of Json.String FixedAddresses; + + type record AddressRange { + Json.String minAddress, + Json.String maxAddress, + Json.String subnetId optional + } + + /** + * @desc This data type represents a type of link + * @member href URI referring to a resource + * @see ETSI GS MEC 010-2 Clause 6.2.5.2 Type: LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc This data type represents a list of key-value pairs + * @member + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.5.3 Type: KeyValuePairs + */ + type record KeyValuePair { + Json.String key_name, + anytype key_value + } + type set of KeyValuePair KeyValuePairs; - type record AppPkgSubscriptionLinkList_Link_Subscription { - JSON.AnyURI href, - AppPkgSubscriptionType subscriptionType - } + /** + * @desc This type represents the checksum of an application package + * @member algorithm Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004 [18] + * @member hash The hexadecimal value of the checksum + * @see ETSI GS MEC 010-2 Clause 6.2.5.6 Type: Checksum + */ + type record Checksum { + Json.String algorithm, + Json.String hash + } - type record length(1..infinity) of AppPkgSubscriptionLinkList_Link_Subscription AppPkgSubscriptionLinkList_Link_Subscriptions; + group edge_platform_application_enablement { /* TITAN WORK-AROUND for build issue (class forward declaration) */ /** - * @desc This data type represents an application package management notification for informing the subscribers about onboarding application package resources - * @member id Identifier of this notification - * @member notificationType Discriminator for the different notification types - * @member subscriptionId Identifier of the subscription to this notification - * @member timeStamp Date and time of the notification generation - * @member appPkgId Identifier of the onboarded application package - * @member appDId The application descriptor identifier identifies the application package and the application descriptor in a globally unique way - * @member operationalState Operational state of the application package - * @member linksLinks to resources related to this notification - * @see ETSI GS MEC 010-2 Clause 6.2.3.6 Type: AppPkgNotification + * @desc The enumeration TransportType represents types of transports. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.4-1: Enumeration TransportType */ - type record AppPkgNotification { - JSON.String id, - JSON.String notificationType, - JSON.String subscriptionId, - TimeStamp timeStamp, - JSON.String appPkgId, - JSON.String appDId, - AppPkgInfo_OperationalState operationalState, - AppPkgNotification_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppPkgNotification_Link { - LinkType subscription + type enumerated TransportType { + REST_HTTP, + MB_TOPIC_BASED, + MB_ROUTING, + MB_PUBSUB, + RPC, + RPC_STREAMING, + WEBSOCKET } /** - * @desc The data type represents the input parameters of "subscription operation" to notification of application package management for the onboarding, or operational state change of application package - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member subscriptionType Type of the subscription - * @member appPkgFilter The attribute-based filter is to filter application packages on which the query applies - * @see ETSI GS MEC 010-2 Clause 6.2.3.7 Type: AppPkgSubscription + * @desc List of supported OAuth 2.0 grant types. */ - type record AppPkgSubscription { - JSON.AnyURI callbackUri, - AppPkgSubscriptionType subscriptionType, - AppPkgFilter appPkgFilter optional - } + // type enumerated GrantTypes { + // OAUTH2_AUTHORIZATION_CODE, + // OAUTH2_IMPLICIT_GRANT, + // OAUTH2_RESOURCE_OWNER, + // OAUTH2_CLIENT_CREDENTIALS + // } + // type record length(1..4) of GrantTypes GrantTypesList; /** - * @desc The data type represents modifications of the "AppPkgInfo" data type that can be requested to perform "application package operation" - * @member New value of the "operationalState" attribute of the "OnboardedAppPkgInfo" structure - * @see ETSI GS MEC 010-2 Clause 6.2.3.8 Type: AppPkgInfoModifications + * @desc The token endpoint. */ - type record AppPkgInfoModifications { - AppPkgInfo_OperationalState operationalState - } + //type Json.String TokenEndpoint; /** - * @desc String representing the type of a subscription - * @see ETSI GS MEC 010-2 Clause 6.2.3.9.2 Simple data types + * @desc Parameters related to use of OAuth 2.0. */ - type JSON.String AppPkgSubscriptionType; + // type record OAuth2Info { + // GrantTypesList grantTypes, + // TokenEndpoint tokenEndpoint + // } /** - * @desc This data type represents subscription filter criteria to match application package - * @member appPkgInfoId Match the application package identifier which is allocated by the MEO - * @member appDId Match the application descriptor identifier which is allocated by the application provider - * @member appProvider Match the provider's name of the onboarded application - * @member appName Match the name of the onboarded application - * @member appSoftwareVersion Match the software version of the application package - * @member appDVersion Match the version of the application descriptor - * @member operationalState Match particular operational state of the application package - * @member usageState Match particular usage state of the application package - * @see ETSI GS MEC 010-2 Clause 6.2.3.10 Type: AppPkgFilter + * @desc This type represents security information related to a transport. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.5.4-1: Attributes of SecurityInfo */ - type record AppPkgFilter { - JSON.String appPkgInfoId optional, - JSON.String appDId optional, - JSON.String appProvider optional, - JSON.String appName optional, - JSON.String appSoftwareVersion optional, - JSON.String appDVersion optional, - AppPkgInfo_OperationalState operationalState optional, - UsageState usageState optional + type record SecurityInfo { + OAuth2Info oAuth2Info optional, + Json.UInt8 extensions optional } - } // End of group application_package_information_model - - group granting_information_model { - /** - * @desc This type represents a grant request - * @member appInstanceId Identifier of the application instance which this grant request is related to - * @member appLcmOpOccId The identifier of the application lifecycle management operation occurrence associated to the GrantRequest - * @member appDId Identifier of the AppD that defines the application for which the LCM operation is to be granted - * @member operation The lifecycle management operation for which granting is requested - * @member addResources List of resource definitions in the AppD for resources to be added by the LCM operation which is related to this grant request, with one entry per resource - * @member tempResources List of resource definitions in the AppD for resources to be temporarily instantiated during the runtime of the LCM operation which is related to this grant request - * @member removeResources Removed by the LCM operation which is related to this grant request, with one entry per resource - * @member updateResources Provides the definitions of resources to be modified by the LCM operation which is related to this grant request, with one entry per resource - * @member additionalParams MEPM, specific to the application and the LCM operation - * @member links Links to resources related to this request - * @see ETSI GS MEC 010-2 Clause 6.2.4 Granting information model + * @desc The enumeration SerializerTypes represents types of serializers. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.3-1: Enumeration SerializerType */ - type record GrantRequest { - JSON.String appInstanceId, - JSON.String appLcmOpOccId, - JSON.String appDId, - OperationType operation, - ResourceDefinition addResources optional, - ResourceDefinition tempResources optional, - ResourceDefinition updateResources optional, - KeyValuePairs additionalParams optional, - GrantRequest_Link links - } with { - variant (links) "name as '_links'"; - } - - type record GrantRequest_Link { - LinkType appLcmOpOcc, - LinkType appInstance + type enumerated SerializerType { + JSON, + XML, + PROTOBUF3, + RAW // Used for invalid behavior } /** - * @desc This type provides information of an existing or proposed resource used by the application - * @member id Identifier of this "ResourceDefinition" structure, unique at least within the scope of the "GrantRequest" structure - * @member type_ Type of the resource definition referenced - * @member vduId Reference to the related VDU in the AppD applicable to this resource - * @member resourceTemplateId Reference to a resource template, i.e. VirtualComputeDescriptor, AppExtCpd, VirtualStorageDescriptor in the AppD - * @member resource Resource information for an existing resource - * @see ETSI GS MEC 010-2 Clause 6.2.4.3 Type: ResourceDefinition + * @desc Reference of the catalogue. */ - type record ResourceDefinition { - JSON.String id, - ResourceDefinition_Type type_, - JSON.String vduId optional, - JSON.String resourceTemplateId, - ResourceDefinition_Resource resource - } - - type enumerated ResourceDefinition_Type { - COMPUTE, - VL, - STORAGE, - LINKPORT - } - - type record ResourceDefinition_Resource { - VimConnectionInfo vimConnectionInfo, - JSON.String resourceId - } + //type Json.String CategoryRef_Href; /** - * @desc This type represents a grant - * @member id Identifier of the Grant - * @member appInstanceId Identifier of the application instance which this Grant is related to - * @member appLcmOpOccId The identifier of the application lifecycle management operation occurrence associated to the Grant - * @member vimConnections Provides information regarding VIM connections that are approved to be used by the MEPM to allocate resources, and provides parameters of these VIM connections - * @member zones Identifies resource zones where the resources are approved to be allocated by the MEPM - * @member zoneGroups Information about groups of resource zones that are related and that the MEO has chosen to fulfil a zoneGroup constraint in the Grant request - * @member addResources List of resources that are approved to be added, with one entry per resource - * @member tempResources List of resources that are approved to be temporarily instantiated during the runtime of the lifecycle operation, with one entry per resource - * @member removeResources List of resources that are approved to be removed, with one entry per resource - * @member updateResources List of resources that are approved to be modified, with one entry per resource - * @member vimAssets Information about assets for the application that are managed by the MEO in the VIM, such as software images - * @member extVirtualLinks Information about external VLs to connect the application instance to - * @member MEPM, specific to the application and the LCM operation - * @member links Links to resources related to this request - * @see ETSI GS MEC 010-2 Clause 6.2.4.4 Type: Grant + * @desc Unique identifier of the category. */ - type record Grant { - JSON.String id, - JSON.String appInstanceId, - JSON.String appLcmOpOccId, - VimConnectionInfo vimConnections optional, - ZoneInfo zones optional, - ZoneGroupInfo zoneGroups optional, - GrantInfo addResources optional, - GrantInfo tempResources optional, - GrantInfo removeResources optional, - GrantInfo updateResources optional, - VimAssets vimAssets optional, - ExtVirtualLinkData extVirtualLinks optional, - KeyValuePairs additionalParams optional, - Grant_Link links - } with { - variant (links) "name as '_links'"; - } - - type record VimAssets { - VimSoftwareImage softwareImages optional - } - - type record Grant_Link { - LinkType appLcmOpOcc, - LinkType appInstance - } + //type Json.String CategoryRef_Id; /** - * @desc This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted - * @member resourceDefinitionId Identifier of the related "ResourceDefinition" structure from the related "GrantRequest" structure - * @member vimConnectionId Identifier of the VIM connection to be used to manage this resource - * @member zoneId Reference to the identifier of the "ZoneInfo" structure in the "Grant" structure defining the resource zone into which this resource is to be placed - * @member resourceGroupId Identifier of the "infrastructure resource group", logical grouping of virtual resources assigned to a tenant within an Infrastructure Domain, to be provided when allocating the resource - * @see ETSI GS MEC 010-2 Clause 6.2.4.5 Type: GrantInfo + * @desc Name of the category. */ - type record GrantInfo { - JSON.String resourceDefinitionId, - JSON.String vimConnectionId optional, - JSON.String zoneId optional, - JSON.String resourceGroupId optional - } + //type Json.String Name; /** - * @desc This type provides information regarding a resource zone - * @member id The identifier of this ZoneInfo instance, for the purpose of referencing it from other structures in the "Grant" structure - * @member zoneId The identifier of the resource zone, as managed by the resource management layer (typically, the VIM) - * @member vimConnectionId Identifier of the connection to the VIM that manages the resource zone - * @see ETSI GS MEC 010-2 Clause 6.2.4.6 Type: ZoneInfo + * @desc Category version. */ - type record ZoneInfo { - JSON.String id, - JSON.String zoneId, - JSON.String vimConnectionId optional - } + //type Json.String CategoryRef_Version; /** - * @desc This type provides information regarding a resource zone group - * @member zoneId References of identifiers of "ZoneInfo" structures, each of which provides information about a resource zone that belongs to this group - * @see ETSI GS MEC 010-2 Clause 6.2.4.7 Type: ZoneGroupInfo + * @desc This type represents the category reference. */ - type record ZoneGroupInfo { - ZoneIds zoneId - } - - type record length(1..infinity) of JSON.String ZoneIds; + // type record CategoryRef { + // CategoryRef_Href href, + // CategoryRef_Id id, + // Name name, + // CategoryRef_Version version + // } - /** - * @desc This type represents an external VL - * @member id The identifier of the external VL instance - * @member vimConnectionId Identifier of the VIM connection to manage this resource - * @member resourceId The identifier of the resource in the scope of the VIM - * @member extCps External CPs of the application instance to be connected to this external VL - * @member extLinkPorts Externally provided link ports to be used to connect external connection points to this external VL - * @see ETSI GS MEC 010-2 Clause 6.2.4.8 Type: ExtVirtualLinkData - */ - type record ExtVirtualLinkData { - JSON.String id, - JSON.String vimConnectionId optional, - JSON.String resourceId, - AppExtCpData extCps, - ExtLinkPortData extLinkPorts optional - } - - /** - * @desc This type represents an externally provided link port to be used to connect an external connection point to an external VL - * @member id Identifier of this link port as provided by the entity that has created the link port - * @member resourceHandleReference to the virtualised resource realizing this link port - * @see ETSI GS MEC 010-2 Clause 6.2.4.9 Type: ExtLinkPortData - */ - type record ExtLinkPortData { - JSON.String id, - ResourceHandle resourceHandle - } - - /** - * @desc This type represents the information that allows addressing a virtualised resource that is used by an application instance - * @member vimConnectionId Identifier of the VIM connection to manage the resource - * @member resourceId Identifier of the resource in the scope of the VIM - * @member vimLevelResourceType Type of the resource in the scope of the VIM - * @see ETSI GS MEC 010-2 Clause 6.2.4.10 Type: ResourceHandle - */ - type record ResourceHandle { - JSON.String vimConnectionId optional, - JSON.String resourceId, - JSON.String vimLevelResourceType optional - } - - /** - * @desc This type contains a mapping between a software image definition in the AppD and the corresponding software image managed by the MEO in the VIM which is needed during compute resource instantiation - * @member vimConnectionId Identifier of the VIM connection to access the software image referenced in this structure - * @member appDSoftwareImageId Identifier which references the software image descriptor in the AppD - * @member vimSoftwareImageId Identifier of the software image in the resource management layer (i.e. VIM) - * @see ETSI GS MEC 010-2 Clause 6.2.4.11 Type: VimSoftwareImage - */ - type record VimSoftwareImage { - JSON.String vimConnectionId optional, - JSON.String appDSoftwareImageId, - JSON.String vimSoftwareImageId - } - - /** - * @desc This type represents configuration information for external CPs created from a CPD - * @member cpdId The identifier of the CPD in the AppD - * @member cpConfig List of instance data that need to be configured on the CP instances created from the respective CPD - * @see ETSI GS MEC 010-2 Clause 6.2.4.12 Type: AppExtCpData - */ - type record AppExtCpData_ { - JSON.String cpdId, - AppExtCpConfig cpConfig - } - - type record length(1..infinity) of AppExtCpData_ AppExtCpData; - - /** - * @desc This type represents an externally provided link port or network address information per instance of an external connection point - * @member cpInstanceId Identifier of the external CP instance to which this set of configuration parameters is requested to be applied - * @member linkPortId Identifier of a pre-configured link port to which the external CP will be associated - * @member cpProtocolData Parameters for configuring the network protocols on the link port that connects the CP to a VL - * @see ETSI GS MEC 010-2 Clause 6.2.4.13 Type: AppExtCpConfig - */ - type record AppExtCpConfig_ { - JSON.String cpInstanceId optional, - JSON.String linkPortId optional, - CpProtocolData cpProtocolData optional - } - - type record length(1..infinity) of AppExtCpConfig_ AppExtCpConfig; - - /** - * @desc This type represents network protocol data - * @member layerProtocol Identifier of layer(s) and protocol(s) - * @member ipOverEthernet Network address data for IP over Ethernet to assign to the extCP instance - * @see ETSI GS MEC 010-2 Clause 6.2.4.14 Type: CpProtocolData - */ - type record CpProtocolData_ { - LayerProtocol layerProtocol, - IpOverEthernetAddressData ipOverEthernet optional - } - - type record length(1..infinity) of CpProtocolData_ CpProtocolData; - - type enumerated LayerProtocol { - IP_OVER_ETHERNET - } - - /** - * @desc This type represents network address data for IP over Ethernet - * @member macAddress MAC address - * @member ipAddresses List of IP addresses to assign to the CP instance - * @see ETSI GS MEC 010-2 Clause 6.2.4.15 Type: IpOverEthernetAddressData - */ - type record IpOverEthernetAddressData { - JSON.String macAddress optional, - IpAddresses ipAddresses optional - } - - /** - * @desc IP addresses to assign to the CP instance - * @member type_ The type of the IP addresses - * @member fixedAddresses Fixed addresses to assign (from the subnet defined by "subnetId" if provided) - * @member numDynamicAddresses Number of dynamic addresses to assign (from the subnet defined by "subnetId" if provided) - * @member addressRange An IP address range to be used, e.g. in case of egress connections - * @see ETSI GS MEC 010-2 Clause 6.2.4.15 Type: IpOverEthernetAddressData - */ - type record IpAddress { - IpAddressType type_, - FixedAddresses fixedAddresses optional, - integer numDynamicAddresses optional, - AddressRange addressRange optional - } - - type record length(1..infinity) of IpAddress IpAddresses; - - type enumerated IpAddressType { - IPV4, - IPV6 - } - - type record length(1..infinity) of JSON.String FixedAddresses; - - type record AddressRange { - JSON.String minAddress, - JSON.String maxAddress, - JSON.String subnetId optional - } - - } // End of group granting_information_model - - group common_information_model { - - /** - * @desc This data type represents a type of link - * @member href URI referring to a resource - * @see ETSI GS MEC 010-2 Clause 6.2.5.2 Type: LinkType - */ - type record LinkType { - JSON.AnyURI href - } - /** - * @desc This data type represents a list of key-value pairs - * @member - * @member - * @see ETSI GS MEC 010-2 Clause 6.2.5.3 Type: KeyValuePairs - */ - type record KeyValuePairs { - JSON.String key_name, - anytype key_value // FIXME To be refined - } - - /** - * @desc This data type represents the time stamp as Unix-time since January 1, 1970, 00:00:00 UTC - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 010-2 Clause 6.2.5.4 Type: TimeStamp - */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } - - /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type UInt32 Seconds; - - /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type UInt32 NanoSeconds; - - /** - * @desc This type represents the checksum of an application package - * @member algorithm Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004 [18] - * @member hash The hexadecimal value of the checksum - * @see ETSI GS MEC 010-2 Clause 6.2.5.6 Type: Checksum - */ - type record Checksum { - JSON.String algorithm, - JSON.String hash - } + type Json.String NotificationType; - } // End of group common_information_model + } // End of group edge_platform_application_enablement } with { extension "anytype integer, float, boolean, universal charstring"; diff --git a/ttcn/LibMec/DeviceApplicationInterfaceAPI/json/UEAppInterfaceApi.json b/ttcn/LibMec/DeviceApplicationInterfaceAPI/json/UEAppInterfaceApi.json deleted file mode 100644 index 6075bbc3f94a82edc215c1c265a5c1fecd279b32..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/DeviceApplicationInterfaceAPI/json/UEAppInterfaceApi.json +++ /dev/null @@ -1,1051 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "contact": { - "url": "https://forge.etsi.org/rep/mec/gs016-dev-app-api" - }, - "title": "ETSI GS MEC 016 Device application interface", - "version": "2.2.1", - "description": "The ETSI MEC ISG Device application interface API described using OpenAPI.", - "license": { - "name": "BSD-3-Clause", - "url": "https://forge.etsi.org/legal-matters" - } - }, - "externalDocs": { - "description": "ETSI GS MEC016 V2.2.1 Device application interface", - "url": "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/02.02.01_60/gs_MEC016v020201p.pdf" - }, - "servers": [ - { - "url": "https://localhost/dev_app/v1" - } - ], - "tags": [ - { - "name": "dev_app" - } - ], - "paths": { - "/app_list": { - "get": { - "tags": [ - "dev_app" - ], - "summary": "Get available application information.", - "description": "Used to query information about the available MEC applications.", - "operationId": "meAppListGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.appName" - }, - { - "$ref": "#/components/parameters/Query.appProvider" - }, - { - "$ref": "#/components/parameters/Query.appSoftVersion" - }, - { - "$ref": "#/components/parameters/Query.vendorId" - }, - { - "$ref": "#/components/parameters/Query.serviceCont" - } - ], - "responses": { - "200": { - "description": "The response body contains an array of the user applications available to the querying device application.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApplicationList" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - }, - "/app_contexts": { - "post": { - "tags": [ - "dev_app" - ], - "summary": "Creation of a new application context.", - "description": "Used to create a new application context. Upon success, the response contains entity body describing the created application context.", - "operationId": "devAppContextsGET", - "requestBody": { - "description": "Entity body in the request contains the Application Context as requested by the device application.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppContext" - } - } - } - }, - "parameters": [], - "responses": { - "201": { - "description": "The response body contains the Application Context as it was created by the MEC system, which includes the reference URI(s) of the associated user application instance(s). The URI of the resource created within the MEC system associated with the request, with its specific application context ID, shall be included in the 'Location' HTTP header of the response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppContext" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "callbacks": { - "notification": { - "{$request.body#/appContext.callbackReference}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification with content based on subscription type", - "operationId": "notificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineNotification" - }, - "example": { - "notificationType": "ApplicationContextDeleteNotification", - "contextId": "contextId123" - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - } - } - }, - "/app_contexts/{contextId}": { - "put": { - "tags": [ - "dev_app" - ], - "summary": "Updating the callbackReference and/or appLocation of an existing application context.", - "description": "Used to update the callback reference and/or application location constraints of an existing application context. Upon successful operation, the target resource is updated with the new application context information.", - "operationId": "devAppContextPUT", - "requestBody": { - "description": "Only the callbackReference and/or appLocation attribute values are allowed to be updated. Other attributes and their values shall remain untouched.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppContext" - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.contextId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - }, - "delete": { - "tags": [ - "dev_app" - ], - "summary": "Deletion of an existing application context.", - "description": "Used to delete the resource that represents the existing application context.", - "operationId": "devAppContextDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.contextId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - }, - "/obtain_app_loc_availability": { - "post": { - "tags": [ - "dev_app" - ], - "summary": "Obtain the location constraints for a new application context.", - "description": "Used to obtain the locations available for instantiation of a specific user application in the MEC system.", - "operationId": "appLocationAvailabilityPOST", - "requestBody": { - "description": "Entity body in the request contains the user application information for the MEC system to evaluate the locations available for instantiation of that application.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApplicationLocationAvailability" - } - } - } - }, - "parameters": [], - "responses": { - "200": { - "description": "The response body contains the locations available for instantiation of the requested user application in the MEC system.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApplicationLocationAvailability" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - } - }, - "components": { - "responses": { - "204": { - "description": "Upon success, a response 204 No Content without any response body is returned." - }, - "400": { - "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized : used when the client did not submit credentials.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden : operation is not allowed given the current status of the resource.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "parameters": { - "Query.appName": { - "name": "appName", - "in": "query", - "description": "Name to identify the MEC application.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "maxLength": 32 - } - } - }, - "Query.appProvider": { - "name": "appProvider", - "in": "query", - "description": "Provider of the MEC application.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "maxLength": 32 - } - } - }, - "Query.appSoftVersion": { - "name": "appSoftVersion", - "in": "query", - "description": "Software version of the MEC application.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "maxLength": 32 - } - } - }, - "Query.vendorId": { - "name": "vendorId", - "in": "query", - "description": "Vendor identifier", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "maxLength": 32 - } - } - }, - "Query.serviceCont": { - "name": "serviceCont", - "in": "query", - "description": "Required service continuity mode for this application. Permitted values: 0 = SERVICE_CONTINUITY_NOT_REQUIRED. 1 = SERVICE_CONTINUITY_REQUIRED.", - "required": false, - "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] - } - }, - "Path.contextId": { - "name": "contextId", - "in": "path", - "description": "Uniquely identifies the application context in the MEC system. It is assigned by the MEC system.", - "required": true, - "schema": { - "type": "string" - } - } - }, - "schemas": { - "AddressChangeNotification": { - "properties": { - "appInstanceId": { - "description": "Identifier of the user application instance.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "contextId": { - "description": "Uniquely identifies the application context in the MEC system.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "notificationType": { - "description": "Shall be set to \"AddressChangeNotification\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "referenceURI": { - "description": "Address of the user application. Used as the reference URI for the application. Assigned by the MEC system.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "URI" - } - }, - "required": [ - "notificationType", - "contextId", - "appInstanceId", - "referenceURI" - ], - "type": "object", - "x-etsi-ref": "6.4.2" - }, - "AppContext": { - "properties": { - "appAutoInstantiation": { - "description": "Provides indication to the MEC system that instantiation of the requested application is desired should a requested appLocation become available that was not at the time of the request.", - "type": "boolean", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Boolean" - }, - "appInfo": { - "description": "", - "properties": { - "appDId": { - "description": "Identifier of this MEC application descriptor. This attribute shall be globally unique. It is equivalent to the appDId defined in clause 6.2.1.2 of ETSI GS MEC 0102 [1]. It shall be present if the application is one in the ApplicationList.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "appDVersion": { - "description": "Identifies the version of the application descriptor. It is equivalent to the appDVersion defined in clause 6.2.1.2 of ETSI GS MEC 0102 [1].", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appDescription": { - "description": "Human readable description of the MEC application. The length of the value shall not exceed 128 characters.", - "type": "string", - "maxLength": 128, - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "appName": { - "description": "Name of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appProvider": { - "description": "Provider of the MEC application.\nThe length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appSoftVersion": { - "description": "Software version of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "appPackageSource": { - "description": "URI of the application package.\nIncluded in the request if the application is not one in the ApplicationList. appPackageSource enables on-boarding of the application package into the MEC system. The application package shall comply with the definitions in clause 6.2.1.2 of ETSI GS MEC 0102 [1].", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "userAppInstanceInfo": { - "description": "List of user application instance information.", - "items": { - "type": "object", - "properties": { - "appInstanceId": { - "description": "Identifier of the user application instance. It shall only be included in the response.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "appLocation": { - "$ref": "#/components/schemas/LocationConstraints" - }, - "referenceURI": { - "description": "Address of the user application instance. It shall only be included in the response.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - } - } - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "array (Structure inlined)" - } - }, - "required": [ - "appName", - "appProvider", - "appDVersion", - "userAppInstanceInfo" - ], - "type": "object", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "appLocationUpdates": { - "description": "Used by the device application to request to receive notifications at the callbackReference URI relating to location availability for user application instantiation.", - "type": "boolean", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Boolean" - }, - "associateDevAppId": { - "description": "Uniquely identifies the device application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "callbackReference": { - "description": "URI assigned by the device application to receive application lifecycle related notifications. Inclusion in the request implies the client supports the pub/sub mechanism and is capable of receiving notifications. This endpoint shall be maintained for the lifetime of the application context.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "contextId": { - "description": "Uniquely identifies the application context in the MEC system. Assigned by the MEC system and shall be present other than in a create request. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "associateDevAppId", - "appInfo" - ], - "type": "object", - "x-etsi-notes": "NOTE 1:\tIf a value of the attribute is included in the request, the same value shall be included in the response.\nNOTE 2:\tThe design of the current operation with callback reference assumes no web proxy between the entity that originates the notification and the entity that receives it.\nNOTE 3:\tThe language support for the application description may be limited.\nNOTE 4:\tAttribute appLocationUpdates and appAutoInstantiation shall not both be set to TRUE.", - "x-etsi-ref": "6.2.3" - }, - "ApplicationContextDeleteNotification": { - "properties": { - "contextId": { - "description": "Uniquely identifies the application context that has been deleted from the MEC system.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "notificationType": { - "description": "Shall be set to \"ApplicationContextDeleteNotification\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "notificationType", - "contextId" - ], - "type": "object", - "x-etsi-ref": "6.4.3" - }, - "ApplicationContextUpdateNotification": { - "properties": { - "contextId": { - "description": "Uniquely identifies the application context in the MEC system.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "notificationType": { - "description": "Shall be set to \"ApplicationContextUpdateNotification\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "userAppInstanceInfo": { - "description": "List of user application instance information.", - "items": { - "type": "object", - "properties": { - "appInstanceId": { - "description": "Identifier of the user application instance.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appLocation": { - "$ref": "#/components/schemas/LocationConstraints" - }, - "referenceURI": { - "description": "Address of the user application instance.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "URI" - } - } - }, - "minItems": 1, - "required": [ - "appInstanceId", - "referenceURI" - ], - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "array (Structure inlined)" - } - }, - "type": "object", - "required": [ - "notificationType", - "contextId", - "userAppInstanceInfo" - ], - "x-etsi-ref": "6.4.4" - }, - "ApplicationList": { - "properties": { - "appList": { - "description": "List of user applications available to the device application. As defined below.", - "items": { - "type": "object", - "properties": { - "appInfo": { - "description": "", - "properties": { - "appCharcs": { - "description": "Characteristics of the application. As defined below. The application characteristics relate to the system resources consumed by the application. A device application can use this information e.g. for estimating the cost of use of the application or for the expected user experience.", - "properties": { - "bandwidth": { - "description": "The required connection bandwidth in kbit/s for the use of the MEC application instance. ", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "uint32" - }, - "latency": { - "description": "The target round trip time in milliseconds supported by the MEC system for the MEC application instance.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "uint32" - }, - "memory": { - "description": "The maximum size in Mbytes of the memory resource expected to be used by the MEC application instance in the MEC system.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "uint32" - }, - "serviceCont": { - "description": "Required service continuity mode for this application. Permitted values: 0 = SERVICE_CONTINUITY_NOT_REQUIRED. 1 = SERVICE_CONTINUITY_REQUIRED.", - "enum": [ - 0, - 1 - ], - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Enum" - }, - "storage": { - "description": "The maximum size in Mbytes of the storage resource expected to be used by the MEC application instance in the MEC system.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "uint32" - } - }, - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "appDId": { - "description": "Identifier of this MEC application descriptor. It is equivalent to the appDId defined in clause 6.2.1.2 of ETSI GS MEC 0102 [1]. This attribute shall be globally unique.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appDVersion": { - "description": "Identifies the version of the application descriptor. It is equivalent to the appDVersion defined in clause 6.2.1.2 of ETSI GS MEC 0102 [1].", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appDescription": { - "description": "Human readable description of the MEC application (see note 2).", - "type": "string", - "maxLength": 128, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appLocation": { - "description": "Identifies the locations of the MEC application.", - "items": { - "$ref": "#/components/schemas/LocationConstraints" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "LocationConstraints" - }, - "appName": { - "description": "Name of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appProvider": { - "description": "Provider of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appSoftVersion": { - "description": "Software version of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "appDId", - "appName", - "appProvider", - "appSoftVersion", - "appDVersion", - "appDescription" - ], - "type": "object", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "vendorSpecificExt": { - "description": "Extension for vendor specific information (see note 1).", - "properties": { - "vendorId": { - "description": "Vendor identifier. The length of the value shall not exceed 32 characters. The rest of the structure of vendor specific extension is not defined.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "vendorId" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - } - } - }, - "minItems": 0, - "required": [ - "appInfo" - ], - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Array (Structure (inlined))" - } - }, - "type": "object", - "x-etsi-notes": "NOTE 1:\tThe vendor specific extension allows submitting information on the application lists that have been made available to the device application of the corresponding vendor.\nNOTE 2:\tThe language support may be limited. The length of the value shall not exceed 128 characters.", - "x-etsi-ref": "6.2.2" - }, - "ApplicationLocationAvailability": { - "properties": { - "appInfo": { - "description": "", - "properties": { - "appDVersion": { - "description": "Identifies the version of the application descriptor. It is equivalent to the appDVersion defined in clause 6.2.1.2 of ETSI GS MEC 0102 [1].", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appDescription": { - "description": "Human readable description of the MEC application. The length of the value shall not exceed 128 characters.", - "type": "string", - "maxLength": 128, - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "appName": { - "description": "Name of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appPackageSource": { - "description": "URI of the application package. Shall be included in the request. The application package shall comply with the definitions in clause 6.2.1.2 of ETSI GS MEC 0102 [1].", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "appProvider": { - "description": "Provider of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appSoftVersion": { - "description": "Software version of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "availableLocations": { - "description": "MEC application location constraints. ", - "items": { - "type": "object", - "properties": { - "appLocation": { - "$ref": "#/components/schemas/LocationConstraints" - } - } - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "array (Structure (inline))" - } - }, - "required": [ - "appName", - "appProvider", - "appDVersion" - ], - "type": "object", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "associateDevAppId": { - "description": "Uniquely identifies the device application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "associateDevAppId", - "appInfo" - ], - "type": "object", - "x-etsi-ref": "6.2.4" - }, - "ApplicationLocationAvailabilityNotification": { - "properties": { - "availableLocations": { - "description": "Locations available to the MEC application.", - "items": { - "type": "object", - "properties": { - "appLocation": { - "$ref": "#/components/schemas/LocationConstraints" - } - } - }, - "minItems": 1, - "required": [ - "appLocation" - ], - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "array (Structure (inline))" - }, - "contextId": { - "description": "Uniquely identifies the application context in the MEC system.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "notificationType": { - "description": "Shall be set to \"ApplicationLocationAvailabilityNotification\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "type": "object", - "required": [ - "notificationType", - "availableLocations" - ], - "x-etsi-ref": "6.4.5" - }, - "InlineNotification": { - "oneOf": [ - { - "$ref": "#/components/schemas/AddressChangeNotification" - }, - { - "$ref": "#/components/schemas/ApplicationContextDeleteNotification" - }, - { - "$ref": "#/components/schemas/ApplicationContextUpdateNotification" - }, - { - "$ref": "#/components/schemas/ApplicationLocationAvailabilityNotification" - } - ], - "discriminator": { - "propertyName": "notificationType" - } - }, - "LocationConstraints": { - "properties": { - "area": { - "$ref": "#/components/schemas/Polygon" - }, - "civicAddressElement": { - "description": "Zero or more elements comprising the civic address. Shall be absent if the \"area\" attribute is present.", - "items": { - "type": "object", - "properties": { - "caType": { - "description": "Describe the content type of caValue. The value of caType shall comply with section 3.4 of IETF RFC 4776 [6]. ", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "caValue": { - "description": "Content of civic address element corresponding to the caType. The format caValue shall comply with section 3.4 of IETF RFC 4776 [6].", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - } - }, - "minItems": 0, - "required": [ - "caType", - "caValue" - ], - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "array (Structure inlined)" - }, - "countryCode": { - "description": "The two-letter ISO 3166 [7] country code in capital letters. Shall be present in case the \"area\" attribute is absent. May be absent if the \"area\" attribute is present (see note).", - "type": "string", - "maxLength": 2, - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - } - }, - "type": "object", - "x-etsi-notes": "NOTE:\tIf both \"countryCode\" and \"area\" are present, no conflicts should exist between the values of these two attributes. In case of conflicts, the API producer (e.g. MEO, MEAO) shall disregard parts of the geographic area signalled by \"area\" that are outside the boundaries of the country signalled by \"countryCode\". If \"countryCode\" is absent, it is solely the \"area\" attribute that defines the location constraint.", - "x-etsi-ref": "6.5.2" - }, - "Polygon": { - "properties": { - "coordinates": { - "items": { - "items": { - "items": { - "type": "number", - "format": "float" - }, - "type": "array" - }, - "type": "array" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "array" - } - }, - "type": "object" - }, - "ProblemDetails": { - "properties": { - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "instance": { - "description": "A URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "status": { - "description": "The HTTP status code for this occurrence of the problem", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "title": { - "description": "A short, human-readable summary of the problem type", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "type": { - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - } - }, - "type": "object" - } - } - } -} diff --git a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Functions.ttcn b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Functions.ttcn index bf592752f7ea2c48523714b4196977cf101c84fe..0f43a1f941f3888618e93f15ad7c370b5a641623 100644 --- a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Functions.ttcn +++ b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Functions.ttcn @@ -2,7 +2,7 @@ module DeviceApplicationInterfaceAPI_Functions { // JSON - import from JSON all; + import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; @@ -11,11 +11,11 @@ module DeviceApplicationInterfaceAPI_Functions { import from LibCommon_Sync all; // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; // LibMec/DeviceApplicationInterfaceAPI import from DeviceApplicationInterfaceAPI_TypesAndValues all; @@ -93,11 +93,10 @@ module DeviceApplicationInterfaceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_DEVICE_APP_CTX_URI & "/" & p_device_info_app_context.contextId, - v_headers - ) - ) - ); + PICS_ROOT_API & PX_DEVICE_APP_CTX_URI & "/" & oct2char(unichar2oct(p_device_info_app_context.contextId, "UTF-8")), + v_headers + ) + )); tc_ac.start; alt { diff --git a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Pixits.ttcn b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Pixits.ttcn index 8fa9b27b90a808494e8923b1c91b294158e07717..49e31f2f4c6ea2a2b87a834b28a98bf195822802 100644 --- a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Pixits.ttcn +++ b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Pixits.ttcn @@ -1,7 +1,7 @@ module DeviceApplicationInterfaceAPI_Pixits { // JSON - import from JSON all; + import from Json all; modulepar charstring PX_DEVICE_APP_LIST_URI := "/dev_app/v1/app_list"; diff --git a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Templates.ttcn b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Templates.ttcn index 6071d1d20bd2dbd160105bd2e4d3fbdd07109d01..8b1ab83eaba1949555ab2ada8e6ad683a88c4a41 100644 --- a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Templates.ttcn +++ b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Templates.ttcn @@ -1,7 +1,7 @@ module DeviceApplicationInterfaceAPI_Templates { // JSON - import from JSON all; + import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; @@ -12,9 +12,9 @@ module DeviceApplicationInterfaceAPI_Templates { template (omit) AppContext m_device_app_context( - in template (value) JSON.String p_associateDevAppId, + in template (value) Json.String p_associateDevAppId, in template (value) ApplicationContext_AppInfo p_appInfo, - in template (omit) JSON.AnyURI p_callbackReference := omit, + in template (omit) Json.AnyURI p_callbackReference := omit, in template (omit) boolean p_appLocationUpdates := omit, in template (omit) boolean p_appAutoInstantiation := omit ) := { @@ -27,10 +27,10 @@ module DeviceApplicationInterfaceAPI_Templates { } // End of template m_device_app_context template (present) AppContext mw_device_app_context( - template (present) JSON.String p_contextId := ?, - template (present) JSON.String p_associateDevAppId := ?, + template (present) Json.String p_contextId := ?, + template (present) Json.String p_associateDevAppId := ?, template (present) ApplicationContext_AppInfo p_appInfo := ?, - template JSON.AnyURI p_callbackReference := *, + template Json.AnyURI p_callbackReference := *, template boolean p_appLocationUpdates := *, template boolean p_appAutoInstantiation := * ) := { @@ -43,14 +43,14 @@ module DeviceApplicationInterfaceAPI_Templates { } // End of template mw_device_app_context template (omit) ApplicationContext_AppInfo m_app_context_info( - in JSON.String p_appDId, - in JSON.String p_appName, - in JSON.String p_appProvider, - in JSON.String p_appDVersion, - in template (omit) JSON.String p_appDescription := omit, - in template (omit) JSON.String p_appSoftVersion := omit, + in Json.String p_appDId, + in Json.String p_appName, + in Json.String p_appProvider, + in Json.String p_appDVersion, + in template (omit) Json.String p_appDescription := omit, + in template (omit) Json.String p_appSoftVersion := omit, in template (omit) UserAppInstanceInfoList p_userAppInstanceInfo := omit, - in template (omit) JSON.AnyURI p_appPackageSource := omit + in template (omit) Json.AnyURI p_appPackageSource := omit ) := { appDId := p_appDId, appName := p_appName, @@ -63,14 +63,14 @@ module DeviceApplicationInterfaceAPI_Templates { } // End ot template m_app_context_info template (present) ApplicationContext_AppInfo mw_app_context_info( - template (present) JSON.String p_appDId := ?, - template (present) JSON.String p_appName := ?, - template (present) JSON.String p_appProvider := ?, - template (present) JSON.String p_appDVersion := ?, - template JSON.String p_appDescription := *, - template JSON.String p_appSoftVersion := *, + template (present) Json.String p_appDId := ?, + template (present) Json.String p_appName := ?, + template (present) Json.String p_appProvider := ?, + template (present) Json.String p_appDVersion := ?, + template Json.String p_appDescription := *, + template Json.String p_appSoftVersion := *, template UserAppInstanceInfoList p_userAppInstanceInfo := *, - template JSON.AnyURI p_appPackageSource := * + template Json.AnyURI p_appPackageSource := * ) := { appDId := p_appDId, appName := p_appName, @@ -83,7 +83,7 @@ module DeviceApplicationInterfaceAPI_Templates { } // End ot template mw_app_context_info template (value) ApplicationLocationAvailability m_application_location_availability( - in JSON.String p_associateDevAppId, + in Json.String p_associateDevAppId, in template (value) ApplicationLocationAvailability_AppInfo p_appInfo ) := { associateDevAppId := p_associateDevAppId, @@ -91,7 +91,7 @@ module DeviceApplicationInterfaceAPI_Templates { } // End of template m_application_location_availability template (present) ApplicationLocationAvailability mw_application_location_availability( - template (present) JSON.String p_associateDevAppId := ?, + template (present) Json.String p_associateDevAppId := ?, template (present) ApplicationLocationAvailability_AppInfo p_appInfo := ? ) := { associateDevAppId := p_associateDevAppId, @@ -99,14 +99,14 @@ module DeviceApplicationInterfaceAPI_Templates { } // End of template mw_application_location_availability template (omit) ApplicationLocationAvailability_AppInfo m_application_location_availability_info( - in JSON.String p_appDId, - in JSON.String p_appName, - in JSON.String p_appProvider, - in JSON.String p_appDVersion, - in template (omit) JSON.String p_appSoftVersion := omit, - in template (omit) JSON.String p_appDescription := omit, + in Json.String p_appDId, + in Json.String p_appName, + in Json.String p_appProvider, + in Json.String p_appDVersion, + in template (omit) Json.String p_appSoftVersion := omit, + in template (omit) Json.String p_appDescription := omit, in template (omit) AvailableLocationsList p_availableLocations := omit, - in template (omit) JSON.AnyURI p_appPackageSource := omit + in template (omit) Json.AnyURI p_appPackageSource := omit ) := { appDId := p_appDId, appName := p_appName, @@ -119,14 +119,14 @@ module DeviceApplicationInterfaceAPI_Templates { } // End of template m_application_location_availability_info template (present) ApplicationLocationAvailability_AppInfo mw_application_location_availability_info( - template (present) JSON.String p_appDId := ?, - template (present) JSON.String p_appName := ?, - template (present) JSON.String p_appProvider := ?, - template (present) JSON.String p_appDVersion := ?, - template JSON.String p_appSoftVersion := *, - template JSON.String p_appDescription := *, + template (present) Json.String p_appDId := ?, + template (present) Json.String p_appName := ?, + template (present) Json.String p_appProvider := ?, + template (present) Json.String p_appDVersion := ?, + template Json.String p_appSoftVersion := *, + template Json.String p_appDescription := *, template AvailableLocationsList p_availableLocations := *, - template JSON.AnyURI p_appPackageSource := * + template Json.AnyURI p_appPackageSource := * ) := { appDId := p_appDId, appName := p_appName, diff --git a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn index c0345566f818c835947070cb59504afb570d9904..228478d8d257ee0f12a950abaaba4be078b675c1 100644 --- a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn @@ -1,5 +1,5 @@ /** - * @author ETSI / TTF T012 + * @author ETSI / TTF T012 / TTF T027 * @version $Url$ * $Id$ * @desc Types ANd Values for ETSI GS MEC 016 V2.2.1 (2020-04) @@ -10,88 +10,29 @@ */ module DeviceApplicationInterfaceAPI_TypesAndValues { - // JSON - import from JSON all; - - // LibCommon - import from LibCommon_BasicTypesAndValues all; - - /** - * @desc Required service continuity mode for this application. - */ - type enumerated ServiceCount { - SERVICE_CONTINUITY_NOT_REQUIRED (0), - SERVICE_CONTINUITY_REQUIRED (1) - } with { - variant "JSON: as number" - } - - /** - * @desc Characteristics of the application - * @member memory The maximum size in Mbytes of the memory resource expected to be used by the MEC application instance in the MEC system - * @member storageThe maximum size in Mbytes of the storage resource expected to be used by the MEC application instance in the MEC system - * @member latency The target round trip time in milliseconds supported by the MEC system for the MEC application instance - * @member bandwidth The required connection bandwidth in kbit/s for the use of the MEC application instance - * @member serviceCont Required service continuity mode for this application - * @see ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList - */ - type record AppCharcs { - UInt32 memory optional, - UInt32 storage optional, - UInt32 latency optional, - UInt32 bandwidth optional, - ServiceCount serviceCont optional - } + import from Json all; /** - * @desc elements comprising the civic address - * @member caType Describe the content type of caValue. The value of caType shall comply with section 3.4 of IETF RFC 4776 - * @member caValue Content of civic address element corresponding to the caType. The format caValue shall comply with section 3.4 of IETF RFC 4776 + * @desc Information on available applications + * @member appList List of user applications available to the device application + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList */ - type record CivicAddressElement { - JSON.Integer caType, - JSON.String caValue - } - - type record Geometry { - JSON.String type_, - Coordinates coordinates - } with { - variant (type_) "name as 'type'"; - } - type record of JSON.Number Coordinate; - type record of Coordinate Coordinates; - type record Property { - JSON.String key, - JSON.String value_ - } with { - variant (value_) "name as 'value'"; - } - type record of Property Properties; - type record Polygon { - JSON.String type_, - Geometry geometry, - Properties properties, - JSON.String this_ - } with { - variant (type_) "name as 'type'"; - variant (this_) "name as 'this'"; + type record ApplicationList { + AppList appList optional } /** - * @desc Identifies the locations of the MEC application - * @member countryCode The two-letter ISO 3166 [7] country code in capital letters. Shall be present in case the "area" attribute is absent - * @member civicAddressElement Zero or more elements comprising the civic address - * @member area Geographic area. Shall be absent if the "civicAddressElement" attribute is present - * @see ETSI GS MEC 016 Clause 6.5.2 Type: LocationConstraints + * @desc Information on available applications + * @member appInfo List of user applications available to the device application + * @member vendorSpecificExt Extension for vendor specific information + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList */ - type record LocationConstraints { - JSON.String countryCode optional, - CivicAddressElement civicAddressElement optional, - Polygon area optional + type record AppListItem { + ApplicationList_AppInfo appInfo, + VendorSpecificExt vendorSpecificExt optional } - type record of LocationConstraints LocationConstraintsList; + type set of AppListItem AppList; /** * @desc Information on available applications @@ -103,61 +44,74 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member appDescription Human readable description of the MEC application * @member appLocation Identifies the locations of the MEC application * @member appCharcs Characteristics of the application - * @see ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList */ type record ApplicationList_AppInfo { - JSON.String appDId, - JSON.String appName, - JSON.String appProvider, - JSON.String appSoftVersion optional, - JSON.String appDVersion, - JSON.String appDescription optional, + Json.String appDId, + Json.String appName, + Json.String appProvider, + Json.String appSoftVersion, + Json.String appDVersion, + Json.String appDescription, LocationConstraintsList appLocation optional, - AppCharcs appCharcs optional + AppCharcs appCharcs optional } /** * @desc Extension for vendor specific information * @member vendorId Vendor identifier + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList */ type record VendorSpecificExt { - JSON.String vendorId + Json.String vendorId } /** - * @desc Information on available applications - * @member appInfo List of user applications available to the device application - * @member vendorSpecificExt Extension for vendor specific information - * @see ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList + * @desc Characteristics of the application + * @member memory The maximum size in Mbytes of the memory resource expected to be used by the MEC application instance in the MEC system + * @member storageThe maximum size in Mbytes of the storage resource expected to be used by the MEC application instance in the MEC system + * @member latency The target round trip time in milliseconds supported by the MEC system for the MEC application instance + * @member bandwidth The required connection bandwidth in kbit/s for the use of the MEC application instance + * @member serviceCont Required service continuity mode for this application + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList */ - type record AppListItem { - ApplicationList_AppInfo appInfo, - VendorSpecificExt vendorSpecificExt optional + type record AppCharcs { + Json.UInteger memory optional, + Json.UInteger storage optional, + Json.UInteger latency optional, + Json.UInteger bandwidth optional, + ServiceCount serviceCont optional } - type record of AppListItem AppList; /** - * @desc Information on available applications - * @member appList List of user applications available to the device application - * @see ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList + * @desc Required service continuity mode for this application + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList */ - type record ApplicationList { - AppList appList optional + type enumerated ServiceCount { + SERVICE_CONTINUITY_NOT_REQUIRED (0), + SERVICE_CONTINUITY_REQUIRED (1) + } with { + variant "JSON: as number" } /** - * @desc user application instance information - * @member appInstanceId Identifier of the user application instance - * @member referenceURI Address of the user application instance - * @member appLocation Location of the user application instance - * @see ETSI GS MEC 016 Clause 6.2.3 Type: AppContext + * @desc Information on application context created by the MEC system + * @member contextId Uniquely identifies the application context in the MEC system + * @member associateDevAppId Uniquely identifies the device application + * @member callbackReference Assigned by the device application to receive application lifecycle related notifications + * @member appLocationUpdates Used by the device application to request to receive notifications at the callbackReference URI relating to location availability for user application instantiation + * @member appAutoInstantiation Provides indication to the MEC system that instantiation of the requested application is desired should a requested appLocation become available that was not at the time of the request + * @member appInfo + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.3 Type: AppContext */ - type record UserAppInstanceInfo { - JSON.String appInstanceId optional, - JSON.AnyURI referenceURI optional, - LocationConstraints appLocation optional + type record AppContext { + Json.String contextId optional, + Json.String associateDevAppId, + Json.AnyURI callbackReference optional, + boolean appLocationUpdates optional, + boolean appAutoInstantiation optional, + ApplicationContext_AppInfo appInfo } - type record of UserAppInstanceInfo UserAppInstanceInfoList; /** * @desc Information on available applications @@ -169,48 +123,44 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member appDescription Human readable description of the MEC application * @member userAppInstanceInfo List of user application instance information * @member appPackageSource URI of the application package - * @see ETSI GS MEC 016 Clause 6.2.3 Type: AppContext + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.3 Type: AppContext */ type record ApplicationContext_AppInfo { - JSON.String appDId, - JSON.String appName, - JSON.String appProvider, - JSON.String appSoftVersion optional, - JSON.String appDVersion, - JSON.String appDescription optional, + Json.String appDId, + Json.String appName, + Json.String appProvider, + Json.String appSoftVersion optional, + Json.String appDVersion, + Json.String appDescription optional, UserAppInstanceInfoList userAppInstanceInfo optional, - JSON.AnyURI appPackageSource optional + Json.AnyURI appPackageSource optional } /** - * @desc Information on application context created by the MEC system - * @member contextId Uniquely identifies the application context in the MEC system - * @member associateDevAppId Uniquely identifies the device application - * @member callbackReference Assigned by the device application to receive application lifecycle related notifications - * @member appLocationUpdates Used by the device application to request to receive notifications at the callbackReference URI relating to location availability for user application instantiation - * @member appAutoInstantiation Provides indication to the MEC system that instantiation of the requested application is desired should a requested appLocation become available that was not at the time of the request - * @member appInfo - * @see ETSI GS MEC 016 Clause 6.2.3 Type: AppContext + * @desc user application instance information + * @member appInstanceId Identifier of the user application instance + * @member referenceURI Address of the user application instance + * @member appLocation Location of the user application instance + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.3 Type: AppContext */ - type record AppContext { - JSON.String contextId optional, - JSON.String associateDevAppId, - JSON.AnyURI callbackReference optional, - boolean appLocationUpdates optional, - boolean appAutoInstantiation optional, - ApplicationContext_AppInfo appInfo + type record UserAppInstanceInfo { + Json.String appInstanceId optional, + Json.AnyURI referenceURI optional, + LocationConstraints appLocation optional } + type set of UserAppInstanceInfo UserAppInstanceInfoList; /** - * @desc - * @member appLocation Shall only be included in the response, where it indicates a location constraint available in the MEC system - - * @see ETSI GS MEC 016 Clause 6.2.4 Type: ApplicationLocationAvailability + * @desc Information on locations available instantiation of new user application instances + * @member associateDevAppId Uniquely identifies the device application + * @member appInfo + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.4 Type: ApplicationLocationAvailability */ - type record AvailableLocations { - LocationConstraints appLocation optional + type record ApplicationLocationAvailability { + Json.String associateDevAppId, + ApplicationLocationAvailability_AppInfo appInfo } - type record of AvailableLocations AvailableLocationsList; + /** * @desc * @member appDId Identifier of this MEC application descriptor @@ -221,29 +171,28 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member appDescription Human readable description of the MEC application * @member availableLocations MEC application location constraints * @member appPackageSource URI of the application package. Shall be included in the request - * @see ETSI GS MEC 016 Clause 6.2.4 Type: ApplicationLocationAvailability + * @seeETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.4 Type: ApplicationLocationAvailability */ type record ApplicationLocationAvailability_AppInfo { - JSON.String appDId, - JSON.String appName, - JSON.String appProvider, - JSON.String appSoftVersion optional, - JSON.String appDVersion, - JSON.String appDescription optional, + Json.String appDId, + Json.String appName, + Json.String appProvider, + Json.String appSoftVersion optional, + Json.String appDVersion, + Json.String appDescription optional, AvailableLocationsList availableLocations optional, - JSON.AnyURI appPackageSource optional + Json.AnyURI appPackageSource optional } /** - * @desc Information on locations available instantiation of new user application instances - * @member associateDevAppId Uniquely identifies the device application - * @member appInfo - * @see ETSI GS MEC 016 Clause 6.2.4 Type: ApplicationLocationAvailability + * @desc + * @member appLocation Shall only be included in the response, where it indicates a location constraint available in the MEC system + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.4 Type: ApplicationLocationAvailability */ - type record ApplicationLocationAvailability { - JSON.String associateDevAppId, - ApplicationLocationAvailability_AppInfo appInfo + type record AvailableLocations { + LocationConstraints appLocation optional } + type set of AvailableLocations AvailableLocationsList; /** * @desc Notification from the UALCMP regarding a change in address of a user application instance @@ -251,52 +200,116 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member contextId Uniquely identifies the application context in the MEC system * @member appInstanceId Identifier of the user application instance * @member referenceURI Address of the user application. Used as the reference URI for the application - * @see ETSI GS MEC 016 Clause 6.4.2 Type: AddressChangeNotification + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.2 Type: AddressChangeNotification */ type record AddressChangeNotification { - JSON.String notificationType, - JSON.String contextId, - JSON.String appInstanceId, - JSON.AnyURI referenceURI + Json.String notificationType, + Json.String contextId, + Json.String appInstanceId, + Json.AnyURI referenceURI } /** * @desc Notification from the UALCMP regarding the deletion of an application context by the MEC system - * @member notificationType Shall be set to "AddressChangeNotification" + * @member notificationType Shall be set to "ApplicationContextDeleteNotification" * @member contextId Uniquely identifies the application context in the MEC system - * @see ETSI GS MEC 016 Clause 6.4.3 Type: ApplicationContextDeleteNotification + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.3 Type: ApplicationContextDeleteNotification */ type record ApplicationContextDeleteNotification { - JSON.String notificationType, - JSON.String contextId + Json.String notificationType, + Json.String contextId } /** * @desc Notification from the UALCMP regarding an update to an application change by the MEC system - * @member notificationType Shall be set to "AddressChangeNotification" + * @member notificationType Shall be set to "ApplicationContextUpdateNotification" * @member contextId Uniquely identifies the application context in the MEC system * @member userAppInstanceInfo List of user application instance information - * @see ETSI GS MEC 016 Clause 6.4.4 Type: ApplicationContextDeleteNotification + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.4 Type: ApplicationContextUpdateNotification */ type record ApplicationContextUpdateNotification { - JSON.String notificationType, - JSON.String contextId, + Json.String notificationType, + Json.String contextId, UserAppInstanceInfoList userAppInstanceInfo } /** * @desc Notification from the UALCMP regarding the availability of a location that was requested in the Application context create that could not be fulfilled at the time of the request - * @member notificationType Shall be set to "AddressChangeNotification" + * @member notificationType Shall be set to "ApplicationLocationAvailabilityNotification" * @member contextId Uniquely identifies the application context in the MEC system * @member availableLocations Locations available to the MEC application - * @see ETSI GS MEC 016 Clause 6.4.5 Type: ApplicationLocationAvailabilityNotification + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.5 Type: ApplicationLocationAvailabilityNotification */ type record ApplicationLocationAvailabilityNotification { - JSON.String notificationType, - JSON.String contextId, + Json.String notificationType, + Json.String contextId, AvailableLocationsList availableLocations } + /** + * @desc Identifies the locations of the MEC application + * @member countryCode The two-letter ISO 3166 [7] country code in capital letters. Shall be present in case the "area" attribute is absent + * @member civicAddressElement Zero or more elements comprising the civic address + * @member area Geographic area. Shall be absent if the "civicAddressElement" attribute is present + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + */ + type record LocationConstraints { + Json.String countryCode optional, + CivicAddressElement civicAddressElement optional, + Polygon area optional + } + type set of LocationConstraints LocationConstraintsList; + + /** + * @desc Elements comprising the civic address + * @member caType Describe the content type of caValue. The value of caType shall comply with section 3.4 of IETF RFC 4776 + * @member caValue Content of civic address element corresponding to the caType. The format caValue shall comply with section 3.4 of IETF RFC 4776 + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + */ + type record CivicAddressElement { + Json.Integer caType, + Json.String caValue + } + + /** + * @desc + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + */ + type record Polygon { + Json.String type_, + Geometry geometry, + Properties properties, + Json.String this_ + } with { + variant (type_) "name as 'type'"; + variant (this_) "name as 'this'"; + } + + /** + * @desc + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + */ + type record Geometry { + Json.String type_, + Coordinates coordinates + } with { + variant (type_) "name as 'type'"; + } + type set of Json.Number Coordinate; + type set of Coordinate Coordinates; + + /** + * @desc + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + */ + type record Property { + Json.String key, + Json.String value_ + } with { + variant (value_) "name as 'value'"; + } + type set of Property Properties; + } with { encode "JSON" } // End of module DeviceApplicationInterfaceAPI_TypesAndValues diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/json/EdgePlatformApplicationEnablementAPI.json b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/json/EdgePlatformApplicationEnablementAPI.json deleted file mode 100644 index e6a39042a6583aaba17e7fc7fc5b1a9c500b8032..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/json/EdgePlatformApplicationEnablementAPI.json +++ /dev/null @@ -1,2529 +0,0 @@ -{ - "openapi": "3.0.2", - "servers": [ - { - "url": "http://127.0.0.1:8081/mp1/v1" - }, - { - "url": "https://127.0.0.1:8081/mp1/v1" - } - ], - "info": { - "title": "Mp1 API", - "version": "1.1.1", - "description": "The ETSI MEC ISG MEC011 Application Enablement API described using OpenAPI", - "license": { - "name": "ETSI Forge copyright notice", - "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt" - }, - "contact": { - "email": "cti_support@etsi.org" - } - }, - "externalDocs": { - "description": "ETSI GS MEC011 Application Enablement API, V1.1.1", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v010101p.pdf" - }, - "tags": [ - { - "name": "trafficRules" - }, - { - "name": "dnsRules" - }, - { - "name": "subscriptions" - }, - { - "name": "services" - }, - { - "name": "timing" - }, - { - "name": "transports" - }, - { - "name": "callbacks" - } - ], - "paths": { - "/applications/{appInstanceId}/dns_rules": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - } - ], - "get": { - "description": "This method retrieves information about all the DNS rules associated with a mobile edge application instance.", - "operationId": "ApplicationsDnsRules_GET", - "tags": [ - "trafficRules" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsDnsRules.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/applications/{appInstanceId}/dns_rules/{dnsRuleId}": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - }, - { - "$ref": "#/components/parameters/Path.DnsRuleId" - } - ], - "get": { - "description": "This method retrieves information about a DNS rule associated with a mobile edge application instance.", - "operationId": "ApplicationsDnsRule_GET", - "tags": [ - "dnsRules" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsDnsRule.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "put": { - "description": "This method activates, de-activates or updates a traffic rule.", - "operationId": "ApplicationsDnsRule_PUT", - "tags": [ - "dnsRules" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsDnsRule.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - }, - "412": { - "$ref": "#/components/responses/Error.412" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/ApplicationsDnsRule" - } - } - }, - "/applications/{appInstanceId}/subscriptions": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - } - ], - "get": { - "description": "The GET method may be used to request information about all subscriptions for this requestor. Upon success, the response contains entity body with all the subscriptions for the requestor.", - "operationId": "ApplicationsSubscriptions_GET", - "tags": [ - "subscriptions" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsSubscriptions.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "post": { - "description": "The POST method may be used to create a new subscription. One example use case is to create a new subscription to the mobile edge service availability notifications. Upon success, the response contains entity body describing the created subscription.", - "operationId": "ApplicationsSubscriptions_POST", - "tags": [ - "subscriptions" - ], - "responses": { - "201": { - "$ref": "#/components/responses/ApplicationsSubscriptions.201" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/ApplicationsSubscriptions" - }, - "callbacks": { - "appTerminationNotification": { - "$ref": "#/components/callbacks/AppTerminationNotification" - }, - "serviceAvailabilityNotification": { - "$ref": "#/components/callbacks/ServiceAvailabilityNotification" - } - } - } - }, - "/applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - }, - { - "$ref": "#/components/parameters/Path.SubscriptionType" - }, - { - "$ref": "#/components/parameters/Path.SubscriptionId" - } - ], - "get": { - "description": "The GET method requests information about a subscription for this requestor. Upon success, the response contains entity body with the subscription for the requestor.", - "operationId": "ApplicationsSubscription_GET", - "tags": [ - "subscriptions" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsSubscription.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "delete": { - "description": "This method deletes a meMp1Subscription. This method is typically used in \"Unsubscribing from service availability event notifications\" procedure.", - "operationId": "ApplicationsSubscription_DELETE", - "tags": [ - "subscriptions" - ], - "responses": { - "204": { - "description": "No Content" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/applications/{appInstanceId}/traffic_rules": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - } - ], - "get": { - "description": "This method retrieves information about all the traffic rules associated with a mobile edge application instance.", - "operationId": "ApplicationsTrafficRules_GET", - "tags": [ - "trafficRules" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsTrafficRules.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/applications/{appInstanceId}/traffic_rules/{trafficRuleId}": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - }, - { - "$ref": "#/components/parameters/Path.TrafficRuleId" - } - ], - "get": { - "description": "This method retrieves information about all the traffic rules associated with a mobile edge application instance.", - "operationId": "ApplicationsTrafficRule_GET", - "tags": [ - "trafficRules" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsTrafficRule.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "put": { - "description": "This method retrieves information about all the traffic rules associated with a mobile edge application instance.", - "operationId": "ApplicationsTrafficRule_PUT", - "tags": [ - "trafficRules" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsTrafficRule.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - }, - "412": { - "$ref": "#/components/responses/Error.412" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/ApplicationsTrafficRule" - } - } - }, - "/services": { - "get": { - "description": "This method retrieves information about a list of meService resources. This method is typically used in \"service availability query\" procedure", - "operationId": "Services_GET", - "tags": [ - "services" - ], - "parameters": [ - { - "$ref": "#/components/parameters/Query.Ser_instance_id" - }, - { - "$ref": "#/components/parameters/Query.Ser_name" - }, - { - "$ref": "#/components/parameters/Query.Ser_category_id" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/Services.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "post": { - "description": "This method is used to create a meService resource. This method is typically used in \"service availability update and new service registration\" procedure", - "operationId": "Services_POST", - "tags": [ - "services" - ], - "responses": { - "201": { - "$ref": "#/components/responses/Services.201" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/Services.Post" - } - } - }, - "/services/{serviceId}": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.ServiceId" - } - ], - "get": { - "description": "This method retrieves information about a meService resource. This method is typically used in \"service availability query\" procedure", - "operationId": "ServicesServiceId_GET", - "tags": [ - "services" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ServicesServiceId.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "put": { - "description": "This method updates the information about a meService resource", - "operationId": "ServicesServiceId_PUT", - "tags": [ - "services" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ServicesServiceId.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - }, - "412": { - "$ref": "#/components/responses/Error.412" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/ServicesServiceId" - } - } - }, - "/timing/current_time": { - "get": { - "description": "This method retrieves the information of the platform's current time which corresponds to the get platform time procedure", - "operationId": "TimingCurrentTime_GET", - "tags": [ - "timing" - ], - "responses": { - "200": { - "$ref": "#/components/responses/TimingCurrentTime.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/timing/timing_caps": { - "get": { - "description": "This method retrieves the information of the platform's timing capabilities which corresponds to the timing capabilities query", - "operationId": "TimingCaps_GET", - "tags": [ - "timing" - ], - "responses": { - "200": { - "$ref": "#/components/responses/TimingCaps.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/transports": { - "get": { - "description": "This method retrieves information about a list of available transports. This method is typically used by a service-producing application to discover transports provided by the mobile edge platform in the \"transport information query\" procedure", - "operationId": "Transports_GET", - "tags": [ - "transports" - ], - "responses": { - "200": { - "$ref": "#/components/responses/Transports.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - } - }, - "components": { - "schemas": { - "Empty": { - "description": "Empty schema" - }, - "AppTerminationNotification.MaxGracefulTimeout": { - "description": "Maximum timeout value in seconds for graceful termination or graceful stop of an application instance.", - "type": "integer", - "format": "uint32", - "example": 10 - }, - "AppTerminationNotification.NotificationType": { - "description": "Shall be set to AppTerminationNotification.", - "type": "string", - "example": "AppTerminationNotification" - }, - "AppTerminationNotification": { - "description": "This type represents the information that the mobile edge platform notifies the subscribed application instance about the corresponding application instance termination/stop.", - "type": "object", - "required": [ - "notificationType", - "maxGracefulTimeout", - "_links" - ], - "properties": { - "notificationType": { - "$ref": "#/components/schemas/AppTerminationNotification.NotificationType" - }, - "maxGracefulTimeout": { - "$ref": "#/components/schemas/AppTerminationNotification.MaxGracefulTimeout" - }, - "_links": { - "$ref": "#/components/schemas/Subscription" - } - } - }, - "AppTerminationNotificationSubscription.AppInstanceId": { - "description": "It is used as the filtering criterion for the subscribed events.", - "type": "string", - "example": "ID1" - }, - "AppTerminationNotificationSubscription.CallbackReference": { - "description": "URI selected by the mobile edge application instance to receive notifications on the subscribed mobile edge application instance management information. This shall be included in both the request and the response.", - "type": "string", - "format": "uri" - }, - "AppTerminationNotificationSubscription": { - "description": "This type represents the information that the mobile edge platform notifies the subscribed application instance about the corresponding application instance termination/stop.", - "type": "object", - "required": [ - "subscriptionType", - "callbackReference", - "_links", - "appInstanceId" - ], - "properties": { - "subscriptionType": { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription.SubscriptionType" - }, - "callbackReference": { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription.CallbackReference" - }, - "_links": { - "$ref": "#/components/schemas/Self" - }, - "appInstanceId": { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription.AppInstanceId" - } - } - }, - "AppTerminationNotificationSubscription.SubscriptionType": { - "description": "Shall be set to AppTerminationNotificationSubscription.", - "type": "string", - "example": "AppTerminationNotificationSubscription" - }, - "CategoryRef.Href": { - "description": "Reference of the catalogue", - "type": "string", - "example": "catItem1" - }, - "CategoryRef.Id": { - "description": "Unique identifier of the category", - "type": "string", - "example": "id12345" - }, - "CategoryRef.Name": { - "description": "Name of the category", - "type": "string", - "example": "RNI" - }, - "CategoryRef.Version": { - "description": "Category version", - "type": "string", - "example": "version1" - }, - "CategoryRef": { - "description": "This type represents the category reference", - "type": "object", - "required": [ - "href", - "id", - "name", - "version" - ], - "properties": { - "href": { - "$ref": "#/components/schemas/CategoryRef.Href" - }, - "id": { - "$ref": "#/components/schemas/CategoryRef.Id" - }, - "name": { - "$ref": "#/components/schemas/CategoryRef.Name" - }, - "version": { - "$ref": "#/components/schemas/CategoryRef.Version" - } - } - }, - "CurrentTime": { - "description": "This type represents the information provided by the mobile edge platform in response to the Get Platform Time Request message.", - "type": "object", - "required": [ - "nanoSeconds", - "seconds", - "timeSourceStatus" - ], - "properties": { - "seconds": { - "type": "integer", - "format": "uint32", - "description": "The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "example": 1577836800 - }, - "nanoSeconds": { - "type": "integer", - "format": "uint32", - "description": "The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "example": 0 - }, - "timeSourceStatus": { - "type": "string", - "enum": [ - "TRACEABLE", - "NONTRACEABLE" - ], - "description": "Platform Time Source status. 1 = TRACEABLE - time source is locked to the UTC time source. 2 = NONTRACEABLE - time source is not locked to the UTC time source", - "example": "TRACEABLE" - } - } - }, - "DestinationInterface.InterfaceType": { - "description": "Type of the interface", - "type": "string", - "enum": [ - "TUNNEL", - "MAC", - "IP" - ], - "example": "TUNNEL" - }, - "DestinationInterface.IpAddress": { - "description": "IP address of the remote destination", - "type": "string", - "example": "192.0.2.0" - }, - "DestinationInterface.MacAddress": { - "description": "Source address identifies the MAC address of the interface", - "type": "string", - "example": "02-00-00-00-00-00" - }, - "DestinationInterface": { - "description": "This type represents the destination interface.", - "type": "object", - "required": [ - "interfaceType" - ], - "properties": { - "interfaceType": { - "$ref": "#/components/schemas/DestinationInterface.InterfaceType" - }, - "tunnelInfo": { - "$ref": "#/components/schemas/TunnelInfo" - }, - "srcMacAddress": { - "$ref": "#/components/schemas/DestinationInterface.MacAddress" - }, - "dstMacAddress": { - "$ref": "#/components/schemas/DestinationInterface.MacAddress" - }, - "dstIpAddress": { - "$ref": "#/components/schemas/DestinationInterface.IpAddress" - } - } - }, - "DnsRule.DomainName": { - "description": "FQDN resolved by the DNS rule", - "type": "string", - "example": "www.example.com" - }, - "DnsRule.Id": { - "description": "Identifies the DNS Rule", - "type": "string", - "example": "dnsRule1" - }, - "DnsRule.IpAddress": { - "description": "IP address associated with the FQDN resolved by the DNS rule", - "type": "string", - "example": "192.0.2.0" - }, - "DnsRule.IpAddressType": { - "description": "IP address type", - "type": "string", - "enum": [ - "IP_V6", - "IP_V4" - ], - "example": "IP_V6" - }, - "DnsRule.State": { - "description": "DNS rule state", - "type": "string", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "example": "ACTIVE" - }, - "DnsRule.Ttl": { - "description": "Time to live value", - "type": "integer", - "format": "uint32", - "example": "?" - }, - "DnsRule": { - "description": "This type represents the general information of a DNS rule.", - "type": "object", - "required": [ - "dnsRuleId", - "domainName", - "ipAddressType", - "ipAddress", - "state" - ], - "properties": { - "dnsRuleId": { - "$ref": "#/components/schemas/DnsRule.Id" - }, - "domainName": { - "$ref": "#/components/schemas/DnsRule.DomainName" - }, - "ipAddressType": { - "$ref": "#/components/schemas/DnsRule.IpAddressType" - }, - "ipAddress": { - "$ref": "#/components/schemas/DnsRule.IpAddress" - }, - "ttl": { - "$ref": "#/components/schemas/DnsRule.Ttl" - }, - "state": { - "$ref": "#/components/schemas/DnsRule.State" - } - } - }, - "EndPointInfo.Address.Host": { - "description": "Host portion of the address", - "type": "string", - "example": "192.0.2.0" - }, - "EndPointInfo.Address_Port": { - "description": "Port portion of the address", - "type": "integer", - "format": "uint32", - "example": 8080 - }, - "EndPointInfo.Address": { - "description": "A IP address and port pair", - "type": "object", - "required": [ - "host", - "port" - ], - "properties": { - "host": { - "$ref": "#/components/schemas/EndPointInfo.Address.Host" - }, - "port": { - "$ref": "#/components/schemas/EndPointInfo.Address_Port" - } - } - }, - "EndPointInfo.Addresses": { - "description": "Entry point information of the service as one or more pairs of IP address and port", - "type": "object", - "required": [ - "addresses" - ], - "properties": { - "addresses": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/EndPointInfo.Address" - } - } - } - }, - "EndPointInfo.Alternative": { - "description": "Entry point information of the service in a format defined by an implementation, or in an external specification.", - "type": "object", - "required": [ - "alternative" - ], - "properties": { - "alternative": { - "type": "object" - } - } - }, - "EndPointInfo.Uri": { - "description": "Entry point information of the service", - "type": "string", - "format": "uri", - "example": "/meMp1/service/EntryPoint" - }, - "EndPointInfo.Uris": { - "description": "Entry point information of the service as string, formatted according to URI syntax", - "type": "object", - "required": [ - "uris" - ], - "properties": { - "uris": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/EndPointInfo.Uri" - } - } - } - }, - "LinkType": { - "description": "This type represents a type of link and may be referenced from data structures", - "type": "object", - "properties": { - "href": { - "$ref": "#/components/schemas/Href" - } - } - }, - "Href": { - "description": "URI referring to a resource", - "type": "string", - "format": "uri", - "example": "/meMp1/example" - }, - "Mp1SubscriptionLinkList.Links": { - "description": "Self-referring URI.", - "type": "object", - "required": [ - "self" - ], - "properties": { - "self": { - "$ref": "#/components/schemas/LinkType" - }, - "subscription": { - "description": "Subscription list", - "type": "array", - "items": { - "$ref": "#/components/schemas/Mp1SubscriptionLinkList.Subscription" - } - } - } - }, - "Mp1SubscriptionLinkList.Subscription": { - "description": "A link to a subscription.", - "type": "object", - "required": [ - "href", - "rel" - ], - "properties": { - "href": { - "$ref": "#/components/schemas/Href" - }, - "rel": { - "description": "The values are as defined in the \"subscriptionType\" attribute for each different Mp1 event subscription data type.", - "type": "string", - "enum": [ - "AppTerminationNotificationSubscription", - "SerAvailabilityNotificationSubscription" - ] - } - } - }, - "Mp1SubscriptionLinkList": { - "description": "This type represents a list of links related to currently existing subscriptions for a mobile edge application instance. This information is returned when sending a request to receive current subscriptions.", - "type": "object", - "required": [ - "_links" - ], - "properties": { - "_links": { - "$ref": "#/components/schemas/Mp1SubscriptionLinkList.Links" - } - } - }, - "ProblemDetails": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/Problem.type" - }, - "title": { - "$ref": "#/components/schemas/Problem.title" - }, - "status": { - "$ref": "#/components/schemas/Problem.status" - }, - "detail": { - "$ref": "#/components/schemas/Problem.detail" - }, - "instance": { - "$ref": "#/components/schemas/Problem.instance" - } - } - }, - "Problem.detail": { - "type": "string", - "description": "A human-readable explanation specific to this occurrence of the problem" - }, - "Problem.instance": { - "type": "string", - "format": "uri", - "description": "A URI reference that identifies the specific occurrence of the problem" - }, - "Problem.status": { - "type": "integer", - "format": "uint32", - "description": "The HTTP status code for this occurrence of the problem" - }, - "Problem.title": { - "type": "string", - "description": "A short, human-readable summary of the problem type" - }, - "Problem.type": { - "type": "string", - "format": "uri", - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type" - }, - "SecurityInfo.OAuth2Info.GrantTypes": { - "description": "List of supported OAuth 2.0 grant types", - "type": "string", - "enum": [ - "OAUTH2_AUTHORIZATION_CODE", - "OAUTH2_IMPLICIT_GRANT", - "OAUTH2_RESOURCE_OWNER", - "OAUTH2_CLIENT_CREDENTIALS" - ], - "example": "OAUTH2_CLIENT_CREDENTIALS" - }, - "SecurityInfo.OAuth2Info.TokenEndpoint": { - "description": "The token endpoint", - "type": "string", - "format": "uri", - "example": "/meMp1/security/TokenEndPoint" - }, - "SecurityInfo.OAuth2Info": { - "description": "Parameters related to use of OAuth 2.0", - "required": [ - "grantTypes", - "tokenEndpoint" - ], - "properties": { - "grantTypes": { - "description": "List of supported OAuth 2.0 grant types.", - "type": "array", - "minItems": 1, - "maxItems": 4, - "items": { - "$ref": "#/components/schemas/SecurityInfo.OAuth2Info.GrantTypes" - } - }, - "tokenEndpoint": { - "$ref": "#/components/schemas/SecurityInfo.OAuth2Info.TokenEndpoint" - } - }, - "type": "object" - }, - "SecurityInfo": { - "description": "This type represents security information related to a transport", - "type": "object", - "properties": { - "oAuth2Info": { - "$ref": "#/components/schemas/SecurityInfo.OAuth2Info" - } - } - }, - "Self": { - "description": "Self-referring URI.", - "type": "object", - "required": [ - "self" - ], - "properties": { - "self": { - "$ref": "#/components/schemas/LinkType" - } - }, - "readOnly": true - }, - "SerAvailabilityNotificationSubscription.CallbackReference": { - "description": "URI selected by the mobile edge application instance to receive notifications on the subscribed mobile edge service availability information. This shall be included in both the request and the response.", - "type": "string", - "format": "uri" - }, - "SerAvailabilityNotificationSubscription": { - "description": "This type represents a subscription to the notifications from the mobile edge platform regarding the availability of a mobile edge service or a list of mobile edge services.", - "type": "object", - "required": [ - "subscriptionType", - "callbackReference", - "_links", - "filteringCriteria" - ], - "properties": { - "subscriptionType": { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription.SubscriptionType" - }, - "callbackReference": { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription.CallbackReference" - }, - "_links": { - "$ref": "#/components/schemas/Self" - }, - "filteringCriteria": { - "$ref": "#/components/schemas/ServiceInfo" - } - } - }, - "SerAvailabilityNotificationSubscription.SubscriptionType": { - "description": "Shall be set to SerAvailabilityNotificationSubscription.", - "type": "string", - "example": "SerAvailabilityNotificationSubscription" - }, - "ServiceAvailabilityNotification": { - "description": "This type represents the service availability information.", - "type": "object", - "required": [ - "notificationType", - "services", - "_links" - ], - "properties": { - "notificationType": { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription.SubscriptionType" - }, - "services": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ServiceInfo" - } - }, - "_links": { - "$ref": "#/components/schemas/Subscription" - } - } - }, - "SerializerTypes": { - "description": "The enumeration SerializerTypes represents types of serializers", - "type": "string", - "enum": [ - "JSON", - "XML", - "PROTOBUF3" - ], - "example": "JSON" - }, - "ServiceInfo.SerInstanceId": { - "description": "Identifier of the service instance assigned by the MEPM / mobile edge platform.", - "type": "string", - "readOnly": true, - "example": "ServiceInstance123" - }, - "ServiceInfo.SerName": { - "description": "The name of the service. This is how the service producing mobile edge application identifies the service instance it produces.", - "type": "string", - "example": "ExampleService" - }, - "ServiceInfo.State": { - "description": "Contains the state", - "type": "string", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "example": "ACTIVE" - }, - "ServiceInfo.TransportId": { - "description": "Identifier of the platform-provided transport to be used by the service. Valid identifiers may be obtained using the \"Transport information query\" procedure. May be present in POST requests to signal the use of a platform-provided transport for the service, and shall be absent otherwise.", - "type": "string", - "writeOnly": true, - "example": "Rest1" - }, - "ServiceInfo.Version": { - "description": "Service version", - "type": "string", - "example": "ServiceVersion1" - }, - "ServiceInfo.Post": { - "description": "This type represents the general information of a mobile edge service.", - "type": "object", - "required": [ - "serName", - "version", - "state", - "serializer" - ], - "oneOf": [ - { - "required": [ - "transportId" - ] - }, - { - "required": [ - "transportInfo" - ] - } - ], - "properties": { - "serInstanceId": { - "$ref": "#/components/schemas/ServiceInfo.SerInstanceId" - }, - "serName": { - "$ref": "#/components/schemas/ServiceInfo.SerName" - }, - "serCategory": { - "$ref": "#/components/schemas/CategoryRef" - }, - "version": { - "$ref": "#/components/schemas/ServiceInfo.Version" - }, - "state": { - "$ref": "#/components/schemas/ServiceInfo.State" - }, - "transportId": { - "$ref": "#/components/schemas/ServiceInfo.TransportId" - }, - "transportInfo": { - "$ref": "#/components/schemas/TransportInfo" - }, - "serializer": { - "$ref": "#/components/schemas/SerializerTypes" - } - } - }, - "ServiceInfo": { - "description": "This type represents the general information of a mobile edge service.", - "type": "object", - "required": [ - "serName", - "version", - "state", - "transportInfo", - "serializer" - ], - "properties": { - "serInstanceId": { - "$ref": "#/components/schemas/ServiceInfo.SerInstanceId" - }, - "serName": { - "$ref": "#/components/schemas/ServiceInfo.SerName" - }, - "serCategory": { - "$ref": "#/components/schemas/CategoryRef" - }, - "version": { - "$ref": "#/components/schemas/ServiceInfo.Version" - }, - "state": { - "$ref": "#/components/schemas/ServiceInfo.State" - }, - "transportInfo": { - "$ref": "#/components/schemas/TransportInfo" - }, - "serializer": { - "$ref": "#/components/schemas/SerializerTypes" - } - } - }, - "Subscription": { - "description": "A link to the related subscription", - "type": "object", - "required": [ - "subscription" - ], - "properties": { - "subscription": { - "$ref": "#/components/schemas/LinkType" - } - } - }, - "TimingCaps.NtpServers.AuthenticationKeyNum": { - "description": "Authentication key number", - "type": "integer", - "format": "uint32", - "example": 1 - }, - "TimingCaps.NtpServers.AuthenticationOption": { - "description": "NTP authentication option", - "type": "string", - "enum": [ - "NONE", - "SYMMETRIC_KEY", - "AUTO_KEY" - ], - "example": "NONE" - }, - "TimingCaps.NtpServers.DelayReqMaxRate": { - "description": "Acceptable maximum rate of the Delay_Req messages in packets per second", - "type": "integer", - "format": "uint32", - "example": 10 - }, - "TimingCaps.NtpServers.LocalPriority": { - "description": "NTP server local priority", - "type": "integer", - "format": "uint32", - "example": 1 - }, - "TimingCaps.NtpServers.MaxPollingInterval": { - "description": "Maximum poll interval for NTP messages, in seconds as a power of two. Range 3...17", - "type": "integer", - "format": "uint32", - "example": 17 - }, - "TimingCaps.NtpServers.MinPollingInterval": { - "description": "Minimum poll interval for NTP messages, in seconds as a power of two. Range 3...17", - "type": "integer", - "format": "uint32", - "example": 3 - }, - "TimingCaps.NtpServers.NtpServerAddr": { - "description": "NTP server address", - "type": "string", - "example": "192.0.2.0" - }, - "TimingCaps.NtpServers.NtpServerAddrType": { - "description": "Address type of NTP server", - "type": "string", - "enum": [ - "IP_ADDRESS", - "DNS_NAME" - ], - "example": "IP_ADDRESS" - }, - "TimingCaps.NtpServers_PtpMasterIpAddress": { - "description": "PTP Master IP Address", - "type": "string", - "example": "192.0.2.0" - }, - "TimingCaps.NtpServers_PtpMasterLocalPriority": { - "description": "PTP Master local priority", - "type": "integer", - "format": "uint32", - "example": 1 - }, - "TimingCaps.NtpServers": { - "description": "NTP server detail.", - "type": "object", - "required": [ - "ntpServerAddrType", - "ntpServerAddr", - "minPollingInterval", - "maxPollingInterval", - "localPriority", - "authenticationOption", - "authenticationKeyNum" - ], - "properties": { - "ntpServerAddrType": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.NtpServerAddrType" - }, - "ntpServerAddr": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.NtpServerAddr" - }, - "minPollingInterval": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.MinPollingInterval" - }, - "maxPollingInterval": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.MaxPollingInterval" - }, - "localPriority": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.LocalPriority" - }, - "authenticationOption": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.AuthenticationOption" - }, - "authenticationKeyNum": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.AuthenticationKeyNum" - } - } - }, - "TimingCaps_PtpMasters": { - "description": "NTP server detail.", - "type": "object", - "required": [ - "ptpMasterIpAddress", - "ptpMasterLocalPriority", - "delayReqMaxRate" - ], - "properties": { - "ptpMasterIpAddress": { - "$ref": "#/components/schemas/TimingCaps.NtpServers_PtpMasterIpAddress" - }, - "ptpMasterLocalPriority": { - "$ref": "#/components/schemas/TimingCaps.NtpServers_PtpMasterLocalPriority" - }, - "delayReqMaxRate": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.DelayReqMaxRate" - } - } - }, - "TimingCaps.TimeStamp": { - "description": "time", - "type": "object", - "required": [ - "nanoSeconds", - "seconds" - ], - "properties": { - "seconds": { - "type": "integer", - "format": "uint32", - "description": "The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "example": 1577836800 - }, - "nanoSeconds": { - "type": "integer", - "format": "uint32", - "description": "The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "example": 0 - } - } - }, - "TimingCaps": { - "description": "This type represents the information provided by the mobile edge platform in response to the Timing capabilities Query message.", - "type": "object", - "properties": { - "timeStamp": { - "$ref": "#/components/schemas/TimingCaps.TimeStamp" - }, - "ntpServers": { - "description": "Available NTP servers", - "type": "array", - "items": { - "$ref": "#/components/schemas/TimingCaps.NtpServers" - } - }, - "ptpMasters": { - "description": "Available PTP Masters", - "type": "array", - "items": { - "$ref": "#/components/schemas/TimingCaps_PtpMasters" - } - } - } - }, - "TrafficFilter.Address": { - "description": "Identify the traffic ip address.", - "type": "string", - "example": "192.168.1.1" - }, - "TrafficFilter.DSCP": { - "description": "Used to match all IPv4 packets that have the same Differentiated Services Code Point (DSCP)", - "type": "integer", - "format": "uint32", - "example": 0 - }, - "TrafficFilter.Port": { - "description": "A port", - "type": "string", - "example": "8080" - }, - "TrafficFilter.Protocol": { - "description": "Protocol of the traffic filter", - "type": "string", - "example": "?" - }, - "TrafficFilter.QCI": { - "description": "Used to match all packets that have the same Quality Class Indicator (QCI).", - "type": "integer", - "format": "uint32", - "example": 1 - }, - "TrafficFilter.TC": { - "description": "Used to match all IPv6 packets that have the same Traffic Class.", - "type": "integer", - "format": "uint32", - "example": 1 - }, - "TrafficFilter.Token": { - "description": "Used for token based traffic rule", - "type": "string", - "example": "?" - }, - "TrafficFilter.TunnelAddress": { - "description": "Used for GTP tunnel based traffic rule", - "type": "string", - "example": "?" - }, - "TrafficFilter.TunnelPort": { - "description": "Used for GTP tunnel based traffic rule", - "type": "string", - "example": "?" - }, - "TrafficFilter": { - "description": "This type represents the traffic filter.", - "type": "object", - "properties": { - "srcAddress": { - "description": "An IP address or a range of IP address. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.Address" - } - }, - "dstAddress": { - "description": "An IP address or a range of IP address. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.Address" - } - }, - "srcPort": { - "description": "A port or a range of ports", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.Port" - } - }, - "dstPort": { - "description": "A port or a range of ports", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.Port" - } - }, - "protocol": { - "description": "Specify the protocol of the traffic filter", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.Protocol" - } - }, - "token": { - "description": "Used for token based traffic rule", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.Token" - } - }, - "srcTunnelAddress": { - "description": "Used for GTP tunnel based traffic rule", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.TunnelAddress" - } - }, - "tgtTunnelAddress": { - "description": "Used for GTP tunnel based traffic rule", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.TunnelAddress" - } - }, - "srcTunnelPort": { - "description": "Used for GTP tunnel based traffic rule", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.TunnelPort" - } - }, - "dstTunnelPort": { - "description": "Used for GTP tunnel based traffic rule", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.TunnelPort" - } - }, - "qCI": { - "$ref": "#/components/schemas/TrafficFilter.QCI" - }, - "dSCP": { - "$ref": "#/components/schemas/TrafficFilter.DSCP" - }, - "tC": { - "$ref": "#/components/schemas/TrafficFilter.TC" - } - } - }, - "TrafficRule.Action": { - "description": "The action of the ME host data plane when a packet matches the trafficFilter", - "type": "string", - "enum": [ - "DROP", - "FORWARD_DECAPSULATED", - "FORWARD_AS_IS", - "PASSTHROUGH", - "DUPLICATE_DECAPSULATED", - "DUPLICATE_AS_IS" - ], - "example": "DROP" - }, - "TrafficRule.FilterType": { - "description": "Definition of filter per FLOW or PACKET. If flow the filter match UE->EPC packet and the reverse packet is handled in the same context", - "type": "string", - "enum": [ - "FLOW", - "PACKET" - ], - "example": "FLOW" - }, - "TrafficRule.Id": { - "description": "Identify the traffic rule.", - "type": "string", - "example": "TrafficRule1" - }, - "TrafficRule_Priority": { - "description": "Priority of this traffic rule. If traffic rule conflicts, the one with higher priority take precedence", - "type": "integer", - "format": "uint32", - "example": 1 - }, - "TrafficRule.State": { - "description": "Contains the traffic rule state", - "type": "string", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "example": "ACTIVE" - }, - "TrafficRule": { - "description": "This type represents the general information of a traffic rule.", - "type": "object", - "required": [ - "trafficRuleId", - "filterType", - "priority", - "trafficFilter", - "action", - "state" - ], - "properties": { - "trafficRuleId": { - "$ref": "#/components/schemas/TrafficRule.Id" - }, - "filterType": { - "$ref": "#/components/schemas/TrafficRule.FilterType" - }, - "priority": { - "$ref": "#/components/schemas/TrafficRule_Priority" - }, - "trafficFilter": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter" - } - }, - "action": { - "$ref": "#/components/schemas/TrafficRule.Action" - }, - "dstInterface": { - "$ref": "#/components/schemas/DestinationInterface" - }, - "state": { - "$ref": "#/components/schemas/TrafficRule.State" - } - } - }, - "TransportInfo.Description": { - "description": "Human-readable description of this transport", - "type": "string", - "example": "REST API" - }, - "TransportInfo.Id": { - "description": "The identifier of this transport", - "type": "string", - "example": "TransId12345" - }, - "TransportInfo.ImplSpecificInfo": { - "description": "Additional implementation specific details of the transport", - "type": "object" - }, - "TransportInfo.Name": { - "description": "The name of this transport", - "type": "string", - "example": "REST" - }, - "TransportInfo.Protocol": { - "description": "The name of the protocol used. Shall be set to HTTP for a REST API.", - "type": "string", - "example": "HTTP" - }, - "TransportInfo.Version": { - "description": "The version of the protocol used", - "type": "string", - "example": "2.0" - }, - "TransportInfo": { - "description": "This type represents the general information of a mobile edge service.", - "type": "object", - "required": [ - "id", - "name", - "type", - "protocol", - "version", - "endpoint", - "security" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/TransportInfo.Id" - }, - "name": { - "$ref": "#/components/schemas/TransportInfo.Name" - }, - "description": { - "$ref": "#/components/schemas/TransportInfo.Description" - }, - "type": { - "$ref": "#/components/schemas/TransportTypes" - }, - "protocol": { - "$ref": "#/components/schemas/TransportInfo.Protocol" - }, - "version": { - "$ref": "#/components/schemas/TransportInfo.Version" - }, - "endpoint": { - "description": "This type represents information about a transport endpoint", - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/EndPointInfo.Uris" - }, - { - "$ref": "#/components/schemas/EndPointInfo.Addresses" - }, - { - "$ref": "#/components/schemas/EndPointInfo.Alternative" - } - ] - }, - "security": { - "$ref": "#/components/schemas/SecurityInfo" - }, - "implSpecificInfo": { - "$ref": "#/components/schemas/TransportInfo.ImplSpecificInfo" - } - } - }, - "TransportTypes": { - "description": "The enumeration TransportTypes represents types of transports", - "type": "string", - "enum": [ - "REST_HTTP", - "MB_TOPIC_BASED", - "MB_ROUTING", - "MB_PUBSUB", - "RPC", - "RPC_STREAMING", - "WEBSOCKET" - ], - "example": "REST_HTTP" - }, - "TunnelInfo.TunnelDstAddress": { - "description": "Destination address of the tunnel", - "type": "string", - "example": "?" - }, - "TunnelInfo.TunnelSrcAddress": { - "description": "Source address of the tunnel", - "type": "string", - "example": "?" - }, - "TunnelInfo.TunnelType": { - "description": "This type represents the tunnel information.", - "type": "string", - "enum": [ - "GTP_U", - "GRE" - ], - "example": "GTP_U" - }, - "TunnelInfo": { - "description": "This type represents the tunnel information.", - "type": "object", - "required": [ - "tunnelType" - ], - "properties": { - "tunnelType": { - "$ref": "#/components/schemas/TunnelInfo.TunnelType" - }, - "tunnelDstAddress": { - "$ref": "#/components/schemas/TunnelInfo.TunnelDstAddress" - }, - "tunnelSrcAddress": { - "$ref": "#/components/schemas/TunnelInfo.TunnelSrcAddress" - } - } - } - }, - "parameters": { - "Path.AppInstanceId": { - "name": "appInstanceId", - "description": "Represents a mobile edge application instance. Note that the appInstanceId is allocated by the mobile edge platform manager.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - "Path.DnsRuleId": { - "name": "dnsRuleId", - "description": "Represents a DNS rule.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - "Path.SubscriptionId": { - "name": "subscriptionId", - "description": "Represents a subscription to the notifications from the mobile edge platform.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - "Path.SubscriptionType": { - "name": "subscriptionType", - "description": "Represents a subscription type to the notifications from the mobile edge platform.", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "AppTerminationNotificationSubscription", - "SerAvailabilityNotificationSubscription" - ] - } - }, - "Path.ServiceId": { - "name": "serviceId", - "description": "Represents a mobile edge service instance.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - "Path.TrafficRuleId": { - "name": "trafficRuleId", - "description": "Represents a traffic rule.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - "Query.Ser_category_id": { - "name": "ser_category_id", - "description": "A mobile edge application instance may use ser_category_id as an input parameter to query the availability of a list of mobile edge service instances in a serCategory. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present.", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - "Query.Ser_instance_id": { - "name": "ser_instance_id", - "description": "A mobile edge application instance may use multiple ser_instance_ids as an input parameter to query the availability of a list of mobile edge service instances. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present.", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.Ser_name": { - "name": "ser_name", - "description": "A mobile edge application instance may use multiple ser_names as an input parameter to query the availability of a list of mobile edge service instances. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present.", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "responses": { - "ApplicationsDnsRules.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/DnsRule" - } - }, - "examples": { - "DnsRules": { - "$ref": "#/components/examples/DnsRules" - } - } - } - }, - "links": { - "getIndividualMeDNSRule": { - "$ref": "#/components/links/GetIndividualMeDNSRule" - }, - "putIndividualMeDNSRule": { - "$ref": "#/components/links/PutIndividualMeDNSRule" - } - } - }, - "ApplicationsDnsRule.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DnsRule" - }, - "examples": { - "DnsRule": { - "$ref": "#/components/examples/DnsRule" - } - } - } - } - }, - "ApplicationsSubscriptions.200": { - "description": "Upon success, a response body containing the list of links to the requested subscriptions is returned.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Mp1SubscriptionLinkList" - } - } - }, - "links": { - "getIndividualMeMp1SubscriptionLinkList": { - "$ref": "#/components/links/GetIndividualMeMp1SubscriptionLinkList" - }, - "delIndividualMeMp1SubscriptionLinkList": { - "$ref": "#/components/links/DelIndividualMeMp1SubscriptionLinkList" - } - } - }, - "ApplicationsSubscriptions.201": { - "description": "Entity body in the request contains a subscription to the mobile edge service availability notifications that is to be created.", - "headers": { - "location": { - "description": "The resource URI of the created resource", - "schema": { - "type": "string", - "format": "uri" - } - } - }, - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription" - }, - { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription" - } - ] - } - } - }, - "links": { - "getIndividualMeMp1Subscription": { - "$ref": "#/components/links/GetIndividualMeMp1Subscription" - }, - "delIndividualMeMp1Subscription": { - "$ref": "#/components/links/DelIndividualMeMp1Subscription" - } - } - }, - "ApplicationsSubscription.200": { - "description": "Upon success, a response body containing the requested subscription is returned.", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription" - }, - { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription" - } - ] - } - } - } - }, - "ApplicationsTrafficRules.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/TrafficRule" - } - }, - "examples": { - "TrafficRules": { - "$ref": "#/components/examples/TrafficRules" - } - } - } - }, - "links": { - "getIndividualMeTrafficRule": { - "$ref": "#/components/links/GetIndividualMeTrafficRule" - }, - "putIndividualMeTrafficRule": { - "$ref": "#/components/links/PutIndividualMeTrafficRule" - } - } - }, - "ApplicationsTrafficRule.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TrafficRule" - }, - "examples": { - "TrafficRule": { - "$ref": "#/components/examples/TrafficRule" - } - } - } - } - }, - "Services.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/ServiceInfo" - } - }, - "examples": { - "ServiceInfoList": { - "$ref": "#/components/examples/ServiceInfoList" - } - } - } - }, - "links": { - "getIndividualMeService": { - "$ref": "#/components/links/GetIndividualMeService" - }, - "putIndividualMeService": { - "$ref": "#/components/links/PutIndividualMeService" - } - } - }, - "Services.201": { - "description": "Upon success, the HTTP response shall include a Location HTTP header that contains the resource URI of the created resource.", - "headers": { - "location": { - "description": "The resource URI of the created resource", - "schema": { - "type": "string", - "format": "uri" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceInfo" - }, - "examples": { - "ServiceInfo": { - "$ref": "#/components/examples/ServiceInfo" - } - } - } - }, - "links": { - "getIndividualMeService": { - "$ref": "#/components/links/GetIndividualMeService" - }, - "putIndividualMeService": { - "$ref": "#/components/links/PutIndividualMeService" - } - } - }, - "ServicesServiceId.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceInfo" - }, - "examples": { - "ServiceInfo": { - "$ref": "#/components/examples/ServiceInfo" - } - } - } - } - }, - "TimingCurrentTime.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CurrentTime" - } - } - } - }, - "TimingCaps.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TimingCaps" - } - } - } - }, - "Transports.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/TransportInfo" - } - } - } - }, - "links": { - "getTransportInfo": { - "$ref": "#/components/links/GetTransportInfo" - } - } - }, - "Error.400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - }, - "Error.403": { - "description": "Forbidden", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "Error.404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - }, - "Error.412": { - "description": "Precondition Failed", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - } - }, - "requestBodies": { - "ApplicationsDnsRule": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DnsRule" - } - } - }, - "description": "The updated state is included in the entity body of the request.", - "required": true - }, - "ApplicationsSubscriptions": { - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription" - }, - { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription" - } - ] - } - } - }, - "description": "Entity body in the request contains a subscription to the mobile edge application termination notifications that is to be created.", - "required": true - }, - "ApplicationsTrafficRule": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TrafficRule" - } - } - }, - "description": "One or more updated attributes that are allowed to be changed", - "required": true - }, - "Services": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceInfo" - } - } - }, - "description": "New ServiceInfo with updated \"state\" is included as entity body of the request", - "required": true - }, - "Services.Post": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceInfo.Post" - } - } - }, - "description": "New ServiceInfo with updated \"state\" is included as entity body of the request", - "required": true - }, - "ServicesServiceId": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceInfo" - } - } - }, - "description": "New ServiceInfo with updated \"state\" is included as entity body of the request", - "required": true - }, - "AppTerminationNotification": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppTerminationNotification" - } - } - } - }, - "ServiceAvailabilityNotification": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceAvailabilityNotification" - } - } - } - } - }, - "callbacks": { - "AppTerminationNotification": { - "{$request.body#/callbackReference}": { - "post": { - "description": "Represents the information that the MEP notifies the subscribed application instance about the corresponding application instance termination/stop", - "operationId": "AppTerminationNotification_POST", - "tags": [ - "callback" - ], - "requestBody": { - "$ref": "#/components/requestBodies/AppTerminationNotification" - }, - "responses": { - "200": { - "description": "Expected responses from callback consumer, if it accepts the callback" - } - } - } - } - }, - "ServiceAvailabilityNotification": { - "{$request.body#/callbackReference}": { - "post": { - "description": "'Represents the service availability information that is used in the following cases - when the MEC platform announces the newly available\n services to the authorized relevant MEC applications (e.g. \n the applications that indicate the services as \"optional\" \n or \"required\") that are subscribed to the corresponding \n service availability notifications\n- when the MEC platform notifies the authorized relevant applications that are subscribed to the corresponding service availability notifications about the service availability changes.'", - "operationId": "ServiceAvailabilityNotification_POST", - "tags": [ - "callback" - ], - "requestBody": { - "$ref": "#/components/requestBodies/ServiceAvailabilityNotification" - }, - "responses": { - "200": { - "description": "Expected responses from callback consumer, if it accepts the callback" - } - } - } - } - } - }, - "links": { - "GetIndividualMeService": { - "operationId": "ServicesServiceId_GET", - "description": "The `serviceId` value returned in the response can be used as the `serviceId` parameter in `GET /services/{serviceId}`", - "parameters": { - "serviceId": "$response.body#/serviceId" - } - }, - "PutIndividualMeService": { - "operationId": "ServicesServiceId_PUT", - "description": "The `serviceId` value returned in the response can be used as the `serviceId` parameter in `PUT /services/{serviceId}`", - "parameters": { - "serviceId": "$response.body#/serviceId" - } - }, - "GetIndividualMeDNSRule": { - "operationId": "ApplicationsDnsRule_GET", - "description": "The `dnsRuleId` value returned in the response can be used as the `dnsRuleId` parameter in `GET /applications/{appInstanceId}/dns_rules/{dnsRuleId}`", - "parameters": { - "dnsRuleId": "$response.body#/dnsRuleId" - } - }, - "PutIndividualMeDNSRule": { - "operationId": "ApplicationsDnsRule_PUT", - "description": "The `dnsRuleId` value returned in the response can be used as the `dnsRuleId` parameter in `PUT /applications/{appInstanceId}/dns_rules/{dnsRuleId}`", - "parameters": { - "dnsRuleId": "$response.body#/dnsRuleId" - } - }, - "GetIndividualMeTrafficRule": { - "operationId": "ApplicationsTrafficRule_GET", - "description": "The `trafficRuleId` value returned in the response can be used as the `trafficRuleId` parameter in `GET /applications/{appInstanceId}/traffic_rules/{trafficRuleId}`", - "parameters": { - "trafficRuleId": "$response.body#/trafficRuleId" - } - }, - "PutIndividualMeTrafficRule": { - "operationId": "ApplicationsTrafficRule_PUT", - "description": "The `trafficRuleId` value returned in the response can be used as the `trafficRuleId` parameter in `PUT /applications/{appInstanceId}/traffic_rules/{trafficRuleId}`", - "parameters": { - "trafficRuleId": "$response.body#/trafficRuleId" - } - }, - "GetTransportInfo": { - "operationId": "AppServices_POST", - "description": "The `id` value returned in the response can be used as the `transportId` parameter in `POST /applications/{appInstanceId}/services`. The first transport is provided as the link as wildcards are not supported", - "parameters": { - "transportId": "$response.body#/0/id" - } - }, - "GetIndividualMeMp1Subscription": { - "operationId": "ApplicationsSubscription_GET", - "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}`", - "parameters": { - "description": "regex = \\/mp1\\/v1\\/applications\\/.*\\/subscriptions\\/.*\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", - "subscriptionId": "TBC" - } - }, - "DelIndividualMeMp1Subscription": { - "operationId": "ApplicationsSubscription_DELETE", - "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}`", - "parameters": { - "description": "regex = \\/mp1\\/v1\\/applications\\/.*\\/subscriptions\\/.*\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", - "subscriptionId": "TBC" - } - }, - "GetIndividualMeMp1SubscriptionLinkList": { - "operationId": "ApplicationsSubscription_GET", - "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}`", - "parameters": { - "description": "regex = \\/mp1\\/v1\\/applications\\/.*\\/subscriptions\\/.*\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", - "subscriptionId": "TBC" - } - }, - "DelIndividualMeMp1SubscriptionLinkList": { - "operationId": "ApplicationsSubscription_DELETE", - "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}`", - "parameters": { - "description": "regex = \\/mp1\\/v1\\/applications\\/.*\\/subscriptions\\/.*\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", - "subscriptionId": "TBC" - } - } - }, - "examples": { - "DnsRule": { - "value": { - "dnsRuleId": "DnsRule1", - "domainName": "www.example.com", - "ipAddressType": "IP_V4", - "ipAddress": "146.241.7.3", - "ttl": 300, - "state": "ACTIVE" - } - }, - "DnsRules": { - "value": [ - { - "dnsRuleId": "DnsRule1", - "domainName": "www.example.com", - "ipAddressType": "IP_V4", - "ipAddress": "146.241.7.3", - "ttl": 300, - "state": "ACTIVE" - } - ] - }, - "ServiceInfo": { - "value": { - "serInstanceId": "ServiceInstance123", - "serName": "ExampleService", - "serCategory": { - "href": "catItem1", - "id": "id12345", - "name": "RNI", - "version": "version1" - }, - "version": "ServiceVersion1", - "state": "ACTIVE", - "transportInfo": { - "id": "TransId12345", - "name": "REST", - "description": "REST API", - "type": "REST_HTTP", - "protocol": "HTTP", - "version": "2.0", - "endpoint": { - "uris": [ - "/meMp1/service/EntryPoint" - ] - }, - "security": { - "oAuth2Info": { - "grantTypes": [ - "OAUTH2_CLIENT_CREDENTIALS" - ], - "tokenEndpoint": "/meMp1/security/TokenEndPoint" - } - } - }, - "serializer": "JSON" - } - }, - "ServiceInfoList": { - "value": [ - { - "serInstanceId": "ServiceInstance123", - "serName": "ExampleService", - "serCategory": { - "href": "catItem1", - "id": "id12345", - "name": "RNI", - "version": "version1" - }, - "version": "ServiceVersion1", - "state": "ACTIVE", - "transportInfo": { - "id": "TransId12345", - "name": "REST", - "description": "REST API", - "type": "REST_HTTP", - "protocol": "HTTP", - "version": "2.0", - "endpoint": { - "addresses": [ - { - "host": "192.0.2.0", - "port": 8080 - } - ] - }, - "security": { - "oAuth2Info": { - "grantTypes": [ - "OAUTH2_CLIENT_CREDENTIALS" - ], - "tokenEndpoint": "/meMp1/security/TokenEndPoint" - } - } - }, - "serializer": "JSON" - } - ] - }, - "TrafficRule": { - "value": { - "trafficRuleId": "TrafficRule123", - "serName": "ExampleService", - "filterType": "FLOW", - "priority": 1, - "trafficFilter": [ - { - "srcAddress": [ - "192.168.2.0/24", - "192.168.3.0/24" - ], - "dstAddress": [ - "192.127.4.100/32" - ], - "dstPort": [ - "80" - ] - } - ], - "action": "FORWARD_DECAPSULATED", - "dstInterface": { - "interfaceType": "IP", - "dstIpAddress": "20.1.1.1" - }, - "state": "ACTIVE" - } - }, - "TrafficRules": { - "value": [ - { - "trafficRuleId": "TrafficRule123", - "serName": "ExampleService", - "filterType": "FLOW", - "priority": 1, - "trafficFilter": [ - { - "srcAddress": [ - "192.168.2.0/24", - "192.168.3.0/24" - ], - "dstAddress": [ - "192.127.4.100/32" - ], - "dstPort": [ - "80" - ] - } - ], - "action": "FORWARD_DECAPSULATED", - "dstInterface": { - "interfaceType": "IP", - "dstIpAddress": "20.1.1.1" - }, - "state": "ACTIVE" - } - ] - } - } - } -} \ No newline at end of file diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn index e0dedcfaaea936cb0ffec000321a0eaa3cb02b94..08ce93a3ce487298fe69917176142b16638f579c 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn @@ -1,7 +1,7 @@ module EdgePlatformApplicationEnablementAPI_Functions { // JSON - import from JSON all; + import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; @@ -10,11 +10,11 @@ module EdgePlatformApplicationEnablementAPI_Functions { import from LibCommon_Sync all; // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; // LibMec/EdgePlatformApplicationEnablementAPI import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; @@ -29,7 +29,7 @@ module EdgePlatformApplicationEnablementAPI_Functions { function f_create_service_info( out ServiceInfo p_service_info, - out Headers p_headers + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -39,24 +39,22 @@ module EdgePlatformApplicationEnablementAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", v_headers, m_http_message_body_json( m_body_json_service_info( m_service_info( v_service_name, - -, -, -, - m_service_info_link("m_service_info_link"), - -, -, //-, + -, -, -, -, -, -, m_transport_info( - "transportId1", - "ETSI MEC-011 Conformance test", + "REST", + "REST_HTTP", REST_HTTP, "HTTP", "2.0", m_end_point_uris({"/meMp1/service/MyEntryPoint"}), m_security_info - ))))))); + ))))))); tc_ac.start; alt { [] httpPort.receive( @@ -65,13 +63,22 @@ module EdgePlatformApplicationEnablementAPI_Functions { mw_http_message_body_json( mw_body_json_service_info( mw_service_info( - v_service_name //serName - )))))) -> value v_response { + v_service_name + )))))) -> value v_response { tc_ac.stop; + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services" & "/(?*)", + 0 + ); p_service_info := v_response.response.body.json_body.serviceInfo; - p_headers := v_response.response.header; - log("f_create_service_info: INFO: IUT successfully responds to the subscription: ", p_service_info); + log("f_create_service_info: INFO: IUT successfully responds to the service creation: ", p_service_info); + log("f_create_service_info: INFO: Resource URI: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_service_info: INCONC: Expected message not received"); @@ -79,8 +86,72 @@ module EdgePlatformApplicationEnablementAPI_Functions { } // End of 'alt' statement } // End of function f_create_service_info + function f_create_service_info_with_liveness( + out ServiceInfo p_service_info, + out charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + var universal charstring v_service_name := oct2unichar(char2oct("service_" & int2str(f_get_current_timestamp_utc()))); + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", + v_headers, + m_http_message_body_json( + m_body_json_service_info( + m_service_info( + v_service_name, + -, -, -, -, -, -, + m_transport_info( + "REST", + "REST_HTTP", + REST_HTTP, + "HTTP", + "2.0", + m_end_point_uris({"/meMp1/service/MyEntryPoint"}), + m_security_info + ), + -, + PX_LIVENESS_INTERVAL + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_service_info( + mw_service_info( + v_service_name, + -, -, -, + mw_service_info_link_liveness + )))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services" & "/(?*)", + 0 + ); + p_service_info := v_response.response.body.json_body.serviceInfo; + log("f_create_service_info: INFO: IUT successfully responds to the service creation: ", p_service_info); + log("f_create_service_info: INFO: Resource URI: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_service_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_service_info_with_liveness + function f_delete_service_info( - in ServiceInfo p_service_info + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; @@ -88,7 +159,7 @@ module EdgePlatformApplicationEnablementAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(p_service_info.serName)), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & p_subscription_id, v_headers ))); tc_ac.start; @@ -104,9 +175,96 @@ module EdgePlatformApplicationEnablementAPI_Functions { } } // End of 'alt' statement } // End of function f_delete_service_info - + + function f_create_app_termination_notif_subscription( + out AppTerminationNotificationSubscription p_app_termination_notification_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + v_headers, + m_http_message_body_json( + m_body_json_app_termination_notif_subscription( + m_app_termination_notif_subscription( + PX_APP_TERM_NOTIF_CALLBACK_URI, + -, + PX_APP_INSTANCE_ID + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_termination_notif_subscription( + mw_app_termination_notif_subscription( + PX_APP_TERM_NOTIF_CALLBACK_URI, + mw_self, + PX_APP_INSTANCE_ID + )))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions" & "/(?*)", + 0 + ); + p_app_termination_notification_subscription := v_response.response.body.json_body.appTerminationNotificationSubscription; + log("f_create_app_termination_notif_subscription: INFO: IUT successfully responds with a AppTerminationNotificationSubscription: ", p_app_termination_notification_subscription); + log("f_create_app_termination_notif_subscription: INFO: Resource URI: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_app_termination_notif_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_app_termination_notif_subscription + + function f_delete_app_termination_notif_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & p_subscription_id, + v_headers + ))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_app_termination_notif_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_app_termination_notif_subscription + function f_create_ser_availability_notification_subscription( - out SerAvailabilityNotificationSubscription p_ser_availability_notification_subscription + out SerAvailabilityNotificationSubscription p_ser_availability_notification_subscription, + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -115,13 +273,13 @@ module EdgePlatformApplicationEnablementAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", v_headers, m_http_message_body_json( m_body_json_srv_avail_notif_subscription( m_srv_avail_notif_subscription( PX_SRV_AVAIL_NOTIF_CALLBACK_URI - )))))); + )))))); tc_ac.start; alt { [] httpPort.receive( @@ -131,11 +289,21 @@ module EdgePlatformApplicationEnablementAPI_Functions { mw_body_json_srv_avail_notif_subscription( mw_srv_avail_notif_subscription( PX_SRV_AVAIL_NOTIF_CALLBACK_URI - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions" & "/(?*)", + 0 + ); p_ser_availability_notification_subscription := v_response.response.body.json_body.serAvailabilityNotificationSubscription log("f_create_ser_availability_notification_subscription: INFO: IUT successfully responds to the subscription: ", p_ser_availability_notification_subscription); + log("f_create_service_info: INFO: Resource URI: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_ser_availability_notification_subscription: INCONC: Expected message not received"); @@ -144,28 +312,23 @@ module EdgePlatformApplicationEnablementAPI_Functions { } // End of function f_create_ser_availability_notification_subscription function f_delete_ser_availability_notification_subscription( - in SerAvailabilityNotificationSubscription p_ser_availability_notification_subscription + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_ser_availability_notification_subscription.links.self_.href)), - "?+(" & PX_MEC_SVC_MGMT_APPS_URI & "/?*)", - 0 - ); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & v_uri, + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & p_subscription_id, v_headers - ))); + ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { @@ -173,5 +336,81 @@ module EdgePlatformApplicationEnablementAPI_Functions { } } // End of 'alt' statement } // End of function f_delete_ser_availability_notification_subscription - + + function f_app_registration( + out AppInfo p_app_info, + out Headers p_headers + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, -, + PX_APP_INSTANCE_ID, + m_end_point_uris({PX_APP_ENDPOINT_URI}) + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_info_regapps( + mw_app_info( + PX_APP_NAME, + -, -, -, + PX_APP_INSTANCE_ID, + mw_end_point_uris({PX_APP_ENDPOINT_URI}) + )))))) -> value v_response { + tc_ac.stop; + + p_app_info := v_response.response.body.json_body.appInfo_regapps; + p_headers := v_response.response.header; + log("f_app_registration: IUT successfully responds with a AppInfo: ", p_app_info); + } + [] tc_ac.timeout { + log("f_app_registration: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_app_registration + + function f_app_deletion( + in Json.String p_app_instance_id + ) runs on HttpComponent { + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + v_headers + ))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_app_deletion: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_app_deletion + } // End of module EdgePlatformApplicationEnablementAPI_Functions diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn index e36543de5dc9a81c6019fcc555378b7702fd9518..3b54f9ad39468c22fe11b56d7d2bc2448fa60e94 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn @@ -1,13 +1,22 @@ module EdgePlatformApplicationEnablementAPI_Pixits { + // JSON + import from Json all; + // LibMec/EdgePlatformApplicationEnablementAPI import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + modulepar Json.String PX_APP_NAME := "appName01"; + + modulepar Json.String PX_APP_D_ID := "appName01"; + modulepar AppInstanceId PX_APP_INSTANCE_ID := "appInst01"; modulepar AppInstanceId PX_NON_EXISTENT_APP_INSTANCE_ID := "appInst99"; + + modulepar Json.String PX_APP_ENDPOINT_URI := "http://example.com:12345"; - modulepar SerName PX_SERVICE_NAME := "serName"; + modulepar SerName PX_SERVICE_NAME := "serName01"; modulepar SerName PX_NON_EXISTENT_SERVICE_NAME := "unknownSerName"; @@ -29,6 +38,8 @@ module EdgePlatformApplicationEnablementAPI_Pixits { modulepar AppTerminationNotificationSubscription_CallbackReference PX_APP_TERM_NOTIF_CALLBACK_URI := "http://example.com/exampleAPI/location/v1/app_termination"; + modulepar Json.UInteger PX_LIVENESS_INTERVAL := 1; + modulepar Href PX_HREF := "http://www.etsi.org"; modulepar Href PX_SUBSCRIPTION_ID := "3"; @@ -57,6 +68,6 @@ module EdgePlatformApplicationEnablementAPI_Pixits { modulepar TrafficRule_Id PX_NON_EXISTENT_TRAFFIC_RULE_ID := "trafficRuleId99"; - modulepar charstring PX_LINK_LIV := "link/to/individual/mecServiceLiveness"; + modulepar charstring PX_LINK_LIV := "mec_service_mgmt/v1/resource_uri_allocated_by_MEC_platform"; } // End of module EdgePlatformApplicationEnablementAPI_Pixits diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn index 58ef2f6b495d37599da68b9e49a20a794c9024ba..74c1915614f26a331e22038afab587da6bc588f8 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn @@ -1,36 +1,25 @@ /** * @desc The ETSI MEC ISG MEC011 Application Enablement API described using OpenAPI - * @see http://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v010101p.pdf */ module EdgePlatformApplicationEnablementAPI_Templates { // JSON - import from JSON all; + import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; - // LibMec/AppEna + // LibMec + import from LibMec_TypesAndValues all; + + // LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; + + // LibMec/EdgePlatformApplicationEnablementAPI import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; import from EdgePlatformApplicationEnablementAPI_Pixits all; - template (value) TimeStamp m_time_stamp( - in Seconds p_seconds, - in NanoSeconds p_nanoSeconds := 0 - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of template m_time_stamp - - template (present) TimeStamp mw_time_stamp( - template (present) Seconds p_seconds := ?, - template (present) NanoSeconds p_nanoSeconds := ? - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of template mw_time_stamp - - template (value) SecurityInfo m_security_info( + template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo m_security_info( in GrantTypesList p_grantTypes := { OAUTH2_CLIENT_CREDENTIALS }, in TokenEndpoint p_tokenEndpoint := "/mecSerMgmtApi/security/MyTokenEndPoint" ) := { @@ -41,7 +30,7 @@ module EdgePlatformApplicationEnablementAPI_Templates { extentions := omit } // End of template m_security_info - template (present) SecurityInfo mw_security_info( + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo mw_security_info( template (present) GrantTypesList p_grantTypes := ?, template (present) TokenEndpoint p_tokenEndpoint := ? ) := { @@ -52,22 +41,32 @@ module EdgePlatformApplicationEnablementAPI_Templates { extentions := * } // End of template mw_security_info - template (value) TransportInfo_Endpoint m_end_point_uris( - in template (value) EndPointInfo_UriList p_uris - ) := { + template (value) EndPointInfo m_end_point_uris( + in template (value) EndPointInfo_UriList p_uris + ) := { uris := p_uris, + fqdn := omit, addresses := omit, alternative := omit } // End of template m_end_point_uris - template (present) TransportInfo_Endpoint mw_end_point_uris( - template (present) EndPointInfo_UriList p_uris := ? - ) := { + template (present) EndPointInfo mw_end_point_uris( + template (present) EndPointInfo_UriList p_uris := ? + ) := { uris := p_uris, + fqdn := *, addresses := *, alternative := * } // End of template mw_end_point_uris + template (omit) ServiceInfo_Link m_service_info_link_liveness( + in template (value) Href p_href, + in template (value) Href p_liveness_href + ) := { + self_ := { href := p_href}, + liveness := { href := p_liveness_href} + } // End of template m_service_info_link_liveness + template (omit) ServiceInfo_Link m_service_info_link( in template (value) Href p_href ) := { @@ -82,16 +81,25 @@ module EdgePlatformApplicationEnablementAPI_Templates { liveness := * } // End of template mw_service_info_link + template (present) ServiceInfo_Link mw_service_info_link_liveness( + template (present) Href p_href := ?, + template (present) Href p_liveness_href := ? + ) := { + self_ := { href := p_href}, + liveness := { href := p_liveness_href} + } // End of template mw_service_info_link_liveness + template (omit) ServiceInfo m_service_info( in SerName p_serName, in ServiceInfo_Version p_version := PX_SERVICE_INFO_VERSION, in ServiceState p_state := PX_SERVICE_INFO_STATE, - in SerializerType p_serializer := PX_SERIALIZER, - in template (value) ServiceInfo_Link p_links, + in EdgePlatformApplicationEnablementAPI_TypesAndValues.SerializerType p_serializer := PX_SERIALIZER, + in template (omit) ServiceInfo_Link p_links := omit, in template (omit) SerInstanceId p_serInstanceId := omit, in template (omit) TransportId p_transportId := omit, in template (omit) TransportInfo p_transportInfo := omit, - in template (omit) CategoryRef p_serCategory := omit + in template (omit) CategoryRef p_serCategory := omit, + in template (omit) Json.UInteger p_livenessInterval := omit ) := { serInstanceId := p_serInstanceId, serName := p_serName, @@ -104,7 +112,7 @@ module EdgePlatformApplicationEnablementAPI_Templates { scopeOfLocality := omit, consumedLocalOnly := omit, isLocal := omit, - livenessInterval := omit, + livenessInterval := p_livenessInterval, links := p_links } // End of template m_service_info @@ -112,7 +120,7 @@ module EdgePlatformApplicationEnablementAPI_Templates { template (present) SerName p_serName := ?, template (present) ServiceInfo_Version p_version := PX_SERVICE_INFO_VERSION, template (present) ServiceState p_state := PX_SERVICE_INFO_STATE, - template (present) SerializerType p_serializer := PX_SERIALIZER, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.SerializerType p_serializer := PX_SERIALIZER, template (present) ServiceInfo_Link p_links := ?, template SerInstanceId p_serInstanceId := *, template TransportId p_transportId := *, @@ -147,11 +155,17 @@ module EdgePlatformApplicationEnablementAPI_Templates { } // End of template mw_subscription_link_list template (value) Self m_self( - in template (value) LinkType p_self_ + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.LinkType p_self_ ) := { self_ := p_self_ } // End of template m_self + template (present) Self mw_self( + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.LinkType p_self_ := ? + ) := { + self_ := p_self_ + } // End of template mw_self + template (omit) AppTerminationNotificationSubscription m_app_termination_notif_subscription( in template (value) AppTerminationNotificationSubscription_CallbackReference p_callbackReference, in template (omit) Self p_links := omit, @@ -182,6 +196,62 @@ module EdgePlatformApplicationEnablementAPI_Templates { appInstanceId := p_appInstanceId } // End of template mw_app_termination_notif_subscription + template (omit) AppInfo m_app_info( + in Json.String p_appName, + in template (omit) Json.String p_appProvider := omit, + in template (omit) CategoryRef p_appCategory := omit, + in template (omit) Json.String p_appDId := omit, + in template (omit) Json.String p_appInstanceId := omit, + in template (omit) EndPointInfo p_endpoint := omit, + in template (omit) ServiceDependencies p_appServiceRequired := omit, + in template (omit) ServiceDependencies p_appServiceOptional := omit, + in template (omit) FeatureDependencies p_appFeatureRequired := omit, + in template (omit) FeatureDependencies p_appFeatureOptional := omit, + in template (omit) Json.Bool p_isInsByMec := omit, + in template (omit) AppProfile p_appProfile := omit + ) := { + appName := p_appName, + appProvider := p_appProvider, + appCategory := p_appCategory, + appDId := p_appDId, + appInstanceId := p_appInstanceId, + endpoint := p_endpoint, + appServiceRequired := p_appServiceRequired, + appServiceOptional := p_appServiceOptional, + appFeatureRequired := p_appFeatureRequired, + appFeatureOptional := p_appFeatureOptional, + isInsByMec := p_isInsByMec, + appProfile := p_appProfile + } // End of template m_app_info + + template (present) AppInfo mw_app_info( + template (present) Json.String p_appName := ?, + template Json.String p_appProvider := *, + template CategoryRef p_appCategory := *, + template Json.String p_appDId := *, + template Json.String p_appInstanceId := *, + template EndPointInfo p_endpoint := *, + template ServiceDependencies p_appServiceRequired := *, + template ServiceDependencies p_appServiceOptional := *, + template FeatureDependencies p_appFeatureRequired := *, + template FeatureDependencies p_appFeatureOptional := *, + template Json.Bool p_isInsByMec := *, + template AppProfile p_appProfile := * + ) := { + appName := p_appName, + appProvider := p_appProvider, + appCategory := p_appCategory, + appDId := p_appDId, + appInstanceId := p_appInstanceId, + endpoint := p_endpoint, + appServiceRequired := p_appServiceRequired, + appServiceOptional := p_appServiceOptional, + appFeatureRequired := p_appFeatureRequired, + appFeatureOptional := p_appFeatureOptional, + isInsByMec := p_isInsByMec, + appProfile := p_appProfile + } // End of template mw_app_info + template (value) ServiceLivenessInfo m_service_liveness_info( in ServiceState p_state, in template (value) TimeStamp p_timeStamp, @@ -202,14 +272,26 @@ module EdgePlatformApplicationEnablementAPI_Templates { interval := p_interval } // End of template mw_service_liveness_info + template (value) ServiceLivenessUpdate m_service_liveness_update( + in ServiceState p_state := ACTIVE + ) := { + state := p_state + } // End of template m_service_liveness_update + + template (present) ServiceLivenessUpdate mw_service_liveness_update( + template (present) ServiceState p_state := ACTIVE + ) := { + state := p_state + } // End of template mw_service_liveness_update + template (value) TransportInfo m_transport_info( in TransportInfo_Id p_id, in TransportInfo_Name p_name, - in TransportTypes p_type_, + in EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType p_type_, in TransportInfo_Protocol p_protocol, in TransportInfo_Version p_version, - in template (value) TransportInfo_Endpoint p_endpoint, - in template (value) SecurityInfo p_security + in template (value) EndPointInfo p_endpoint, + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo p_security ) := { id := p_id, name := p_name, @@ -225,11 +307,11 @@ module EdgePlatformApplicationEnablementAPI_Templates { template (present) TransportInfo mw_transport_info( template (present) TransportInfo_Id p_id := ?, template (present) TransportInfo_Name p_name := ?, - template (present) TransportTypes p_type_ := ?, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType p_type_ := ?, template (present) TransportInfo_Protocol p_protocol := ?, template (present) TransportInfo_Version p_version := ?, - template (present) TransportInfo_Endpoint p_endpoint := ?, - template (present) SecurityInfo p_security := ? + template (present) EndPointInfo p_endpoint := ?, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo p_security := ? ) := { id := p_id, name := p_name, diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn index bd8e6086256ca4952ee503de442a8e94bf29d25f..ad62b1cebb180b5be7b494b8e8e3489f2ddb1fe2 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn @@ -1,94 +1,85 @@ /** * @desc The ETSI MEC ISG MEC011 Application Enablement API described using OpenAPI - * @see http://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v020201p.pdf */ module EdgePlatformApplicationEnablementAPI_TypesAndValues { // JSON - import from JSON all; - - // LibCommon - import from LibCommon_BasicTypesAndValues all; + import from Json all; + + // LibMec + import from LibMec_TypesAndValues all; + + // MEC-10-2 + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; /** * @desc Maximum timeout value in seconds for graceful termination or graceful stop of an application instance. */ - type UInt32 MaxGracefulTimeout; + type Json.UInteger MaxGracefulTimeout; /** * @desc Shall be set to AppTerminationNotification. */ - type JSON.String NotificationType; + type Json.String NotificationType; /** * @desc Operation that is being performed on the MEC */ type enumerated OperationAction { - STOPPING (0), + STOPPING (0), TERMINATING (1) } /** * @desc This type represents the information that the mobile edge platform notifies the subscribed application instance about the corresponding application instance termination/stop. + * @member notificationType Shall be set to "AppTerminationNotification" + * @member operationAction Operation that is being performed on the MEC application instance + * @member maxGracefulTimeout Maximum non-zero timeout value in seconds for graceful termination or graceful stop of an application instance + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.4.2-1: Attributes of AppTerminationNotification */ type record AppTerminationNotification { - NotificationType notificationType, - OperationAction operationAction, + NotificationType notificationType, + OperationAction operationAction, MaxGracefulTimeout maxGracefulTimeout, - Subscription links + Subscription links } with { variant (links) "name as '_links'"; } /** * @desc This type represents the information that the MEC application instance provides to the MEC platform when informing it -that the application has completed its application level related terminate/stop actions, e.g. retention of application state -in the case of stop. + * that the application has completed its application level related terminate/stop actions, e.g. retention of application state + * in the case of stop. + * @member operationAction Operation that is being performed on the MEC application instance + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.4.3-1: Attributes of AppTerminationConfirmation */ type record AppTerminationConfirmation { OperationAction operationAction } /** - * @desc This type represents the information that the MEC application instance indicates to the MEC platform that it is up and -running + * @desc This type represents the information that the MEC application instance indicates to the MEC platform that it is up and running + * @member indication Indication about the MEC application instance + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.4.4-1: Attributes of AppReadyConfirmation */ type record AppReadyConfirmation { - JSON.String indication - } - - /** - * @desc Represents possible states of a MEC service instance - */ - type enumerated ServiceState { - ACTIVE (0), - INACTIVE (1), - SUSPENDED (2) - } - type record length(1..infinity) of ServiceState ServiceStateList; - - /** - * @desc This type represents the liveness information of a MEC service instance - */ - type record ServiceLivenessInfo { - ServiceState state, - TimeStamp timeStamp, - integer interval + Json.String indication } - /** - * @desc It is used as the filtering criterion for the subscribed events. - */ - type JSON.String AppInstanceId; - /** * @desc URI selected by the mobile edge application instance to receive notifications on the subscribed mobile edge application instance management information. * This shall be included in both the request and the response." */ - type JSON.String AppTerminationNotificationSubscription_CallbackReference; + type Json.String AppTerminationNotificationSubscription_CallbackReference; /** * @desc This type represents the information that the mobile edge platform notifies the subscribed application instance about the corresponding application instance termination/stop. + * @member subscriptionType Shall be set to "AppTerminationNotificationSubscription" + * @member callbackReference URI selected by the MEC application instance to receive notifications on the subscribed MEC application instance management information + * @member links Object containing hyperlinks related to the resource + * @member appInstanceId It is used as the filtering criterion for the subscribed events + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.3.2-1: Attributes of AppTerminationNotificationSubscription */ type record AppTerminationNotificationSubscription { SubscriptionType subscriptionType, @@ -102,51 +93,80 @@ running /** * @desc Shall be set to AppTerminationNotificationSubscription. */ - type JSON.String SubscriptionType; + type Json.String SubscriptionType; + + /** + * @desc It is used as the filtering criterion for the subscribed events. + */ + type Json.String AppInstanceId; + + /** + * @desc Represents possible states of a MEC service instance + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.6.6-1: Enumeration ServiceState + */ + type enumerated ServiceState { + ACTIVE (0), + INACTIVE (1), + SUSPENDED (2) + } + type record length(1..infinity) of ServiceState ServiceStateList; + + /** + * @desc This type represents the liveness information of a MEC service instance + * @member state Liveness state of the MEC service instance + * @member timeStamp The time when the last "heartbeat" message was received by MEC platform + * @member interval The interval (in seconds) between two consecutive "heartbeat" messages (see clause 8.2.10.3.3) that MEC platform has determined. + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.2.4-1: Attributes of ServiceLivenessInfo + */ + type record ServiceLivenessInfo { + ServiceState state, + TimeStamp timeStamp, + integer interval + } + + /** + * @desc This type represents changes to the liveness information of a MEC service instance + * @member state Update to the state of the MEC service instance to indicate that the service is still alive. + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.2.5-1: Attributes of ServiceLivenessUpdate + */ + type record ServiceLivenessUpdate { + ServiceState state + } /** * @desc Reference of the catalogue. */ - type JSON.String CategoryRef_Href; + type Json.String CategoryRef_Href; /** * @desc Unique identifier of the category. */ - type JSON.String CategoryRef_Id; + type Json.String CategoryRef_Id; /** * @desc Name of the category. */ - type JSON.String Name; + type Json.String Name; /** * @desc Category version. */ - type JSON.String CategoryRef_Version; + type Json.String CategoryRef_Version; /** * @desc This type represents the category reference. */ type record CategoryRef { - CategoryRef_Href href, - CategoryRef_Id id, - Name name, + CategoryRef_Href href, + CategoryRef_Id id, + Name name, CategoryRef_Version version } type record length(1..infinity) of CategoryRef CategoryRefList; - /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. - */ - type UInt32 Seconds; - - /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. - */ - type UInt32 NanoSeconds; - /** * @desc Platform Time Source status. 1 = TRACEABLE - time source is locked to the UTC time source. 2 = NONTRACEABLE - time source is not locked to the UTC time source. + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.2.5-1: Attributes of CurrentTime */ type enumerated TimeSourceStatus { TRACEABLE (1), @@ -158,6 +178,7 @@ running * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. * @member timeSourceStatus Platform Time Source status. 1 = TRACEABLE - time source is locked to the UTC time source. 2 = NONTRACEABLE - time source is not locked to the UTC time source. + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.2.5-1: Attributes of CurrentTime */ type record CurrentTime { Seconds seconds, @@ -165,6 +186,45 @@ running TimeSourceStatus timeSourceStatus } + /** + * @desc This type represents the information provided by the MEC application instance as part of the "application registration request" and "application registration update" messages + * @member appName Name of the application. It shall be consistent with the appName in the AppD, if an AppD is available + * @member appProvider Provider of the application. It shall be consistent with the appProvider in the AppD, if an AppD is available + * @member appCategory Category of the application + * @member appDId The application descriptor identifier + * @member appInstanceId Identifier of the application instance + * @member endpoint Endpoint information (e.g. URI, FQDN, IP address) of the application server, which is part of the application functionalities + * @member appServiceRequired Describes services a MEC application requires to run + * @member appServiceOptional Describes services a MEC application may use if available + * @member appFeatureRequired Describes features a MEC application requires to run + * @member appFeatureOptional Describes features a MEC application may use if available + * @member isInsByMec Indicate whether the application instance is instantiated by the MEC Management + * @member appProfile Can be mapped to EAS profile as defined in ETSI TS 129 558 [19] + * @see ETSI GS MEC 011 V3.2.1 7.1.2.6-1: Attributes of AppInfo + */ + type record AppInfo { + Json.String appName, + Json.String appProvider optional, + CategoryRef appCategory optional, + Json.String appDId optional, + Json.String appInstanceId optional, + EndPointInfo endpoint optional, + ServiceDependencies appServiceRequired optional, + ServiceDependencies appServiceOptional optional, + FeatureDependencies appFeatureRequired optional, + FeatureDependencies appFeatureOptional optional, + Json.Bool isInsByMec optional, + AppProfile appProfile optional + } // End of type AppInfo + + /** + * @desc + * @see ETSI TS 129 558 V17.2.0 + */ + type record AppProfile { + // TODO + } // End of type AppProfile + /** * @desc Type of the interface. */ @@ -178,39 +238,45 @@ running /** * @desc IP address of the remote destination. */ - type JSON.String DestinationInterface_IpAddress; + type Json.String DestinationInterface_IpAddress; /** * @desc Source address identifies the MAC address of the interface. */ - type JSON.String DestinationInterface_MacAddress; + type Json.String DestinationInterface_MacAddress; /** * @desc This type represents the destination interface. + * member interfaceType Type of the interface, e.g. TUNNEL, MAC, IP, etc + * member tunnelInfo Included only if the destination interface type is "tunnel" + * member srcMacAddress If the interface type is "MAC", source address identifies the MAC address of the interface + * member dstMacAddress If the interface type is "MAC", destination address identifies the MAC address of the interface + * member dstIpAddress If the interface type is "IP", destination address identifies the IP address of the remote destination + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.5.3-1: Attributes of DestinationInterface */ type record DestinationInterface { - InterfaceType interfaceType, - TunnelInfo tunnelInfo optional, + InterfaceType interfaceType, + TunnelInfo tunnelInfo optional, DestinationInterface_MacAddress srcMacAddress optional, DestinationInterface_MacAddress dstMacAddress optional, - DestinationInterface_IpAddress dstIpAddress optional + DestinationInterface_IpAddress dstIpAddress optional } - type record of DestinationInterface DestinationInterfaceList; + type set of DestinationInterface DestinationInterfaceList; /** * @desc FQDN resolved by the DNS rule. */ - type JSON.String DomainName; + type Json.String DomainName; /** * @desc Identifies the DNS Rule. */ - type JSON.String DnsRule_Id; + type Json.String DnsRule_Id; /** * @desc IP address associated with the FQDN resolved by the DNS rule. */ - type JSON.String DnsRule_IpAddress; + type Json.String DnsRule_IpAddress; /** * @desc IP address type. @@ -232,36 +298,43 @@ running /** * @desc Time to live value. */ - type UInt32 Ttl; + type Json.UInteger Ttl; /** - * @desc This type represents the general information of a DNS rule. + * @desc This type represents the general information of a DNS rule + * member dnsRuleId Identifies the DNS Rule + * member domainName FQDN resolved by the DNS rule + * member ipAddressType 1 Specify the IP address type, value: IP_V6, IP_V4 + * member ipAddress IP address associated with the FQDN resolved by the DNS rule + * member ttl Time to live value, in seconds. + * member state Contains the DNS rule state: ACTIVE, INACTIVE + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.2.3-1: Attributes of DnsRule */ type record DnsRule { - DnsRule_Id dnsRuleId, - DomainName domainName, + DnsRule_Id dnsRuleId, + DomainName domainName, DnsRule_IpAddressType ipAddressType, - DnsRule_IpAddress ipAddress, - Ttl ttl, - DnsRule_State state + DnsRule_IpAddress ipAddress, + Ttl ttl, + DnsRule_State state } - type record of DnsRule DnsRuleList; + type set of DnsRule DnsRuleList; /** * @desc Host portion of the address. */ - type JSON.String Host; + type Json.String Host; /** * @desc Port portion of the address. */ - type UInt32 Address_Port; + type Json.UInteger Address_Port; /** * @desc A IP address and port pair. */ type record Address { - Host host, + Host host, Address_Port port_ } with { variant (port_) "name as 'port'"; @@ -276,21 +349,28 @@ running * @desc Entry point information of the service in a format defined by an implementation, or in an external specification. */ type record EndPointInfo_Alternative { - anytype alternative + anytype alternative optional } /** * @desc Entry point information of the service. */ - type JSON.String EndPointInfo_Uri; + type Json.String EndPointInfo_Uri; /** * @desc Entry point information of the service as string, formatted according to URI syntax. */ type record length(1..infinity) of EndPointInfo_Uri EndPointInfo_UriList; + /** + * @desc Fully Qualified Domain Name of the service. + */ + type record length(1..infinity) of Json.String EndPointInfo_FqdnList; + /** * @desc This type represents a type of link and may be referenced from data structures. + * @member href URI referring to a resource + * @see ETSI GS MEC 011 V3.2.1 Table 6.3.2-1: Attributes of the LinkType */ type record LinkType { Href href @@ -299,7 +379,7 @@ running /** * @desc URI referring to a resource. */ - type JSON.String Href; + type Json.String Href; /** * @desc Self-referring URI. @@ -337,8 +417,14 @@ running variant (links) "name as '_links'"; } + /** + * @desc This type represents a list of links related to currently existing subscriptions for a MEC application instance. + * @member self_ Self-referring URI + * @member subscriptions The MEC application instance's subscriptions + * @see ETSI GS MEC 011 V3.2.1 Table 6.2.2-1: Attributes of the SubscriptionLinkList + */ type record Links { - LinkType self_, + LinkType self_, Subscriptions subscriptions } with { variant (self_) "name as 'self'"; @@ -346,6 +432,8 @@ running /** * @desc This type represents a list of links related to currently existing subscriptions for a MEC application instance. + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 011 V3.2.1 Table 6.2.2-1: Attributes of the SubscriptionLinkList */ type record SubscriptionLinkList { Links links @@ -357,9 +445,10 @@ running * @desc The MEC application instance's subscriptions * @member href URI referring to the subscription * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 011 V3.2.1 Table 6.2.2-1: Attributes of the SubscriptionLinkList */ type record Subscription_ { - JSON.AnyURI href, + Json.AnyURI href, SubscriptionType subscriptionType } type record length(1..infinity) of Subscription_ Subscriptions; @@ -378,7 +467,7 @@ running /** * @desc The token endpoint. */ - type JSON.String TokenEndpoint; + type Json.String TokenEndpoint; /** * @desc Parameters related to use of OAuth 2.0. @@ -390,10 +479,11 @@ running /** * @desc This type represents security information related to a transport. + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.5.4-1: Attributes of SecurityInfo */ type record SecurityInfo { OAuth2Info oAuth2Info optional, - UInt8 extentions optional + Json.UInt8 extentions optional } /** @@ -408,12 +498,12 @@ running /** * @desc URI selected by the mobile edge application instance to receive notifications on the subscribed mobile edge service availability information. This shall be included in both the request and the response. */ - type JSON.String SerAvailabilityNotificationSubscription_CallbackReference; + type Json.String SerAvailabilityNotificationSubscription_CallbackReference; /** * @desc This type represents a subscription to the notifications from the mobile edge platform regarding the availability of a mobile edge service or a list of mobile edge services. */ - type record SerAvailabilityNotificationSubscription_ { + type record SerAvailabilityNotificationSubscription { SerAvailabilityNotificationSubscription_SubscriptionType subscriptionType, SerAvailabilityNotificationSubscription_CallbackReference callbackReference, Self links optional, @@ -425,17 +515,23 @@ running /** * @desc Shall be set to SerAvailabilityNotificationSubscription. */ - type JSON.String SerAvailabilityNotificationSubscription_SubscriptionType; + type Json.String SerAvailabilityNotificationSubscription_SubscriptionType; /** * @desc Filtering criteria to match services for which events are requested to be reported + * @member serInstanceIds Identifiers of service instances about which to report events + * @member serNames Names of services about which to report events + * @member serCategories Categories of services about which to report events + * @member states States of the services about which to report events + * @member isLocal Restrict event reporting to whether the service is local to the MEC platform where the subscription is managed + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.3.2-1: Attributes of SerAvailabilityNotificationSubscription */ type record FilteringCriteria { SerInstanceIdList serInstanceIds optional, SerNameList serNames optional, CategoryRefList serCategories optional, ServiceStateList states optional, - JSON.Bool isLocal optional + Json.Bool isLocal optional } /** @@ -449,6 +545,7 @@ running /** * @desc The enumeration SerializerTypes represents types of serializers. + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.6.3-1: Enumeration SerializerType */ type enumerated SerializerType { JSON, @@ -462,13 +559,13 @@ running /** * @desc Identifier of the service instance assigned by the MEPM / mobile edge platform. */ - type JSON.String SerInstanceId; + type Json.String SerInstanceId; type record length(1..infinity) of SerInstanceId SerInstanceIdList; /** * @desc The name of the service. This is how the service producing mobile edge application identifies the service instance it produces. */ - type JSON.String SerName; + type Json.String SerName; type record length(1..infinity) of SerName SerNameList; /** @@ -483,6 +580,7 @@ running /** * @desc Contains the types of locality. + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.6.5-1: Enumeration LocalityType */ type enumerated LocalityType { MEC_SYSTEM, @@ -496,12 +594,12 @@ running /** * @desc Identifier of the platform-provided transport to be used by the service. Valid identifiers may be obtained using the \"Transport information query\" procedure. May be present in POST requests to signal the use of a platform-provided transport for the service, and shall be absent otherwise. */ - type JSON.String TransportId; + type Json.String TransportId; /** * @desc Service version. */ - type JSON.String ServiceInfo_Version; + type Json.String ServiceInfo_Version; /** * @desc Type of the change */ @@ -514,6 +612,20 @@ running /** * @desc This type represents the general information of a mobile edge service. + * @member serInstanceId Identifier of the service instance assigned by the MEPM/MEC platform + * @member serName The name of the service + * @member serCategory A Category reference + * @member version The version of the service + * @member state Contains the service state + * @member transportId Identifier of the platform-provided transport to be used by the service + * @member transportInfo Information regarding the transport used by the service + * @member serializer Indicate the supported serialization format of the service + * @member scopeOfLocality The scope of locality as expressed by "consumedLocalOnly" and "isLocal". + * @member consumedLocalOnly Indicate whether the service can only be consumed by the MEC applications located in the same locality (as defined by scopeOfLocality) as this service instance (TRUE) or not (FALSE) + * @member isLocal Indicate whether the service is located in the same locality (as defined by scopeOfLocality) as the consuming MEC application (TRUE) or not (FALSE) + * @member livenessInterval Interval (in seconds) between two consecutive "heartbeat" messages + * @member links Links to resources related to this resource + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.2.2-1: Attributes of ServiceInfo */ type record ServiceInfo { SerInstanceId serInstanceId optional, @@ -525,14 +637,14 @@ running TransportInfo transportInfo optional, SerializerType serializer, LocalityType scopeOfLocality optional, - JSON.Bool consumedLocalOnly optional, - JSON.Bool isLocal optional, - UInt32 livenessInterval optional, - ServiceInfo_Link links + Json.Bool consumedLocalOnly optional, + Json.Bool isLocal optional, + Json.UInteger livenessInterval optional, + ServiceInfo_Link links optional } with { variant (links) "name as '_links'"; } - type record of ServiceInfo ServiceInfoList; + type set of ServiceInfo ServiceInfoList; /** * @desc A link to the related subscription. @@ -544,7 +656,7 @@ running /** * @desc Authentication key number. */ - type UInt32 AuthenticationKeyNum; + type Json.UInteger AuthenticationKeyNum; /** * @desc NTP authentication option. @@ -558,12 +670,12 @@ running /** * @desc Acceptable maximum rate of the Delay_Req messages in packets per second. */ - type UInt32 DelayReqMaxRate; + type Json.UInteger DelayReqMaxRate; /** * @desc NTP server local priority. */ - type UInt32 LocalPriority; + type Json.UInteger LocalPriority; /** * @desc Maximum poll interval for NTP messages, in seconds as a power of two. Range 3...17. @@ -578,7 +690,7 @@ running /** * @desc NTP server address. */ - type JSON.String NtpServerAddr; + type Json.String NtpServerAddr; /** * @desc Address type of NTP server. @@ -591,15 +703,23 @@ running /** * @desc PTP Master IP Address. */ - type JSON.String NtpServers_PtpMasterIpAddress; + type Json.String NtpServers_PtpMasterIpAddress; /** * @desc PTP Master local priority. */ - type UInt32 NtpServers_PtpMasterLocalPriority; + type Json.UInteger NtpServers_PtpMasterLocalPriority; /** * @desc NTP server detail. + * @member ntpServerAddrType Address type of NTP server + * @member ntpServerAddr NTP server address + * @member minPollingInterval Minimum poll interval for NTP messages + * @member maxPollingInterval Maximum poll interval for NTP messages + * @member localPriority NTP server local priority + * @member authenticationOption NTP authentication option + * @member authenticationKeyNum Authentication key number + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.2.4-1: Attributes of TimingCaps */ type record NtpServers { NtpServerAddrType ntpServerAddrType, @@ -610,7 +730,7 @@ running AuthenticationOption authenticationOption, AuthenticationKeyNum authenticationKeyNum } - type record of NtpServers NtpServersList; + type set of NtpServers NtpServersList; /** * @desc NTP server detail. @@ -620,20 +740,14 @@ running NtpServers_PtpMasterLocalPriority ptpMasterLocalPriority, DelayReqMaxRate delayReqMaxRate } - type record of TimingCaps_PtpMasters TimingCaps_PtpMastersList; - - /** - * @desc Time. - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. - */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } + type set of TimingCaps_PtpMasters TimingCaps_PtpMastersList; /** - * @desc This type represents the information provided by the mobile edge platform in response to the Timing capabilities Query message. + * @desc This type represents the information provided by the mobile edge platform in response to the Timing capabilities Query message + * @member timeStamp + * @member ntpServers Number of available NTP servers + * @member ptpMasters Number of available PTP Servers (referred to as "masters" in IEEE 1588-2019™ [i.2]) + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.2.4-1: Attributes of TimingCaps */ type record TimingCaps { TimeStamp timeStamp optional, @@ -644,56 +758,70 @@ running /** * @desc Identify the traffic ip address. */ - type JSON.String TrafficFilter_Address; - type record of TrafficFilter_Address TrafficFilter_AddressList; + type Json.String TrafficFilter_Address; + type set of TrafficFilter_Address TrafficFilter_AddressList; /** * @desc Used to match all IPv4 packets that have the same Differentiated Services Code Point (DSCP). */ - type UInt32 TrafficFilter_DSCP; + type Json.UInteger TrafficFilter_DSCP; /** * @desc Identify the traffic ip address. */ - type JSON.String TrafficFilter_Port; + type Json.String TrafficFilter_Port; type record length(1..infinity) of TrafficFilter_Port TrafficFilter_PortList; /** * @desc Protocol of the traffic filter. */ - type JSON.String TrafficFilter_Protocol; - type record of TrafficFilter_Protocol TrafficFilter_ProtocolList; + type Json.String TrafficFilter_Protocol; + type set of TrafficFilter_Protocol TrafficFilter_ProtocolList; /** * @desc Used to match all packets that have the same Quality Class Indicator (QCI). */ - type UInt32 TrafficFilter_QCI; + type Json.UInteger TrafficFilter_QCI; /** * @desc Used to match all IPv6 packets that have the same Traffic Class. */ - type UInt32 TrafficFilter_TC; + type Json.UInteger TrafficFilter_TC; /** * @desc Used for tag based traffic rule. */ - type JSON.String TrafficFilter_Tag; - type record of TrafficFilter_Tag TrafficFilter_TagList; + type Json.String TrafficFilter_Tag; + type set of TrafficFilter_Tag TrafficFilter_TagList; /** * @desc Used for GTP tunnel based traffic rule. */ - type JSON.String TrafficFilter_TunnelAddress; - type record of TrafficFilter_TunnelAddress TrafficFilter_TunnelAddressList; + type Json.String TrafficFilter_TunnelAddress; + type set of TrafficFilter_TunnelAddress TrafficFilter_TunnelAddressList; /** * @desc Used for GTP tunnel based traffic rule. */ - type JSON.String TrafficFilter_TunnelPort; - type record of TrafficFilter_TunnelPort TrafficFilter_TunnelPortList; + type Json.String TrafficFilter_TunnelPort; + type set of TrafficFilter_TunnelPort TrafficFilter_TunnelPortList; /** * @desc This type represents the traffic filter. + * @member srcAddress An IP address or a range of IP address + * @member dstAddress An IP address or a range of IP address + * @member srcPort A port or a range of ports. + * @member dstPort A port or a range of ports. + * @member protocol Specify the protocol of the traffic filter + * @member tag Used for tag based traffic rule + * @member srcTunnelAddress Used for GTP tunnel based traffic rule + * @member tgtTunnelAddress Used for GTP tunnel based traffic rule + * @member srcTunnelPort Used for GTP tunnel based traffic rule + * @member dstTunnelPort Used for GTP tunnel based traffic rule + * @member qCI Used to match all packets that have the same QCI + * @member dSCP Used to match all IPv4 packets that have the same DSCP + * @member tC Used to match all IPv6 packets that have the same TC + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.5.2-1: Attributes of TrafficFilter */ type record TrafficFilter { TrafficFilter_AddressList srcAddress optional, @@ -710,7 +838,7 @@ running TrafficFilter_DSCP dSCP optional, TrafficFilter_TC tC optional } - type record of TrafficFilter TrafficFilterList; + type set of TrafficFilter TrafficFilterList; /** * @desc The action of the ME host data plane when a packet matches the trafficFilter. @@ -735,12 +863,12 @@ running /** * @desc Identify the traffic rule. */ - type JSON.String TrafficRule_Id; + type Json.String TrafficRule_Id; /** * @desc Priority of this traffic rule. If traffic rule conflicts, the one with higher priority take precedence. */ - type UInt32 TrafficRule_Priority; + type Json.UInteger TrafficRule_Priority; /** * @desc Contains the traffic rule state. @@ -751,7 +879,15 @@ running } /** - * @desc This type represents the general information of a traffic rule. + * @desc This type represents the general information of a traffic rule + * member trafficRuleId Identify the traffic rule. + * member filterType Definition of filter per FLOW or PACKET + * member priority Priority of this traffic rule within the range 0 to 255] + * member trafficFilter The filter used to identify specific packets that need to be handled by the MEC host + * member action The action of the MEC host data plane when a packet matches the trafficFilter + * member dstInterface Describes the destination interface information + * member state Contains the traffic rule state: ACTIVE, INACTIVE + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.2.2-1: Attributes of TrafficRule */ type record TrafficRule { TrafficRule_Id trafficRuleId, @@ -764,17 +900,17 @@ running } with { variant (action_) "name as 'action'"; } - type record of TrafficRule TrafficRuleList; + type set of TrafficRule TrafficRuleList; /** * @desc Human-readable description of this transport. */ - type JSON.String TransportInfo_Description; + type Json.String TransportInfo_Description; /** * @desc The identifier of this transport. */ - type JSON.String TransportInfo_Id; + type Json.String TransportInfo_Id; /** * @desc Additional implementation specific details of the transport. @@ -784,49 +920,66 @@ running /** * @desc The name of this transport. */ - type JSON.String TransportInfo_Name; + type Json.String TransportInfo_Name; /** * @desc The name of the protocol used. Shall be set to HTTP for a REST API. */ - type JSON.String TransportInfo_Protocol; + type Json.String TransportInfo_Protocol; /** * @desc The version of the protocol used. */ - type JSON.String TransportInfo_Version; + type Json.String TransportInfo_Version; /** - * @desc This type represents information about a transport endpoint. + * @desc This type represents information about a transport endpoint + * @member uris Entry point information of the service as string, formatted according to URI syntax (see IETF RFC 3986 [8]) + * @member fqdn Fully Qualified Domain Name of the service + * @member addresses Entry point information of the service as one or more pairs of IP address and port + * @member alternativeEntry point information of the service in a format defined by an implementation, or in an external specification + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.5.3-1: Attributes of EndPointInfo */ - type record TransportInfo_Endpoint { + type record EndPointInfo { EndPointInfo_UriList uris optional, + EndPointInfo_FqdnList fqdn optional, EndPointInfo_AddressList addresses optional, EndPointInfo_Alternative alternative optional } /** * @desc This type represents the general information of a mobile edge service. + * @member id The identifier of this transport + * @member name The name of this transport + * @member description Human-readable description of this transport + * @member type_ Type of the transport + * @member protocol The name of the protocol used. Shall be set to "HTTP" for a REST API + * @member version The version of the protocol used + * @member endpoint Information about the endpoint to access the transport + * @member security Information about the security used by the transport + * @member implSpecificInfo Additional implementation specific details of the transport + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.2.3-1: Attributes of TransportInfo */ type record TransportInfo { TransportInfo_Id id, TransportInfo_Name name, TransportInfo_Description description optional, - TransportTypes type_, + TransportType type_, TransportInfo_Protocol protocol, TransportInfo_Version version, - TransportInfo_Endpoint endpoint, + EndPointInfo endpoint, SecurityInfo security, TransportInfo_ImplSpecificInfo implSpecificInfo optional } with { variant (type_) "name as 'type'"; } - type record of TransportInfo TransportInfoList; + type set of TransportInfo TransportInfoList; /** - * @desc The enumeration TransportTypes represents types of transports. + * @desc The enumeration TransportType represents types of transports. + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.6.4-1: Enumeration TransportType */ - type enumerated TransportTypes { + type enumerated TransportType { REST_HTTP, MB_TOPIC_BASED, MB_ROUTING, @@ -839,12 +992,12 @@ running /** * @desc Destination address of the tunnel. */ - type JSON.String TunnelInfo_TunnelDstAddress; + type Json.String TunnelInfo_TunnelDstAddress; /** * @desc Source address of the tunnel. */ - type JSON.String TunnelInfo_TunnelSrcAddress; + type Json.String TunnelInfo_TunnelSrcAddress; /** * @desc This type represents the tunnel information. @@ -856,6 +1009,10 @@ running /** * @desc This type represents the tunnel information. + * @member tunnelType Type of the tunnel, e.g. GTP_U, GRE, etc + * @member tunnelDstAddress Destination address of the tunnel + * @member tunnelSrcAddress Source address of the tunnel + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.5.4-1: Attributes of TunnelInfo */ type record TunnelInfo { TunnelInfo_TunnelType tunnelType, diff --git a/ttcn/LibMec/FederationEnablementAPI/module.mk b/ttcn/LibMec/FederationEnablementAPI/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..ff13bd478290a6caf17c3eaf23584f45a486c8ca --- /dev/null +++ b/ttcn/LibMec/FederationEnablementAPI/module.mk @@ -0,0 +1,6 @@ +sources := \ + ttcn/FederationEnablementAPI_Pics.ttcn \ + ttcn/FederationEnablementAPI_Pixits.ttcn \ + ttcn/FederationEnablementAPI_Templates.ttcn \ + ttcn/FederationEnablementAPI_Functions.ttcn \ + ttcn/FederationEnablementAPI_TypesAndValues.ttcn diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1c300b9b8f11d052936f2ce226250728e61d67d8 --- /dev/null +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn @@ -0,0 +1,117 @@ +module FederationEnablementAPI_Functions { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + import from LibCommon_Time all; + import from LibCommon_VerdictControl all; + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec/FixedAccessInformationServiceAPI + import from FederationEnablementAPI_TypesAndValues all; + import from FederationEnablementAPI_Templates all; + import from FederationEnablementAPI_Pixits all; + + // LibMec + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + function f_create_system_info( + inout SystemInfo p_system_info + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + log(">>> f_create_system_info: ", p_system_info); + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_FED_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info( + p_system_info + ))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fed_system_info( + p_system_info + ))))) -> value v_response { + tc_ac.stop; + + p_system_info := v_response.response.body.json_body.systemInfo; + log("f_create_system_info: INFO: IUT successfully responds to the subscription: ", p_system_info); + } + [] tc_ac.timeout { + log("f_create_system_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_system_info + + function f_delete_system_info( + in SystemInfo p_system_info + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(p_system_info.systemId, "UTF-8")), + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_system_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_system_info + + function f_create_system_info_list( + inout SystemInfoList p_system_info_list + ) runs on HttpComponent { + log(">>> f_create_system_info_list: ", p_system_info_list); + + for (var integer i := 0; i < lengthof(p_system_info_list); i := i + 1) { + f_create_system_info(p_system_info_list[i]); + } + } // End of function f_create_system_info_list + + function f_delete_system_info_list( + in SystemInfoList p_system_info_list + ) runs on HttpComponent { + for (var integer i := 0; i < lengthof(p_system_info_list); i := i + 1) { + if (ispresent(p_system_info_list[i].systemId)) { + f_delete_system_info(p_system_info_list[i]); + } + } + } // End of function f_delete_system_info_list + +} // End of modue FederationEnablementAPI_Functions \ No newline at end of file diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pics.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pics.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d45a081bc96982519d7ddae5b20cde2242b4efaf --- /dev/null +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pics.ttcn @@ -0,0 +1,8 @@ +module FederationEnablementAPI_Pics { + + /** + * @desc Does the IUT support MEC Federation API? + */ + modulepar boolean PICS_FED_API_SUPPORTED := true; + +} // End of module FederationEnablementAPI_Pics \ No newline at end of file diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pixits.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pixits.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..269774067972260bf75193cbefedc06b46a0acec --- /dev/null +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pixits.ttcn @@ -0,0 +1,42 @@ +module FederationEnablementAPI_Pixits { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/FixedAccessInformationServiceAPI + import from FederationEnablementAPI_TypesAndValues all; + + modulepar Json.String PX_FED_SYSTEM_ID_1 := "SYSTEM_ID"; + + modulepar Json.String PX_FED_SYSTEM_NAME_1 := "systemName"; + + modulepar Json.String PX_FED_SYSTEM_PROVIDER_1 := "systemProvider"; + + modulepar Json.String PX_FED_SYSTEM_ID_2 := "SYSTEM_ID02"; + + modulepar Json.String PX_FED_SYSTEM_NAME_2 := "systemName02"; + + modulepar Json.String PX_FED_SYSTEM_PROVIDER_2 := "systemProvider02"; + + modulepar Json.String PX_FED_SYSTEM_ID_3 := "SYSTEM_ID03"; + + modulepar Json.String PX_FED_SYSTEM_NAME_3 := "systemName03"; + + modulepar Json.String PX_FED_SYSTEM_PROVIDER_3 := "systemProvider03"; + + modulepar Json.String PX_FED_SYSTEM_ID_UNKNOWN := "SYSTEM_ID666"; + + modulepar Json.String PX_FED_SYSTEM_NAME_UNKNOWN := "systemName666"; + + modulepar Json.String PX_FED_SYSTEM_PROVIDER_UNKNOWN := "systemProvider666"; + + modulepar Json.String PX_FED_ENDPOINT_URI_1 := ""; + + modulepar Json.String PX_FED_ENDPOINT_URI_2 := ""; + + modulepar Json.String PX_FED_ENDPOINT_URI_3 := ""; + +} // End of module FederationEnablementAPI_Pixits \ No newline at end of file diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Templates.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Templates.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a724d4e0ad97be03f96b17a161ec6592f4cf5e85 --- /dev/null +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Templates.ttcn @@ -0,0 +1,51 @@ +module FederationEnablementAPI_Templates { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + + // LibMec/FixedAccessInformationServiceAPI + import from FederationEnablementAPI_TypesAndValues all; + + template (omit) SystemInfo m_system_info( + in Json.String p_system_name, + in Json.String p_system_provider, + in template (omit) Json.String p_system_id := omit + ) := { + systemId := p_system_id, + systemName := p_system_name, + systemProvider := p_system_provider + } // End of template m_system_info + + template (present) SystemInfo mw_system_info( + template (present) Json.String p_system_name := ?, + template (present) Json.String p_system_provider := ?, + template Json.String p_system_id := * + ) := { + systemId := p_system_id, + systemName := p_system_name, + systemProvider := p_system_provider + } // End of template mw_system_info + + template (omit) SystemInfoUpdate m_system_info_update( + in template (omit) Json.String p_system_name := omit, + in template (omit) EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo p_end_point := omit + ) := { + systemName := p_system_name, + endPoint := p_end_point + } // End of template m_system_info_update + + template SystemInfoUpdate mw_system_info_update( + template Json.String p_system_name := *, + template EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo p_end_point := * + ) := { + systemName := p_system_name, + endPoint := p_end_point + } // End of template mw_system_info_update + +} // End of module FederationEnablementAPI_Templates \ No newline at end of file diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..77cf613dbee93969c63424248700af1db3a3dade --- /dev/null +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn @@ -0,0 +1,42 @@ +/** + * @desc The ETSI MEC ISG MEC040 Radio Network Information API described using OpenAPI + * @see TODO + */ +module FederationEnablementAPI_TypesAndValues { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + + /** + * @desc Information provided by the MEC orchestrator as a part of the "Registration of MEC system to the federation" + * @member systemId Identifier of the MEC system + * @member systemName The name of the MEC system + * @member systemProvider Provider of the MEC system + * @see Draft ETSI GS MEC 040 V3.1.3 (2022-12) Table 6.2.2-1: Attributes of SystemInfo + */ + type record SystemInfo { + Json.String systemId optional, // Shall be absent in POST request + Json.String systemName, + Json.String systemProvider + } // End of type SystemInfo + type set of SystemInfo SystemInfoList; + + /** + * @desc information provided by MEC orchestrator as a part of the "Update of MEC system(s) to the federation" + * @member systemName The name of the MEC system + * @member endpoint Endpoint information (e.g. URI, FQDN, IP address) of MEC federator + * @see Draft ETSI GS MEC 040 V3.1.3 (2022-12) Table 6.2.3-1: Attributes of SystemInfoUpdate + */ + type record SystemInfoUpdate { + Json.String systemName optional, + EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo endPoint optional + } // End of type SystemInfoUpdate + +} with { + encode "JSON" +} // End of module FederationEnablementAPI_TypesAndValues \ No newline at end of file diff --git a/ttcn/LibMec/FixedAccessInformationAPI/ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn b/ttcn/LibMec/FixedAccessInformationAPI/ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn deleted file mode 100644 index 7581680870909e8550efff679b1653ba507141d0..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/FixedAccessInformationAPI/ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn +++ /dev/null @@ -1,31 +0,0 @@ -module FixedAccessInformationServiceAPI_Pixits { - - // JSON - import from JSON all; - - // LibMec_FixedAccessInformationServiceAPI - import from FixedAccessInformationServiceAPI_TypesAndValues all; - - modulepar GatewayId PX_FAI_GW_ID := { "" }; - - modulepar GatewayId PX_NON_EXISTING_FAI_GW_ID := { "" }; - - modulepar CmdId PX_FAI_CM_ID := ""; - - modulepar CmdId PX_NON_EXISTING_FAI_CM_ID := ""; - - modulepar OnuId PX_FAI_ONU_ID := ""; - - modulepar OnuId PX_NON_EXISTING_FAI_ONU_ID := ""; - - modulepar JSON.String PX_FAI_SUB_ID := ""; - - modulepar JSON.String PX_NON_EXISTING_FAI_SUB_ID := ""; - - modulepar JSON.AnyURI PX_ONU_ALARM_SUB_CALLBACK_URI := ""; - - modulepar JSON.String PX_SUBSCRIPTION_ID := ""; - - modulepar JSON.String PX_NON_EXISTENT_SUBSCRIPTION_ID := ""; - -} // End of module FixedAccessInformationServiceAPI_Pixits diff --git a/ttcn/LibMec/FixedAccessInformationAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn b/ttcn/LibMec/FixedAccessInformationAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn deleted file mode 100644 index 91aecd488de0aa2a738d1be73140c0066463d98f..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/FixedAccessInformationAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn +++ /dev/null @@ -1,228 +0,0 @@ -module FixedAccessInformationServiceAPI_Templates { - - // JSON - import from JSON all; - - // LibCommon - import from LibCommon_BasicTypesAndValues all; - - // LibMec_FixedAccessInformationServiceAPI - import from FixedAccessInformationServiceAPI_TypesAndValues all; - import from FixedAccessInformationServiceAPI_Pixits all; - - template (omit) FaInfo m_fa_info( - in template (value) CpInfo p_customerPremisesInfo, - in template (omit) TimeStamp p_timeStamp := omit, - in template (omit) ConnectivityInfo p_connectivityInfo := omit - ) := { - timeStamp := p_timeStamp, - customerPremisesInfo := p_customerPremisesInfo, - connectivityInfo := p_connectivityInfo - } // End of template m_fa_info - - template FaInfo mw_fa_info( - template (present) CpInfo p_customerPremisesInfo := ?, - template TimeStamp p_timeStamp := *, - template ConnectivityInfo p_connectivityInfo := * - ) := { - timeStamp := p_timeStamp, - customerPremisesInfo := p_customerPremisesInfo, - connectivityInfo := p_connectivityInfo - } // End of template mw_fa_info - - template (omit) DeviceInfo m_device_info( - in template (value) GatewayId p_gwId, - in template (value) DeviceStatus p_deviceStatus, - in template (value) JSON.Number p_upTime, - in template (value) JSON.Number p_iPConnectionUpTime, - in template (value) JSON.Number p_totalBytesSent, - in template (value) JSON.Number p_totalBytesReceived, - in template (value) JSON.Number p_totalPacketsSent, - in template (value) JSON.Number p_totalPacketsReceived, - in template (omit) TimeStamp p_timeStamp := omit, - in template (omit) DeviceId p_deviceId := omit, - in template (omit) IPPingDiagnostics p_iPPingDiagnostics := omit, - in template (omit) TraceRouteDiagnostics p_traceRouteDiagnostics := omit, - in template (omit) DownloadDiagnostics p_downloadDiagnostics := omit, - in template (omit) UploadDiagnostics p_uploadDiagnostics := omit - ) := { - timeStamp := p_timeStamp, - gwId := p_gwId, - deviceId := p_deviceId, - deviceStatus := p_deviceStatus, - upTime := p_upTime, - iPConnectionUpTime := p_iPConnectionUpTime, - totalBytesSent := p_totalBytesSent, - totalBytesReceived := p_totalBytesReceived, - totalPacketsSent := p_totalPacketsSent, - totalPacketsReceived := p_totalPacketsReceived, - iPPingDiagnostics := p_iPPingDiagnostics, - traceRouteDiagnostics := p_traceRouteDiagnostics, - downloadDiagnostics := p_downloadDiagnostics, - uploadDiagnostics := p_uploadDiagnostics - } // End of template m_device_info - - template DeviceInfo mw_device_info( - template (present) GatewayId p_gwId := ?, - template (present) DeviceStatus p_deviceStatus := ?, - template (present) JSON.Number p_upTime := ?, - template (present) JSON.Number p_iPConnectionUpTime := ?, - template (present) JSON.Number p_totalBytesSent := ?, - template (present) JSON.Number p_totalBytesReceived := ?, - template (present) JSON.Number p_totalPacketsSent := ?, - template (present) JSON.Number p_totalPacketsReceived := ?, - template TimeStamp p_timeStamp := *, - template DeviceId p_deviceId := *, - template IPPingDiagnostics p_iPPingDiagnostics := *, - template TraceRouteDiagnostics p_traceRouteDiagnostics := *, - template DownloadDiagnostics p_downloadDiagnostics := *, - template UploadDiagnostics p_uploadDiagnostics := * - ) := { - timeStamp := p_timeStamp, - gwId := p_gwId, - deviceId := p_deviceId, - deviceStatus := p_deviceStatus, - upTime := p_upTime, - iPConnectionUpTime := p_iPConnectionUpTime, - totalBytesSent := p_totalBytesSent, - totalBytesReceived := p_totalBytesReceived, - totalPacketsSent := p_totalPacketsSent, - totalPacketsReceived := p_totalPacketsReceived, - iPPingDiagnostics := p_iPPingDiagnostics, - traceRouteDiagnostics := p_traceRouteDiagnostics, - downloadDiagnostics := p_downloadDiagnostics, - uploadDiagnostics := p_uploadDiagnostics - } // End of template mw_device_info - - template (omit) CableLineInfo m_cable_line_info( - in template (value) CpInfo p_customerPremisesInfo, - in template (value) CmdInfo p_cmdInfo, - in template (omit) TimeStamp p_timeStamp := omit - ) := { - timeStamp := p_timeStamp, - customerPremisesInfo := p_customerPremisesInfo, - cmdInfo := p_cmdInfo - } // End of template m_cable_line_info - - template CableLineInfo mw_cable_line_info( - template (present) CpInfo p_customerPremisesInfo := ?, - template (present) CmdInfo p_cmdInfo := ?, - template TimeStamp p_timeStamp := * - ) := { - timeStamp := p_timeStamp, - customerPremisesInfo := p_customerPremisesInfo, - cmdInfo := p_cmdInfo - } // End of template mw_cable_line_info - - template (omit) PonInfo m_pon_info( - in template (value) CpInfo p_customerPremisesInfo, - in template (value) PonSYS_ID p_ponSYS_ID, - in template (value) OpticalNetworkInfo p_opticalNetworkInfo, - in template (omit) TimeStamp p_timeStamp := omit - ) := { - timeStamp := p_timeStamp, - customerPremisesInfo := p_customerPremisesInfo, - ponSYS_ID := p_ponSYS_ID, - opticalNetworkInfo := p_opticalNetworkInfo - } // End of template m_pon_info - - template PonInfo mw_pon_info( - template (present) CpInfo p_customerPremisesInfo := ?, - template (present) PonSYS_ID p_ponSYS_ID := ?, - template (present) OpticalNetworkInfo p_opticalNetworkInfo := ?, - template TimeStamp p_timeStamp := * - ) := { - timeStamp := p_timeStamp, - customerPremisesInfo := p_customerPremisesInfo, - ponSYS_ID := p_ponSYS_ID, - opticalNetworkInfo := p_opticalNetworkInfo - } // End of template mw_pon_info - - template (omit) SubscriptionLinkList m_subscription_link_list( - in template (value) Links p_links, - in template (omit) Subscriptions p_subscription := omit - ) := { - links := p_links, - subscription := p_subscription - } // End of template m_subscription_link_list - - template SubscriptionLinkList mw_subscription_link_list( - template (present) Links p_links := ?, - template Subscriptions p_subscription := * - ) := { - links := p_links, - subscription := p_subscription - } // End of template m_wsubscription_link_list - - template (omit) OnuAlarmSubscription m_onu_alarm_subscription( - in template (value) JSON.AnyURI p_callbackReference, - in template (value) FilterCriteriaOnuAlarm p_filterCriteriaOnuAlarm, - in template (omit) Links p_links := omit, - in template (omit) TimeStamp p_expiryDeadline := omit - ) := { - subscriptionType := "OnuAlarmSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaOnuAlarm := p_filterCriteriaOnuAlarm, - expiryDeadline := p_expiryDeadline - } // End of template m_onu_alarm_subscription - - template (omit) OnuAlarmSubscription m_onu_alarm_subscription_bad_request( - in template (value) JSON.AnyURI p_callbackReference, - in template (value) FilterCriteriaOnuAlarm p_filterCriteriaOnuAlarm, - in template (omit) Links p_links := omit, - in template (omit) TimeStamp p_expiryDeadline := omit - ) modifies m_onu_alarm_subscription := { - subscriptionType := "BadSubscriptionType" - } // End of template m_onu_alarm_subscription_bad_request - - template OnuAlarmSubscription mw_onu_alarm_subscription( - template (present) JSON.AnyURI p_callbackReference := ?, - template (present) FilterCriteriaOnuAlarm p_filterCriteriaOnuAlarm := ?, - template Links p_links := *, - template TimeStamp p_expiryDeadline := * - ) := { - subscriptionType := "OnuAlarmSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaOnuAlarm := p_filterCriteriaOnuAlarm, - expiryDeadline := p_expiryDeadline - } // End of template mw_onu_alarm_subscription - - template (omit) FilterCriteriaOnuAlarm m_filter_criteria_onu_alarm( - in template (value) OnuIds p_onuId := { PX_FAI_ONU_ID }, - in template (omit) CpInfo p_customerPremisesIxnfo := omit, - in template (omit) Alarms p_alarms := omit - ) := { - customerPremisesInfo := p_customerPremisesIxnfo, - onuId := p_onuId, - alarms := p_alarms - } // End of template m_filter_criteria_onu_alarm - - template FilterCriteriaOnuAlarm mw_filter_criteria_onu_alarm( - template (present) OnuIds p_onuId := ?, - template CpInfo p_customerPremisesIxnfo := *, - template Alarms p_alarms := * - ) := { - customerPremisesInfo := p_customerPremisesIxnfo, - onuId := p_onuId, - alarms := p_alarms - } // End of template mw_filter_criteria_onu_alarm - - template (value) TimeStamp m_time_stamp( - in UInt32 p_seconds, - in UInt32 p_nanoSeconds := 0 - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of temlate m_time_stamp - - template (present) TimeStamp mw_time_stamp( - template (present) UInt32 p_seconds := ?, - template (present) UInt32 p_nanoSeconds := ? - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of temlate mw_time_stamp - -} // End of module FixedAccessInformationServiceAPI_Templates diff --git a/ttcn/LibMec/FixedAccessInformationAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/FixedAccessInformationAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn deleted file mode 100644 index d328bd5caa1cc35423de593a2537a05653b0d664..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/FixedAccessInformationAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn +++ /dev/null @@ -1,488 +0,0 @@ -module FixedAccessInformationServiceAPI_TypesAndValues { - - // JSON - import from JSON all; - - // LibCommon - import from LibCommon_BasicTypesAndValues all; - - /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type UInt32 Seconds; - - /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type UInt32 NanoSeconds; - - /** - * @desc - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } - - /** - * @desc This type represents the fixed access information. - * @member timeStamp Time stamp. - * @member customerPremisesInfo The physical location of a customer site. - * @member connectivityInfo The per connectivity domain fixed access information. - */ - type record FaInfo { - TimeStamp timeStamp optional, - CpInfo customerPremisesInfo, - ConnectivityInfo connectivityInfo optional - } - - /** - * @desc The per connectivity domain fixed access information. - * @member LastMileTech An informative field identifying the last mile access technology used. - * @member InterfaceType The physical interface used for the end customer site – as defined in IEEE802, ITU, Broadband Forum. - * @member dsbw The bandwidth (in Mbps) from the network towards the customer site. - * @member usbw The bandwidth (in Mbps) from the customer site towards the network. - * @member latency Maximum baseline latency (in ms) between customer site and service edge node. - */ - type record ConnectivityInfo { - LastMileTech lastMileTech optional, - InterfaceType interfaceType, - JSON.Number dsbw optional, - JSON.Number usbw optional, - JSON.Number latency optional - } - - /** - * @desc An informative field identifying the last mile access technology used. - */ - type enumerated LastMileTech { - ADSL, - VDSL, - GPON, - XGPON, - NGPON2, - XGSPON, - GFAST, - P2PEthernet - } - - /** - * @desc The physical interface used for the end customer site – as defined in IEEE802, ITU, Broadband Forum. - */ - type enumerated InterfaceType { - e_100BASE_TX, - e_1000BASE_TX, - e_1000BASE_LX, - e_1000BASELX10, - e_1000BASEBX10, - e_1000BASE_LH, - e_1000Base_ZX, - ADSL_RJ11, - VDSL_RJ11, - GPON - } - - /** - * @desc Latitude (DATUM=WGS84) -90 to 90 in decimal degree format DDD.ddd - */ - type JSON.Number Latitude; - - /** - * @desc Longitude (DATUM=WGS84) -180 to 180 in decimal degree format DDD.ddd - */ - type JSON.Number Longitude; - - /** - * @desc Postal code for the location - */ - type JSON.String PostalCode; - - type record CpInfo_{ - Latitude latitude optional, - Longitude longitude optional, - PostalCode postalCode optional - } - type record of CpInfo_ CpInfo; - - /** - * @desc This type represents the information of the device that is connected to a fixed access network. - * @member timeStamp Time stamp. - * @member gwId Information (typically the serial number) to identify an Internet Gateway Device through which the customer premises device is connected. - * @member deviceId Typically, the serial number of the device. - * @member deviceStatus Current operational status of the device. - * @member upTime Time in seconds since the device was last restarted - * @member iPConnectionUpTime The time in seconds that the IP interface has been connected. - * @member totalBytesSent Total number of IP payload bytes sent since the device was last restarted - * @member totalBytesReceived Total number of IP payload bytes received since the device was last restarted - * @member totalPacketsSent Total number of packets sent since the device was last restarted - * @member totalPacketsReceived Total number of packets received since the device was last restarted - * @member iPPingDiagnostics The result of an IP-layer ping test - * @member traceRouteDiagnostics The result of an IP-layer trace-route test - * @member downloadDiagnostics The result of a HTTP and FTP DownloadDiagnostics Test - * @member uploadDiagnostics The result of a HTTP and FTP UploadDiagnostics Test - */ - type record DeviceInfo { - TimeStamp timeStamp optional, - GatewayId gwId, - DeviceId deviceId optional, - DeviceStatus deviceStatus, - JSON.Number upTime, - JSON.Number iPConnectionUpTime, - JSON.Number totalBytesSent, - JSON.Number totalBytesReceived, - JSON.Number totalPacketsSent, - JSON.Number totalPacketsReceived, - IPPingDiagnostics iPPingDiagnostics optional, - TraceRouteDiagnostics traceRouteDiagnostics optional, - DownloadDiagnostics downloadDiagnostics optional, - UploadDiagnostics uploadDiagnostics optional - } - - /** - * @desc Information (typically the serial number) to identify an Internet Gateway Device through which the customer premises device is connected. - */ - type record of JSON.String GatewayId; - - /** - * @desc Typically, the serial number of the device. - */ - type record of JSON.String DeviceId; - - /** - * @desc Current operational status of the device. - */ - type enumerated DeviceStatus { - Up, - Initializing, - Error, - Disabled - } - - type record IPPingDiagnostics {} - type record TraceRouteDiagnostics {} - type record DownloadDiagnostics{} - type record UploadDiagnostics {} - - /** - * @desc This type represents the information of the cable line of a fixed access network - * @member timeStamp Time stamp. - * @member customerPremisesInfo The physical location of a customer site. - * - */ - type record CableLineInfo { - TimeStamp timeStamp optional, - CpInfo customerPremisesInfo, - CmdInfo cmdInfo - } - - /** - * @desc - * @member cmdId Information (typically the serial number) to identify a Cable Modem at subscriber locations intended for use in conveying data communications on a cable data system. - * @member cmStatus It provides CM connectivity status information of the CM. - * @member cmDpvStats It represents the DOCSIS Path Verify Statistics collected in the cable modem device. - * @member serviceFlowStats It describes statistics associated with the Service Flows in a managed device. - */ - type record CmdInfo_ { - CmdId cmdId, - CmStatus cmStatus optional, - CmDpvStats cmDpvStats optional, - ServiceFlowStats serviceFlowStats optional - } - type record of CmdInfo_ CmdInfo; - - /** - * @desc Information (typically the serial number) to identify a Cable Modem at subscriber locations intended for use in conveying data communications on a cable data system. - */ - type JSON.String CmdId; - - /** - * @desc It provides CM connectivity status information of the CM. - * @member ifIndex It denotes the MAC Domain interface index of the CM. - * @member It defines the CM connectivity state. - * @member resets It denotes the number of times the CM reset or initialized this interface. - * @member lostSyncs It denotes the number of times the CM lost synchronization with the downstream channel. - * @member invalidRegRsps It denotes the number of times the CM received invalid registration response messages. - * @member energyMgt1x1OperStatus It indicates whether the CM is currently operating in Energy Management 1x1 Mode - * @member emDlsOperStatus It indicates whether the CM is currently operating in Energy Management DLS Mode - */ - type record CmStatus_ { - IfIndex ifIndex, - CmRegState cmRegState, - JSON.Number resets, - JSON.Number lostSyncs, - JSON.Number invalidRegRsps, - JSON.Bool energyMgt1x1OperStatus, - JSON.Bool emDlsOperStatus - } - type record of CmStatus_ CmStatus; - - /** - * @desc It denotes the MAC Domain interface index of the CM. - */ - type JSON.String IfIndex; - - /** - * @desc It defines the CM connectivity state. - */ - type enumerated CmRegState { - other, - notReady, - notSynchronized, - phySynchronized, - usParametersAcquired, - rangingComplete, - dhcpV4Complete, - todEstablished, - securityEstablished, - configFileDownloadComplete, - registrationComplete, - operational, - accessDenied, - eaeInProgress, - dhcpv4InProgress, - dhcpv6InProgress, - dhcpV6Complete, - registrationInProgress, - bpiInit, - forwardingDisabled, - dsTopologyResolutionInProgress, - rangingInProgress, - rfMuteAll - } - - /** - * @desc It represents the DOCSIS Path Verify Statistics collected in the cable modem device. - * @member ifIndex It denotes the MAC Domain interface index of the CM. - * @member lastMeasLatency The last latency measurement. - * @member lastMeasTime the last measurement time of the last latency measurement. - * @member minLatency the minimum latency measurement. - * @member maxLatency the maximum latency measurement. - * @member avgLatency the average latency measurement. - * @member numMeas The number of latency measurements made. - */ - type record CmDpvStats_ { - IfIndex ifIndex, - JSON.Number lastMeasLatency, - TimeStamp lastMeasTime, - JSON.Number minLatency, - JSON.Number maxLatency, - JSON.Number avgLatency, - JSON.Number numMeas - } - type record of CmDpvStats_ CmDpvStats; - - /** - * @desc It describes statistics associated with the Service Flows in a managed device. - * @member ifIndex It denotes the MAC Domain interface index of the CM. - * @member serviceFlowInfo It represents the information of a Service Flow. - */ - type record ServiceFlowStats_ { - IfIndex ifIndex, - ServiceFlowInfo serviceFlowInfo - } - type record of ServiceFlowStats_ ServiceFlowStats; - - /** - * @desc It represents the information of a Service Flow. - * @member ifIndex It denotes the MAC Domain interface index of the CM. - * @member serviceFlowId It represents an identifier assigned to a Service Flow by CMTS within a MAC Domain. - * @member pkts For outgoing Service Flows, this attribute counts the number of Packet Data PDUs forwarded to this Service Flow. For incoming upstream CMTS service flows, this attribute counts the number of Packet Data PDUs actually received on the Service Flow identified by the SID for which the packet was scheduled. - * @member timeCreated It indicates the time when the service flow was created. - * @member timeActiveIt Indicates the number of seconds that the service flow has been active. - * @member policedDropPkts For upstream service flows, this attribute counts the number of Packet Data PDUs classified to this service flow dropped due to: (1) exceeding the selected Buffer Size for the service flow; or (2) UGS packets dropped due to exceeding the Unsolicited Grant Size with a Request/Transmission policy that requires such packets to be dropped. - * @member policedDelayPkts It counts only outgoing packets delayed in order to maintain the Maximum Sustained Traffic Rate. - * @member aqmDroppedPkts For upstream service flows on which AQM is enabled, this attribute counts the number of Packet Data PDUs classified to this service flow dropped due to Active Queue Management drop decisions. - */ - type record ServiceFlowInfo_ { - JSON.Number serviceFlowId, - JSON.Number pkts, - TimeStamp timeCreated, - JSON.Number timeActive, - JSON.Number policedDropPkts, - JSON.Number policedDelayPkts, - JSON.Number aqmDroppedPkts - } - type record of ServiceFlowInfo_ ServiceFlowInfo; - - /** - * @desc This type represents the information of the of an optical network (e.g., G-PON, XG-PON, NG-PON2, XGS-PON). - * @member timeStamp Time stamp. - * @member customerPremisesInfo The physical location of a customer site. - * @member ponSYS_ID The 20-bit identity of the optical system within a certain domain. - * @member opticalNetworkInfo - */ - type record PonInfo { - TimeStamp timeStamp optional, - CpInfo customerPremisesInfo, - PonSYS_ID ponSYS_ID, - OpticalNetworkInfo opticalNetworkInfo - } - - type JSON.String PonSYS_ID; - - /** - * @desc This type represents the information of the of an optical network (e.g., G-PON, XG-PON, NG-PON2, XGS-PON). - * @member onuId Information to identify an Optical Network Unit. - * @member ponTech An informative field identifying the optical technology used. - * @member operationalState It reports whether the ONU is currently capable of performing its function. - * @member dsRate Downstream line rate - * @member usRate Upstream line rate - */ - type record OpticalNetworkInfo_ { - OnuId onuId, - PonTech ponTech, - OperationalState operationalState, - DsRate dsRate, - UsRate usRate - } - type record of OpticalNetworkInfo_ OpticalNetworkInfo; - - /** - * @desc Information to identify an Optical Network Unit. - */ - type JSON.String OnuId; - type record of OnuId OnuIds; - - /** - * @desc An informative field identifying the optical technology used. - */ - type enumerated PonTech { - GPON, - XGPON, - NGPON2, - XGSPON - } - - /** - * @desc It reports whether the ONU is currently capable of performing its function. - */ - type enumerated OperationalState { - enabled, - disabled - } - - /** - * @desc Upstream line rate - */ - type enumerated DsRate { - e_ds_one, // 1 = 2.48832 Gbit/s: G-PON [i.9] or NG-PON2 option 2 [i.8] - e_ds_two // 9.95328 Gbit/s: XG-PON [i.10] or XGS-PON [i.11] or NG-PON2 option 1 [i.8] - } - - /** - * @desc Upstream line rate - */ - type enumerated UsRate { - e_us_one, // 1 = 1.24416 Gbit/s: G-PON option 1 [i.9] - e_us_two, // 2 = 2.48832 Gbit/s: G-PON option 2 [i.9] or XG-PON [i.10] or NG-PON2 option 2 [i.8] - e_us_three // 9.95328 Gbit/s: XGS-PON [i.11] - } - - /** - * @desc Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests. - * @member self_ Self referring URI. The URI shall be unique within the FAI API as it acts as an ID for the subscription. - */ - type record Links { - LinkType self_ - } with { - variant (self_) "name as 'self'"; - } - - /** - * @desc This type represents a type of link and may be referenced from data structures. - */ - type record LinkType { - Href href - } - - /** - * @desc URI referring to a resource. - */ - type JSON.String Href; - - /** - * @desc This type represents a list of links related to currently existing subscriptions for the service consumer. - * @member links List of hyperlinks related to the resource. - * @member subscription A link to a subscription. - */ - type record SubscriptionLinkList { - Links links, - Subscriptions subscription optional - } with { - variant (links) "name as '_links'"; - } - - /** - * @desc A link to a subscription - * @member href The URI referring to the subscription. - * @member subscriptionType Type of subscription - */ - type record Subscription_ { - JSON.AnyURI href, - SubscriptionType subscriptionType - } - type record of Subscription_ Subscriptions; - - /** - * @desc Type of subscription - */ - type enumerated SubscriptionType { - RESERVED, - ONU_ALARM, - DEVICE_ABNORMAL_ALERT, - CM_CONNECTIVITY_STATE, - ANI_ALARM - } - - /** - * @desc This type represents a subscription to ONU alarm notifications from FAIS. - */ - type record OnuAlarmSubscription { - JSON.String subscriptionType, - JSON.AnyURI callbackReference, - Links links optional, - FilterCriteriaOnuAlarm filterCriteriaOnuAlarm, - TimeStamp expiryDeadline optional - } with { - variant (links) "name as '_links'"; - } - - /** - * @desc List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response - * @member customerPremisesInfo Physical locations of the customer sites - * @member onuId Unique identifiers for the optical network units. - * @member In case alarms is not included in the subscription request, the default value -1 = All shall be used and included in the response. - */ - type record FilterCriteriaOnuAlarm { - CpInfo customerPremisesInfo optional, - OnuIds onuId, - Alarms alarms optional - } - - /** - * @desc - */ - type enumerated Alarm { - EquipmentAlarm, // (Functional failure on an internal interface) - PoweringAlarm, // (Loss of external power to battery backup unit. This alarm is typically derived through an external interface to a battery backup unit, and indicates that AC is no longer available to maintain battery charge.) - BatteryMissing, // (Battery is provisioned but missing) - BatteryFailure, // (Battery is provisioned and present but cannot recharge) - BatteryLow, // (Battery is provisioned and present but its voltage is too low) - PhysicalIntrusion, // (Applies if the ONU supports detection such as door or box open) - OnuSelfTestFailure, // (ONU has failed autonomous self-test) - DyingGasp, // ()ONU is powering off imminently due to loss of power to the ONU itself.) - TemperatureYellow, // (No service shutdown at present, but the circuit pack is operating beyond its recommended range.) - TemperatureRed, // ()Some services have been shut down to avoid equipment damage.) - VoltageYellow, // (No service shutdown at present, but the line power voltage is below its recommended minimum.) - VoltageRed, // (Some services have been shut down to avoid power collapse.) - OnuManualPowerOff, // (The ONU is shutting down because the subscriber has turned off its power switch.) - InvImage, // (Software image is invalid) - PseOverloadYellow, // (Indicates that the ONU is nearing its maximum ability to supply the known PoE demand of the attached PDs. The thresholds for declaring and clearing this alarm are vendor-specific.) - PseOverloadRed, //(Indicates that the ONU is unable to supply all of the PoE demand of the attached PDs and has removed or reduced power to at least one PD.) - All - } - type record of Alarm Alarms; - -} // End of module FixedAccessInformationServiceAPI_TypesAndValues diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/module.mk b/ttcn/LibMec/FixedAccessInformationServiceAPI/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..2d89431e97f033dc6686d3d8c0df75b50ce845c8 --- /dev/null +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/module.mk @@ -0,0 +1,7 @@ +sources := \ + ttcn/FixedAccessInformationServiceAPI_Pics.ttcn \ + ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn \ + ttcn/FixedAccessInformationServiceAPI_Templates.ttcn \ + ttcn/FixedAccessInformationServiceAPI_Functions.ttcn \ + ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn + diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Functions.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Functions.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3ce305c2aec485141fd5e6abd5a2ace3f4a0463c --- /dev/null +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Functions.ttcn @@ -0,0 +1,342 @@ +module FixedAccessInformationServiceAPI_Functions { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + import from LibCommon_Time all; + import from LibCommon_VerdictControl all; + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec/FixedAccessInformationServiceAPI + import from FixedAccessInformationServiceAPI_TypesAndValues all; + import from FixedAccessInformationServiceAPI_Templates all; + import from FixedAccessInformationServiceAPI_Pixits all; + + // LibMec + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + function f_create_onu_alarm_subscription( + out OnuAlarmSubscription p_onu_alarm_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_FAI_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_FAI_SUB_URI & "/(?*)", + 0 + ); + p_onu_alarm_subscription := v_response.response.body.json_body.onuAlarmSubscription; + log("f_create_onu_alarm_subscription: INFO: IUT successfully responds to the subscription: ", p_onu_alarm_subscription); + log("f_create_onu_alarm_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_onu_alarm_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_onu_alarm_subscription + + function f_delete_onu_alarm_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & p_subscription_id, + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_onu_alarm_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_onu_alarm_subscription + + function f_create_dev_info_subscription( + out DevInfoSubscription p_dev_info_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_FAI_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_fai_dev_info_subscription( + m_dev_info_subscription( + PX_DEV_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_dev_info + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_FAI_SUB_URI & "/(?*)", + 0 + ); + p_dev_info_subscription := v_response.response.body.json_body.devInfoSubscription; + log("f_create_dev_info_subscription: INFO: IUT successfully responds to the subscription: ", p_dev_info_subscription); + log("f_create_dev_info_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_onu_alarm_suf_create_dev_info_subscriptionbscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_dev_info_subscription + + function f_delete_dev_info_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & p_subscription_id, + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_dev_info_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_dev_info_subscription + + function f_create_cm_conn_subscription( + out CmConnSubscription p_cm_conn_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_FAI_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_fai_cm_conn_subscription( + m_cm_conn_subscription( + PX_CM_CONN_SUB_CALLBACK_URI + //m_filter_criteria_dev_info + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription( + PX_CM_CONN_SUB_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_FAI_SUB_URI & "/(?*)", + 0 + ); + p_cm_conn_subscription := v_response.response.body.json_body.cmConnSubscription; + log("f_create_cm_conn_subscription: INFO: IUT successfully responds to the subscription: ", p_cm_conn_subscription); + log("f_create_cm_conn_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_onu_alarm_suf_create_cm_conn_subscriptionbscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_cm_conn_subscription + + function f_delete_cm_conn_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & p_subscription_id, + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_cm_conn_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_cm_conn_subscription + + function f_create_ani_alarm_subscription( + out AniAlarmSubscription p_ani_alarm_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_FAI_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_fai_ani_alarm_subscription( + m_ani_alarm_subscription( + PX_ANI_ALARM_SUB_CALLBACK_URI + //m_filter_criteria_ani_alarm + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fai_ani_alarm_subscription( + mw_ani_alarm_subscription( + PX_ANI_ALARM_SUB_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_FAI_SUB_URI & "/(?*)", + 0 + ); + p_ani_alarm_subscription := v_response.response.body.json_body.aniAlarmSubscription; + log("f_create_ani_alarm_subscription: INFO: IUT successfully responds to the subscription: ", p_ani_alarm_subscription); + log("f_create_ani_alarm_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_ani_alarm_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_ani_alarm_subscription + + function f_delete_ani_alarm_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & p_subscription_id, + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_ani_alarm_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_ani_alarm_subscription + +} // End of module FixedAccessInformationServiceAPI_Functions \ No newline at end of file diff --git a/ttcn/LibMec/FixedAccessInformationAPI/ttcn/FixedAccessInformationServiceAPI_Pics.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pics.ttcn similarity index 71% rename from ttcn/LibMec/FixedAccessInformationAPI/ttcn/FixedAccessInformationServiceAPI_Pics.ttcn rename to ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pics.ttcn index 670fd237eb1f9daaa02f27c498eef25935b4a47d..e5c244989bfe106b341bce8116fe2b0956145497 100644 --- a/ttcn/LibMec/FixedAccessInformationAPI/ttcn/FixedAccessInformationServiceAPI_Pics.ttcn +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pics.ttcn @@ -1,5 +1,8 @@ module FixedAccessInformationServiceAPI_Pics { + /** + * @desc Does the IUT support MEC Federation API? + */ modulepar boolean PICS_FAI_API_SUPPORTED := true; } // End of module FixedAccessInformationServiceAPI_Pics diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..28872c3a5bc71abeb0fcb5748699dcaa81ed428a --- /dev/null +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn @@ -0,0 +1,37 @@ +module FixedAccessInformationServiceAPI_Pixits { + + // JSON + import from Json all; + + // LibMec_FixedAccessInformationServiceAPI + import from FixedAccessInformationServiceAPI_TypesAndValues all; + + modulepar Json.String PX_FAI_CM_ID := ""; + + modulepar Json.String PX_NON_EXISTING_FAI_CM_ID := ""; + + modulepar Json.String PX_FAI_ONU_ID := ""; + + modulepar Json.String PX_NON_EXISTING_FAI_ONU_ID := ""; + + modulepar Json.String PX_FAI_GW_ID := ""; + + modulepar Json.String PX_NON_EXISTING_FAI_GW_ID := ""; + + modulepar Json.String PX_FAI_SUB_ID := ""; + + modulepar Json.String PX_NON_EXISTING_FAI_SUB_ID := ""; + + modulepar Json.AnyURI PX_ONU_ALARM_SUB_CALLBACK_URI := ""; + + modulepar Json.AnyURI PX_DEV_ALARM_SUB_CALLBACK_URI := ""; + + modulepar Json.AnyURI PX_CM_CONN_SUB_CALLBACK_URI := ""; + + modulepar Json.AnyURI PX_ANI_ALARM_SUB_CALLBACK_URI := ""; + + modulepar Json.String PX_SUBSCRIPTION_ID := ""; + + modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := ""; + +} // End of module FixedAccessInformationServiceAPI_Pixits diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b97c9aa16ea9884ab0ae93101552d38815066dce --- /dev/null +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn @@ -0,0 +1,424 @@ +module FixedAccessInformationServiceAPI_Templates { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec + import from LibMec_TypesAndValues all; + + // LibMec_FixedAccessInformationServiceAPI + import from FixedAccessInformationServiceAPI_TypesAndValues all; + import from FixedAccessInformationServiceAPI_Pixits all; + + template (omit) FaInfo m_fa_info( + in template (value) CpInfo p_customerPremisesInfo, + in template (value) LastMileTech p_lastMileTech, + in template (value) InterfaceType p_interfaceType, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) Json.Integer p_dsbw := omit, + in template (omit) Json.Integer p_usbw := omit, + in template (omit) Json.Integer p_latency := omit + ) := { + timeStamp := p_timeStamp, + customerPremisesInfo := p_customerPremisesInfo, + lastMileTech := p_lastMileTech, + interfaceType := p_interfaceType, + dsbw := p_dsbw, + usbw := p_usbw, + latency := p_latency + } // End of template m_fa_info + + template FaInfo mw_fa_info( + template (present) CpInfo p_customerPremisesInfo := ?, + template (present) LastMileTech p_lastMileTech := ?, + template (present) InterfaceType p_interfaceType := ?, + template TimeStamp p_timeStamp := *, + template Json.Integer p_dsbw := *, + template Json.Integer p_usbw := *, + template Json.Integer p_latency := * + ) := { + timeStamp := p_timeStamp, + customerPremisesInfo := p_customerPremisesInfo, + lastMileTech := p_lastMileTech, + interfaceType := p_interfaceType, + dsbw := p_dsbw, + usbw := p_usbw, + latency := p_latency + } // End of template mw_fa_info + + template (omit) DeviceInfo m_device_info( + in template (value) Json.String p_gwId, + in template (value) DeviceStatus p_deviceStatus, + in template (value) Json.Number p_upTime, + in template (value) Json.Number p_iPConnectionUpTime, + in template (value) Json.Number p_totalBytesSent, + in template (value) Json.Number p_totalBytesReceived, + in template (value) Json.Number p_totalPacketsSent, + in template (value) Json.Number p_totalPacketsReceived, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) Json.String p_deviceId := omit, + in template (omit) IPPingDiagnostics p_iPPingDiagnostics := omit, + in template (omit) TraceRouteDiagnostics p_traceRouteDiagnostics := omit, + in template (omit) DownloadDiagnostics p_downloadDiagnostics := omit, + in template (omit) UploadDiagnostics p_uploadDiagnostics := omit + ) := { + timeStamp := p_timeStamp, + gwId := p_gwId, + deviceId := p_deviceId, + deviceStatus := p_deviceStatus, + upTime := p_upTime, + iPConnectionUpTime := p_iPConnectionUpTime, + totalBytesSent := p_totalBytesSent, + totalBytesReceived := p_totalBytesReceived, + totalPacketsSent := p_totalPacketsSent, + totalPacketsReceived := p_totalPacketsReceived, + iPPingDiagnostics := p_iPPingDiagnostics, + traceRouteDiagnostics := p_traceRouteDiagnostics, + downloadDiagnostics := p_downloadDiagnostics, + uploadDiagnostics := p_uploadDiagnostics + } // End of template m_device_info + + template DeviceInfo mw_device_info( + template (present) Json.String p_gwId := ?, + template (present) DeviceStatus p_deviceStatus := ?, + template (present) Json.Number p_upTime := ?, + template (present) Json.Number p_iPConnectionUpTime := ?, + template (present) Json.Number p_totalBytesSent := ?, + template (present) Json.Number p_totalBytesReceived := ?, + template (present) Json.Number p_totalPacketsSent := ?, + template (present) Json.Number p_totalPacketsReceived := ?, + template TimeStamp p_timeStamp := *, + template Json.String p_deviceId := *, + template IPPingDiagnostics p_iPPingDiagnostics := *, + template TraceRouteDiagnostics p_traceRouteDiagnostics := *, + template DownloadDiagnostics p_downloadDiagnostics := *, + template UploadDiagnostics p_uploadDiagnostics := * + ) := { + timeStamp := p_timeStamp, + gwId := p_gwId, + deviceId := p_deviceId, + deviceStatus := p_deviceStatus, + upTime := p_upTime, + iPConnectionUpTime := p_iPConnectionUpTime, + totalBytesSent := p_totalBytesSent, + totalBytesReceived := p_totalBytesReceived, + totalPacketsSent := p_totalPacketsSent, + totalPacketsReceived := p_totalPacketsReceived, + iPPingDiagnostics := p_iPPingDiagnostics, + traceRouteDiagnostics := p_traceRouteDiagnostics, + downloadDiagnostics := p_downloadDiagnostics, + uploadDiagnostics := p_uploadDiagnostics + } // End of template mw_device_info + + template (omit) CableLineInfo m_cable_line_info( + in template (value) CpInfo p_customerPremisesInfo, + in template (value) Json.String p_cmdId, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) CmStatus p_cmStatus := omit, + in template (omit) CmDpvStats p_cmDpvStats := omit, + in template (omit) ServiceFlowStats p_serviceFlowStats := omit + ) := { + timeStamp := p_timeStamp, + customerPremisesInfo := p_customerPremisesInfo, + cmdId := p_cmdId, + cmStatus := p_cmStatus, + cmDpvStats := p_cmDpvStats, + serviceFlowStats := p_serviceFlowStats + } // End of template m_cable_line_info + + template CableLineInfo mw_cable_line_info( + template (present) CpInfo p_customerPremisesInfo := ?, + template (present) Json.String p_cmdId := ?, + template TimeStamp p_timeStamp := *, + template CmStatus p_cmStatus := *, + template CmDpvStats p_cmDpvStats := *, + template ServiceFlowStats p_serviceFlowStats := * + + ) := { + timeStamp := p_timeStamp, + customerPremisesInfo := p_customerPremisesInfo, + cmdId := p_cmdId, + cmStatus := p_cmStatus, + cmDpvStats := p_cmDpvStats, + serviceFlowStats := p_serviceFlowStats + } // End of template mw_cable_line_info + + template (omit) PonInfo m_pon_info( + in template (value) CpInfo p_customerPremisesInfo, + in template (value) Json.String p_ponSYS_ID, + in template (value) Json.String p_onuId, + in template (value) PonTech p_ponTech, + in template (value) OperationalState p_operationalState, + in template (value) DsRate p_dsRate, + in template (value) UsRate p_usRate, + in template (omit) TimeStamp p_timeStamp := omit + ) := { + timeStamp := p_timeStamp, + customerPremisesInfo := p_customerPremisesInfo, + ponSYS_ID := p_ponSYS_ID, + onuId := p_onuId, + ponTech := p_ponTech, + operationalState := p_operationalState, + dsRate := p_dsRate, + usRate := p_usRate + } // End of template m_pon_info + + template PonInfo mw_pon_info( + template (present) CpInfo p_customerPremisesInfo := ?, + template (present) Json.String p_ponSYS_ID := ?, + template (present) Json.String p_onuId := ?, + template (present) PonTech p_ponTech := ?, + template (present) OperationalState p_operationalState := ?, + template (present) DsRate p_dsRate := ?, + template (present) UsRate p_usRate := ?, + template TimeStamp p_timeStamp := * + ) := { + timeStamp := p_timeStamp, + customerPremisesInfo := p_customerPremisesInfo, + ponSYS_ID := p_ponSYS_ID, + onuId := p_onuId, + ponTech := p_ponTech, + operationalState := p_operationalState, + dsRate := p_dsRate, + usRate := p_usRate + } // End of template mw_pon_info + + template (omit) SubscriptionLinkList m_subscription_link_list( + in template (value) SubscriptionLinks p_links + ) := { + links := p_links + } // End of template m_subscription_link_list + + template SubscriptionLinkList mw_subscription_link_list( + template (present) SubscriptionLinks p_links := ? + ) := { + links := p_links + } // End of template m_wsubscription_link_list + + template (omit) OnuAlarmSubscription m_onu_alarm_subscription( + in template (value) Json.AnyURI p_callbackReference, + in template (value) FilterCriteriaOnuAlarm p_filterCriteriaOnuAlarm, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Links p_links := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "OnuAlarmSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaOnuAlarm := p_filterCriteriaOnuAlarm, + expiryDeadline := p_expiryDeadline + } // End of template m_onu_alarm_subscription + + template (omit) OnuAlarmSubscription m_onu_alarm_subscription_bad_request( + in template (value) Json.AnyURI p_callbackReference, + in template (value) FilterCriteriaOnuAlarm p_filterCriteriaOnuAlarm, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Links p_links := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) modifies m_onu_alarm_subscription := { + subscriptionType := "BadSubscriptionType" + } // End of template m_onu_alarm_subscription_bad_request + + template (present) OnuAlarmSubscription mw_onu_alarm_subscription( + template (present) Json.AnyURI p_callbackReference := ?, + template (present) FilterCriteriaOnuAlarm p_filterCriteriaOnuAlarm := ?, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "OnuAlarmSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaOnuAlarm := p_filterCriteriaOnuAlarm, + expiryDeadline := p_expiryDeadline + } // End of template mw_onu_alarm_subscription + + template (omit) FilterCriteriaOnuAlarm m_filter_criteria_onu_alarm( + in template (value) OnuIds p_onuId := { PX_FAI_ONU_ID }, + in template (omit) CpInfo p_customerPremisesIxnfo := omit, + in template (omit) AlarmList p_alarms := omit + ) := { + customerPremisesInfo := p_customerPremisesIxnfo, + onuId := p_onuId, + alarms := p_alarms + } // End of template m_filter_criteria_onu_alarm + + template FilterCriteriaOnuAlarm mw_filter_criteria_onu_alarm( + template (present) OnuIds p_onuId := ?, + template CpInfo p_customerPremisesIxnfo := *, + template AlarmList p_alarms := * + ) := { + customerPremisesInfo := p_customerPremisesIxnfo, + onuId := p_onuId, + alarms := p_alarms + } // End of template mw_filter_criteria_onu_alarm + + template (omit) DevInfoSubscription m_dev_info_subscription( + in template (value) Json.AnyURI p_callbackReference, + in template (value) FilterCriteriaDevInfo p_filterCriteriaDevInfo, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "DevInfoSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaDevInfo := p_filterCriteriaDevInfo, + expiryDeadline := p_expiryDeadline + } // End of template m_dev_info_subscription + + template (present) DevInfoSubscription mw_dev_info_subscription( + template (present) Json.AnyURI p_callbackReference := ?, + template (present) FilterCriteriaDevInfo p_filterCriteriaDevInfo := ?, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "DevInfoSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaDevInfo := p_filterCriteriaDevInfo, + expiryDeadline := p_expiryDeadline + } // End of template mw_dev_info_subscription + + template (omit) FilterCriteriaDevInfo m_filter_criteria_dev_info( + in template (value) GatewayIdList p_gwId := { PX_FAI_GW_ID }, + in template (omit) DeviceIdList p_deviceId := omit, + in template (omit) DeviceErrStatus p_deviceErrStatus := omit + ) := { + gwId := p_gwId, + deviceId := p_deviceId, + deviceErrStatus := p_deviceErrStatus + } // End of template m_filter_criteria_dev_info + + template (present) FilterCriteriaDevInfo mw_filter_criteria_dev_info( + template (present) GatewayIdList p_gwId := ?, + template DeviceIdList p_deviceId := *, + template DeviceErrStatus p_deviceErrStatus := * + ) := { + gwId := p_gwId, + deviceId := p_deviceId, + deviceErrStatus := p_deviceErrStatus + } // End of template mw_filter_criteria_dev_info + + template (omit) CmConnSubscription m_cm_conn_subscription( + in template (value) Json.AnyURI p_callbackReference, + in template (omit) FilterCriteriaCmConn p_filterCriteriaCmConn := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "CmConnSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaCmConn := p_filterCriteriaCmConn, + expiryDeadline := p_expiryDeadline + } // End of template m_cm_conn_subscription + + template (present) CmConnSubscription mw_cm_conn_subscription( + template (present) Json.AnyURI p_callbackReference := ?, + template FilterCriteriaCmConn p_filterCriteriaCmConn := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "CmConnSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaCmConn := p_filterCriteriaCmConn, + expiryDeadline := p_expiryDeadline + } // End of template mw_cm_conn_subscription + + template (omit) FilterCriteriaCmConn m_filter_criteria_cm_conn( + in template (omit) CpInfo p_customerPremisesInfo := omit, + in template (omit) CmIf p_cmIf := omit + ) := { + customerPremisesInfo := p_customerPremisesInfo, + cmIf := p_cmIf + } // End of template m_filter_criteria_cm_conn + + template FilterCriteriaCmConn mw_filter_criteria_cm_conn( + template CpInfo p_customerPremisesInfo := *, + template CmIf p_cmIf := * + ) := { + customerPremisesInfo := p_customerPremisesInfo, + cmIf := p_cmIf + } // End of template mw_filter_criteria_cm_conn + + template (omit) AniAlarmSubscription m_ani_alarm_subscription( + in template (value) Json.AnyURI p_callbackReference, + in template (omit) FilterCriteriaAniAlarm p_filterCriteriaAniAlarm := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "AniAlarmSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAniAlarm := p_filterCriteriaAniAlarm, + expiryDeadline := p_expiryDeadline + } // End of template m_ani_alarm_subscription + + template (present) AniAlarmSubscription mw_ani_alarm_subscription( + template (present) Json.AnyURI p_callbackReference := ?, + template FilterCriteriaAniAlarm p_filterCriteriaAniAlarm := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "AniAlarmSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAniAlarm := p_filterCriteriaAniAlarm, + expiryDeadline := p_expiryDeadline + } // End of template mw_ani_alarm_subscription + + template (omit) FilterCriteriaAniAlarm m_filter_criteria_ani_alarm( + in template (value) OnuIds p_onuId, + in template (value) AniId p_aniId, + in template (omit) CpInfo p_customerPremisesInfo := omit + ) := { + customerPremisesInfo := p_customerPremisesInfo, + onuId := p_onuId, + aniId := p_aniId + } // End of template m_filter_criteria_ani_alarm + + template (present) FilterCriteriaAniAlarm mw_filter_criteria_ani_alarm( + template (present) OnuIds p_onuId := ?, + template (present) AniId p_aniId := ?, + template CpInfo p_customerPremisesInfo := * + ) := { + customerPremisesInfo := p_customerPremisesInfo, + onuId := p_onuId, + aniId := p_aniId + } // End of template mw_filter_criteria_ani_alarm + +} // End of module FixedAccessInformationServiceAPI_Templates diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8e6e6a9f0301415ad37a4b99189b12ff72f799c5 --- /dev/null +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn @@ -0,0 +1,854 @@ +/** + * @author ETSI / STF569 / TTF T027 + * @version $Url$ + * $Id$ + * @desc Types and Values for ETSI GS MEC 029 V2.2.1 (2022-01) + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + */ +module FixedAccessInformationServiceAPI_TypesAndValues { + + // JSON + import from Json all; + + // LibMec + import from LibMec_TypesAndValues all; + + /** + * @desc This type represents the fixed access information + * @member timeStamp Time stamp + * @member customerPremisesInfo The physical location of a customer site + * @member lastMileTech An informative field identifying the last mile access technology used + * @member interfaceType The physical interface used for the end customer site + * @member dsbw The bandwidth (in Mbps) from the network towards the customer site + * @member usbw The bandwidth (in Mbps) from the customer site towards the network + * @member latency Maximum baseline latency + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.2-1: Attributes of the FaInfo + */ + type record FaInfo { + TimeStamp timeStamp optional, + CpInfo customerPremisesInfo, + LastMileTech lastMileTech, + InterfaceType interfaceType, + Json.Integer dsbw optional, + Json.Integer usbw optional, + Json.Integer latency optional + } + + /** + * @desc An informative field identifying the last mile access technology used + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.2-1: Attributes of the FaInfo + */ + type enumerated LastMileTech { + ADSL (1), + VDSL (2), + GPON (3), + XGPON (4), + NGPON2 (5), + XGSPON (6), + GFAST (7), + P2PEthernet (8) + } with { + variant "JSON: as number" + } + + /** + * @desc The physical interface used for the end customer site + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.2-1: Attributes of the FaInfo + */ + type enumerated InterfaceType { + e_100BASE_TX (1), + e_1000BASE_TX (2), + e_1000BASE_LX (3), + e_1000BASELX10 (4), + e_1000BASEBX10 (5), + e_1000BASE_LH (6), + e_1000Base_ZX (7), + e_ADSL_RJ11 (8), + e_VDSL_RJ11 (9), + e_GPON (10) + } with { + variant "JSON: as number" + } + + /** + * @desc This type represents the information of the device that is connected to a fixed access network. + * @member timeStamp Time stamp. + * @member gwId Information (typically the serial number) to identify an Internet Gateway Device through which the customer premises device is connected. + * @member deviceId Typically, the serial number of the device. + * @member deviceStatus Current operational status of the device. + * @member upTime Time in seconds since the device was last restarted + * @member iPConnectionUpTime The time in seconds that the IP interface has been connected. + * @member totalBytesSent Total number of IP payload bytes sent since the device was last restarted + * @member totalBytesReceived Total number of IP payload bytes received since the device was last restarted + * @member totalPacketsSent Total number of packets sent since the device was last restarted + * @member totalPacketsReceived Total number of packets received since the device was last restarted + * @member iPPingDiagnostics The result of an IP-layer ping test + * @member traceRouteDiagnostics The result of an IP-layer trace-route test + * @member downloadDiagnostics The result of a HTTP and FTP DownloadDiagnostics Test + * @member uploadDiagnostics The result of a HTTP and FTP UploadDiagnostics Test + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.3-1: Attributes of the DeviceInfo + */ + type record DeviceInfo { + TimeStamp timeStamp optional, + Json.String gwId, + Json.String deviceId optional, + DeviceStatus deviceStatus, + Json.Number upTime, + Json.Number iPConnectionUpTime, + Json.Number totalBytesSent, + Json.Number totalBytesReceived, + Json.Number totalPacketsSent, + Json.Number totalPacketsReceived, + IPPingDiagnostics iPPingDiagnostics optional, + TraceRouteDiagnostics traceRouteDiagnostics optional, + DownloadDiagnostics downloadDiagnostics optional, + UploadDiagnostics uploadDiagnostics optional + } + + /** + * @desc Current operational status of the device. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.3-1: Attributes of the DeviceInfo + */ + type enumerated DeviceStatus { + Up (1), + Initializing (2), + Error (3), + Disabled (4) + } with { + variant "JSON: as number" + } + + /** + * @desc This type represents the information of the cable line of a fixed access network + * @member timeStamp Time stamp + * @member customerPremisesInfo The physical location of a customer site + * @member cmdId Information (typically the serial number) to identify a Cable Modem at subscriber locations intended for use in conveying data communications on a cable data system + * @member cmStatus It provides CM connectivity status information of the CM + * @member cmDpvStats It represents the DOCSIS Path Verify Statistics collected in the cable modem device + * @member serviceFlowStats It describes statistics associated with the Service Flows in a managed device + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.4-1: Attributes of the CableLineInfo + */ + type record CableLineInfo { + TimeStamp timeStamp optional, + CpInfo customerPremisesInfo, + Json.String cmdId, + CmStatus cmStatus optional, + CmDpvStats cmDpvStats optional, + ServiceFlowStats serviceFlowStats optional + } + + /** + * @desc It provides CM connectivity status information of the CM + * @member ifIndex It denotes the MAC Domain interface index of the CM + * @member cmRegState It defines the CM connectivity state + * @member resets It denotes the number of times the CM reset or initialized this interface + * @member lostSyncs It denotes the number of times the CM lost synchronization with the downstream channel + * @member invalidRegRsps It denotes the number of times the CM received invalid registration response messages + * @member energyMgt1x1OperStatus It indicates whether the CM is currently operating in Energy Management 1x1 Mode + * @member emDlsOperStatus It indicates whether the CM is currently operating in Energy Management DLS Mode + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.4-1: Attributes of the CableLineInfo + */ + type record CmStatus_ { + Json.String ifIndex, + CmRegState cmRegState, + Json.Integer reset, + Json.Integer lostSyncs, + Json.Integer invalidRegRsps, + Json.Bool energyMgt1x1OperStatus, + Json.Bool emDlsOperStatus + } + type set of CmStatus_ CmStatus; + type set of Json.String IfIndexList; + + /** + * @desc It defines the CM connectivity state. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.4-1: Attributes of the CableLineInfo + */ + type enumerated CmRegState { + other (1), + notReady, + notSynchronized, + phySynchronized, + usParametersAcquired, + rangingComplete, + dhcpV4Complete, + todEstablished, + securityEstablished, + configFileDownloadComplete, + registrationComplete, + operational, + accessDenied, + eaeInProgress, + dhcpv4InProgress, + dhcpv6InProgress, + dhcpV6Complete, + registrationInProgress, + bpiInit, + forwardingDisabled, + dsTopologyResolutionInProgress, + rangingInProgress, + rfMuteAll + } with { + variant "JSON: as number" + } + type set of CmRegState CmRegStateList; + + /** + * @desc It represents the DOCSIS Path Verify Statistics collected in the cable modem device + * @member ifIndex It represents the interface Index of the Downstream Interface where the measurements are taken + * @member lastMeasLatency The last latency measurement + * @member lastMeasTime The last measurement time of the last latency measurement + * @member minLatency The minimum latency measurement + * @member maxLatency The maximum latency measurement + * @member avgLatency The average latency measurement + * @member numMeas The number of latency measurements made + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.4-1: Attributes of the CableLineInfo + */ + type record CmDpvStats { + Json.String ifIndex, + Json.Integer lastMeasLatency, + TimeStamp lastMeasTime, + Json.Integer minLatency, + Json.Integer maxLatency, + Json.Integer avgLatency, + Json.Integer numMeas + } + + /** + * @desc It describes statistics associated with the Service Flows in a managed device + * @member ifIndex It represents the interface index of the MAC Domain of the Service Flow + * @member serviceFlowInfo It represents the information of a Service Flow + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.4-1: Attributes of the CableLineInfo + */ + type record ServiceFlowStats { + Json.String ifIndex, + ServiceFlowInfoList serviceFlowInfo + } + + /** + * @desc It represents the information of a Service Flow + * @member serviceFlowId It represents an identifier assigned to a Service Flow by CMTS within a MAC Domain + * @member pkts For outgoing Service Flows, this attribute counts the number of Packet Data PDUs forwarded to this Service Flow + * For incoming upstream CMTS service flows, this attribute counts the number of Packet Data PDUs actually received on the Service Flow identified by the SID for which the packet was scheduled + * @member timeCreated It indicates the time when the service flow was created + * @member timeActive It indicates the number of seconds that the service flow has been active + * @member policedDropPkts For upstream service flows, this attribute counts the number of Packet Data PDUs classified to this service flow dropped + * @member policedDelayPkts It counts only outgoing packets delayed in order to maintain the Maximum Sustained Traffic Rate + * @member aqmDroppedPkts this attribute counts the number of Packet Data PDUs classified to this service flow dropped due to Active Queue Management drop decisions + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.4-1: Attributes of the CableLineInfo + */ + type record ServiceFlowInfoList { + Json.Integer serviceFlowId, + Json.Integer pkts, + TimeStamp timeCreated, + Json.Integer timeActive, + Json.Integer policedDropPkts, + Json.Integer policedDelayPkts, + Json.Integer aqmDroppedPkts + } + + /** + * @desc This type represents the information of the of an optical network (e.g., G-PON, XG-PON, NG-PON2, XGS-PON). + * @member timeStamp Time stamp. + * @member customerPremisesInfo The physical location of a customer site. + * @member ponSYS_ID The 20-bit identity of the optical system within a certain domain. + * @member onuId Information to identify an Optical Network Unit + * @member ponTech An informative field identifying the optical technology used + * @member operationalState It reports whether the ONU is currently capable of performing its function + * @member dsRate Downstream line rate + * @member usRate Upstream line rate + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.5-1: Attributes of the PonInfo + */ + type record PonInfo { + TimeStamp timeStamp optional, + CpInfo customerPremisesInfo, + Json.String ponSYS_ID, + Json.String onuId, + PonTech ponTech, + OperationalState operationalState, + DsRate dsRate, + UsRate usRate + } + + /** + * @desc An informative field identifying the optical technology used. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.5-1: Attributes of the PonInfo + */ + type enumerated PonTech { + GPON (1), + XGPON (2), + NGPON2 (3), + XGSPON (4) + } with { + variant "JSON: as number" + } + + /** + * @desc It reports whether the ONU is currently capable of performing its function. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.5-1: Attributes of the PonInfo + */ + type enumerated OperationalState { + enabled (1), + disabled (2) + } with { + variant "JSON: as number" + } + + /** + * @desc Upstream line rate + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.5-1: Attributes of the PonInfo + */ + type enumerated DsRate { + e_ds_one (1), // 1 = 2.48832 Gbit/s: G-PON [i.9] or NG-PON2 option 2 [i.8] + e_ds_two (2) // 9.95328 Gbit/s: XG-PON [i.10] or XGS-PON [i.11] or NG-PON2 option 1 [i.8] + } with { + variant "JSON: as number" + } + + /** + * @desc Upstream line rate + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.5-1: Attributes of the PonInfo + */ + type enumerated UsRate { + e_us_one (1), // 1 = 1.24416 Gbit/s: G-PON option 1 [i.9] + e_us_two (2), // 2 = 2.48832 Gbit/s: G-PON option 2 [i.9] or XG-PON [i.10] or NG-PON2 option 2 [i.8] + e_us_three (3) // 9.95328 Gbit/s: XGS-PON [i.11] + } with { + variant "JSON: as number" + } + + /** + * @desc This type represents a subscription to ONU alarm notifications from FAIS + * @member subscriptionType Shall be set to "OnuAlarmSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaOnuAlarm List of filtering criteria for the subscription + * @member expiryDeadline Identifies a boundary after which the subscription will expire + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.2-1: Attributes of the OnuAlarmSubscription + */ + type record OnuAlarmSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteriaOnuAlarm filterCriteriaOnuAlarm, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests. + * @member self_ Self referring URI. The URI shall be unique within the FAI API as it acts as an ID for the subscription. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.2-1: Attributes of the OnuAlarmSubscription + */ + type record Links { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response + * @member customerPremisesInfo Physical locations of the customer sites + * @member onuId Unique identifiers for the optical network units. + * @member alarms In case alarms is not included in the subscription request, the default value -1 = All shall be used and included in the response. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.2-1: Attributes of the OnuAlarmSubscription + */ + type record FilterCriteriaOnuAlarm { + CpInfo customerPremisesInfo optional, + OnuIds onuId, + AlarmList alarms optional + } + type set of Json.String OnuIds; + + /** + * @desc In case alarms is not included in the subscription request, the default value -1 = All shall be used and included in the response + */ + type enumerated Alarm { + EquipmentAlarm (1), // (Functional failure on an internal interface) + PoweringAlarm, // (Loss of external power to battery backup unit. This alarm is typically derived through an external interface to a battery backup unit, and indicates that AC is no longer available to maintain battery charge.) + BatteryMissing, // (Battery is provisioned but missing) + BatteryFailure, // (Battery is provisioned and present but cannot recharge) + BatteryLow, // (Battery is provisioned and present but its voltage is too low) + PhysicalIntrusion, // (Applies if the ONU supports detection such as door or box open) + OnuSelfTestFailure, // (ONU has failed autonomous self-test) + DyingGasp, // ()ONU is powering off imminently due to loss of power to the ONU itself.) + TemperatureYellow, // (No service shutdown at present, but the circuit pack is operating beyond its recommended range.) + TemperatureRed, // ()Some services have been shut down to avoid equipment damage.) + VoltageYellow, // (No service shutdown at present, but the line power voltage is below its recommended minimum.) + VoltageRed, // (Some services have been shut down to avoid power collapse.) + OnuManualPowerOff, // (The ONU is shutting down because the subscriber has turned off its power switch.) + InvImage, // (Software image is invalid) + PseOverloadYellow, // (Indicates that the ONU is nearing its maximum ability to supply the known PoE demand of the attached PDs. The thresholds for declaring and clearing this alarm are vendor-specific.) + PseOverloadRed, // (Indicates that the ONU is unable to supply all of the PoE demand of the attached PDs and has removed or reduced power to at least one PD.) + All + } with { + variant "JSON: as number" + } + type set of Alarm AlarmList; + + /** + * @desc This type represents a subscription to device information notifications from FAIS + * @member subscriptionType Shall be set to "DevInfoSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaDevInfo List of filtering criteria for the subscription + * @member expiryDeadline Identifies a boundary after which the subscription will expire + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.3-1: Attributes of the DevInfoSubscription + */ + type record DevInfoSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteriaDevInfo filterCriteriaDevInfo, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc List of filtering criteria for the subscription + * @member gwId The identifier of an Internet Gateway Device through which the customer premises device is connected + * @member deviceId The device identifier + * @member deviceErrStatus The abnormal operational status of the device + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.3-1: Attributes of the DevInfoSubscription + */ + type record FilterCriteriaDevInfo { + GatewayIdList gwId optional, + DeviceIdList deviceId optional, + DeviceErrStatus deviceErrStatus optional + } + + /** + * @desc Information (typically the serial number) to identify an Internet Gateway Device through which the customer premises device is connected. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.3-1: Attributes of the DevInfoSubscription + */ + type set of Json.String GatewayIdList; + + /** + * @desc Typically, the serial number of the device. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.3-1: Attributes of the DevInfoSubscription + */ + type set of Json.String DeviceIdList; + + /** + * @desc Current operational status of the device. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.3-1: Attributes of the DeviceInfo + */ + type enumerated DeviceErrStatus_ { + Error (1), + Disabled (2) + } with { + variant "JSON: as number" + } + type set of DeviceErrStatus_ DeviceErrStatus; + + /** + * @desc This type represents a subscription to cable modem connectivity state notifications from FAIS + * @member subscriptionType Shall be set to "CmConnSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaCmConn List of filtering criteria for the subscription + * @member expiryDeadline Identifies a boundary after which the subscription will expire + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.4-1: Attributes of the CmConnSubscription + */ + type record CmConnSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteriaCmConn filterCriteriaCmConn, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc List of filtering criteria for the subscription + * @member customerPremisesInfo The physical location of a customer site + * @member cmIf + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.4-1: Attributes of the CmConnSubscription + */ + type record FilterCriteriaCmConn { + CpInfo customerPremisesInfo optional, + CmIf cmIf optional + } + + /** + * @desc + * @member customerPremisesInfo The physical location of a customer site + * @member cmId The identifier of a Cable Modem at subscriber locations intended for use in conveying data communications on a cable data system + * @member ifIndex The MAC Domain interface index of the CM + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.4-1: Attributes of the CmConnSubscription + */ + type record CmIf { + Json.String cmId, + IfIndexList ifIndex, + CmRegStateList cmRegState + } + + /** + * @desc This type represents a list of links related to currently existing subscriptions for the service consumer + * @member links Hyperlink related to the resource + * @member subscription The service consumer's subscriptions + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.5-1: Attributes of the SubscriptionLinkList + */ + type record SubscriptionLinkList { + SubscriptionLinks links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Hyperlink related to the resource + * @member self_ URI of this resource. + * @member subscription The service consumer's subscriptions + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.5-1: Attributes of the SubscriptionLinkList + */ + type record SubscriptionLinks { + LinkType self_, + SubscriptionList subscription optional + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc A link to a subscription + * @member href The URI referring to the subscription. + * @member subscriptionType Type of subscription + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.5-1: Attributes of the SubscriptionLinkList + */ + type record Subscription_ { + Json.AnyURI href, + SubscriptionType subscriptionType + } + type set of Subscription_ SubscriptionList; + + /** + * @desc Type of subscription + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.5-1: Attributes of the SubscriptionLinkList + */ + type enumerated SubscriptionType { + OnuAlarmSubscription, + DevInfoSubscription, + CmConnSubscription, + AniAlarmSubscription + } + + /** + * @desc This type represents a subscription to cable modem connectivity state notifications from FAIS + * @member subscriptionType Shall be set to "AniAlarmSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaAniAlarm List of filtering criteria for the subscription + * @member expiryDeadline Identifies a boundary after which the subscription will expire + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.6-1: Attributes of the AniAlarmSubscription + */ + type record AniAlarmSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteriaAniAlarm filterCriteriaAniAlarm, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc List of filtering criteria for the subscription + * @member customerPremisesInfo 0 to N physical locations of the customer sites + * @member onuId 1 to N unique identifiers for the optical network units + * @member aniId + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.6-1: Attributes of the AniAlarmSubscription + */ + type record FilterCriteriaAniAlarm { + CpInfo customerPremisesInfo optional, + OnuIds onuId, + AniId aniId + } + + /** + * @desc + * @member onuId The unique identifiers for the optical network unit + * @member aniId The index of an access network interface supported by the optical network unit + * @member alarms + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.6-1: Attributes of the AniAlarmSubscription + */ + type record AniId_ { + OnuIds onuId, + Json.String aniIndex, + AlarmList alarms optional + } + type set of AniId_ AniId + + /** + * @desc This type represents a notification from FAIS with regards to ONU alarms + * @member notificationType Shall be set to "OnuAlarmNotification" + * @member timeStamp Date and time of the generation of the notification + * @member customerPremisesInfo The physical location of the related customer sites\ + * @member onuId The unique identifier for an optical network unit + * @member alarm Indicates the alarm of the ONU + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.2-1: Attributes of the OnuAlarmNotification + */ + type record OnuAlarmNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + CpInfo customerPremisesInfo optional, + Json.String onuId, + Alarm alarm + } + + /** + * @desc This type represents a notification from FAIS with regards to ONU alarms + * @member notificationType Shall be set to "DevInfoNotification" + * @member timeStamp Date and time of the generation of the notification + * @member deviceId The identifier for a device + * @member deviceErrStatus Indicates the abnormal operational status of the device + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.3-1: Attributes of the DevInfoNotification + */ + type record DevInfoNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Json.String deviceId, + DeviceErrStatus_ deviceErrStatus + } + + /** + * @desc This type represents a notification from FAIS with regards to ONU alarms + * @member notificationType Shall be set to "CmConnNotification" + * @member timeStamp Date and time of the generation of the notification + * @member customerPremisesInfo The physical location of a customer site + * @member cmIf + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.4-1: Attributes of the CmConnNotification + */ + type record CmConnNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + CpInfo customerPremisesInfo optional, + CmIf cmIf + } + + /** + * @desc This type represents a notification from FAIS with regards to expiry of the existing subscription + * @member timeStamp Date and time of the generation of the notification + * @member links List of hyperlinks related to the resource + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.5-1: Attributes of the ExpiryNotification + */ + type record ExpiryNotification { + TimeStamp timeStamp optional, + Links links, + TimeStamp expiryDeadline + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a notification from FAIS with regards to ONU alarms + * @member notificationType Shall be set to "AniAlarmNotification" + * @member timeStamp Date and time of the generation of the notification + * @member customerPremisesInfo The physical location of a customer site + * @member onuId The unique identifier for an optical network unit + * @member aniId + * @member alarm Indicates the alarm of the ANI + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.6-1: Attributes of the AniAlarmNotification + */ + type record AniAlarmNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + CpInfo customerPremisesInfo optional, + OnuIds onuId optional, + AniId aniId optional, + Alarm alarm + } + + /** + * @desc This type represents a test notification from a FAIS to determine if the Websocket method is to be utilized to issue notifications for a subscription + * @member notificationType Shall be set to "OnuAlarmNoTestNotificationtification" + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.7-1: Attributes of the TestNotification + */ + type record TestNotification { + Json.String notificationType, + Links_TestNotification links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Hyperlink related to the resource + * @member subscription URI identifying the subscription for the test notification + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.7-1: Attributes of the TestNotification + */ + type record Links_TestNotification { + LinkType subscription + } + + /** + * @desc This type represents a customer premises (physical location) + * @member latitude Latitude (DATUM=WGS84) + * @member longitude Longitude (DATUM=WGS84) + * @member postalCode Postal code for the location + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.3-1: Attributes of the CpInfo + */ + type record CpInfo_{ + Json.Number latitude optional, + Json.Number longitude optional, + Json.String postalCode optional + } + type set of CpInfo_ CpInfo; + + /** + * @desc This type represents an IP-layer ping test + * @member diagnosticsState The state of the IP ping test + * @member host Host name or address of the host to ping + * @member numberOfRepetitions Number of repetitions of the ping test to perform before reporting the results + * @member timeout_ Timeout in milliseconds for the ping test + * @member dataBlockSize Size of the data block in bytes to be sent for each ping + * @member successCount Result parameter indicating the number of successful pings (those in which a successful response was received prior to the timeout) in the most recent ping test + * @member failureCount Result parameter indicating the number of failed pings in the most recent ping test + * @member averageResponseTime Result parameter indicating the average response time in milliseconds over all repetitions with successful responses of the most recent ping test + * @member minimumResponseTime Result parameter indicating the minimum response time in milliseconds over all repetitions with successful responses of the most recent ping test + * @member maximumResponseTime Result parameter indicating the maximum response time in milliseconds over all repetitions with successful responses of the most recent ping test + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.4-1: Attributes of the IPPingDiagnostics + */ + type record IPPingDiagnostics { + DiagnosticsState diagnosticsState, + Json.String host optional, + Json.Number numberOfRepetitions optional, + Json.Number timeout_ optional, + Json.Number dataBlockSize optional, + Json.Number successCount optional, + Json.Number failureCount optional, + Json.Number averageResponseTime optional, + Json.Number minimumResponseTime optional, + Json.Number maximumResponseTime optional + } + + /** + * @desc The state of the IP ping test + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.4-1: Attributes of the IPPingDiagnostics + */ + type enumerated DiagnosticsState { + None (1), + Requested (2), + Complete (3), + Error_CannotResolveHostName (4), + Error_Internal (5), + Error_Other (6) + } with { + variant "JSON: as number" + } + + /** + * @desc This type represents an IP-layer trace-route test + * @member diagnosticsState The state of the IP ping test + * @member host Host name or address of the host to find a route to + * @member timeout_ Timeout in milliseconds for the trace route test + * @member dataBlockSize Size of the data block in bytes to be sent for each trace route + * @member maxHopCount The maximum number of hop used in outgoing probe packets. The default is 30 hops + * @member responseTime Result parameter indicating the response time in milliseconds the most recent trace route test + * @member numberOfRouteHops Result parameter indicating the number of hops within the discovered route + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.5-1: Attributes of the TraceRouteDiagnostics + */ + type record TraceRouteDiagnostics { + DiagnosticsState diagnosticsState, + Json.String host optional, + Json.Number timeout_ optional, + Json.Number dataBlockSize optional, + Json.Number maxHopCount optional, + Json.Number responseTime optional, + Json.Number numberOfRouteHops optional + } + + /** + * @desc This type represents a HTTP and FTP DownloadDiagnostics test + * @member diagnosticsState The state of the HTTP and FTP download test + * @member downloadURI The URI for the device to perform the download on + * @member rOMTime Request time in UTC, which shall be specified to microsecond precision + * @member bOMTime Begin of transmission time in UTC, which shall be specified to microsecond precision + * @member eOMTime End of transmission in UTC, which shall be specified to microsecond precision + * @member testBytesReceived The test traffic received in bytes during the FTP/HTTP transaction including FTP/HTTP headers,`between bOMTime and eOMTime + * @member totalBytesReceived The total number of bytes received on the Interface between bOMTime and eOMTime + * @member tCPOpenRequestTime Request time in UTC, which shall be specified to microsecond precision + * @member tCPOpenReponseTime Response time in UTC, which shall be specified to microsecond precision + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.6-1: Attributes of the DownloadDiagnostics + */ + type record DownloadDiagnostics { + DiagnosticsState diagnosticsState, + Json.AnyURI downloadURI optional, + TimeStamp rOMTime optional, + TimeStamp bOMTime optional, + TimeStamp eOMTime optional, + Json.Number testBytesReceived optional, + Json.Number totalBytesReceived optional, + TimeStamp tCPOpenRequestTime optional, + TimeStamp tCPOpenReponseTime optional + } + + /** + * @desc This type represents a HTTP and FTP UploadDiagnostics test + * @member diagnosticsState The state of the HTTP and FTP download test + * @member uploadURI The URI for the device to perform the upload to + * @member testFileLength The size of the file (in bytes) to be uploaded to the server + * @member rOMTime Request time in UTC, which shall be specified to microsecond precision + * @member bOMTime Begin of transmission time in UTC, which shall be specified to microsecond precision + * @member eOMTime End of transmission in UTC, which shall be specified to microsecond precision + * @member testBytesSent The test traffic sent in bytes during the FTP/HTTP transaction including FTP/HTTP headers, between bOMTime and eOMTime + * @member tCPOpenRequestTime Request time in UTC, which shall be specified to microsecond precision + * @member tCPOpenReponseTime Response time in UTC, which shall be specified to microsecond precision + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.7-1: Attributes of the UploadDiagnostics + */ + type record UploadDiagnostics { + DiagnosticsState diagnosticsState, + Json.AnyURI uploadURI optional, + Json.Number testFileLength optional, + TimeStamp rOMTime optional, + TimeStamp bOMTime optional, + TimeStamp eOMTime optional, + Json.Number testBytesSent optional, + TimeStamp tCPOpenRequestTime optional, + TimeStamp tCPOpenReponseTime optional + } + + /** + * @desc This type represents a type of link and may be referenced from data structures + * @member href URI referring to a resource + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.8-1: Attributes of the LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc This type represents configuration for the delivery of subscription notifications over Websockets + * @member websocketUri Set by location server to indicate to the service consumer the Websocket URI to be used for delivering notifications + * @member requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.9-1: Attributes of the WebsockNotifConfig + */ + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional + } + + } with { + encode "JSON" +} // End of module FixedAccessInformationServiceAPI_TypesAndValues diff --git a/ttcn/LibMec/IoTAPI/module.mk b/ttcn/LibMec/IoTAPI/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..150ca462a85824db4939513dce19e7ad94e05e9e --- /dev/null +++ b/ttcn/LibMec/IoTAPI/module.mk @@ -0,0 +1,6 @@ +sources := \ + ttcn/IoTAPI_Pics.ttcn \ + ttcn/IoTAPI_Pixits.ttcn \ + ttcn/IoTAPI_Templates.ttcn \ + ttcn/IoTAPI_Functions.ttcn \ + ttcn/IoTAPI_TypesAndValues.ttcn diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b338fce62ee5e09a3fff9bf683f62cb36063ddc0 --- /dev/null +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn @@ -0,0 +1,235 @@ +module IoTAPI_Functions { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + import from LibCommon_Time all; + import from LibCommon_VerdictControl all; + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_Templates all; + + // LibMec/IoTAPI + import from IoTAPI_TypesAndValues all; + import from IoTAPI_Templates all; + import from IoTAPI_Pixits all; + + // LibMec + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + function f_create_device_info( + out DeviceInfo p_device_info + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_IOT_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_iot_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + false, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_iot_device_info( + mw_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + false, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + )))))) -> value v_response { + tc_ac.stop; + + p_device_info := v_response.response.body.json_body.deviceInfo_iot; + log("f_create_device_info: INFO: IUT successfully responds to the subscription: ", p_device_info); + } + [] tc_ac.timeout { + log("f_create_device_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_device_info + + function f_delete_device_info( + in DeviceInfo p_device_info + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(p_device_info.deviceId, "UTF-8")), + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_device_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_device_info + + function f_create_device_info_list( + out DeviceInfoList p_device_info_list + ) runs on HttpComponent { + for (var integer i := 0; i < lengthof(p_device_info_list); i := i + 1) { + f_create_device_info(p_device_info_list[i]); + } + } // End of function f_create_device_info_list + + function f_delete_device_info_list( + in DeviceInfoList p_device_info_list + ) runs on HttpComponent { + for (var integer i := 0; i < lengthof(p_device_info_list); i := i + 1) { + if (p_device_info_list[i].deviceId != "") { + f_delete_device_info(p_device_info_list[i]); + } + } + } // End of function f_delete_device_info_list + + function f_create_iot_platform_info( + out IotPlatformInfo p_iot_platform_info + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB, + v_headers, + m_http_message_body_json( + m_body_json_iot_iot_platform_info( + m_iot_platform_info( + PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_iot_iot_platform_info( + mw_iot_platform_info( + PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )))))) -> value v_response { + tc_ac.stop; + + p_iot_platform_info := v_response.response.body.json_body.iotPlatformInfo; + log("f_create_iot_platform_info: INFO: IUT successfully responds to the subscription: ", p_iot_platform_info); + } + [] tc_ac.timeout { + log("f_create_iot_platform_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_iot_platform_info + + function f_delete_iot_platform_info( + in IotPlatformInfo p_iot_platform_info + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(p_iot_platform_info.iotPlatformId, "UTF-8")), + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_iot_platform_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_iot_platform_info + + function f_create_iot_platform_info_list( + out IotPlatformInfoList p_iot_platform_info_list + ) runs on HttpComponent { + for (var integer i := 0; i < lengthof(p_iot_platform_info_list); i := i + 1) { + f_create_iot_platform_info(p_iot_platform_info_list[i]); + } + } // End of function f_create_iot_platform_info_list + + function f_delete_iot_platform_info_list( + in IotPlatformInfoList p_iot_platform_info_list + ) runs on HttpComponent { + for (var integer i := 0; i < lengthof(p_iot_platform_info_list); i := i + 1) { + if (p_iot_platform_info_list[i].iotPlatformId != "") { + f_delete_iot_platform_info(p_iot_platform_info_list[i]); + } + } + } // End of function f_delete_iot_platform_info_list + +} // End of modue IoTAPI_Functions \ No newline at end of file diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pics.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pics.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..52985e139833e394fc076b041564cc46cb3682ee --- /dev/null +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pics.ttcn @@ -0,0 +1,8 @@ +module IoTAPI_Pics { + + /** + * @desc Does the IUT support MEC IoT API? + */ + modulepar boolean PICS_IOT_API_SUPPORTED := true; + +} // End of IoTAPI_Pics diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1d9f8ed4046ec0180cb5d2ef3845703341097656 --- /dev/null +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn @@ -0,0 +1,87 @@ +module IoTAPI_Pixits { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + + modulepar Json.String PX_IOT_DEVICE_ID_1 := ""; + + modulepar Json.String PX_IOT_DEVICE_SUPI_1 := ""; + + modulepar Json.String PX_IOT_DEVICE_IMSI_1 := ""; + + modulepar Json.String PX_IOT_DEVICE_AUTH_1 := ""; + + modulepar Json.String PX_IOT_DEVICE_ID_2 := ""; + + modulepar Json.String PX_IOT_DEVICE_SUPI_2 := ""; + + modulepar Json.String PX_IOT_DEVICE_IMSI_2 := ""; + + modulepar Json.String PX_IOT_DEVICE_AUTH_2 := ""; + + modulepar Json.String PX_IOT_DEVICE_ID_3 := ""; + + modulepar Json.String PX_IOT_DEVICE_SUPI_3 := ""; + + modulepar Json.String PX_IOT_DEVICE_IMSI_3 := ""; + + modulepar Json.String PX_IOT_DEVICE_AUTH_3 := ""; + + modulepar Json.String PX_IOT_DEVICE_ID_UNKNOWN := ""; + + modulepar Json.String PX_IOT_ENDPOINT_URI_1 := ""; + + modulepar Json.String PX_IOT_ENDPOINT_URI_2 := ""; + + modulepar Json.String PX_IOT_ENDPOINT_URI_3 := ""; + + modulepar Json.String PX_REQUESTED_PLTF_ID := ""; + + modulepar Json.String PX_IOT_PLTF_ID_1 := ""; + + modulepar Json.String PX_IOT_PLTF_ID_2 := ""; + + modulepar Json.String PX_IOT_PLTF_ID_3 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_ID_1 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_NAME_1 := ""; + + modulepar EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType PX_MB_TRANSPORTINFO_TYPE_1 + := REST_HTTP; + + modulepar Json.String PX_MB_TRANSPORTINFO_PROTOCOL_1 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_VERSION_1 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_ID_2 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_NAME_2 := ""; + + modulepar EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType PX_MB_TRANSPORTINFO_TYPE_2 + := REST_HTTP; + + modulepar Json.String PX_MB_TRANSPORTINFO_PROTOCOL_2 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_VERSION_2 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_ID_3 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_NAME_3 := ""; + + modulepar EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType PX_MB_TRANSPORTINFO_TYPE_3 + := REST_HTTP; + + modulepar Json.String PX_MB_TRANSPORTINFO_PROTOCOL_3 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_VERSION_3 := ""; + + modulepar Json.String PX_IOT_PLTF_ID_UNKNOWN := ""; + +} // End of module IoTAPI_Pixits \ No newline at end of file diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..12199bd8eec3167c4fea7dbbf299a4a4d85f10fd --- /dev/null +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn @@ -0,0 +1,192 @@ +module IoTAPI_Templates { + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; + + // LibMec/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + + // LibMec/IoTAPI + import from IoTAPI_TypesAndValues all; + + template (omit) DeviceInfo m_device_info( + in Json.String p_deviceId, + in Json.String p_deviceAuthenticationInfo, + in Json.Bool p_enabled := false, + in template (omit) Json.String p_supi := omit, + in template (omit) Json.String p_imsi := omit, + in template (omit) Json.String p_requestedIotPlatformId := omit, + in template (omit) TrafficRuleDescriptors p_requestedMecTrafficRule := omit, + in template (omit) DeviceMetatData p_deviceMetadata := omit, + in template (omit) Json.String p_gpsi := omit, + in template (omit) Json.String p_pei := omit, + in template (omit) Json.String p_msisdn := omit, + in template (omit) Json.String p_imei := omit, + in template (omit) Json.String p_iccid := omit, + in template (omit) DeviceSpecificMessageFormats p_deviceSpecificMessageFormats := omit, + in template (omit) DownlinkInfo p_downlinkInfo := omit, + in template (omit) Json.String p_clientCertificate := omit + + ) := { + deviceAuthenticationInfo := p_deviceAuthenticationInfo, + deviceMetadata := p_deviceMetadata, + gpsi := p_gpsi, + pei := p_pei, + supi := p_supi, + msisdn := p_msisdn, + imei := p_imei, + imsi := p_imsi, + iccid := p_iccid, + deviceId := p_deviceId, + requestedMecTrafficRule := p_requestedMecTrafficRule, + requestedIotPlatformId := p_requestedIotPlatformId, + deviceSpecificMessageFormats := p_deviceSpecificMessageFormats, + downlinkInfo := p_downlinkInfo, + clientCertificate := p_clientCertificate, + enabled := p_enabled + } // End of template m_device_info + + template (present) DeviceInfo mw_device_info( + template (present) Json.String p_deviceId := ?, + template (present) Json.String p_deviceAuthenticationInfo := ?, + template (present) Json.Bool p_enabled := ?, + template Json.String p_supi := *, + template Json.String p_imsi := *, + template Json.String p_requestedIotPlatformId := *, + template TrafficRuleDescriptors p_requestedMecTrafficRule := *, + template DeviceMetatData p_deviceMetadata := *, + template Json.String p_gpsi := *, + template Json.String p_pei := *, + template Json.String p_msisdn := *, + template Json.String p_imei := *, + template Json.String p_iccid := *, + template DeviceSpecificMessageFormats p_deviceSpecificMessageFormats := *, + template DownlinkInfo p_downlinkInfo := *, + template Json.String p_clientCertificate := * + ) := { + deviceAuthenticationInfo := p_deviceAuthenticationInfo, + deviceMetadata := p_deviceMetadata, + gpsi := p_gpsi, + pei := p_pei, + supi := p_supi, + msisdn := p_msisdn, + imei := p_imei, + imsi := p_imsi, + iccid := p_iccid, + deviceId := p_deviceId, + requestedMecTrafficRule := p_requestedMecTrafficRule, + requestedIotPlatformId := p_requestedIotPlatformId, + deviceSpecificMessageFormats := p_deviceSpecificMessageFormats, + downlinkInfo := p_downlinkInfo, + clientCertificate := p_clientCertificate, + enabled := p_enabled + } // End of template mw_device_info + + template (omit) IotPlatformInfo m_iot_platform_info( + in Json.String p_iotPlatformId, + in template (value) MBTransportInfoList p_userTransportInfo, + in Json.Bool p_enabled := false, + in template (omit) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList p_customServicesTransportInfo := omit + + ) := { + iotPlatformId := p_iotPlatformId, + userTransportInfo := p_userTransportInfo, + customServicesTransportInfo := p_customServicesTransportInfo, + enabled := p_enabled + } // End of template m_iot_platform_info + + template (omit) IotPlatformInfo m_iot_platform_info_error( + in Json.String p_iotPlatformId, + in Json.Bool p_enabled := false, + in template (omit) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList p_customServicesTransportInfo := omit + + ) := { + iotPlatformId := p_iotPlatformId, + userTransportInfo := omit, + customServicesTransportInfo := p_customServicesTransportInfo, + enabled := p_enabled + } // End of template m_iot_platform_info_error + + template (present) IotPlatformInfo mw_iot_platform_info( + template (present) Json.String p_iotPlatformId := ?, + template (present) MBTransportInfoList p_userTransportInfo := ?, + template (present) Json.Bool p_enabled := ?, + template EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList p_customServicesTransportInfo := * + + ) := { + iotPlatformId := p_iotPlatformId, + userTransportInfo := p_userTransportInfo, + customServicesTransportInfo := p_customServicesTransportInfo, + enabled := p_enabled + } // End of template mw_iot_platform_info + + template (omit) MBTransportInfo m_mb_transport_info( + in Json.String p_id, + in Json.String p_name, + in EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType p_type, + in Json.String p_protocol, + in Json.String p_version, + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo p_endpoint, + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo p_security, + in template (value) ImplSpecificInfo p_implSpecificInfo, + in template (omit) Json.String p_description := omit + ) := { + id := p_id, + name := p_name, + description := p_description, + type_ := p_type, + protocol := p_protocol, + version := p_version, + endpoint := p_endpoint, + security := p_security, + implSpecificInfo := p_implSpecificInfo + } // End of template m_mb_transport_info + + template (present) MBTransportInfo mw_mb_transport_info( + template (present) Json.String p_id := ?, + template (present) Json.String p_name := ?, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType p_type := ?, + template (present) Json.String p_protocol := ?, + template (present) Json.String p_version := ?, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo p_endpoint := ?, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo p_security := ?, + template (present) ImplSpecificInfo p_implSpecificInfo := ?, + template Json.String p_description := * + ) := { + id := p_id, + name := p_name, + description := p_description, + type_ := p_type, + protocol := p_protocol, + version := p_version, + endpoint := p_endpoint, + security := p_security, + implSpecificInfo := p_implSpecificInfo + } // End of template mw_mb_transport_info + + template (omit) ImplSpecificInfo m_impl_specific_info( + in template (omit) EventTopics p_eventTopics := omit, + in template (omit) UplinkTopics p_uplinkTopics := omit, + in template (omit) DownlinkTopics p_downlinkTopics := omit + ) := { + eventTopics := p_eventTopics, + uplinkTopics := p_uplinkTopics, + downlinkTopics := p_downlinkTopics + } // End of template m_impl_specific_info + + template ImplSpecificInfo mw_impl_specific_info( + template EventTopics p_eventTopics := *, + template UplinkTopics p_uplinkTopics := *, + template DownlinkTopics p_downlinkTopics := * + ) := { + eventTopics := p_eventTopics, + uplinkTopics := p_uplinkTopics, + downlinkTopics := p_downlinkTopics + } // End of template mw_impl_specific_info + +} // End of IoTAPI_Templates diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..20969c40a6718a96c94310a50faa0906343236e9 --- /dev/null +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn @@ -0,0 +1,192 @@ +/** + * @desc The ETSI MEC ISG MEC033 Radio Network Information API described using OpenAPI + * @see https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf + */ +module IoTAPI_TypesAndValues { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; + + // LibMec/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + + /** + * @desc Information associated to an IoT device + * @member deviceAuthenticationInfo Information needed for secondary authentication of the IoT device to the data network + * @member deviceMetadata Additional information about the IoT device + * @member gpsi GPSI of the IoT device if 5G-enabled + * @member pei PEI of the IoT device if 5G-enabled + * @member supi SUPI of the IoT device if 5G-enabled + * @member msisdn MSISDN of the IoT device if LTE-enabled + * @member imei IMEI of the IoT device if LTE-enabled + * @member imsi IMSI of the IoT device if LTE-enabled + * @member iccid ICCID of the IoT device + * @member deviceId Human-readable identifier of the IoT device + * @member requestedMecTrafficRule MEC traffic rules the IoT device is requested to be associated to + * @member requestedIotPlatformId IoT platform to which the IoT device is requested to be associated to + * @member deviceSpecificMessageFormats Format of the messages to be published by the MEC IoTS on the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device + * @member downlinkInfo Downlink communication configuration of the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device + * @member clientCertificate Client-side SSL/TLS certificate to be used by the MEC IoTS to interact with the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device + * @member enabled Indication whether the IoT device has a valid associated traffic rule (TRUE) or not (FALSE) + * @see ETSI GS MEC 033 V3.1.1 (2022-12) Table 6.2.2-1: Definition of type DeviceInfo + */ + type record DeviceInfo { + Json.String deviceAuthenticationInfo, + DeviceMetatData deviceMetadata optional, + Json.String gpsi optional, + Json.String pei optional, + Json.String supi optional, + Json.String msisdn optional, + Json.String imei optional, + Json.String imsi optional, + Json.String iccid optional, + Json.String deviceId, + TrafficRuleDescriptors requestedMecTrafficRule optional, + Json.String requestedIotPlatformId optional, + DeviceSpecificMessageFormats deviceSpecificMessageFormats optional, + DownlinkInfo downlinkInfo optional, + Json.String clientCertificate optional, + Json.Bool enabled + } // End of type DeviceInfo + + type set of DeviceInfo DeviceInfoList; + + type set of Json.String DeviceMetatData; + + /** + * @desc + * @member eventMsgFormat Event message format configuration + * @member uplinkMsgFormat Uplink message format configuration + */ + type record DeviceSpecificMessageFormats { + EventMsg eventMsgFormat optional, + UplinkMsg uplinkMsgFormat optional + } // End of type DeviceSpecificMessageFormats + + /** + * @desc Downlink communication configuration of the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device + * @member downlinkTopic Topic associated to the IoT device + * @member devicePort UDP port to be used by the MEC IoTS for the outgoing downlink packets towards the IoT device + */ + type record DownlinkInfo { + Json.String downlinkTopic optional, + Json.Number devicePort optional + } // End of type DownlinkInfo + + /** + * @desc Information associated to a IoT platform + * @member iotPlatformId Identifier of the IoT platform + * @member userTransportInfoInformation about the user transport(s) provided by the IoT platform + * @member customServicesTransportInfo Transport enabling access to vendor-specific services provided by the IoT platform. The data + * @member enabled Indication whether the IoT platform is capable of providing user transports and vendor-specific services (TRUE) or not (FALSE) + * @see ETSI GS MEC 033 V3.1.1 (2022-12) Table 6.2.3-1: Definition of type IotPlatformInfo + */ + type record IotPlatformInfo { + Json.String iotPlatformId, + MBTransportInfoList userTransportInfo optional, // optional on;ly for the 400 Bad Request TP + TransportInfoList customServicesTransportInfo optional, + Json.Bool enabled + } // End of IotPlatformInfo + type set of IotPlatformInfo IotPlatformInfoList; + + /** + * @desc User transport based on a message bus + * @member id The identifier of this transport as per ETSI GS MEC 011 [i.2] + * @member name The name of this transport as per ETSI GS MEC 011 [i.2] + * @member description Human-readable description of this transport as per ETSI GS MEC 011 [i.2] + * @member type_ Type of the transport + * @member protocol The name of the protocol used + * @member version The version of the protocol used as per ETSI GS MEC 011 [i.2] + * @member endpoint Information about the endpoint to access the transport as per ETSI GS MEC 011 [i.2] + * @member security Information about the security used by the transport as per ETSI GS MEC 011 [i.2] + * @member implSpecificInfo Additional implementation specific details of the transport + * @see ETSI GS MEC 033 V3.1.1 (2022-12) Table 6.3.2-1: Definition of type MBTransportInfo + */ + type record MBTransportInfo { + Json.String id, + Json.String name, + Json.String description optional, + EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType type_, + Json.String protocol, + Json.String version , + EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo endpoint, + EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo security, + ImplSpecificInfo implSpecificInfo + } // End of type MBTransportInfo + type set of MBTransportInfo MBTransportInfoList; + + /** + * @desc + * @member eventTopics Topics used to publish events related to the established session between the IoT device(s) and the end IoT application(s) on the user transport + * @member uplinkTopics Topics used to publish data generated by the IoT device(s) on the user transport, in order to be consumed by the end IoT application(s) + * @member downlinkTopics Topics used to publish data generated by the IoT applications(s) on the user transport, in order to be consumed by the end IoT device(s) + * @see ETSI GS MEC 033 V3.1.1 (2022-12) Table 6.3.2-1: Definition of type MBTransportInfo + */ + type record ImplSpecificInfo { + EventTopics eventTopics optional, + UplinkTopics uplinkTopics optional, + DownlinkTopics downlinkTopics optional + } // End of type ImplSpecificInfo + type set of Json.String EventTopics; + type set of Json.String UplinkTopics; + type set of Json.String DownlinkTopics; + + type set of EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfo TransportInfoList; + + /** + * @desc Defines the format of the messages to be published on the user transport in order to provide application-specific information about events related to the established session between the IoT device and the end IoT application(s) + * @member eventTopic Topic where the message containing application-specific information should be published + * @member selectedSerializer Type of serializer to be used for the topic as per ETSI GS MEC 011 [i.2] + * @member includeDeviceAddr Indication whether to include the IP address of the IoT device (TRUE) or not (FALSE) + * @member includeDeviceMetadata Indication whether to include the metadata about the IoT device (TRUE) or not (FALSE) + * @member includeSupi Indication whether to include the SUPI of the IoT device (TRUE) or not (FALSE) + * @member includeImsi Indication whether to include the IMSI of the IoT device (TRUE) or not (FALSE) + * @member inclueIccid Indication whether to include the ICCID of the IoT device (TRUE) or not (FALSE) + * @member includeDeviceId Indication whether to include the humanreadable identified of the IoT device (TRUE) or not (FALSE) + * @member + * @see ETSI GS MEC 033 V3.1.1 (2022-12) Table 6.3.3-1: Definition of type EventMsg + */ + type record EventMsg { + Json.String eventTopic, + EdgePlatformApplicationEnablementAPI_TypesAndValues.SerializerType selectedSerializer, + Json.Bool includeDeviceAddr optional, + Json.Bool includeDeviceMetadata optional, + Json.Bool includeSupi optional, + Json.Bool includeImsi optional, + Json.Bool includeIccid optional, + Json.Bool includeDeviceId optional + } // End ot type EventMsg + + /** + * @desc Defines the format of the messages containing uplink data generated by the IoT device to be published on the user transport + * @member uplinkTopic Topic where the message containing the data generated by the IoT device(s) should be published, in order to be consumed by the end IoT application(s). + * @member selectedSerializer Type of serializer to be used for the topic as per ETSI GS MEC 011 [i.2] + * @member includeDeviceAddr Indication whether to include the IP address of the IoT device (TRUE) or not (FALSE) + * @member includeDeviceMetadata Indication whether to include the metadata about the IoT device (TRUE) or not (FALSE) + * @member includeSupi Indication whether to include the SUPI of the IoT device (TRUE) or not (FALSE) + * @member includeImsi Indication whether to include the IMSI of the IoT device (TRUE) or not (FALSE) + * @member inclueIccid Indication whether to include the ICCID of the IoT device (TRUE) or not (FALSE) + * @member includeDeviceId Indication whether to include the humanreadable identified of the IoT device (TRUE) or not (FALSE) + * @member + * @see ETSI GS MEC 033 V3.1.1 (2022-12) Table 6.3.4-1: Definition of type UplinkMsg + */ + type record UplinkMsg { + Json.String uplinkTopic, + EdgePlatformApplicationEnablementAPI_TypesAndValues.SerializerType selectedSerializer, + Json.Bool includeDeviceAddr optional, + Json.Bool includeDeviceMetadata optional, + Json.Bool includeSupi optional, + Json.Bool includeImsi optional, + Json.Bool includeIccid optional, + Json.Bool includeDeviceId optional + } // End ot type UplinkMsg + +} with { + encode "JSON" +} // End of module IoTAPI_TypesAndValues \ No newline at end of file diff --git a/ttcn/LibMec/LocationAPI/json/LocationAPI.json b/ttcn/LibMec/LocationAPI/json/LocationAPI.json deleted file mode 100644 index 5a483d722b686eddd9c37e1988743e07880145c5..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/LocationAPI/json/LocationAPI.json +++ /dev/null @@ -1,4344 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "contact": { - "url": "https://forge.etsi.org/rep/mec/gs013-location-api" - }, - "title": "ETSI GS MEC 013 - Location API", - "version": "2.1.1", - "description": "The ETSI MEC ISG MEC013 Location API described using OpenAPI.", - "license": { - "name": "BSD-3-Clause", - "url": "https://forge.etsi.org/legal-matters" - } - }, - "externalDocs": { - "description": "ETSI MEC013 V2.1.1 Location API", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/013/02.01.01_60/gs_mec013v020101p.pdf" - }, - "servers": [ - { - "url": "https://localhost/location/v2" - } - ], - "tags": [ - { - "name": "location" - } - ], - "paths": { - "/queries/distance": { - "get": { - "tags": [ - "location" - ], - "summary": "UE Distance Lookup of a specific UE", - "description": "UE Distance Lookup between terminals or a terminal and a location", - "operationId": "distanceGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.Requester" - }, - { - "$ref": "#/components/parameters/Query.AddressMandatory" - }, - { - "$ref": "#/components/parameters/Query.Latitude" - }, - { - "$ref": "#/components/parameters/Query.Longitude" - } - ], - "responses": { - "200": { - "description": "Successful response to a distance request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "terminalDistance": { - "$ref": "#/components/schemas/TerminalDistance" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "queries" - } - }, - "/queries/users": { - "get": { - "tags": [ - "location" - ], - "summary": "UE Location Lookup of a specific UE or group of UEs", - "description": "UE Location Lookup of a specific UE or group of UEs", - "operationId": "usersGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.ZoneId" - }, - { - "$ref": "#/components/parameters/Query.AccessPointId" - }, - { - "$ref": "#/components/parameters/Query.Address" - } - ], - "responses": { - "200": { - "description": "Successful response to users request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userList": { - "$ref": "#/components/schemas/UserList" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "queries" - } - }, - "/queries/zones": { - "get": { - "tags": [ - "location" - ], - "summary": "Zones information Lookup", - "description": "Used to get a list of identifiers for zones authorized for use by the application.", - "operationId": "zonesGET", - "responses": { - "200": { - "description": "Successful response to zones request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneList": { - "$ref": "#/components/schemas/ZoneList" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "queries" - } - }, - "/queries/zones/{zoneId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Zones information Lookup", - "description": "Used to get the information for an authorized zone for use by the application.", - "operationId": "zonesGetById", - "parameters": [ - { - "$ref": "#/components/parameters/Path.ZoneId" - } - ], - "responses": { - "200": { - "description": "Successful response to an access point Id request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneInfo": { - "$ref": "#/components/schemas/ZoneInfo" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "queries" - } - }, - "/queries/zones/{zoneId}/accessPoints": { - "get": { - "tags": [ - "location" - ], - "summary": "Radio Node Location Lookup", - "description": "Radio Node Location Lookup to retrieve a list of radio nodes associated to a zone.", - "operationId": "apGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.ZoneId" - }, - { - "$ref": "#/components/parameters/Query.InterestRealm" - } - ], - "responses": { - "200": { - "description": "Successful response to an access point Id request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "accessPointList": { - "$ref": "#/components/schemas/AccessPointList" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "queries" - } - }, - "/queries/zones/{zoneId}/accessPoints/{accessPointId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Radio Node Location Lookup", - "description": "Radio Node Location Lookup to retrieve a radio node associated to a zone.", - "operationId": "apByIdGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.ZoneId" - }, - { - "$ref": "#/components/parameters/Path.AccessPointId" - } - ], - "responses": { - "200": { - "description": "Successful response to an access point Id request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "accessPointInfo": { - "$ref": "#/components/schemas/AccessPointInfo" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "queries" - } - }, - "/subscriptions/area/circle": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieves all active subscriptions to area change notifications", - "description": "This operation is used for retrieving all active subscriptions to area change notifications.", - "operationId": "areaCircleSubListGET", - "responses": { - "200": { - "description": "Response to retrieve area subscriptions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "notificationSubscriptionList" - ], - "properties": { - "notificationSubscriptionList": { - "$ref": "#/components/schemas/NotificationSubscriptionList" - } - }, - "example": { - "notificationSubscriptionList": { - "circleNotificationSubscription": [ - { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "checkImmediate": true, - "enteringLeavingCriteria": "Entering", - "frequency": 10, - "latitude": -80.88, - "longitude": 41.277, - "radius": 500, - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123" - } - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/area/circle" - } - } - } - } - } - } - } - }, - "post": { - "tags": [ - "location" - ], - "summary": "Creates a subscription for area change notification", - "description": "Creates a subscription to the Location Service for an area change notification.", - "operationId": "areaCircleSubPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "circleNotificationSubscription": { - "$ref": "#/components/schemas/CircleNotificationSubscription" - } - }, - "example": { - "circleNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "checkImmediate": true, - "enteringLeavingCriteria": "Entering", - "frequency": 10, - "latitude": -80.88, - "longitude": 41.277, - "radius": 500, - "trackingAccuracy": 10 - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "circleNotificationSubscription": { - "$ref": "#/components/schemas/CircleNotificationSubscription" - } - }, - "example": { - "circleNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "checkImmediate": true, - "enteringLeavingCriteria": "Entering", - "frequency": 10, - "latitude": -80.88, - "longitude": 41.277, - "radius": 500, - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/circleNotificationSubscription.callbackReference.notifyURL}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from Location service, content based on subscription type", - "operationId": "circleNotificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "subscriptionNotification": { - "$ref": "#/components/schemas/SubscriptionNotification" - } - }, - "example": { - "subscriptionNotification": { - "enteringLeavingCriteria": "Entering", - "isFinalNotification": "false,", - "link": { - "rel": "CircleNotificationSubscription", - "href": "http://meAppServer.example.com/location/v2/subscriptions/area/circle/sub123" - }, - "terminalLocation": { - "address": "acr:10.0.0.1", - "currentLocation": { - "accuracy": 100, - "altitude": 1001, - "latitude": -80.86302, - "longitude": 41.277306, - "timestamp": { - "seconds": 1483231138, - "nanoSeconds\"": 0 - } - }, - "locationRetrievalStatus": "Retrieved" - } - } - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/area/circle/{subscriptionId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieve subscription information", - "description": "Get subscription information.", - "operationId": "areaCircleSubGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "circleNotificationSubscription" - ], - "properties": { - "circleNotificationSubscription": { - "$ref": "#/components/schemas/CircleNotificationSubscription" - } - }, - "example": { - "circleNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "checkImmediate": true, - "enteringLeavingCriteria": "Entering", - "frequency": 10, - "latitude": -80.88, - "longitude": 41.277, - "radius": 500, - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "put": { - "tags": [ - "location" - ], - "summary": "Updates a subscription information", - "description": "Updates a subscription.", - "operationId": "areaCircleSubPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "circleNotificationSubscription": { - "$ref": "#/components/schemas/CircleNotificationSubscription" - } - }, - "example": { - "circleNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "checkImmediate": true, - "enteringLeavingCriteria": "Entering", - "frequency": 10, - "latitude": -80.88, - "longitude": 41.277, - "radius": 500, - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123" - } - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "circleNotificationSubscription": { - "$ref": "#/components/schemas/CircleNotificationSubscription" - } - }, - "example": { - "circleNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "checkImmediate": true, - "enteringLeavingCriteria": "Entering", - "frequency": 10, - "latitude": -80.88, - "longitude": 41.277, - "radius": 500, - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "delete": { - "tags": [ - "location" - ], - "summary": "Cancel a subscription", - "description": "Method to delete a subscription.", - "operationId": "areaCircleSubDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/distance": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieves all active subscriptions to distance change notifications", - "description": "This operation is used for retrieving all active subscriptions to a distance change notifications.", - "operationId": "distanceSubListGET", - "responses": { - "200": { - "description": "Response to retrieve area subscriptions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "notificationSubscriptionList" - ], - "properties": { - "notificationSubscriptionList": { - "$ref": "#/components/schemas/NotificationSubscriptionList" - } - }, - "example": { - "notificationSubscriptionList": { - "distanceNotificationSubscription": [ - { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "monitoredAddress": [ - "acr:10.0.0.1", - "acr:10.0.0.2" - ], - "checkImmediate": true, - "criteria": "AllWithinDistance", - "distance": 100, - "frequency": 10, - "referenceAddress": "acr:10.0.0.3", - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/distance/sub123" - } - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/distance" - } - } - } - } - } - } - } - }, - "post": { - "tags": [ - "location" - ], - "summary": "Creates a subscription for distance change notification", - "description": "Creates a subscription to the Location Service for a distance change notification.", - "operationId": "distanceSubPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "distanceNotificationSubscription": { - "$ref": "#/components/schemas/DistanceNotificationSubscription" - } - }, - "example": { - "distanceNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "monitoredAddress": [ - "acr:10.0.0.1", - "acr:10.0.0.2" - ], - "checkImmediate": true, - "criteria": "AllWithinDistance", - "distance": 100, - "frequency": 10, - "referenceAddress": "acr:10.0.0.3", - "trackingAccuracy": 10 - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "distanceNotificationSubscription": { - "$ref": "#/components/schemas/DistanceNotificationSubscription" - } - }, - "example": { - "distanceNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "monitoredAddress": [ - "acr:10.0.0.1", - "acr:10.0.0.2" - ], - "checkImmediate": true, - "criteria": "AllWithinDistance", - "distance": 100, - "frequency": 10, - "referenceAddress": "acr:10.0.0.3", - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/distance/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/distanceNotificationSubscription.callbackReference.notifyURL}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from Location service, content based on subscription type", - "operationId": "distanceNotificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "subscriptionNotification": { - "$ref": "#/components/schemas/SubscriptionNotification" - } - }, - "example": { - "subscriptionNotification": { - "distanceCriteria": "AllWithinDistance", - "isFinalNotification": "false,", - "link": { - "rel": "DistanceNotificationSubscription", - "href": "http://meAppServer.example.com/location/v2/subscriptions/distance/sub123" - }, - "terminalLocation": [ - { - "address": "acr:10.0.0.1", - "currentLocation": { - "accuracy": 100, - "altitude": 1001, - "latitude": -80.86302, - "longitude": 41.277306, - "timestamp": { - "seconds": 1483231138, - "nanoSeconds\"": 0 - } - }, - "locationRetrievalStatus": "Retrieved" - }, - { - "address": "acr:10.0.0.2", - "currentLocation": { - "accuracy": 100, - "altitude": 1001, - "latitude": -80.86301, - "longitude": 41.277306, - "timestamp": { - "seconds": 1483231138, - "nanoSeconds\"": 0 - } - }, - "locationRetrievalStatus": "Retrieved" - } - ] - } - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/distance/{subscriptionId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieve subscription information", - "description": "Get subscription information.", - "operationId": "distanceSubGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "distanceNotificationSubscription" - ], - "properties": { - "distanceNotificationSubscription": { - "$ref": "#/components/schemas/DistanceNotificationSubscription" - } - }, - "example": { - "distanceNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "monitoredAddress": [ - "acr:10.0.0.1", - "acr:10.0.0.2" - ], - "checkImmediate": true, - "criteria": "AllWithinDistance", - "distance": 100, - "frequency": 10, - "referenceAddress": "acr:10.0.0.3", - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/distance/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "put": { - "tags": [ - "location" - ], - "summary": "Updates a subscription information", - "description": "Updates a subscription.", - "operationId": "distanceSubPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "distanceNotificationSubscription": { - "$ref": "#/components/schemas/DistanceNotificationSubscription" - } - }, - "example": { - "distanceNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "monitoredAddress": [ - "acr:10.0.0.1", - "acr:10.0.0.2" - ], - "checkImmediate": true, - "criteria": "AllWithinDistance", - "distance": 100, - "frequency": 10, - "referenceAddress": "acr:10.0.0.3", - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/distance/subscription123" - } - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "distanceNotificationSubscription": { - "$ref": "#/components/schemas/DistanceNotificationSubscription" - } - }, - "example": { - "distanceNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "monitoredAddress": [ - "acr:10.0.0.1", - "acr:10.0.0.2" - ], - "checkImmediate": true, - "criteria": "AllWithinDistance", - "distance": 100, - "frequency": 10, - "referenceAddress": "acr:10.0.0.3", - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/distance/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "delete": { - "tags": [ - "location" - ], - "summary": "Cancel a subscription", - "description": "Method to delete a subscription.", - "operationId": "distanceSubDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/periodic": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieves all active subscriptions to periodic notifications", - "description": "This operation is used for retrieving all active subscriptions to periodic notifications.", - "operationId": "periodicSubListGET", - "responses": { - "200": { - "description": "Response to retrieve area subscriptions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "notificationSubscriptionList" - ], - "properties": { - "notificationSubscriptionList": { - "$ref": "#/components/schemas/NotificationSubscriptionList" - } - }, - "example": { - "notificationSubscriptionList": { - "periodicNotificationSubscription": [ - { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "frequency": 10, - "requestedAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/periodic/subscription123" - } - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/periodic" - } - } - } - } - } - } - } - }, - "post": { - "tags": [ - "location" - ], - "summary": "Creates a subscription for periodic notification", - "description": "Creates a subscription to the Location Service for a periodic notification.", - "operationId": "periodicSubPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "periodicNotificationSubscription": { - "$ref": "#/components/schemas/PeriodicNotificationSubscription" - } - }, - "example": { - "periodicNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "frequency": 10, - "requestedAccuracy": 10 - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "periodicNotificationSubscription": { - "$ref": "#/components/schemas/PeriodicNotificationSubscription" - } - }, - "example": { - "periodicNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "frequency": 10, - "requestedAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/periodic/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/periodicNotificationSubscription.callbackReference.notifyURL}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from Location service, content based on subscription type", - "operationId": "periodicNotificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "subscriptionNotification": { - "$ref": "#/components/schemas/SubscriptionNotification" - } - }, - "example": { - "subscriptionNotification": { - "isFinalNotification": "false,", - "link": { - "rel": "PeriodicNotificationSubscription", - "href": "http://meAppServer.example.com/location/v2/subscriptions/periodic/sub123" - }, - "terminalLocation": { - "address": "acr:10.0.0.1", - "currentLocation": { - "accuracy": 100, - "altitude": 1001, - "latitude": -80.86302, - "longitude": 41.277306, - "timestamp": { - "seconds": 1483231138, - "nanoSeconds\"": 0 - } - }, - "locationRetrievalStatus": "Retrieved" - } - } - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/periodic/{subscriptionId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieve subscription information", - "description": "Get subscription information.", - "operationId": "periodicSubGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "periodicNotificationSubscription" - ], - "properties": { - "periodicNotificationSubscription": { - "$ref": "#/components/schemas/PeriodicNotificationSubscription" - } - }, - "example": { - "periodicNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "frequency": 10, - "requestedAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/periodic/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "put": { - "tags": [ - "location" - ], - "summary": "Updates a subscription information", - "description": "Updates a subscription.", - "operationId": "periodicSubPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "periodicNotificationSubscription": { - "$ref": "#/components/schemas/PeriodicNotificationSubscription" - } - }, - "example": { - "periodicNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "frequency": 10, - "requestedAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/periodic/subscription123" - } - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "periodicNotificationSubscription": { - "$ref": "#/components/schemas/PeriodicNotificationSubscription" - } - }, - "example": { - "periodicNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "frequency": 10, - "requestedAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/periodic/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "delete": { - "tags": [ - "location" - ], - "summary": "Cancel a subscription", - "description": "Method to delete a subscription.", - "operationId": "periodicSubDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/userTracking": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieves all active subscriptions to user tracking notifications", - "description": "This operation is used for retrieving all active subscriptions to user tracking notifications.", - "operationId": "userTrackingSubListGET", - "responses": { - "200": { - "description": "Response to retrieve user tracking subscriptions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "notificationSubscriptionList" - ], - "properties": { - "notificationSubscriptionList": { - "$ref": "#/components/schemas/NotificationSubscriptionList" - } - }, - "example": { - "notificationSubscriptionList": { - "userTrackingSubscription": [ - { - "clientCorrelator": "0123", - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/subscription123", - "callbackReference": { - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:192.0.2.1", - "userEventCriteria": [ - "Transferring" - ] - }, - { - "clientCorrelator": "0124", - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/subscription124", - "callbackReference": { - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:192.0.2.2", - "userEventCriteria": [ - "Transferring" - ] - } - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking" - } - } - } - } - } - } - } - }, - "post": { - "tags": [ - "location" - ], - "summary": "Creates a subscription for user tracking notification", - "description": "Creates a subscription to the Location Service for user tracking change notification.", - "operationId": "userTrackingSubPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userTrackingSubscription": { - "$ref": "#/components/schemas/UserTrackingSubscription" - } - }, - "example": { - "userTrackingSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "address": "acr:10.0.0.1", - "userEventCriteria": [ - "Transferring" - ] - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userTrackingSubscription": { - "$ref": "#/components/schemas/UserTrackingSubscription" - } - }, - "example": { - "userTrackingSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "address": "acr:10.0.0.1", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/sub123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/userTrackingSubscription.callbackReference.notifyURL}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from Location service, content based on subscription type", - "operationId": "userTrackingNotificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zonalPresenceNotification": { - "$ref": "#/components/schemas/ZonalPresenceNotification" - } - }, - "example": { - "zonalPresenceNotification": { - "clientCorrelator": "0123", - "zoneId": "zone01", - "address": "acr:10.0.0.1", - "userEventType": "Transferring", - "currentAccessPointId": "ap2", - "previousAccessPointId": "ap1", - "timestamp": { - "seconds": 1483231138, - "nanoseconds": 0 - }, - "link": { - "rel": "UserTrackingSubscription", - "href": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/sub123" - } - } - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/userTracking/{subscriptionId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieve subscription information", - "description": "Get subscription information.", - "operationId": "userTrackingSubGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "userTrackingSubscription" - ], - "properties": { - "userTrackingSubscription": { - "$ref": "#/components/schemas/UserTrackingSubscription" - } - }, - "example": { - "userTrackingSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "address": "acr:10.0.0.1", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/sub123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "put": { - "tags": [ - "location" - ], - "summary": "Updates a subscription information", - "description": "Updates a subscription.", - "operationId": "userTrackingSubPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userTrackingSubscription": { - "$ref": "#/components/schemas/UserTrackingSubscription" - } - }, - "example": { - "userTrackingSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "address": "acr:10.0.0.1", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/sub123" - } - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userTrackingSubscription": { - "$ref": "#/components/schemas/UserTrackingSubscription" - } - } - }, - "example": { - "userTrackingSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "address": "acr:10.0.0.1", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/sub123" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "delete": { - "tags": [ - "location" - ], - "summary": "Cancel a subscription", - "description": "Method to delete a subscription.", - "operationId": "userTrackingSubDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/zonalTraffic": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieves all active subscriptions to zonal traffic notifications", - "description": "This operation is used for retrieving all active subscriptions to zonal traffic change notifications.", - "operationId": "zonalTrafficSubListGET", - "responses": { - "200": { - "description": "Response to retrieve zonal traffic subscriptions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "notificationSubscriptionList" - ], - "properties": { - "notificationSubscriptionList": { - "$ref": "#/components/schemas/NotificationSubscriptionList" - } - }, - "example": { - "notificationSubscriptionList": { - "zonalTrafficSubscription": [ - { - "clientCorrelator": "0123", - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/subscription123", - "callbackReference": { - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "zoneId": "zone01", - "userEventCriteria": [ - "Transferring" - ] - }, - { - "clientCorrelator": "0124", - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/subscription124", - "callbackReference": { - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "zoneId": "zone02", - "userEventCriteria": [ - "Transferring" - ] - } - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic" - } - } - } - } - } - } - } - }, - "post": { - "tags": [ - "location" - ], - "summary": "Creates a subscription for zonal traffic notification", - "description": "Creates a subscription to the Location Service for zonal traffic change notification.", - "operationId": "zonalTrafficSubPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zonalTrafficSubscription": { - "$ref": "#/components/schemas/ZonalTrafficSubscription" - } - }, - "example": { - "zonalTrafficSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "userEventCriteria": [ - "Transferring" - ] - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zonalTrafficSubscription": { - "$ref": "#/components/schemas/ZonalTrafficSubscription" - } - }, - "example": { - "zonalTrafficSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/sub123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/zonalTrafficSubscription.callbackReference.notifyURL}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from Location service, content based on subscription type", - "operationId": "zonalTrafficNotificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zonalPresenceNotification": { - "$ref": "#/components/schemas/ZonalPresenceNotification" - } - }, - "example": { - "zonalPresenceNotification": { - "clientCorrelator": "0123", - "zoneId": "zone01", - "address": "acr:10.0.0.1", - "userEventType": "Transferring", - "currentAccessPointId": "ap2", - "previousAccessPointId": "ap1", - "timestamp": { - "seconds": 1483231138, - "nanoseconds": 0 - }, - "link": { - "rel": "ZonalTrafficSubscription", - "href": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/sub123" - } - } - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/zonalTraffic/{subscriptionId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieve subscription information", - "description": "Get subscription information.", - "operationId": "zonalTrafficSubGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "zonalTrafficSubscription" - ], - "properties": { - "zonalTrafficSubscription": { - "$ref": "#/components/schemas/ZonalTrafficSubscription" - } - }, - "example": { - "zonalTrafficSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/sub123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "put": { - "tags": [ - "location" - ], - "summary": "Updates a subscription information", - "description": "Updates a subscription.", - "operationId": "zonalTrafficSubPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zonalTrafficSubscription": { - "$ref": "#/components/schemas/ZonalTrafficSubscription" - } - }, - "example": { - "zonalTrafficSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/sub123" - } - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zonalTrafficSubscription": { - "$ref": "#/components/schemas/ZonalTrafficSubscription" - } - } - }, - "example": { - "zonalTrafficSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/sub123" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "delete": { - "tags": [ - "location" - ], - "summary": "Cancel a subscription", - "description": "Method to delete a subscription.", - "operationId": "zonalTrafficSubDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/zoneStatus": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieves all active subscriptions to zone status notifications", - "description": "This operation is used for retrieving all active subscriptions to zone status change notifications.", - "operationId": "zoneStatusSubListGET", - "responses": { - "200": { - "description": "Response to retrieve zone status subscriptions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "notificationSubscriptionList" - ], - "properties": { - "notificationSubscriptionList": { - "$ref": "#/components/schemas/NotificationSubscriptionList" - } - }, - "example": { - "notificationSubscriptionList": { - "zoneStatusSubscription": [ - { - "clientCorrelator": "0123", - "resourceURL": "http://example.com/exampleAPI/location/v2/subscriptions/zoneStatus/subscription123", - "callbackReference": { - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "zoneId": "zone01", - "numberOfUsersZoneThreshold": 500, - "operationStatus": [ - "Serviceable" - ] - } - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zoneStatus" - } - } - } - } - } - } - } - }, - "post": { - "tags": [ - "location" - ], - "summary": "Creates a subscription for zone status notification", - "description": "Creates a subscription to the Location Service for zone status change notification.", - "operationId": "zoneStatusSubPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneStatusSubscription": { - "$ref": "#/components/schemas/ZoneStatusSubscription" - } - }, - "example": { - "zoneStatusSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "numberOfUsersZoneThreshold": 500, - "operationStatus": [ - "Serviceable" - ] - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneStatusSubscription": { - "$ref": "#/components/schemas/ZoneStatusSubscription" - } - }, - "example": { - "zoneStatusSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "numberOfUsersZoneThreshold": 500, - "operationStatus": [ - "Serviceable" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zoneStatus/sub123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/zoneStatusSubscription.callbackReference.notifyURL}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from Location service, content based on subscription type", - "operationId": "zoneStatusNotificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneStatusNotification": { - "$ref": "#/components/schemas/ZoneStatusNotification" - } - }, - "example": { - "zoneStatusNotification": { - "clientCorrelator": "0123", - "zoneId": "zone01", - "accessPointId": "poa1", - "operationStatus": "Serviceable", - "numberOfUsersInZone": "20", - "numberOfUsersInAP": "12", - "timestamp": { - "seconds": 1483231138, - "nanoseconds": 0 - }, - "link": { - "rel": "ZoneStatusSubscription", - "href": "http://meAppServer.example.com/location/v2/subscriptions/zoneStatus/sub123" - } - } - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/zoneStatus/{subscriptionId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieve subscription information", - "description": "Get subscription information.", - "operationId": "zoneStatusSubGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "zoneStatusSubscription" - ], - "properties": { - "zoneStatusSubscription": { - "$ref": "#/components/schemas/ZoneStatusSubscription" - } - }, - "example": { - "zoneStatusSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "numberOfUsersZoneThreshold": 500, - "operationStatus": [ - "Serviceable" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zoneStatus/sub123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "put": { - "tags": [ - "location" - ], - "summary": "Updates a subscription information", - "description": "Updates a subscription.", - "operationId": "zoneStatusSubPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneStatusSubscription": { - "$ref": "#/components/schemas/ZoneStatusSubscription" - } - }, - "example": { - "zoneStatusSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "numberOfUsersZoneThreshold": 500, - "operationStatus": [ - "Serviceable" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zoneStatus/sub123" - } - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneStatusSubscription": { - "$ref": "#/components/schemas/ZoneStatusSubscription" - } - } - }, - "example": { - "zoneStatusSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "numberOfUsersZoneThreshold": 500, - "operationStatus": [ - "Serviceable" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zoneStatus/sub123" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "delete": { - "tags": [ - "location" - ], - "summary": "Cancel a subscription", - "description": "Method to delete a subscription.", - "operationId": "zoneStatusSubDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - } - } - }, - "components": { - "responses": { - "200": { - "description": "OK" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized : used when the client did not submit credentials.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden : operation is not allowed given the current status of the resource.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable : used to indicate that the server cannot provide the any of the content formats supported by the client.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "414": { - "description": "URI Too Long : used to indicate that the server is refusing to process the request because the request URI is longer than the server is willing or able to process.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type : used to indicate that the server or the client does not support the content type of the entity body.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity : used to indicate that the server understands the content type of the request entity and that the syntax of the request entity is correct but that the server is unable to process the contained instructions. This error condition can occur if an JSON request body is syntactically correct but semantically incorrect, for example if the target area for the request is considered too large. This error condition can also occur if the capabilities required by the request are not supported.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - }, - "example": { - "application/problem+json": { - "type": "https://meAppServer.example.com/rni/v2/probs/too-many targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - } - }, - "429": { - "description": "Too Many Requests : used when a rate limiter has triggered.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "parameters": { - "Path.AccessPointId": { - "name": "accessPointId", - "in": "path", - "description": "Identifier of access Point", - "required": true, - "schema": { - "type": "string" - }, - "x-exportParamName": "AccessPointId" - }, - "Path.SubscrId": { - "name": "subscriptionId", - "in": "path", - "description": "Subscription Identifier, specifically the \"self\" returned in the subscription request", - "required": true, - "schema": { - "type": "string", - "format": "uri" - }, - "x-exportParamName": "SubscriptionId" - }, - "Path.ZoneId": { - "name": "zoneId", - "in": "path", - "description": "Indentifier of zone", - "required": true, - "schema": { - "type": "string" - }, - "x-exportParamName": "ZoneId" - }, - "Query.AccessPointId": { - "name": "accessPointId", - "in": "query", - "description": "Identifier of access point", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "x-exportParamName": "AccessPointId" - }, - "Query.Address": { - "name": "address", - "in": "query", - "description": "address of users (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "x-exportParamName": "Address" - }, - "Query.AddressMandatory": { - "name": "address", - "in": "query", - "description": "address of users (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "x-exportParamName": "AddressMandatory" - }, - "Query.InterestRealm": { - "name": "interestRealm", - "in": "query", - "description": "Interest realm of access point (e.g. geographical area, a type of industry etc.).", - "required": false, - "schema": { - "type": "string" - }, - "x-exportParamName": "InterestRealm" - }, - "Query.Latitude": { - "name": "latitude", - "in": "query", - "description": "Latitude geo position", - "required": false, - "schema": { - "type": "number", - "format": "float" - }, - "x-exportParamName": "Latitude" - }, - "Query.Longitude": { - "name": "longitude", - "in": "query", - "description": "Longitude geo position", - "required": false, - "schema": { - "type": "number", - "format": "float" - }, - "x-exportParamName": "Longitude" - }, - "Query.Requester": { - "name": "requester", - "in": "query", - "description": "Entity that is requesting the information", - "required": false, - "schema": { - "type": "string" - }, - "x-exportParamName": "Requester" - }, - "Query.ZoneId": { - "name": "zoneId", - "in": "query", - "description": "Identifier of zone", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "x-exportParamName": "ZoneId" - } - }, - "schemas": { - "AccessPointInfo": { - "description": "A type containing access point information.", - "properties": { - "accessPointId": { - "description": "Identifier of access point.", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - }, - "connectionType": { - "$ref": "#/components/schemas/ConnectionType" - }, - "interestRealm": { - "description": "Interest realm of access point.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "locationInfo": { - "$ref": "#/components/schemas/LocationInfo" - }, - "numberOfUsers": { - "description": "Number of users currently on the access point.", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "integer" - }, - "operationStatus": { - "$ref": "#/components/schemas/OperationStatus" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "timezone": { - "description": "Time zone of access point.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "dateTimeStamp" - } - }, - "required": [ - "accessPointId", - "connectionType", - "operationStatus", - "numberOfUsers", - "resourceURL" - ], - "type": "object" - }, - "AccessPointList": { - "description": "A type containing list of access points.", - "properties": { - "accessPoint": { - "description": "Collection of the access point information list.", - "items": { - "$ref": "#/components/schemas/AccessPointInfo" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "AccessPointInfo" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "zoneId", - "resourceURL" - ], - "type": "object" - }, - "CallbackReference": { - "properties": { - "callbackData": { - "description": "Data the application can register with the server when subscribing to notifications, and that are passed back unchanged in each of the related notifications. These data can be used by the application in the processing of the notification, e.g. for correlation purposes.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "notificationFormat": { - "$ref": "#/components/schemas/NotificationFormat" - }, - "notifyURL": { - "description": "Notify Callback URL", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "anyURI" - } - }, - "required": [ - "notifyURL" - ], - "type": "object" - }, - "CircleNotificationSubscription": { - "description": "A type containing data for notifications, when the area is defined as a circle.", - "properties": { - "address": { - "description": "Address of terminals to monitor (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "items": { - "type": "string" - }, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "anyURI" - }, - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "checkImmediate": { - "description": "Check location immediately after establishing notification.", - "type": "boolean", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "boolean" - }, - "clientCorrelator": { - "description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "count": { - "description": "Maximum number of notifications per individual address. For no maximum, either do not include this element or specify a value of zero. Default value is 0.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "int" - }, - "duration": { - "description": "Period of time (in seconds) notifications are provided for. If set to “0” (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "int" - }, - "enteringLeavingCriteria": { - "$ref": "#/components/schemas/EnteringLeavingCriteria" - }, - "frequency": { - "description": "Maximum frequency (in seconds) of notifications per subscription (can also be considered minimum time between notifications).", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "int" - }, - "latitude": { - "description": "Latitude of center point.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "float" - }, - "link": { - "description": "Link to other resources that are in relationship with the resource.", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "longitude": { - "description": "Longitude of center point.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "float" - }, - "radius": { - "description": "Radius circle around center point in meters.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "float" - }, - "requester": { - "description": "Identifies the entity that is requesting the information (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "trackingAccuracy": { - "description": "Number of meters of acceptable error in tracking distance.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "float" - } - }, - "required": [ - "callbackReference", - "address", - "latitude", - "longitude", - "radius", - "trackingAccuracy", - "enteringLeavingCriteria", - "checkImmediate", - "frequency" - ], - "type": "object" - }, - "ConnectionType": { - "description": "The connection type for the access point", - "enum": [ - "Femto", - "LTE-femto", - "Smallcell", - "LTE-smallcell", - "Wifi", - "Pico", - "Micro", - "Macro", - "Wimax", - "Unknown" - ], - "type": "string" - }, - "DistanceCriteria": { - "enum": [ - "AllWithinDistance", - "AnyWithinDistance", - "AllBeyondDistance", - "AnyBeyondDistance" - ], - "type": "string" - }, - "DistanceNotificationSubscription": { - "description": "A type containing data for distance subscription, with reference to other devices.", - "properties": { - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "checkImmediate": { - "description": "Check location immediately after establishing notification.", - "type": "boolean", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "boolean" - }, - "clientCorrelator": { - "description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "count": { - "description": "Maximum number of notifications per individual address. For no maximum, either do not include this element or specify a value of zero. Default value is 0.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "int" - }, - "criteria": { - "$ref": "#/components/schemas/DistanceCriteria" - }, - "distance": { - "description": "Distance between devices that shall be monitored.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "float" - }, - "duration": { - "description": "Period of time (in seconds) notifications are provided for. If set to “0” (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "int" - }, - "frequency": { - "description": "Maximum frequency (in seconds) of notifications per subscription (can also be considered minimum time between notifications).", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "int" - }, - "link": { - "description": "Link to other resources that are in relationship with the resource.", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "monitoredAddress": { - "description": "Contains addresses of devices to monitor (e.g., 'sip' URI, 'tel' URI, 'acr' URI)", - "items": { - "type": "string" - }, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "anyURI" - }, - "referenceAddress": { - "description": "Indicates address of each device that will be used as reference devices from which the distances towards monitored devices indicated in the Addresses will be monitored (e.g., 'sip' URI, 'tel' URI, 'acr' URI)", - "items": { - "type": "string" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "anyURI" - }, - "requester": { - "description": "Identifies the entity that is requesting the information (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "trackingAccuracy": { - "description": "Number of meters of acceptable error in tracking distance.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "float" - } - }, - "required": [ - "callbackReference", - "monitoredAddress", - "distance", - "trackingAccuracy", - "criteria", - "checkImmediate", - "frequency" - ], - "type": "object" - }, - "EnteringLeavingCriteria": { - "enum": [ - "Entering", - "Leaving" - ], - "type": "string" - }, - "Link": { - "description": "Link to other resources", - "properties": { - "href": { - "description": "URI", - "format": "anyURI", - "type": "string" - }, - "rel": { - "description": "Describes the relationship between the URI and the resource.", - "type": "string" - } - }, - "required": [ - "rel", - "href" - ], - "type": "object" - }, - "LocationInfo": { - "properties": { - "accuracy": { - "description": "Horizontal accuracy / (semi-major) uncertainty of location provided in meters, as defined in [14]. Present only if \"shape\" equals 4, 5 or 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "accuracyAltitude": { - "description": "Altitude accuracy / uncertainty of location provided in meters, as defined in [14]. Present only if \"shape\" equals 3 or 4", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "accuracySemiMinor": { - "description": "Horizontal accuracy / (semi-major) uncertainty of location provided in meters, as defined in [14]. Present only if \"shape\" equals 4, 5 or 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "altitude": { - "description": "Location altitude relative to the WGS84 ellipsoid surface.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Float" - }, - "confidence": { - "description": "Confidence by which the position of a target entity is known to be within the shape description, expressed as a percentage and defined in [14]. Present only if \"shape\" equals 1, 4 or 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "includedAngle": { - "description": "Present only if \"shape\" equals 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "innerRadius": { - "description": "Present only if \"shape\" equals 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "latitude": { - "description": "Location latitude, expressed in the range -90° to +90°. Cardinality greater than one only if \"shape\" equals 7.", - "items": { - "format": "float", - "type": "number" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "Float" - }, - "longitude": { - "description": "Location longitude, expressed in the range -180° to +180°. Cardinality greater than one only if \"shape\" equals 7.", - "items": { - "format": "float", - "type": "number" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "Float" - }, - "offsetAngle": { - "description": "Present only if \"shape\" equals 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "orientationMajorAxis": { - "description": "Angle of orientation of the major axis, expressed in the range 0° to 180°, as defined in [14]. Present only if \"shape\" equals 4 or 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "shape": { - "description": "Shape information, as detailed in [14], associated with the reported location coordinate:

1 = ELLIPSOID_ARC

2 = ELLIPSOID_POINT

3 = ELLIPSOID_POINT_ALTITUDE

4 = ELLIPSOID_POINT_ALTITUDE_UNCERT_ELLIPSOID

5 = ELLIPSOID_POINT_UNCERT_CIRCLE

6 = ELLIPSOID_POINT_UNCERT_ELLIPSE

7 = POLYGON", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "timestamp": { - "$ref": "#/components/schemas/TimeStamp" - }, - "uncertaintyRadius": { - "description": "Present only if \"shape\" equals 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "velocity": { - "description": "Structure with attributes relating to the target entity’s velocity, as defined in [14].", - "properties": { - "bearing": { - "description": "Bearing, expressed in the range 0° to 360°, as defined in [14].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "horizontalSpeed": { - "description": "Horizontal speed, expressed in km/h and defined in [14].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "uncertainty": { - "description": "Horizontal uncertainty, as defined in [14]. Present only if \"velocityType\" equals 3 or 4", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "velocityType": { - "description": "Velocity information, as detailed in [14], associated with the reported location coordinate:

1 = HORIZONTAL

2 = HORIZONTAL_VERTICAL

3 = HORIZONTAL_UNCERT

4 = HORIZONTAL_VERTICAL_UNCERT", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "verticalSpeed": { - "description": "Vertical speed, expressed in km/h and defined in [14]. Present only if \"velocityType\" equals 2 or 4", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Int" - }, - "verticalUncertainty": { - "description": "Vertical uncertainty, as defined in [14]. Present only if \"velocityType\" equals 4", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - } - }, - "required": [ - "velocityType", - "bearing", - "horizontalSpeed" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - } - }, - "required": [ - "latitude", - "longitude", - "shape" - ], - "type": "object", - "x-etsi-ref": "6.5.3" - }, - "NotificationFormat": { - "enum": [ - "XML", - "JSON" - ], - "type": "string" - }, - "NotificationSubscriptionList": { - "properties": { - "circleNotificationSubscription": { - "description": "Collection of CircleNotificationSubscription elements, see note 2.", - "items": { - "$ref": "#/components/schemas/CircleNotificationSubscription" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0.. N", - "x-etsi-mec-origin-type": "CircleNotificationSubscription" - }, - "distanceNotificationSubscription": { - "description": "Collection of DistanceNotificationSubscription elements, see note 2.", - "items": { - "$ref": "#/components/schemas/DistanceNotificationSubscription" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0.. N", - "x-etsi-mec-origin-type": "DistanceNotificationSubscription" - }, - "periodicNotificationSubscription": { - "description": "Collection of PeriodicNotificationSubscription elements, see note 2.", - "items": { - "$ref": "#/components/schemas/PeriodicNotificationSubscription" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0.. N", - "x-etsi-mec-origin-type": "PeriodicNotificationSubscription" - }, - "resourceURL": { - "description": "Self-referring URL, see note 1.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "AnyURI" - }, - "userTrackingSubscription": { - "description": "Collection of UserTrackingSubscription elements, see note 1.", - "items": { - "$ref": "#/components/schemas/UserTrackingSubscription" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0.. N", - "x-etsi-mec-origin-type": "UserTrackingSubscription" - }, - "zonalTrafficSubscription": { - "description": "Collection of ZonalTrafficSubscription elements, see note 1.", - "items": { - "$ref": "#/components/schemas/ZonalTrafficSubscription" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0.. N", - "x-etsi-mec-origin-type": "ZonalTrafficSubscription" - }, - "zoneStatusSubscription": { - "description": "Collection of ZoneStatusSubscription elements, see note 1.", - "items": { - "$ref": "#/components/schemas/ZoneStatusSubscription" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0.. N", - "x-etsi-mec-origin-type": "ZoneStatusSubscription" - } - }, - "required": [ - "resourceURL" - ], - "type": "object", - "x-etsi-notes": "NOTE 1:\tAs specified in [5], clause 5.2.2.8.\nNOTE 2: \tAs specified in [6], clause 5.2.2.7.", - "x-etsi-ref": "6.3.3" - }, - "OperationStatus": { - "enum": [ - "Serviceable", - "Unserviceable", - "Unknown" - ], - "type": "string" - }, - "PeriodicNotificationSubscription": { - "description": "A type containing data for periodic subscription.", - "properties": { - "address": { - "description": "Address of terminals to monitor (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "items": { - "type": "string" - }, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "anyURI" - }, - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "clientCorrelator": { - "description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "duration": { - "description": "Period of time (in seconds) notifications are provided for. If set to “0” (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "int" - }, - "frequency": { - "description": "Maximum frequency (in seconds) of notifications (can also be considered minimum time between notifications) per subscription.", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "int" - }, - "link": { - "description": "Link to other resources that are in relationship with the resource.", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "requestedAccuracy": { - "description": "Accuracy of the provided distance in meters.", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "int" - }, - "requester": { - "description": "Identifies the entity that is requesting the information (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - } - }, - "required": [ - "callbackReference", - "address", - "requestedAccuracy", - "frequency" - ], - "type": "object" - }, - "ProblemDetails": { - "properties": { - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "instance": { - "description": "A URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "status": { - "description": "The HTTP status code for this occurrence of the problem", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "title": { - "description": "A short, human-readable summary of the problem type", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "type": { - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - } - }, - "type": "object" - }, - "RetrievalStatus": { - "enum": [ - "Retrieved", - "NotRetrieved", - "Error" - ], - "type": "string" - }, - "ServiceError": { - "description": "used to indicate a notification termination or cancellation.", - "properties": { - "messageId": { - "description": "Message identifier, either with prefix SVC or with prefix POL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - }, - "text": { - "description": "Message text, with replacement variables marked with %n, where n is an index into the list of elements, starting at 1", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - }, - "variables": { - "description": "Variables to substitute into text string", - "items": { - "type": "string" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "messageId", - "text" - ], - "type": "object" - }, - "SubscriptionCancellationNotification": { - "description": "A type containing the subscription cancellation notification.", - "properties": { - "address": { - "description": "Address of terminal if the error applies to an individual terminal.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "callbackData": { - "description": "CallbackData if passed by the application in the receiptRequest element during the associated subscription operation", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "link": { - "description": "Link to other resources that are in relationship with the resource.", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "reason": { - "$ref": "#/components/schemas/ServiceError" - } - }, - "required": [ - "terminalLocation" - ], - "type": "object" - }, - "SubscriptionNotification": { - "description": "A type containing the notification subscription.", - "properties": { - "callbackData": { - "description": "CallbackData if passed by the application in the receiptRequest element during the associated subscription operation", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "distanceCriteria": { - "$ref": "#/components/schemas/DistanceCriteria" - }, - "enteringLeavingCriteria": { - "$ref": "#/components/schemas/EnteringLeavingCriteria" - }, - "isFinalNotification": { - "description": "Set to true if it is a final notification about location change.", - "type": "boolean", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "boolean" - }, - "link": { - "description": "Link to other resources that are in relationship with the resource.", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "terminalLocation": { - "description": "Collection of the terminal locations.", - "items": { - "$ref": "#/components/schemas/TerminalLocation" - }, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "TerminalLocation" - } - }, - "required": [ - "terminalLocation" - ], - "type": "object" - }, - "TerminalDistance": { - "description": "A type containing information about the distance from a terminal to a location or between two terminals, in addition the accuracy and a timestamp of the information are provided.", - "properties": { - "accuracy": { - "description": "Accuracy of the provided distance in meters", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "integer" - }, - "distance": { - "description": "Distance from terminal to a location or between two terminals specified in meters", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "integer" - }, - "timestamp": { - "$ref": "#/components/schemas/TimeStamp" - } - }, - "required": [ - "distance" - ], - "type": "object" - }, - "TerminalLocation": { - "description": "A type containing device address, retrieval status and location information.", - "properties": { - "address": { - "description": "Address of the terminal to which the location information applies (e.g., 'sip' URI, 'tel' URI, 'acr' URI).", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "currentLocation": { - "$ref": "#/components/schemas/LocationInfo" - }, - "errorInformation": { - "$ref": "#/components/schemas/ServiceError" - }, - "locationRetrievalStatus": { - "$ref": "#/components/schemas/RetrievalStatus" - } - }, - "required": [ - "address", - "locationRetrievalStatus" - ], - "type": "object" - }, - "TerminalLocationList": { - "description": "Collection of the terminal locations.", - "items": { - "$ref": "#/components/schemas/TerminalLocation" - }, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "TerminalLocation" - }, - "TimeStamp": { - "properties": { - "nanoSeconds": { - "description": "The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "seconds": { - "description": "The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "required": [ - "seconds", - "nanoSeconds" - ], - "type": "object", - "x-etsi-ref": "6.5.2" - }, - "UserEventType": { - "enum": [ - "Entering", - "Leaving", - "Transferring" - ], - "type": "string" - }, - "UserInfo": { - "properties": { - "accessPointId": { - "description": "The identity of the access point the user is currently on, see note 1.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "address": { - "description": "Address of user (e.g. 'sip' URI, 'tel' URI, 'acr' URI) currently on the access point, see note 1.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "AnyURI" - }, - "ancillaryInfo": { - "description": "Reserved for future use.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "contextLocationInfo": { - "description": "Contextual information of a user location (e.g. aisle, floor, room number, etc.).", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "locationInfo": { - "$ref": "#/components/schemas/LocationInfo" - }, - "resourceURL": { - "description": "Self-referring URL, see note 1.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "timestamp": { - "$ref": "#/components/schemas/TimeStamp" - }, - "zoneId": { - "description": "The identity of the zone the user is currently within, see note 1.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "address", - "accessPointId", - "zoneId", - "resourceURL", - "timestamp" - ], - "type": "object", - "x-etsi-notes": "NOTE 1:\tAs specified in [5], clause 5.2.2.7.\nNOTE 2: \tAs specified in [5], clause 5.2.2.5.", - "x-etsi-ref": "6.2.2" - }, - "UserList": { - "description": "A type containing list of users.", - "properties": { - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "user": { - "description": "Collection of the zone information list.", - "items": { - "$ref": "#/components/schemas/UserInfo" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "UserInfo" - } - }, - "required": [ - "resourceURL" - ], - "type": "object" - }, - "UserTrackingSubscription": { - "description": "A type containing user tracking subscription.", - "properties": { - "address": { - "description": "Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) to monitor", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "clientCorrelator": { - "description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "userEventCriteria": { - "description": "List of user event values to generate notifications for (these apply to address specified). If this element is missing, a notification is requested to be generated for any change in user event.", - "items": { - "$ref": "#/components/schemas/UserEventType" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "UserEventType" - } - }, - "required": [ - "callbackReference", - "address" - ], - "type": "object" - }, - "ZonalPresenceNotification": { - "description": "A type containing zonal presence notification", - "properties": { - "address": { - "description": "Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) to monitor", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "callbackData": { - "description": "CallBackData if passed by the application during the associated ZonalTrafficSubscription and UserTrackingSubscription operation. See [REST_NetAPI_Common].", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "currentAccessPointId": { - "description": "Identifier of access point.", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - }, - "interestRealm": { - "description": "Interest realm of access point (e.g. geographical area, a type of industry etc.).", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "link": { - "description": "Link to other resources that are in relationship with this notification. The server SHOULD include a link to the related subscription. No other links are required or suggested by this specification", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "previousAccessPointId": { - "description": "Identifier of access point.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "timestamp": { - "$ref": "#/components/schemas/TimeStamp" - }, - "userEventType": { - "$ref": "#/components/schemas/UserEventType" - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "zoneId", - "address", - "userEventType", - "currentAccessPointId", - "timestamp" - ], - "type": "object" - }, - "ZonalTrafficSubscription": { - "description": "A type containing zonal traffic subscription", - "properties": { - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "clientCorrelator": { - "description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "duration": { - "description": "Period (in seconds) of time notifications are provided for. If set to \"0\" (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications. This element MAY be given by the client during resource creation in order to signal the desired lifetime of the subscription. The server MUST return in this element the period of time for which the subscription will still be valid.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "unsignedInt" - }, - "interestRealm": { - "description": "Interest realm of access point (e.g. geographical area, a type of industry etc.).", - "items": { - "type": "string" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "string" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "userEventCriteria": { - "description": "List of user event values to generate notifications for (these apply to zone identifier or all interest realms within zone identifier specified). If this element is missing, a notification is requested to be generated for any change in user event.", - "items": { - "$ref": "#/components/schemas/UserEventType" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "UserEventType" - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "callbackReference", - "zoneId" - ], - "type": "object" - }, - "ZoneInfo": { - "description": "A type containing zone information.", - "properties": { - "numberOfAccessPoints": { - "description": "The number of access points within the zone", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "unsignedInt" - }, - "numberOfUnserviceableAccessPoints": { - "description": "Number of inoperable access points within the zone.", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "unsignedInt" - }, - "numberOfUsers": { - "description": "The number of users currently on the access point.", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "unsignedInt" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "zoneId", - "numberOfAccessPoints", - "numberOfUnserviceableAccessPoints", - "numberOfUsers", - "resourceURL" - ], - "type": "object" - }, - "ZoneList": { - "description": "A type containing a list of zones.", - "properties": { - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "zone": { - "description": "Collection of the zone information list.", - "items": { - "$ref": "#/components/schemas/ZoneInfo" - }, - "type": "array" - } - }, - "required": [ - "resourceURL" - ], - "type": "object" - }, - "ZoneStatusNotification": { - "description": "A type containing zone status notification.", - "properties": { - "accessPointId": { - "description": "Identifier of an access point.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "callbackData": { - "description": "CallBackData if passed by the application during the associated ZoneStatusSubscription operation. See [REST_NetAPI_Common].", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "link": { - "description": "Link to other resources that are in relationship with this notification. The server SHOULD include a link to the related subscription. No other links are required or suggested by this specification", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "numberOfUsersInAP": { - "description": "This element shall be present when ZoneStatusSubscription includes numberOfUsersAPThreshold element and the number of users in an access point exceeds the threshold defined in the subscription.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "unsignedInt" - }, - "numberOfUsersInZone": { - "description": "This element shall be present when ZoneStatusSubscription includes numberOfUsersZoneThreshold element and the number of users in a zone exceeds the threshold defined in this subscription.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "unsignedInt" - }, - "operationStatus": { - "$ref": "#/components/schemas/OperationStatus" - }, - "timestamp": { - "$ref": "#/components/schemas/TimeStamp" - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "zoneId", - "timestamp" - ], - "type": "object" - }, - "ZoneStatusSubscription": { - "description": "A type containing zone status subscription.", - "properties": { - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "clientCorrelator": { - "description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "numberOfUsersAPThreshold": { - "description": "Threshold number of users in an access point which if crossed shall cause a notification", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "unsignedInt" - }, - "numberOfUsersZoneThreshold": { - "description": "Threshold number of users in a zone which if crossed shall cause a notification", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "unsignedInt" - }, - "operationStatus": { - "description": "List of operation status values to generate notifications for (these apply to all access points within a zone).", - "items": { - "$ref": "#/components/schemas/OperationStatus" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "OperationStatus" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "callbackReference", - "zoneId" - ], - "type": "object" - } - } - } -} diff --git a/ttcn/LibMec/LocationAPI/module.mk b/ttcn/LibMec/LocationAPI/module.mk index f0a2cf5b114e6fee5b67ecf4fa1a90f7f820f8b9..fb33917ae751dc83091e2dfcaa06059a00e71d2d 100644 --- a/ttcn/LibMec/LocationAPI/module.mk +++ b/ttcn/LibMec/LocationAPI/module.mk @@ -4,4 +4,5 @@ sources := \ ttcn/LocationAPI_Pics.ttcn \ ttcn/LocationAPI_Pixits.ttcn \ ttcn/LocationAPI_Templates.ttcn \ - ttcn/LocationAPI_TypesAndValues.ttcn + ttcn/LocationAPI_TypesAndValues.ttcn \ + diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn index 523d7a9c41015514355f5d63850edefffc085414..8a941faea2db8ad2ba60c6c838d47564efa7d72e 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn @@ -11,7 +11,7 @@ module LocationAPI_Functions { // JSON - import from JSON all; + import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; @@ -20,11 +20,11 @@ module LocationAPI_Functions { import from LibCommon_Sync all; // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; // LibMec/LocationAPI import from LocationAPI_TypesAndValues all; @@ -37,9 +37,11 @@ module LocationAPI_Functions { import from LibMec_Pics all; import from LibMec_Pixits all; - function f_create_user_tracking_subscription( - out UserTrackingSubscription p_user_tracking_subscription - ) runs on HttpComponent { + function f_create_user_location_event_subscription( + out UserLocationEventSubscription p_user_location_event_subscription, + out charstring p_subscription_id, + in Address p_address := PX_USER + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -47,75 +49,78 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI, + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_user_tracking_subscription( - m_user_tracking_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_USER - )))))); + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + PX_CALLBACK_REF_URL, + p_address + )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_user_tracking_subscription( - mw_user_tracking_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_USER - )))))) -> value v_response { + mw_body_json_user_location_event_subscription( + mw_user_location_event_subscription( + PX_CALLBACK_REF_URL, + p_address + )))))) -> value v_response { tc_ac.stop; - p_user_tracking_subscription := v_response.response.body.json_body.userTrackingSubscription; - log("f_create_user_tracking_subscription: INFO: IUT successfully responds to the subscription: ", p_user_tracking_subscription); + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + p_user_location_event_subscription := v_response.response.body.json_body.userLocationEventSubscription; + log("f_create_user_location_event_subscription: INFO: IUT successfully responds to the subscription: ", p_user_location_event_subscription); + log("f_create_user_location_event_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { - log("f_create_user_tracking_subscription: INCONC: Expected message not received"); + log("f_create_user_location_event_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_create_user_tracking_subscription + } // End of function f_create_user_location_event_subscription - function f_delete_user_tracking_subscription( - in UserTrackingSubscription p_user_tracking_subscription - ) runs on HttpComponent { + function f_delete_user_location_event_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri :=regexp( - oct2char(unichar2oct(p_user_tracking_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_USERS_LOC_SUB_URI & "/(?*)", - 0 - ); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & p_subscription_id, v_headers - ))); + ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { - log("f_delete_user_tracking_subscription: INCONC: Expected message not received"); + log("f_delete_user_location_event_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_delete_user_tracking_subscription + } // End of function f_delete_user_location_event_subscription - function f_create_periodic_notification_subscription( - out PeriodicNotificationSubscription p_periodic_notification_subscription - ) runs on HttpComponent { + function f_create_user_location_periodic_subscription( + out UserLocationPeriodicSubscription p_user_location_periodic_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -123,58 +128,55 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI, + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_periodic_notification_subscription( - m_periodic_notification_subscription( - { PX_IP_ADDRESS }, - PX_CALLBACK_REF_URL, - -, -, - PX_USER - )))))); + m_body_json_user_location_periodic_subscription( + m_user_location_periodic_subscription( + PX_CALLBACK_REF_URL + )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_periodic_notification_subscription( - mw_periodic_notification_subscription( - { PX_IP_ADDRESS }, - PX_CALLBACK_REF_URL, - -, -, - PX_USER, - ? - )))))) -> value v_response { + mw_body_json_user_location_periodic_subscription( + mw_user_location_periodic_subscription( + PX_CALLBACK_REF_URL + )))))) -> value v_response { tc_ac.stop; - p_periodic_notification_subscription := v_response.response.body.json_body.periodicNotificationSubscription; - log("f_create_periodic_notification_subscription: INFO: IUT successfully responds to the subscription: ", p_periodic_notification_subscription); + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + p_user_location_periodic_subscription := v_response.response.body.json_body.userLocationPeriodicSubscription; + log("f_create_user_location_periodic_subscription: INFO: IUT successfully responds to the subscription: ", p_user_location_periodic_subscription); + log("f_create_user_location_periodic_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { - log("f_create_periodic_notification_subscription: INCONC: Expected message not received"); + log("f_create_user_location_periodic_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_create_periodic_notification_subscription + } // End of function f_create_user_location_periodic_subscription - function f_delete_periodic_notification_subscription( - in PeriodicNotificationSubscription p_position_notification_subscription - ) runs on HttpComponent { + function f_delete_user_location_periodic_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_position_notification_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/(?*)", - 0 - ); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & p_subscription_id, v_headers ))); tc_ac.start; @@ -186,14 +188,16 @@ module LocationAPI_Functions { tc_ac.stop; } [] tc_ac.timeout { - log("f_delete_periodic_notification_subscription: INCONC: Expected message not received"); + log("f_delete_user_location_periodic_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_delete_periodic_notification_subscription + } // End of function f_delete_user_location_periodic_subscription - function f_create_zonal_traffic_subscription( - out ZonalTrafficSubscription p_zonal_traffic_subscription - ) runs on HttpComponent { + function f_create_zone_location_event_subscription( + out ZoneLocationEventNotification p_zone_location_event_notification, + out charstring p_subscription_id, + in Address p_user := PX_USER + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -201,55 +205,58 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_INF_SUB_URI, + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_zonal_traffic_subscription( - m_zonal_traffic_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_ZONE_ID - )))))); + m_body_json_zone_location_event_subscription( + m_zone_location_event_subscription( + PX_CALLBACK_REF_URL, + p_user, + PX_ZONE_ID + )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_zonal_traffic_subscription( - mw_zonal_traffic_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_ZONE_ID - )))))) -> value v_response { - tc_ac.stop; + mw_body_json_zone_location_event_notification( + mw_zone_location_event_notification( + // FIXME + )))))) -> value v_response { + tc_ac.stop; - p_zonal_traffic_subscription := v_response.response.body.json_body.zonalTrafficSubscription; - log("f_create_zonal_traffic_subscription: INFO: IUT successfully responds to the subscription: ", p_zonal_traffic_subscription); + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_LOC_API_ZONES_SUB_URI & "/(?*)", + 0 + ); + p_zone_location_event_notification := v_response.response.body.json_body.zoneLocationEventNotification; + log("f_create_zone_location_event_subscription: INFO: IUT successfully responds to the subscription: ", p_zone_location_event_notification); + log("f_create_zone_location_event_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { - log("f_create_zonal_traffic_subscription: INCONC: Expected message not received"); + log("f_create_zone_location_event_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_create_zonal_traffic_subscription + } // End of function f_create_zone_location_event_subscription - function f_delete_zonal_traffic_subscription( - in ZonalTrafficSubscription p_zonal_traffic_subscription - ) runs on HttpComponent { + function f_delete_zone_location_event_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_zonal_traffic_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_USERS_INF_SUB_URI & "/(?*)", - 0 - ); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_INF_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & p_subscription_id, v_headers ))); tc_ac.start; @@ -261,14 +268,18 @@ module LocationAPI_Functions { tc_ac.stop; } [] tc_ac.timeout { - log("f_delete_zonal_traffic_subscription: INCONC: Expected message not received"); + log("f_delete_zone_location_event_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_delete_zonal_traffic_subscription + } // End of function f_delete_zone_location_event_subscription - function f_create_circle_notification_subscription( - out CircleNotificationSubscription p_circle_notification_subscription - ) runs on HttpComponent { + function f_create_zone_status_subscription( + out ZoneStatusNotification p_zone_status_notification, + out charstring p_subscription_id, + in template (omit) OperationStatus p_operationStatus := Serviceable, + in template (omit) Json.UInteger p_upper_num_user_threshold := omit, + in template (omit) Json.UInteger p_lower_num_user_threshold := omit + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -276,53 +287,149 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_AREA_SUB_URI, + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_circle_notification_subscription( - m_circle_notification_subscription( - PX_CLIENT_ID, //clientCorrelator - PX_AREA_SUB_CALLBACK_URI, // callbackReference - { PX_IP_ADDRESS } // address - )))))); + m_body_json_zone_status_subscription( + m_zone_status_subscription( + PX_AREA_SUB_CALLBACK_URI, + -, + PX_ZONE_ID, + -, -, -, -, -, + p_upper_num_user_threshold, + p_lower_num_user_threshold, + p_operationStatus + )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_circle_notification_subscription( - mw_circle_notification_subscription( - PX_CLIENT_ID - )))))) -> value v_response { + mw_body_json_zone_status_notification( + mw_zone_status_notification( + -, -, + p_operationStatus, + -, + PX_ZONE_ID + )))))) -> value v_response { tc_ac.stop; - p_circle_notification_subscription := v_response.response.body.json_body.circleNotificationSubscription; - log("f_create_circle_notification_subscription: INFO: IUT successfully responds to the subscription: ", p_circle_notification_subscription); - } + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_LOC_API_ZONES_SUB_URI & "/(?*)", + 0 + ); + p_zone_status_notification := v_response.response.body.json_body.zoneStatusNotification; + log("f_create_zone_status_subscription: INFO: IUT successfully responds to the subscription: ", p_zone_status_notification); + log("f_create_zone_status_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { - log("f_create_circle_notification_subscription: INCONC: Expected message not received"); + log("f_create_zone_status_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_create_circle_notification_subscription + } // End of function f_create_zone_status_subscription - function f_delete_circle_notification_subscription( - in CircleNotificationSubscription p_circle_notification_subscription - ) runs on HttpComponent { + function f_delete_zone_status_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & p_subscription_id, + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_zone_status_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_delete_zone_status_subscription + + function f_create_user_area_subscription( + out UserAreaSubscription p_user_area_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_circle_notification_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_AREA_SUB_URI & "/(?*)", - 0 - ); + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_area_subscription( + m_user_area_subscription( + PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference + PX_USER, + m_area_info( + ELLIPSOID_POINT_UNCERT_CIRCLE, + { m_point(PX_UE_COORD_LAT, PX_UE_COORD_LONG) }, + PX_RADIUS + ), // AreaInfo + { PX_IP_ADDRESS }, + PX_TRACKIMNG_ACCURACY, // TrackingAccuracy + -, -, -, -, + { ENTERING_AREA_EVENT } + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_area_subscription( + mw_user_area_subscription( + // FIXME PX_UE_DIST_SUB_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_LOC_API_AREA_SUB_URI & "/(?*)", + 0 + ); + p_user_area_subscription := v_response.response.body.json_body.userAreaSubscription; + log("f_create_user_area_subscription: INFO: IUT successfully responds to the subscription: ", p_user_area_subscription); + log("f_create_user_area_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_user_area_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_user_area_subscription + + function f_delete_user_area_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_AREA_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & p_subscription_id, v_headers ))); tc_ac.start; @@ -334,24 +441,15 @@ module LocationAPI_Functions { tc_ac.stop; } [] tc_ac.timeout { - log("f_delete_circle_notification_subscription: INCONC: Expected message not received"); + log("f_delete_user_area_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_delete_circle_notification_subscription - - - - - - - - + } // End of function f_delete_user_area_subscription - - - function f_create_distance_notification_subscription( - out DistanceNotificationSubscription p_distance_notification_subscription - ) runs on HttpComponent { + function f_create_user_distance_subscription( + out UserDistanceSubscription p_user_distance_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -359,75 +457,77 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_DIST_URI, + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_distance_notification_subscription( - m_distance_notification_subscription( - PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference - -, // checkImmediate - PX_CLIENT_ID, //clientCorrelator - -, // criteria - 10.0, // distance - -, - { PX_UE_MONITORED_IP_ADDRESS } // monitoredAddress - )))))); + m_body_json_user_distance_subscription( + m_user_distance_subscription( + PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference + PX_USER, + { PX_UE_MONITORED_IP_ADDRESS }, + PX_DISTANCE, + PX_TRACKIMNG_ACCURACY, + -, -, -, + { PX_UE_REFERENCED_IP_ADDRESS } + )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_distance_notification_subscription( - mw_distance_notification_subscription( - PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference - -, - PX_CLIENT_ID, //clientCorrelator - -, -, -, - { PX_UE_MONITORED_IP_ADDRESS } // monitoredAddress - )))))) -> value v_response { + mw_body_json_user_distance_subscription( + mw_user_distance_subscription( + PX_UE_DIST_SUB_CALLBACK_URI, + -, + PX_USER + )))))) -> value v_response { tc_ac.stop; - p_distance_notification_subscription := v_response.response.body.json_body.distanceNotificationSubscription; - log("f_create_distance_notification_subscription: INFO: IUT successfully responds to the subscription: ", p_distance_notification_subscription); + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_LOC_API_DISTANCE_SUB_URI & "/(?*)", + 0 + ); + p_user_distance_subscription := v_response.response.body.json_body.userDistanceSubscription; + log("f_create_user_distance_subscription: INFO: IUT successfully responds to the subscription: ", p_user_distance_subscription); + log("f_create_user_distance_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { - log("f_create_distance_notification_subscription: INCONC: Expected message not received"); + log("f_create_user_distance_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_create_distance_notification_subscription + } // End of function f_create_user_distance_subscription - function f_delete_distance_notification_subscription( - in DistanceNotificationSubscription p_distance_notification_subscription - ) runs on HttpComponent { + function f_delete_user_distance_subscription( + charstring p_subscription_id + ) runs on HttpComponent { var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_distance_notification_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_DIST_URI & "/(?*)", - 0 - ); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_DIST_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "/" & p_subscription_id, v_headers - ))); + ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { - log("f_delete_distance_notification_subscription: INCONC: Expected message not received"); + log("f_delete_user_distance_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_delete_distance_notification_subscription + } // End of function f_delete_user_distance_subscription } // End of module LocationAPI_Functions diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn index 2acb417fba266608104b068838aecb89560d1ea3..2a02c714383c3cb886c546adb57117226dff727a 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn @@ -1,7 +1,7 @@ module LocationAPI_Pixits { // JSON - import from JSON all; + import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; @@ -11,6 +11,8 @@ module LocationAPI_Pixits { modulepar Address PX_USER := "ue1"; + modulepar Address PX_USER_2 := "ue2"; + modulepar Address PX_USER_UNKNOWN := "acr:192.168.5.1.1"; modulepar ClientCorrelator PX_CLIENT_ID := "0123"; @@ -22,12 +24,20 @@ module LocationAPI_Pixits { modulepar ClientCorrelator PX_NON_EXISTENT_SUBSCRIPTION_ID := "subscription0666"; modulepar AccessPointId PX_ACCESS_POINT_ID := "zone1-poa1"; + + modulepar ConnectionType PX_CONNECTION_TYPE := LTE; + + modulepar Json.Number PX_AP_COORD_LAT := 43.737087; + + modulepar Json.Number PX_AP_COORD_LONG := 7.421007; modulepar ZoneId PX_ZONE_ID := "zone1"; + modulepar ZoneId PX_ZONE_ID_1 := "zone2"; + modulepar ZoneId PX_NON_EXISTENT_ZONE_ID := "zone51"; - modulepar ResourceURL PX_RESOURCE_URL := "http://meep-loc-serv/etsi-013/location/v2/users/ue1"; + modulepar ResourceURL PX_RESOURCE_URL := "http://meep-loc-serv/etsi-013/location/v3/users/ue1"; modulepar NumberOfAccessPoints PX_NB_ACCESS_POINTS := 3; @@ -35,32 +45,54 @@ module LocationAPI_Pixits { modulepar UInt32 PX_NB_USERS := 10; - modulepar CallbackReference PX_CALLBACK_REF_URL := { notifyURL := "http://clientApp.example.com/location_notifications/123456", callbackData := omit, notificationFormat := omit }; + modulepar CallbackReference PX_CALLBACK_REF_URL := "http://clientApp.example.com/location_notifications/123456"; - modulepar CallbackReference PX_UE_PERIODIC_SUB_CALLBACK_URI := { notifyURL := "http://clientApp.example.com/location_notifications/123456", callbackData := omit, notificationFormat := omit }; + modulepar CallbackReference PX_UE_PERIODIC_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456"; modulepar Address PX_IP_ADDRESS := "acr:10.0.0.3"; - modulepar CallbackReference PX_AREA_SUB_CALLBACK_URI := { notifyURL := "http://clientApp.example.com/location_notifications/123456", callbackData := omit, notificationFormat := omit }; + modulepar Address PX_IP_ADDRESS_1 := "acr:10.0.0.10"; + + modulepar CallbackReference PX_AREA_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456"; - modulepar CallbackReference PX_UE_DIST_SUB_CALLBACK_URI := { notifyURL := "http://clientApp.example.com/location_notifications/123456", callbackData := omit, notificationFormat := omit }; + modulepar CallbackReference PX_UE_DIST_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456"; + modulepar CallbackReference PX_UE_NEW_SUB_CALLBACK_URI := "http://clientApp.example.com/new_location_notifications/123456"; + modulepar Address PX_UE_MONITORED_IP_ADDRESS := "acr:10.0.0.1"; + + modulepar Address PX_UE_REFERENCED_IP_ADDRESS := "acr:10.0.0.2"; modulepar Address PX_ACR_UNKNOWN_IP := "acr:10.0.0.254"; modulepar Address PX_UE_ZONAL_TRAF_SUB_URI := ""; - modulepar JSON.AnyURI PX_UE_LOC_QRY_URI := "/location/v2/queries/distance"; + modulepar Json.AnyURI PX_UE_LOC_QRY_URI := "/location/v3/queries/distance"; - modulepar JSON.Number PX_UE_COORD_LAT := -80.86302; + modulepar Json.Number PX_UE_COORD_LAT := -80.86302; - modulepar JSON.Number PX_UE_COORD_LONG := 41.277306; + modulepar Json.Number PX_UE_COORD_LONG := 41.277306; + + modulepar Json.Number PX_DISTANCE := 1000.0; + + modulepar Json.UInteger PX_RADIUS := 500; + + modulepar Json.Number PX_TRACKIMNG_ACCURACY := 1000.0; modulepar Address PX_ACR_SOME_IP := ""; - modulepar CallbackReference PX_USERTRACK_SUB_CALLBACK_URI := { "" }; + modulepar CallbackReference PX_USERTRACK_SUB_CALLBACK_URI := ""; - modulepar CallbackReference PX_TRAFFIC_SUB_CALLBACK_URI := { "" }; + modulepar CallbackReference PX_TRAFFIC_SUB_CALLBACK_URI := ""; + + modulepar float PX_NOTIF_EXPIRY := 60.0; + + modulepar Json.UInteger PX_UPPER_NUM_USER_THRESHOLD := 10; + + modulepar Json.UInteger PX_LOWER_NUM_USER_THRESHOLD := 1; + + modulepar integer PX_REPORTING_AMOUNT := 0; + + modulepar integer PX_REPORTING_INTERVAL := 0; } // End of module LocationAPI_Pixits diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn index 124656102989996e82021003b9657d7b8d0a3d4f..1a665cc9812ed4fc4a14613a0245c5ba1d69bc86 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn @@ -1,15 +1,18 @@ module LocationAPI_Templates { - + // JSON - import from JSON all; - + import from Json all; + // LibCommon import from LibCommon_BasicTypesAndValues all; - + + // LibMec + import from LibMec_TypesAndValues all; + // LibMec/LocationAPI import from LocationAPI_TypesAndValues all; import from LocationAPI_Pixits all; - + template (value) UserInfo m_user_info( in Address p_address := PX_USER, in AccessPointId p_access_point_id := PX_ACCESS_POINT_ID, @@ -17,16 +20,17 @@ module LocationAPI_Templates { in TimeStamp p_timestamp, in ResourceURL p_resource_url := PX_RESOURCE_URL ) := { - address_ := p_address, - accessPointId := p_access_point_id, - zoneId := p_zone_id, - timestamp_ := p_timestamp, - resourceURL := p_resource_url, - locationInfo := omit, - contextLocationInfo := omit, - ancillaryInfo := omit + address_ := p_address, + accessPointId := p_access_point_id, + zoneId := p_zone_id, + resourceURL := p_resource_url, + timestamp_ := p_timestamp, + locationInfo := omit, + civicInfo := omit, + ancillaryInfo := omit, + relativeLocationInfo := omit } // End of template m_user_info - + template (present) UserInfo mw_user_info( template (present) Address p_address := ?, template (present) AccessPointId p_access_point_id := ?, @@ -34,14 +38,15 @@ module LocationAPI_Templates { template (present) TimeStamp p_timestamp := ?, template (present) ResourceURL p_resource_url := ? ) := { - address_ := p_address, - accessPointId := p_access_point_id, - zoneId := p_zone_id, - timestamp_ := p_timestamp, - resourceURL := p_resource_url, - locationInfo := *, - contextLocationInfo := *, - ancillaryInfo := * + address_ := p_address, + accessPointId := p_access_point_id, + zoneId := p_zone_id, + resourceURL := p_resource_url, + timestamp_ := p_timestamp, + locationInfo := *, + civicInfo := *, + ancillaryInfo := *, + relativeLocationInfo := * } // End of template mw_user_info template (omit) UserList m_user_list( @@ -51,15 +56,15 @@ module LocationAPI_Templates { user := p_userInfo, resourceURL := p_resource_url } // End of template m_user_list - - template UserList mw_user_list( - template UserInfos p_userInfo := *, - template (present) ResourceURL p_resource_url := ? - ) := { + + template (present) UserList mw_user_list( + template (present) ResourceURL p_resource_url := ?, + template UserInfos p_userInfo := * + ) := { user := p_userInfo, resourceURL := p_resource_url } // End of template mw_user_list - + template (value) LocationInfo m_location_info( in Latitude p_latitude, in Longitude p_longitude, @@ -82,7 +87,7 @@ module LocationAPI_Templates { timestamp_ := omit, velocity := omit } // End of template m_location_info - + template (present) LocationInfo mw_location_info( template (present) Latitude p_latitude := ?, template (present) Longitude p_longitude := ?, @@ -104,7 +109,51 @@ module LocationAPI_Templates { timestamp_ := *, velocity := * } // End of template mw_location_info - + + template (omit) RelativeLocationInfo m_relative_location_info( + in template (value) MapInfo p_mapInfo, + in Json.Number p_X, + in Json.Number p_Y, + in template (omit) Json.Number p_Z := omit + ) := { + mapInfo := p_mapInfo, + X := p_Y, + Y := p_Y, + Z := p_Z + } // End of template m_relative_location_info + + template (present) RelativeLocationInfo mw_relative_location_info( + template (present) MapInfo p_mapInfo := ?, + template (present) Json.Number p_X := ?, + template (present) Json.Number p_Y := ?, + template Json.Number p_Z := * + ) := { + mapInfo := p_mapInfo, + X := p_Y, + Y := p_Y, + Z := p_Z + } // End of template mw_relative_location_info + + template (omit) MapInfoOrigin m_map_info_origin( + in Json.Number p_latitude, + in Json.Number p_longitude, + in template (omit) Json.Number p_altitude := omit + ) :={ + latitude := p_latitude, + longitude := p_longitude, + altitude := p_altitude + } // End of template m_map_info_origin + + template (present) MapInfoOrigin mw_map_info_origin( + template (present) Json.Number p_latitude := ?, + template (present) Json.Number p_longitude := ?, + template Json.Number p_altitude := * + ) :={ + latitude := p_latitude, + longitude := p_longitude, + altitude := p_altitude + } // End of template mw_map_info_origin + template (value) ZoneInfo m_zone_info( in ZoneId p_zone_id := PX_ZONE_ID, in NumberOfAccessPoints p_number_of_access_points := PX_NB_ACCESS_POINTS, @@ -118,7 +167,7 @@ module LocationAPI_Templates { numberOfUsers := p_number_of_users, resourceURL := p_resource_url } // End of template m_zone_info - + template (present) ZoneInfo mw_zone_info( template (present) ZoneId p_zone_id := ?, template (present) NumberOfAccessPoints p_number_of_access_points := ?, @@ -132,7 +181,7 @@ module LocationAPI_Templates { numberOfUsers := p_number_of_users, resourceURL := p_resource_url } // End of template mw_zone_info - + template (omit) AccessPointList m_access_point_list( in ZoneId p_zoneId := PX_ZONE_ID, in ResourceURL p_resourceURL, @@ -142,267 +191,729 @@ module LocationAPI_Templates { accessPoint := p_accessPoint, resourceURL := p_resourceURL } // End of template m_access_point_list - - template AccessPointList mw_access_point_list( - template (present) ZoneId p_zoneId := ?, - template (present) ResourceURL p_resourceURL := ?, - template AccessPointInfos p_accessPoint := * - ) := { + + template (present) AccessPointList mw_access_point_list( + template (present) ZoneId p_zoneId := ?, + template (present) ResourceURL p_resourceURL := ?, + template AccessPointInfos p_accessPoint := * + ) := { zoneId := p_zoneId, accessPoint := p_accessPoint, resourceURL := p_resourceURL } // End of template mw_access_point_list - - template (value) UserTrackingSubscription m_user_tracking_subscription( - in ClientCorrelator p_clientCorrelator, - in CallbackReference p_callbackReference, - in Address p_address := PX_USER, - in UserEventCriteria p_userEventCriteria := { Entering } - ) := { - clientCorrelator := p_clientCorrelator, - callbackReference := p_callbackReference, - address_ := p_address, - userEventCriteria := p_userEventCriteria, - resourceURL := omit - } // End of template m_user_tracking_subscription - - template (present) UserTrackingSubscription mw_user_tracking_subscription( - template (present) ClientCorrelator p_clientCorrelator := ?, - template (present) CallbackReference p_callbackReference := ?, - template (present) Address p_address := PX_USER, - template (present) UserEventCriteria p_userEventCriteria := { Entering }, - template (present) ResourceURL p_resourceURL := ? - ) := { - clientCorrelator := p_clientCorrelator, - callbackReference := p_callbackReference, - address_ := p_address, - userEventCriteria := p_userEventCriteria, - resourceURL := p_resourceURL - } // End of template mw_user_tracking_subscription - - template (value) PeriodicTrackingSubscription m_periodic_tracking_subscription( - in ClientCorrelator p_clientCorrelator, - in CallbackReference p_callbackReference, - in Address p_address := PX_USER, - in JSON.Number p_frequency := 10.0, - in JSON.Number p_requestedAccuracy := 10.0 - ) := { - clientCorrelator := p_clientCorrelator, - callbackReference := p_callbackReference, - address_ := p_address, - frequency := p_frequency, - requestedAccuracy := p_requestedAccuracy, - resourceURL := omit - } // End of template m_periodic_tracking_subscription - - template (present) PeriodicTrackingSubscription mw_periodic_tracking_subscription( - template (present) ClientCorrelator p_clientCorrelator := ?, - template (present) CallbackReference p_callbackReference := ?, - template (present) Address p_address := PX_USER, - template (present) JSON.Number p_frequency := ?, - template (present) JSON.Number p_requestedAccuracy := ? + + template (omit) AccessPointInfo m_access_point_info( + in AccessPointId p_accessPointId, + in ConnectionType p_connectionType, + in OperationStatus p_operationStatus, + in NumberOfUsers p_numberOfUsers, + in template (value) ResourceURL p_resourceURL, + in template (omit) LocationInfo p_locationInfo := omit, + in template (omit) InterestRealm p_interestRealm := omit, + in template (omit) DateTimeStamp p_timezone := omit + ) := { + accessPointId := p_accessPointId, + locationInfo := p_locationInfo, + connectionType := p_connectionType, + operationStatus := p_operationStatus, + numberOfUsers := p_numberOfUsers, + interestRealm := p_interestRealm, + timezone := p_timezone, + resourceURL := p_resourceURL + } // End of template m_access_point_info + + template (present) AccessPointInfo mw_access_point_info( + template (present) AccessPointId p_accessPointId := ?, + template (present) ConnectionType p_connectionType := ?, + template (present) OperationStatus p_operationStatus := ?, + template (present) NumberOfUsers p_numberOfUsers := ?, + template (present) ResourceURL p_resourceURL := ?, + template LocationInfo p_locationInfo := *, + template InterestRealm p_interestRealm := *, + template DateTimeStamp p_timezone := * + ) := { + accessPointId := p_accessPointId, + locationInfo := p_locationInfo, + connectionType := p_connectionType, + operationStatus := p_operationStatus, + numberOfUsers := p_numberOfUsers, + interestRealm := p_interestRealm, + timezone := p_timezone, + resourceURL := p_resourceURL + } // End of template mw_access_point_info + + template (omit) Subscription m_subscription( + in Json.String p_subscriptionType, + in template (omit) Json.AnyURI p_href := omit + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template m_subscription + + template (present) Subscription mw_subscription( + template (present) Json.String p_subscriptionType := ?, + template Json.AnyURI p_href := * + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template mw_subscription + + template (omit) NotificationSubscriptionList m_notification_subscription_list( + in template (value) LinkType p_resourceURL, + in template (omit) Subscriptions p_subscription := omit + ) := { + subscription := p_subscription, + resourceURL := p_resourceURL + } // End of template m_notification_subscription_list + + template (present) NotificationSubscriptionList mw_notification_subscription_list( + template (present) LinkType p_resourceURL := ?, + template Subscriptions p_subscription := * ) := { - clientCorrelator := p_clientCorrelator, - callbackReference := p_callbackReference, - address_ := p_address, - frequency := p_frequency, - requestedAccuracy := p_requestedAccuracy, - resourceURL := * - } // End of template mw_periodic_tracking_subscription - - template (value) ZonalTrafficSubscription m_zonal_traffic_subscription( - in ClientCorrelator p_client_correlator, - in CallbackReference p_callback_reference, - in ZoneId p_zone_id, - in UserEventCriteria p_user_event_criteria := { Entering } - ) := { - clientCorrelator := p_client_correlator, - callbackReference := p_callback_reference, - zoneId := p_zone_id, - interestRealm := omit, - userEventCriteria := p_user_event_criteria, - duration := omit, - resourceURL := omit - } // End of template m_zonal_traffic_subscription - - template (present) ZonalTrafficSubscription mw_zonal_traffic_subscription( - template (present) ClientCorrelator p_client_correlator := ?, - template (present) CallbackReference p_callback_reference := ?, - template (present) ZoneId p_zone_id := ? - ) := { - clientCorrelator := p_client_correlator, - callbackReference := p_callback_reference, - zoneId := p_zone_id, - interestRealm := *, - userEventCriteria := *, - duration := *, - resourceURL := * - } // End of template mw_zonal_traffic_subscription - - template (omit) CircleNotificationSubscription m_circle_notification_subscription( - in template (omit) ClientCorrelator p_clientCorrelator := omit, - in template (value) CallbackReference p_callbackReference, - in template (value) Addresses p_address, - in template (value) JSON.Number p_latitude := PX_UE_COORD_LAT, - in template (value) JSON.Number p_longitude := PX_UE_COORD_LONG, - in template (value) JSON.Number p_radius := 200.0, - in template (value) JSON.Number p_trackingAccuracy := 10.0, - in template (value) EnteringLeavingCriteria p_enteringLeavingCriteria := Entering, - in template (value) JSON.Bool p_checkImmediate := true, - in template (value) UInt32 p_frequency := 10, - in template (omit) ResourceURL p_resourceURL := omit - ) := { + subscription := p_subscription, + resourceURL := p_resourceURL + } // End of template mw_notification_subscription_list + + template (omit) UserAreaNotification m_user_area_notification( + in template (value) Address p_address_, + in template (value) LocationEventType p_userLocationEvent, + in template (value) Links p_links_, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) LocationInfo p_locationInfo := omit, + in template (omit) CivicAddress p_civicInfo := omit, + in template (omit) RelativeLocationInfo p_relativeLocationInfo := omit + ) :={ + notificationType := "UserAreaNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + locationInfo := p_locationInfo, + civicInfo := p_civicInfo, + relativeLocationInfo := p_relativeLocationInfo, + userLocationEvent := p_userLocationEvent, + links_ := p_links_ + } // End of template m_user_area_notification + + template (present) UserAreaNotification mw_user_area_notification( + template (present) Address p_address_ := ?, + template (present) LocationEventType p_userLocationEvent := ?, + template (present) Links p_links_ := ?, + template TimeStamp p_timeStamp := *, + template LocationInfo p_locationInfo := *, + template CivicAddress p_civicInfo := *, + template RelativeLocationInfo p_relativeLocationInfo := * + ) :={ + notificationType := "UserAreaNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + locationInfo := p_locationInfo, + civicInfo := p_civicInfo, + relativeLocationInfo := p_relativeLocationInfo, + userLocationEvent := p_userLocationEvent, + links_ := p_links_ + } // End of template mw_user_area_notification + + template (omit) UserLocationEventSubscription m_user_location_event_subscription( + in CallbackReference p_callbackReference, + in Address p_address := PX_USER, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) UserEventPara p_userEventPara := omit, + in template (omit) LocationEventCriteria p_locationEventCriteria := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "UserLocationEventSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + address_ := p_address, + userEventPara := p_userEventPara, + locationEventCriteria := p_locationEventCriteria, + expiryDeadline := p_expiryDeadline + } // End of template m_user_location_event_subscription + + template (omit) UserLocationEventSubscription m_user_location_event_subscription_error( + in Address p_address := PX_USER, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) UserEventPara p_userEventPara := omit, + in template (omit) LocationEventCriteria p_locationEventCriteria := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "UserLocationEventSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := omit, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, address_ := p_address, + userEventPara := p_userEventPara, + locationEventCriteria := p_locationEventCriteria, + expiryDeadline := p_expiryDeadline + } // End of template m_user_location_event_subscription_error + + template (present) UserLocationEventSubscription mw_user_location_event_subscription( + template (present) CallbackReference p_callbackReference := ?, + template (present) Address p_address := ?, + template (present) Links p_links_ := ?, + template ClientCorrelator p_clientCorrelator := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template UserEventPara p_userEventPara := *, + template LocationEventCriteria p_locationEventCriteria := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "UserLocationEventSubscription", + clientCorrelator := p_clientCorrelator, callbackReference := p_callbackReference, - checkImmediate := p_checkImmediate, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := p_links_, + address_ := p_address, + userEventPara := p_userEventPara, + locationEventCriteria := p_locationEventCriteria, + expiryDeadline := p_expiryDeadline + } // End of template mw_user_location_event_subscription + + template (omit) UserLocationPeriodicSubscription m_user_location_periodic_subscription( + in CallbackReference p_callbackReference, + in Address p_address := PX_USER, + in template (value) PeriodicEventInfo p_periodicEventInfo := m_periodic_event_info, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "UserLocationPeriodicSubscription", clientCorrelator := p_clientCorrelator, - count := omit, - duration := omit, - enteringLeavingCriteria := p_enteringLeavingCriteria, - frequency := p_frequency, - latitude := p_latitude, - link := omit, - longitude := p_longitude, - radius := p_radius, - requester := omit, - resourceURL := p_resourceURL, - trackingAccuracy := p_trackingAccuracy - } // End of template m_circle_notification_subscription - - template CircleNotificationSubscription mw_circle_notification_subscription( - template ClientCorrelator p_clientCorrelator := *, - template (present) CallbackReference p_callbackReference := ?, - template (present) Addresses p_address := ?, - template (present) JSON.Number p_latitude := ?, - template (present) JSON.Number p_longitude := ?, - template (present) JSON.Number p_radius := ?, - template (present) JSON.Number p_trackingAccuracy := ?, - template (present) EnteringLeavingCriteria p_enteringLeavingCriteria := ?, - template (present) JSON.Bool p_checkImmediate := ?, - template (present) UInt32 p_frequency := ?, - template ResourceURL p_resourceURL := * - ) := { + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + address_ := p_address, + periodicEventInfo := p_periodicEventInfo, + expiryDeadline := p_expiryDeadline + } // End of template m_user_location_periodic_subscription + + template (present) UserLocationPeriodicSubscription mw_user_location_periodic_subscription( + template (present) CallbackReference p_callbackReference := ?, + template (present) Address p_address := ?, + template (present) Links p_links_ := ?, + template (present) PeriodicEventInfo p_periodicEventInfo := mw_periodic_event_info, + template ClientCorrelator p_clientCorrelator := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "UserLocationPeriodicSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := p_links_, address_ := p_address, + periodicEventInfo := p_periodicEventInfo, + expiryDeadline := p_expiryDeadline + } // End of template mw_user_location_periodic_subscription + + template (value) PeriodicEventInfo m_periodic_event_info( + in ReportingAmount p_reportingAmount := PX_REPORTING_AMOUNT, + in ReportingInterval p_reportingInterval := PX_REPORTING_INTERVAL + ) := { + reportingAmount := p_reportingAmount, + reportingInterval := p_reportingInterval + } // End of template m_periodic_event_info + + template (present) PeriodicEventInfo mw_periodic_event_info( + template (present) ReportingAmount p_reportingAmount := ?, + template (present) ReportingInterval p_reportingInterval := ? + ) := { + reportingAmount := p_reportingAmount, + reportingInterval := p_reportingInterval + } // End of template mw_periodic_event_info + + template (omit) ZoneLocationEventSubscription m_zone_location_event_subscription( + in CallbackReference p_callbackReference, + in Address p_address := PX_USER, + in ZoneId p_zoneId, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) LocationEventCriteria p_locationEventCriteria := omit, + in template (omit) ReportingCtrl p_reportingCtrl := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "ZoneLocationEventSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + zoneId := p_zoneId, + locationEventCriteria := p_locationEventCriteria, + reportingCtrl := p_reportingCtrl, + expiryDeadline := p_expiryDeadline + } // End of template m_zone_location_event_subscription + + template (present) ZoneLocationEventSubscription mw_zone_location_event_subscription( + template (present) CallbackReference p_callbackReference := ?, + template (present) Address p_address := ?, + template (present) ZoneId p_zoneId := ?, + template (present) Links p_links_ := ?, + template ClientCorrelator p_clientCorrelator := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template LocationEventCriteria p_locationEventCriteria := *, + template ReportingCtrl p_reportingCtrl := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "ZoneLocationEventSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := p_links_, + zoneId := p_zoneId, + locationEventCriteria := p_locationEventCriteria, + reportingCtrl := p_reportingCtrl, + expiryDeadline := p_expiryDeadline + } // End of template mw_zone_location_event_subscription + + template (omit) ZoneStatusSubscription m_zone_status_subscription( + in CallbackReference p_callbackReference, + in Address p_address := PX_USER, + in ZoneId p_zoneId, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Json.UInteger p_upperNumberOfUsersZoneThreshold := omit, + in template (omit) Json.UInteger p_lowerNumberOfUsersZoneThreshold := omit, + in template (omit) Json.UInteger p_upperNumberOfUsersAPThreshold := omit, + in template (omit) Json.UInteger p_lowerNumberOfUsersAPThreshold := omit, + in template (omit) OperationStatus p_operationStatus := omit, + in template (omit) ReportingCtrl p_reportingCtrl := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "ZoneStatusSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + zoneId := p_zoneId, + upperNumberOfUsersZoneThreshold := p_upperNumberOfUsersZoneThreshold, + lowerNumberOfUsersZoneThreshold := p_lowerNumberOfUsersZoneThreshold, + upperNumberOfUsersAPThreshold := p_upperNumberOfUsersAPThreshold, + lowerNumberOfUsersAPThreshold := p_lowerNumberOfUsersAPThreshold, + operationStatus := p_operationStatus, + reportingCtrl := p_reportingCtrl, + expiryDeadline := p_expiryDeadline + } // End of template m_zone_status_subscription + + template (present) ZoneStatusSubscription mw_zone_status_subscription( + template (present) CallbackReference p_callbackReference := ?, + template (present) Address p_address := ?, + template (present) ZoneId p_zoneId := ?, + template (present) Links p_links_ := ?, + template ClientCorrelator p_clientCorrelator := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template Json.UInteger p_upperNumberOfUsersZoneThreshold := *, + template Json.UInteger p_lowerNumberOfUsersZoneThreshold := *, + template Json.UInteger p_upperNumberOfUsersAPThreshold := *, + template Json.UInteger p_lowerNumberOfUsersAPThreshold := *, + template OperationStatus p_operationStatus := *, + template ReportingCtrl p_reportingCtrl := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "ZoneStatusSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := p_links_, + zoneId := p_zoneId, + upperNumberOfUsersZoneThreshold := p_upperNumberOfUsersZoneThreshold, + lowerNumberOfUsersZoneThreshold := p_lowerNumberOfUsersZoneThreshold, + upperNumberOfUsersAPThreshold := p_upperNumberOfUsersAPThreshold, + lowerNumberOfUsersAPThreshold := p_lowerNumberOfUsersAPThreshold, + operationStatus := p_operationStatus, + reportingCtrl := p_reportingCtrl, + expiryDeadline := p_expiryDeadline + } // End of template mw_zone_status_subscription + + template (omit) UserAreaSubscription m_user_area_subscription( + in CallbackReference p_callbackReference, + in Address p_address := PX_USER, + in template (value) AreaInfo p_areaDefine, + in template (value) AddressList p_addressList, + in Json.Number p_trackingAccuracy, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) Links p_links_ := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) LocationEventCriteria p_locationEventCriteria := omit, + in template (omit) ReportingCtrl p_reportingCtrl := omit, + in template (omit) Json.Bool p_reportingLocationReq := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "UserAreaSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + areaDefine := p_areaDefine, + addressList := p_addressList, + trackingAccuracy := p_trackingAccuracy, + locationEventCriteria := p_locationEventCriteria, + reportingCtrl := p_reportingCtrl, + reportingLocationReq := p_reportingLocationReq, + expiryDeadline := p_expiryDeadline + } // End of template m_user_area_subscription + + template (present) UserAreaSubscription mw_user_area_subscription( + template (present) CallbackReference p_callbackReference := ?, + template (present) Address p_address := ?, + template (present) Links p_links_ := ?, + template (present) AreaInfo p_areaDefine := ?, + template (present) AddressList p_addressList := ?, + template (present) Json.Number p_trackingAccuracy := ?, + template ClientCorrelator p_clientCorrelator := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template LocationEventCriteria p_locationEventCriteria := *, + template ReportingCtrl p_reportingCtrl := *, + template Json.Bool p_reportingLocationReq := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "UserAreaSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := p_links_, + areaDefine := p_areaDefine, + addressList := p_addressList, + trackingAccuracy := p_trackingAccuracy, + locationEventCriteria := p_locationEventCriteria, + reportingCtrl := p_reportingCtrl, + reportingLocationReq := p_reportingLocationReq, + expiryDeadline := p_expiryDeadline + } // End of template mw_user_area_subscription + + template (omit) UserDistanceSubscription m_user_distance_subscription( + in CallbackReference p_callbackReference, + in Address p_address := PX_USER, + in template (value) Json.AnyURIArray p_monitoredAddress, + in Json.Number p_distance, + in Json.Number p_trackingAccuracy, + in template (value) DistanceCriteria p_criteria := AllWithinDistance, + in Json.Bool p_checkImmediate := true, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.AnyURIArray p_referenceAddress := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) ReportingCtrl p_reportingCtrl := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "UserDistanceSubscription", + clientCorrelator := p_clientCorrelator, callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + referenceAddress := p_referenceAddress, + monitoredAddress := p_monitoredAddress, + distance := p_distance, + trackingAccuracy := p_trackingAccuracy, + criteria := p_criteria, checkImmediate := p_checkImmediate, + reportingCtrl := p_reportingCtrl, + expiryDeadline := p_expiryDeadline + } // End of template m_user_distance_subscription + + template (present) UserDistanceSubscription mw_user_distance_subscription( + template (present) CallbackReference p_callbackReference := ?, + template (present) Links p_links_ := ?, + template (present) Address p_address := ?, + template (present) Json.AnyURIArray p_monitoredAddress := ?, + template (present) Json.Number p_distance := ?, + template (present) Json.Number p_trackingAccuracy := ?, + template (present) DistanceCriteria p_criteria := ?, + template (present) Json.Bool p_checkImmediate := ?, + template ClientCorrelator p_clientCorrelator := *, + template Json.AnyURIArray p_referenceAddress := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template ReportingCtrl p_reportingCtrl := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "UserDistanceSubscription", clientCorrelator := p_clientCorrelator, - count := *, - duration := *, - enteringLeavingCriteria := p_enteringLeavingCriteria, - frequency := p_frequency, - latitude := p_latitude, - link := *, - longitude := p_longitude, - radius := p_radius, - requester := *, - resourceURL := p_resourceURL, - trackingAccuracy := p_trackingAccuracy - } // End of template m_wcircle_notification_subscription - - template (value) TerminalDistance m_terminal_distance(in JSON.Number p_distance) := { + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := p_links_, + referenceAddress := p_referenceAddress, + monitoredAddress := p_monitoredAddress, + distance := p_distance, + trackingAccuracy := p_trackingAccuracy, + criteria := p_criteria, + checkImmediate := p_checkImmediate, + reportingCtrl := p_reportingCtrl, + expiryDeadline := p_expiryDeadline + } // End of template mw_user_distance_subscription + + template (omit) UserDistanceNotification m_user_distance_notification( + in template (value) UserList p_monitoredUsers, + in template (value) DistanceCriteria p_distanceEvent, + in template (value) Links p_links_, + in template (omit) TimeStamp p_timeStamp := omit + ) := { + notificationType := "UserDistanceNotification", + timeStamp := p_timeStamp, + monitoredUsers := p_monitoredUsers, + distanceEvent := p_distanceEvent, + links_ := p_links_ + } // End of template m_user_distance_notification + + template (present) UserDistanceNotification mw_user_distance_notification( + template (present) UserList p_monitoredUsers := ?, + template (present) DistanceCriteria p_distanceEvent := ?, + template (present) Links p_links_ := ?, + template TimeStamp p_timeStamp := * + ) := { + notificationType := "UserDistanceNotification", + timeStamp := p_timeStamp, + monitoredUsers := p_monitoredUsers, + distanceEvent := p_distanceEvent, + links_ := p_links_ + } // End of template mw_user_distance_notification + + template (omit) UserLocationEventNotification m_user_location_event_notification( + in template (value) Address p_address_, + in template (value) LocationEventType p_userLocationEvent, + in template (value) Links p_links_, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) LocationInfo p_locationInfo := omit, + in template (omit) CivicAddress p_civicInfo := omit, + in template (omit) RelativeLocationInfo p_relativeLocationInfo := omit, + in template (omit) ZoneId p_zoneId := omit, + in template (omit) AccessPointId p_accessPointId := omit + ) :={ + notificationType := "UserLocationEventNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + userLocationEvent := p_userLocationEvent, + locationInfo := p_locationInfo, + civicInfo := p_civicInfo, + relativeLocationInfo := p_relativeLocationInfo, + zoneId := p_zoneId, + accessPointId := p_accessPointId, + links_ := p_links_ + } // End of template m_user_location_event_notification + + template (present) UserLocationEventNotification mw_user_location_event_notification( + template (present) Address p_address_ := ?, + template (present) LocationEventType p_userLocationEvent := ?, + template (present) Links p_links_ := ?, + template TimeStamp p_timeStamp := *, + template LocationInfo p_locationInfo := *, + template CivicAddress p_civicInfo := *, + template RelativeLocationInfo p_relativeLocationInfo := *, + template ZoneId p_zoneId := *, + template AccessPointId p_accessPointId := * + ) :={ + notificationType := "UserLocationEventNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + userLocationEvent := p_userLocationEvent, + locationInfo := p_locationInfo, + civicInfo := p_civicInfo, + relativeLocationInfo := p_relativeLocationInfo, + zoneId := p_zoneId, + accessPointId := p_accessPointId, + links_ := p_links_ + } // End of template mw_user_location_event_notification + + template (omit) UserLocationPeriodicNotification m_user_location_periodic_notification( + in template (value) Address p_address_, + in template (value) LocationEventType p_userLocationEvent, + in template (value) Links p_links_, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) LocationInfo p_locationInfo := omit, + in template (omit) CivicAddress p_civicInfo := omit, + in template (omit) RelativeLocationInfo p_relativeLocationInfo := omit, + in template (omit) ZoneId p_zoneId := omit, + in template (omit) AccessPointId p_accessPointId := omit, + in template (omit) Json.Bool p_isFinalNotification := omit + ) :={ + notificationType := "UserLocationPeriodicNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + userLocationEvent := p_userLocationEvent, + locationInfo := p_locationInfo, + civicInfo := p_civicInfo, + relativeLocationInfo := p_relativeLocationInfo, + zoneId := p_zoneId, + accessPointId := p_accessPointId, + isFinalNotification := p_isFinalNotification, + links_ := p_links_ + } // End of template m_user_location_periodic_notification + + template (present) UserLocationPeriodicNotification mw_user_location_periodic_notification( + template (present) Address p_address_ := ?, + template (present) LocationEventType p_userLocationEvent := ?, + template (present) Links p_links_ := ?, + template TimeStamp p_timeStamp := *, + template LocationInfo p_locationInfo := *, + template CivicAddress p_civicInfo := *, + template RelativeLocationInfo p_relativeLocationInfo := *, + template ZoneId p_zoneId := *, + template AccessPointId p_accessPointId := *, + template Json.Bool p_isFinalNotification := * + ) :={ + notificationType := "UserLocationPeriodicNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + userLocationEvent := p_userLocationEvent, + locationInfo := p_locationInfo, + civicInfo := p_civicInfo, + relativeLocationInfo := p_relativeLocationInfo, + zoneId := p_zoneId, + accessPointId := p_accessPointId, + isFinalNotification := p_isFinalNotification, + links_ := p_links_ + } // End of template mw_user_location_periodic_notification + + template (omit) ZoneLocationEventNotification m_zone_location_event_notification( + in template (value) Address p_address_, + in template (value) Links p_links_, + in template (value) LocationEventType p_userLocationEvent, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) ZoneId p_zoneId := omit + ) := { + notificationType := "ZoneLocationEventNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + userLocationEvent := p_userLocationEvent, + zoneId := p_zoneId, + links_ := p_links_ + } // End of template m_zone_location_event_notification + + template (present) ZoneLocationEventNotification mw_zone_location_event_notification( + template (present) Address p_address_ := ?, + template (present) Links p_links_ := ?, + template (present) LocationEventType p_userLocationEvent := ?, + template TimeStamp p_timeStamp := *, + template ZoneId p_zoneId := * + ) := { + notificationType := "ZoneLocationEventNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + userLocationEvent := p_userLocationEvent, + zoneId := p_zoneId, + links_ := p_links_ + } // End of template mw_zone_location_event_notification + + template (omit) ZoneStatusNotification m_zone_status_notification( + in template (value) Links p_links_, + in template (omit) UserNumEvent p_userNumEvent := omit, + in template (omit) OperationStatus p_operationStatus := omit, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) ZoneId p_zoneId := omit, + in template (omit) AccessPointId p_accessPointId := omit + ) := { + notificationType := "ZoneStatusNotification", + timeStamp := p_timeStamp, + userNumEvent := p_userNumEvent, + operationStatus := p_operationStatus, + zoneId := p_zoneId, + accessPointId := p_accessPointId, + links_ := p_links_ + } // End of template m_zone_status_notification + + template (present) ZoneStatusNotification mw_zone_status_notification( + template (present) Links p_links_ := ?, + template UserNumEvent p_userNumEvent := *, + template OperationStatus p_operationStatus := *, + template TimeStamp p_timeStamp := *, + template ZoneId p_zoneId := *, + template AccessPointId p_accessPointId := * + ) := { + notificationType := "ZoneStatusNotification", + timeStamp := p_timeStamp, + userNumEvent := p_userNumEvent, + operationStatus := p_operationStatus, + zoneId := p_zoneId, + accessPointId := p_accessPointId, + links_ := p_links_ + } // End of template mw_zone_status_notification + + template (value) TestNotification m_test_notification( + in template (value) LinksSubscription p_links_ + ) := { + notificationType := "TestNotification", + links_ := p_links_ + } // End of template m_test_notification + + template (present) TestNotification mw_test_notification( + template (present) LinksSubscription p_links_ := ? + ) := { + notificationType := "TestNotification", + links_ := p_links_ + } // End of template mw_test_notification + + template (omit) AreaInfo m_area_info( + in template (value) Shape p_shape, + in template (value) Points p_points, + in template (omit) Json.UInteger p_radius := omit + ) := { + shape := p_shape, + points := p_points, + radius := p_radius + } // End of template m_area_info + + template (present) AreaInfo mw_area_info( + template (present) Shape p_shape := ?, + template (present) Points p_points := ?, + template Json.UInteger p_radius := * + ) := { + shape := p_shape, + points := p_points, + radius := p_radius + } // End of template mw_area_info + + template (value) Point m_point( + in Json.Number p_latitude, + in Json.Number p_longitude + ) := { + latitude := p_latitude, + longitude := p_longitude + } // End of template m_point + + template (present) Point mw_point( + template (present) Json.Number p_latitude := ?, + template (present) Json.Number p_longitude := ? + ) := { + latitude := p_latitude, + longitude := p_longitude + } // End of template mw_point + + template (value) TerminalDistance m_terminal_distance(in Json.Number p_distance) := { distance := p_distance, accuracy := omit, timestamp_ := omit } // End of template m_terminal_distance - - template (present) TerminalDistance mw_terminal_distance(template (present) JSON.Number p_distance := ?) := { + + template (present) TerminalDistance mw_terminal_distance(template (present) Json.Number p_distance := ?) := { distance := p_distance, accuracy := *, timestamp_ := * } // End of template mw_terminal_distance - - template (omit) DistanceNotificationSubscription m_distance_notification_subscription( - in template (value) CallbackReference p_callbackReference, - in template (value) JSON.Bool p_checkImmediate := true, - in template (omit) ClientCorrelator p_clientCorrelator := omit, - in template (value) DistanceCriteria p_criteria := AllWithinDistance, - in template (value) JSON.Number p_distance, - in template (value) UInt32 p_frequency := 10, - in template (value) Addresses p_monitoredAddress, - in template (omit) Addresses p_referenceAddress := omit, - in template (value) JSON.Number p_trackingAccuracy := 10.0, - in template (omit) ResourceURL p_resourceURL := omit - ) := { - callbackReference := p_callbackReference, - checkImmediate := p_checkImmediate, - clientCorrelator := p_clientCorrelator, - count := omit, - criteria := p_criteria, - distance := p_distance, - duration := omit, - frequency := p_frequency, - link := omit, - monitoredAddress := p_monitoredAddress, - referenceAddress := p_referenceAddress, - requester := omit, - resourceURL := p_resourceURL, - trackingAccuracy := p_trackingAccuracy - } // End of template m_distance_notification_subscription - - template DistanceNotificationSubscription mw_distance_notification_subscription( - template (present) CallbackReference p_callbackReference := ?, - template (present) JSON.Bool p_checkImmediate := ?, - template ClientCorrelator p_clientCorrelator := *, - template (present) DistanceCriteria p_criteria := ?, - template (present) JSON.Number p_distance := ?, - template (present) UInt32 p_frequency := ?, - template (present) Addresses p_monitoredAddress := ?, - template Addresses p_referenceAddress := *, - template (present) JSON.Number p_trackingAccuracy := ?, - template ResourceURL p_resourceURL := * - ) := { - callbackReference := p_callbackReference, - checkImmediate := p_checkImmediate, - clientCorrelator := p_clientCorrelator, - count := *, - criteria := p_criteria, - distance := p_distance, - duration := *, - frequency := p_frequency, - link := *, - monitoredAddress := p_monitoredAddress, - referenceAddress := p_referenceAddress, - requester := *, - resourceURL := p_resourceURL, - trackingAccuracy := p_trackingAccuracy - } // End of template mw_distance_notification_subscription - - template (omit) PeriodicNotificationSubscription m_periodic_notification_subscription( - in template (value) Addresses p_address, - in template (value) CallbackReference p_callbackReference, - in template (value) UInt32 p_frequency := 10, - in template (value) UInt32 p_requestedAccuracy := 1, - in template (omit) ClientCorrelator p_clientCorrelator := omit, - in template (omit) ResourceURL p_resourceURL := omit - ) := { - address_ := p_address, - callbackReference := p_callbackReference, - clientCorrelator := p_clientCorrelator, - duration := omit, - frequency := p_frequency, - link := omit, - requestedAccuracy := p_requestedAccuracy, - requester := omit, - resourceURL := p_resourceURL - } // End of template m_periodic_notification_subscription - - template PeriodicNotificationSubscription mw_periodic_notification_subscription( - template (present) Addresses p_address := ?, - template (present) CallbackReference p_callbackReference := ?, - template (present) UInt32 p_frequency := ?, - template (present) UInt32 p_requestedAccuracy := ?, - template ClientCorrelator p_clientCorrelator := *, - template ResourceURL p_resourceURL := * - ) := { - address_ := p_address, - callbackReference := p_callbackReference, - clientCorrelator := p_clientCorrelator, - duration := *, - frequency := p_frequency, - link := *, - requestedAccuracy := p_requestedAccuracy, - requester := *, - resourceURL := p_resourceURL - } // End of template mw_periodic_notification_subscription } // End of module LocationAPI_Templates diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn index 69321a2e2e48f8c71c161a8d8284d6210e7cdda5..e7f86e40a8e3399d686257fb58c451899fda1017 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn @@ -1,8 +1,8 @@ /** - * @author ETSI / STF569 + * @author ETSI / STF569 / TTF T027 * @version $Url$ * $Id$ - * @desc Types ANd Values for ETSI GS MEC 013 V2.1.1 (2019-09) + * @desc Types ANd Values for ETSI GS MEC 013 V3.1.1 (2019-09) * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. @@ -11,82 +11,105 @@ module LocationAPI_TypesAndValues { // JSON - import from JSON all; + import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @desc This type represents a list of UserInfo. + * @member user Collection of the user location information list. + * @member resourceURL Self referring URL. + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.5 Type: UserList */ - type UInt32 Seconds; + type record UserList { + UserInfos user optional, + ResourceURL resourceURL optional + } + type set of UserInfo UserInfos; /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @desc This type represents configuration for the delivery of subscription notifications over Websockets + * @member websocketUri Set by location server to indicate to the service consumer the Websocket URI to be used for delivering notifications + * @member requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.4 Type: WebsockNotifConfig */ - type UInt32 NanoSeconds; + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional + } /** - * @desc - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 013 V2.1.1 (2019-09) Clause 6.5.2 Type: TimeStamp + * @desc This type represents some requirements about reporting the event of user locationreportingLocationReq This IE shall be set to true if a location estimate is required for each event report + * @member accessPointList One or more access points forming a monitoring area that could be any shape + * @member zoneId Identifier of zone (e.g. zone001) to monitor + * @member occurrenceInfo One time only report indication + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.5 Type: UserEventPara */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds + type record UserEventPara { + Json.Bool reportingLocationReq optional, + AccessPointList accessPointList optional, + ZoneId zoneId optional, + OccurrenceInfo occurrenceInfo optional + } // End of type UserEventPara + + +/** + * @desc Indicates whether event reporting is one time + * @see ETSI TS 129 572 V16.7.0 (2021-08) Clause 6.1.6.3.16 Enumeration: OccurrenceInfo + */ + type enumerated OccurrenceInfo { + ONE_TIME_EVENT, + MULTIPLE_TIME_EVENT } /** - * @desc A type containing list of users. - * @member user Collection of the zone information list. - * @member resourceURL Self referring URL. - * @see ETSI GS MEC 013 V2.1.1 (2019-09) Clause 6.2.2 Type: UserInfo + * @desc This type represents the parameters that control the report times and frequency + * @member minimumInterval Minimum interval between reports in case frequently reporting. Unit is second. + * @member maximumFrequency Maximum frequency (in seconds) of notifications per subscription + * @member maximumCount Maximum number of notifications. For no maximum, either do not include this element or specify a value of zero. Default value is 0 + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.6 Type: ReportingCtrl */ - type record of UserInfo UserInfos; - type record UserList { - UserInfos user optional, - ResourceURL resourceURL - } + type record ReportingCtrl { + Json.UInteger minimumInterval optional, + Json.UInteger maximumFrequency optional, + Json.UInteger maximumCount optional + } // End of type ReportingCtrl /** - * @desc Shape information, as detailed in [14], associated with the reported location coordinate - * @see ETSI GS MEC 013 V2.1.1 (2019-09) Table 6.5.3-1: Definition of type LocationInfo + * @desc This type represents the parameters that describe an area + * @member shape The shape of the area monitored + * @member points Shall include one point if the shape is CIRCLE + * @member radius + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.7 Type: AreaInfo */ - type enumerated Shape { - ELLIPSOID_ARC (1), - ELLIPSOID_POINT (2), - ELLIPSOID_POINT_ALTITUDE (3), - ELLIPSOID_POINT_ALTITUDE_UNCERT_ELLIPSOID (4), - ELLIPSOID_POINT_UNCERT_CIRCLE (5), - ELLIPSOID_POINT_UNCERT_ELLIPSE (6), - POLYGON (7) - } with { - variant "JSON: as number" - } + type record AreaInfo { + Shape shape, + Points points, + Json.UInteger radius optional + } // End of type AreaInfo /** - * @desc Velocity information, as detailed in [14], associated with the reported location coordinate - * @see ETSI GS MEC 013 V2.1.1 (2019-09) Table 6.5.3-1: Definition of type LocationInfo + * @desc Location latitude, expressed in the range -90° to +90° */ - type enumerated VelocityType { - HORIZONTAL (1), - HORIZONTAL_VERTICAL (2), - HORIZONTAL_UNCERT (3), - HORIZONTAL_VERTICAL_UNCERT (4) - } + type set of Json.Number Latitude; - type record Velocity { - VelocityType velocityType, - UInt32 bearing, - UInt32 horizontalSpeed, - Int32 verticalSpeed optional, - UInt32 verticalUncertainty optional - } - - type record of JSON.Number Latitude; + /** + * @desc Location longitude, expressed in the range -180° to +180° + */ + type set of Json.Number Longitude; - type record of JSON.Number Longitude; + /** + * @desc This type represents the geographical location of a point + * @member latitude Location latitude, expressed in the range -90° to +90° + * @member longitude Location longitude, expressed in the range -180° to +180° + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.8 Type: Point + */ + type record Point { + Json.Number latitude, + Json.Number longitude + } // End of type Point + type set of Point Points; /** * @desc A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided. @@ -104,28 +127,85 @@ module LocationAPI_TypesAndValues { * @member includedAngle Present only if \"shape\" equals 6 * @member shape Shape information, as detailed in [14], associated with the reported location coordinate * @member velocity Structure with attributes relating to the target entity’s velocity, as defined in [14] - * @see ETSI GS MEC 013 V2.1.1 (2019-09) Clause 6.5.3 Type: LocationInfo + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.3 Type: LocationInfo */ type record LocationInfo { - Latitude latitude, - Longitude longitude, - JSON.Number altitude optional, - UInt32 accuracy optional, - UInt32 accuracySemiMinor optional, - UInt32 accuracyAltitude optional, - UInt32 orientationMajorAxis optional, - UInt32 confidence optional, - UInt32 innerRadius optional, - UInt32 uncertaintyRadius optional, - UInt32 offsetAngle optional, - UInt32 includedAngle optional, - Shape shape, - TimeStamp timestamp_ optional, - Velocity velocity optional + Latitude latitude, + Longitude longitude, + Json.Number altitude optional, + Json.UInteger accuracy optional, + Json.UInteger accuracySemiMinor optional, + Json.UInteger accuracyAltitude optional, + Json.UInteger orientationMajorAxis optional, + Json.UInteger confidence optional, + Json.UInteger innerRadius optional, + Json.UInteger uncertaintyRadius optional, + Json.UInteger offsetAngle optional, + Json.UInteger includedAngle optional, + Shape shape, + TimeStamp timestamp_ optional, + Velocity velocity optional } with { variant (timestamp_) "name as 'timestamp'"; } // End of type LocationInfo + /** + * @desc Shape information, as detailed in [14], associated with the reported location coordinate + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Table 6.5.3-1: Definition of type LocationInfo + */ + type enumerated Shape { + ELLIPSOID_ARC (1), + ELLIPSOID_POINT (2), + ELLIPSOID_POINT_ALTITUDE (3), + ELLIPSOID_POINT_ALTITUDE_UNCERT_ELLIPSOID (4), + ELLIPSOID_POINT_UNCERT_CIRCLE (5), + ELLIPSOID_POINT_UNCERT_ELLIPSE (6), + POLYGON (7) + } with { + variant "JSON: as number" + } + + /** + * @desc Velocity information, as detailed in [14], associated with the reported location coordinate + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Table 6.5.3-1: Definition of type LocationInfo + */ + type enumerated VelocityType { + HORIZONTAL (1), + HORIZONTAL_VERTICAL (2), + HORIZONTAL_UNCERT (3), + HORIZONTAL_VERTICAL_UNCERT (4), + ELLIPSOID_POINT_UNCERT_CIRCLE (5), + ELLIPSOID_POINT_UNCERT_ELLIPSE (6), + POLYGON (7) + } with { + variant "JSON: as number" + } + + /** + * @desc Structure with attributes relating to the target entity's velocity + * @member velocityType Velocity information + * @member bearing Bearing, expressed in the range 0° to 360° + * @member horizontalSpeed Horizontal speed + * @member uncertainty Horizontal uncertainty + * @member verticalSpeed Vertical speed, expressed in km/h + * @member verticalUncertainty Vertical uncertainty + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Table 6.5.3-1: Definition of type LocationInfo + */ + type record Velocity { + VelocityType velocityType, + Json.UInteger bearing, + Json.UInteger horizontalSpeed, + Json.UInteger uncertainty optional, + Json.Integer verticalSpeed optional, + Json.UInteger verticalUncertainty optional + } // End of type Velocity + + /** + * @desc Identifier of access point, (reference ETSI TS 129 171). Where the E-CGI is made up of the PLMN and Cell Identity (28 bit string). Then the PLMN is made up of the 3 digit MCC & 2 or 3 digit MNC. The Cell Portion is an optional element + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.6.1 accessPointId + */ + type Json.String AccessPointId; + /** * @desc A type containing zone information. * @member zoneId Identifier of zone @@ -133,33 +213,31 @@ module LocationAPI_TypesAndValues { * @member numberOfUnservicableAccessPoints Number of inoperable access points within the zone. * @member numberOfUsers The number of users currently on the access point. * @member resourceURL Self referring URL. + * @see OMA-TS-REST_NetAPI_ZonalPresence-V1_0-20160308-C Clause 5.2.2.2 Type: ZoneInfo + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1 Zonal presence data types */ type record ZoneInfo { - ZoneId zoneId, - NumberOfAccessPoints numberOfAccessPoints, + ZoneId zoneId, + NumberOfAccessPoints numberOfAccessPoints, NumberOfUnserviceableAccessPoints numberOfUnservicableAccessPoints, - NumberOfUsers numberOfUsers, - ResourceURL resourceURL + NumberOfUsers numberOfUsers, + ResourceURL resourceURL } + type set of ZoneInfo ZoneInfos; /** * @desc Collection of the zone information list. * @member zone Collection of the zone information list. * @member resourceURL Self referring URL. + * @see OMA-TS-REST_NetAPI_ZonalPresence-V1_0-20160308-C Clause 5.2.2.1 Type: ZoneList + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1 Zonal presence data types */ - type record of ZoneInfo ZoneInfos; type record ZoneList { ZoneInfos zone optional, ResourceURL resourceURL } - /** - * @desc Identifier of access point, (reference ETSI TS 129 171). Where the E-CGI is made up of the PLMN and Cell Identity (28 bit string). Then the PLMN is made up of the 3 digit MCC & 2 or 3 digit MNC. The Cell Portion is an optional element - * @see ETSI GS MEC 013 V2.1.1 (2019-09) 6.6.1 accessPointId - */ - type JSON.String AccessPointId; - - type UInt32 DateTimeStamp; // FIXME To be reviewed + type Json.UInteger DateTimeStamp; // FIXME To be reviewed /** * @desc A type containing access point information. @@ -170,161 +248,173 @@ module LocationAPI_TypesAndValues { * @member interestRealm Interest realm of access point * @member timezone Time zone of access point * @member resourceURL Self referring URL. + * @see OMA-TS-REST_NetAPI_ZonalPresence-V1_0-20160308-C Clause 5.2.2.4 Type: AccessPointInfo + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1 Zonal presence data types */ type record AccessPointInfo { - AccessPointId accessPointId, - LocationInfo locationInfo optional, - ConnectionType connectionType, + AccessPointId accessPointId, + LocationInfo locationInfo optional, + ConnectionType connectionType, OperationStatus operationStatus, - NumberOfUsers numberOfUsers, - InterestRealm interestRealm optional, - DateTimeStamp timezone optional, - ResourceURL resourceURL + NumberOfUsers numberOfUsers, + InterestRealm interestRealm optional, + DateTimeStamp timezone optional, + ResourceURL resourceURL } + /** * @desc Collection of the access point information list */ - type record of AccessPointInfo AccessPointInfos; + type set of AccessPointInfo AccessPointInfos; /** * @desc A type containing list of access points. * @member zoneId Identifier of zone * @member accessPoint Collection of the access point information list. * @member resourceURL Self referring URL + * @see OMA-TS-REST_NetAPI_ZonalPresence-V1_0-20160308-C Clause 5.2.2.3 Type: AccessPointList + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1 Zonal presence data types */ type record AccessPointList { - ZoneId zoneId, + ZoneId zoneId, AccessPointInfos accessPoint optional, - ResourceURL resourceURL + ResourceURL resourceURL } /** - * @desc Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI). + * @desc Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) */ - type JSON.AnyURI Address - type record of Address Addresses; + type Json.AnyURI Address + type set of Address Addresses; /** * @desc Reserved for future use. */ - type JSON.String AncillaryInfo; - - /** - * @desc CallBackData if passed by the application during the associated ZonalTrafficSubscription and UserTrackingSubscription operation. See [\ -REST_NetAPI_Common]. - */ - type JSON.String CallbackData; - - /** - * @desc Notification serialization format - */ - type enumerated NotificationFormat { - JSON (1), - XML (2) - } + type Json.String AncillaryInfo; /** * @desc CallbackData description - * @member callbackData Data the application can register with the server when subscribing to notifications, and that are passed back unchanged in each of the related notifications. These data can be used by the application in the processing of the notification, e.g. for correlation purposes - * @member notificationFormat - * @member notifyURL Notify Callback URL - */ - type record CallbackReference { - NotifyURL notifyURL, - CallbackData callbackData optional, - NotificationFormat notificationFormat optional - } + */ + type Json.AnyURI CallbackReference; /** * @desc Uniquely identifies this create subscription request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid creating a duplicate subscription. */ - type JSON.String ClientCorrelator; + type Json.String ClientCorrelator; /** - * @desc The connection type for the access point + * @desc This enumeration represents the connection type of an access point. + * @member LTE Access point provides a LTE-Femto connection + * @member Wifi Access point provides a Wifi® connection + * @member Wimax Access point provides a Wimax® connection + * @member FiveG_NR Access point provides a 5G NR connection + * @member UNKNOWN Access point connection type is unknown + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.7.5 Enumeration: ConnectionType */ type enumerated ConnectionType { - Femto, - LTE_femto, - Smallcell, - LTE_smallcell, + LTE, Wifi, - Pico, - Micro, - Macro, Wimax, - Unknown + FiveG_NR, + UNKNOWN } - /** - * @desc Contextual information of a user location (e.g., aisle, floor, room number, etc.) - */ - type JSON.String ContextLocationInfo; - /** * @desc Zone ID */ - type JSON.String CurrentAccessPointId; + type Json.String CurrentAccessPointId; /** * @desc Period (in seconds) of time notifications are provided for. If set to \"0\" (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications. This element MAY be given by the client during resource creation in order to signal the desired lifetime of the subscription. The server MUST return in this element the period of time for which the subscription will still be valid. */ - type JSON.Date Duration; + type Json.Date Duration; /** * @desc Interest realm of access point (e.g. geographical area, a type of industry etc.). */ - type JSON.String InterestRealm; + type Json.String InterestRealm; + + /** + * @desc This type represents a type of link and may be referenced from data structures + * @member href URI referring to a resource + * @see ETSI TS 129 572 V16.7.0 (2021 08) Clause 6.7.2 Type: LinkType + */ + type record LinkType { + Json.AnyURI href + } /** - * @desc Link to other resources - * @member rel Describes the relationship between the URI and the resource. - * @member href UTI + * @desc This type represents specified event types for UE location report + * @member ENTERING_AREA_EVENT Entering area reporting event + * @member LEAVING_AREA_EVENT Leaving area reporting event + * @see ETSI TS 129 572 V16.7.0 (2021 08) Clause 6.7.3 Enumeration: LocationEventType */ - type record Link { - JSON.String rel, - JSON.String href + type enumerated LocationEventType { + ENTERING_AREA_EVENT, + LEAVING_AREA_EVENT + } + type set of LocationEventType LocationEventCriteria; + + /** + * @desc This enumeration represents the result of a localization associated with a notification + * @member SUCCESS Localization is successful + * @member ABNORMAL Localization is failed due to timeout or other unspecific errors + * @see ETSI TS 129 572 V16.7.0 (2021 08) 6.7.4 Enumeration: NotificationResult + */ + type enumerated NotificationResult { + SUCCESS, + ABNORMAL } /** * @desc The URL of your own listener application. */ - type JSON.String NotifyURL; + type Json.AnyURI NotifyURL; + + /** + * @desc Hyperlink related to the resource + * @member self_ Self-referring URI + */ + type record Links { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } /** * @desc The number of access points within the zone */ - type UInt32 NumberOfAccessPoints; + type Json.UInteger NumberOfAccessPoints; /** * @desc Number of inoperable access points within the zone. */ - type UInt32 NumberOfUnserviceableAccessPoints; + type Json.UInteger NumberOfUnserviceableAccessPoints; /** * @desc The number of users currently on the access point. */ - type UInt32 NumberOfUsers; + type Json.UInteger NumberOfUsers; /** * @desc Threshold number of users in an access point which if crossed shall cause a notification. */ - type UInt32 NumberOfUsersAPThreshold; + type Json.UInteger NumberOfUsersAPThreshold; /** * @desc This element shall be present when ZoneStatusSubscription includes numberOfUsersAPThreshold element and the number of users in an access point exceeds the threshold defined in the subscription. */ - type UInt32 NumberOfUsersInAP; + type Json.UInteger NumberOfUsersInAP; /** * @desc Threshold number of users in a zone which if crossed shall cause a notification. */ - type UInt32 NumberOfUsersInZone; + type Json.UInteger NumberOfUsersInZone; /** * @desc Threshold number of users in a zone which if crossed shall cause a notification. */ - type UInt32 NumberOfUsersZoneThreshold; + type Json.UInteger NumberOfUsersZoneThreshold; /** * @desc The operation status of the access point @@ -347,17 +437,17 @@ REST_NetAPI_Common]. /** * @desc Zone ID */ - type JSON.String PreviousAccessPointId; + type Json.String PreviousAccessPointId; /** * @desc Self referring URL */ - type JSON.AnyURI ResourceURL; + type Json.AnyURI ResourceURL; /** * @desc Time zone of access point */ - type JSON.String Timezone; + type Json.String Timezone; /** * @desc User event @@ -371,372 +461,658 @@ REST_NetAPI_Common]. /** * @desc List of user event values to generate notifications for (these apply to address specified). If this element is missing, a notification is requested to be generated for any change in user event. */ - type record of UserEventType UserEventCriteria; + type set of UserEventType UserEventCriteria; + + /** + * @desc Definition of type CivicAddress + * @member country The two-letter ISO 3166 country code in capital ASCII letters + * @member A1 National subdivisions + * @member A2 County, parish + * @member A3 City, township + * @member A4 City division, borough, city district + * @member A5 Neighbourhood + * @member A6 Group of streets below the neighbourhood level IETF RFC 4776 [6] + * @member PRD Leading street direction IETF RFC 4776 [6] + * @member POD Trailing street suffix IETF RFC 4776 [6] + * @member STS Street suffix or type IETF RFC 4776 [6] + * @member HNO House number IETF RFC 4776 [6] + * @member HNS House number suffix IETF RFC 4776 [6] + * @member LMK Landmark or vanity address IETF RFC 4776 [6] + * @member LOC Additional location information IETF RFC 4776 [6] + * @member NAM Name (residence and office occupant) IETF RFC 4776 [6] + * @member PC Postal/zip code IETF RFC 4776 [6] + * @member BLD Building (structure) IETF RFC 5139 [7] + * @member UNIT Unit (apartment, suite) IETF RFC 5139 [7] + * @member FLR Floor IETF RFC 4776 [6] + * @member Room Place-type IETF RFC 5139 [7] + * @member PCN Postal community name IETF RFC 5139 [7] + * @member POBOX Post office box (P.O. box) IETF RFC 5139 [7] + * @member ADDCODE Additional code IETF RFC 5139 [7] + * @member SEAT Seat (desk, cubicle, workstation) IETF RFC 5139 [7] + * @member RD Primary road or street IETF RFC 5139 [7] + * @member RDSEC Road clause IETF RFC 5139 [7] + * @member RDBR Road branch IETF RFC 5139 [7] + * @member RDSUBBR Road sub-branch IETF RFC 5139 [7] + * @member PRM Road pre-modifier IETF RFC 5139 [7] + * @member POM Road post-modifier IETF RFC 5139 [7] + * @member usageRules When present, this IE shall carry the value of "usagerules" Element of the PIDL-LO XML document + * @member method When present, this IE shall contain the method token, carried by the "method" Element of the PIDLLO XML document. IETF RFC 4119 [25] providedBy string O 0..1 When present, this IE shall carry the value of "provided-by" Element of the PIDL-LO XML document + * @member providedBy When present, this IE shall carry the value of "provided-by" Element of the PIDL-LO XML document + * @see ETSI TS 129 572 V16.7.0 (2021 08) Table 6.1.6.2.14-1 + */ + type record CivicAddress { + Json.String country, + Json.String A1 optional, + Json.String A3 optional, + Json.String A4 optional, + Json.String A5 optional, + Json.String A6 optional, + Json.String PRD optional, + Json.String POD optional, + Json.String STS optional, + Json.String HNO optional, + Json.String HNS optional, + Json.String LMK optional, + Json.String LOC optional, + Json.String NAM optional, + Json.String PC optional, + Json.String BLD optional, + Json.String UNIT optional, + Json.String FLR optional, + Json.String Room optional, + Json.String PCN optional, + Json.String POBOX optional, + Json.String ADDCODE optional, + Json.String SEAT optional, + Json.String RD optional, + Json.String RDSEC optional, + Json.String RDBR optional, + Json.String RDSUBBR optional, + Json.String PRM optional, + Json.String POM optional, + Json.String usageRules optional, + Json.String method optional, + Json.String providedBy optional + } /** * @desc A type containing user information. * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI). * @member accessPointId Identifier of access point, (reference ETSI TS 129 171). - * @member zoneId Identifier of zone - * @member timestamp + * @member zoneId The identity of the zone the user is currently within, + * @member timestamp Date and time that location was collected * @member resourceURL Self referring URL. * @member locationInfo A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided. + * @member civicInfo Contextual information of a user location * @member contextLocationInfo Contextual information of a user location (e.g. aisle, floor, room number, etc.). * @member ancillaryInfo Reserved for future use - * @see ETSI GS MEC 013 V2.1.1 (2019-09) Clause 6.2.2 Type: UserInfo + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.2 Type: UserInfo */ type record UserInfo { - Address address_, - AccessPointId accessPointId, - ZoneId zoneId, - TimeStamp timestamp_, - ResourceURL resourceURL, - LocationInfo locationInfo optional, - ContextLocationInfo contextLocationInfo optional, - AncillaryInfo ancillaryInfo optional + Address address_, + AccessPointId accessPointId, + ZoneId zoneId, + ResourceURL resourceURL optional, + TimeStamp timestamp_, + LocationInfo locationInfo optional, + CivicAddress civicInfo optional, + AncillaryInfo ancillaryInfo optional, + RelativeLocationInfo relativeLocationInfo optional } with { variant (address_) "name as 'address'"; variant (timestamp_) "name as 'timestamp'"; } // End of type UserInfo /** - * @desc A type containing user tracking subscription. - * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server - * @member callbackReference - * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) to monitor - * @member userEventCriteria List of user event values to generate notifications for (these apply to address specified). If this element is missing, a notification is requested to be generated for any change in user event - * @member resourceURL Self referring URL + * @desc Represents the relative location in a reference system that is a Cartesian coordinate system and described by a map + * @member mapInfo Indicates a map corresponding to a location area + * @member X Indicates the value (in the unit of meters) on x-axis of the relative location in the Cartesian system + * @member Y Indicates the value (in the unit of meters) on y-axis of the relative location in the Cartesian system + * @member Z Indicates the value (in the unit of meters) on z-axis of the relative location in the Cartesian system for a 3D-Point + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.3 */ - type record UserTrackingSubscription { - ClientCorrelator clientCorrelator optional, - CallbackReference callbackReference, - Address address_, - UserEventCriteria userEventCriteria optional, - ResourceURL resourceURL optional + type record RelativeLocationInfo { + MapInfo mapInfo, + Json.Number X, + Json.Number Y, + Json.Number Z optional + } + + /** + * @desc Indicates the location of the map origin in the local Cartesian coordinate system + * @member latitude Location latitude, expressed in the range -90° to +90° + * @member longitude Location longitude, expressed in the range -180° to +180° + * @member Location altitude relative to the WGS84 ellipsoid surface + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.4 + */ + type record MapInfoOrigin { + Json.Number latitude, + Json.Number longitude, + Json.Number altitude optional + } + + /** + * @desc This type represents a map that may incorporates an origin + * @member mapId Indicates the ID of the map + * @member Indicates the location of the map origin in the local Cartesian coordinate system + * @member ancillaryMapInfo Ancillary map information may be used to convert coordinates between different coordinate systems + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.4 + */ + type record MapInfo { + Json.String mapId, + MapInfoOrigin origin optional, + AncillaryMapInfo ancillaryMapInfo optional + } + type Json.String AncillaryMapInfo; + + /** + * @desc Identifier of zone + */ + type Json.String ZoneId; + type enumerated EnteringLeavingCriteria { + Entering, + Leaving + } + + /** + * @desc A type containing information about the distance from a terminal to a location or between two terminals, in addition the accuracy and a timestamp of the information are provided + * @member distance Distance from terminal to a location or between two terminals specified in meters + * @member accuracy Accuracy of the provided distance in meters + * @member timestamp Date and time that location from which distance is calculated was collected + * @see OMA-TS-REST_NetAPI_TerminalLocation-V1_0_1-20151029-A Clause 5.2.2.5 Type: TerminalDistance + */ + type record TerminalDistance { + Json.Number distance, + Json.Number accuracy optional, + TimeStamp timestamp_ optional } with { - variant (address_) "name as 'address'"; + variant (timestamp_) "name as 'timestamp'"; } /** - * @desc A type containing periodic tracking subscription. - * @member + * @desc Distance criterium + * @member AllWithinDistance All monitored devices are within the specified distance + * @member AnyWithinDistance Any of monitored devices gets within the specified distance + * @member AllBeyondDistance All monitored devices are beyond the specified distance + * @member AnyBeyondDistance Any of monitored devices gets beyond the specified distance + * @see OMA-TS-REST_NetAPI_TerminalLocation-V1_0_1-20151029-A Clause 5.2.3.2 Enumeration: DistanceCriteria */ - type record PeriodicTrackingSubscription { - ClientCorrelator clientCorrelator optional, - CallbackReference callbackReference, - Address address_, - JSON.Number frequency, - JSON.Number requestedAccuracy, - ResourceURL resourceURL optional + type enumerated DistanceCriteria { + AllWithinDistance, + AnyWithinDistance, + AllBeyondDistance, + AnyBeyondDistance + } + + /** + * @desc A type containing device address, retrieval status and location information + * @member address_ Address of the terminal to which the location information applies (e.g., 'sip' URI, 'tel' URI, 'acr' URI) + * @member locationRetrievalStatus Status of retrieval for this terminal address + * @member currentLocation Location of terminal + * @member errorInformation Used to indicate a notification termination or cancellation + * @see OMA-TS-REST_NetAPI_TerminalLocation-V1_0_1-20151029-A Clause 5.2.2.1 Type: TerminalLocation + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1A Terminal location data types + */ + type record TerminalLocation { + Address address_, + RetrievalStatus locationRetrievalStatus, + LocationInfo currentLocation optional, + ServiceError errorInformation optional } with { variant (address_) "name as 'address'"; + } // End of type TerminalLocation + type set of TerminalLocation TerminalLocationList + + /** + * @desc Indicate a notification termination or cancellation + * @member messageId Message identifier, either with prefix SVC or with prefix POL + * @member text Message text, with replacement variables marked with %n, where n is an index into the list of elements, starting at 1 + * @member variables Variables to substitute into text string + * @see OMA-TS-REST_NetAPI_Common-V1_0-20180116-A Clause B.1.4 Type: ServiceError + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1A Terminal location data types + */ + type record ServiceError { + Json.String messageId, + Json.String text, + Json.String variables optional + } // End of type ServiceError + + /** + * @desc This type contains a list of subscriptions + * @member href The URI referring to the subscription + * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.3 Type: NotificationSubscriptionList + */ + type record Subscription { + Json.AnyURI href optional, + Json.String subscriptionType } + type set of Subscription Subscriptions; /** - * @desc A type containing zonal presence notification - * @member callbackData CallBackData if passed by the application during the associated ZonalTrafficSubscription and UserTrackingSubscription operation. See - * @member zoneId Identifier of zone - * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) to monitor - * @member interestRealm Interest realm of access point (e.g. geographical area, a type of industry etc.) - * @member userEventType - * @member currentAccessPointId Identifier of access point - * @member previousAccessPointId Identifier of access point - * @member timestamp_ - * @member link Link to other resources that are in relationship with this notification. The server SHOULD include a link to the related subscription. No other links are required or suggested by this specification. - */ - type record ZonalPresenceNotification { - CallbackData callbackData optional, - ZoneId zoneId, - Address address_, - InterestRealm interestRealm optional, - UserEventType userEventType, - CurrentAccessPointId currentAccessPointId, - PreviousAccessPointId previousAccessPointId optional, - TimeStamp timestamp_, - Link link optional + * @desc This type contains a list of subscriptions + * @member subscription Subscription elements + * @member resourceURL Self-referring URL + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.3 Type: NotificationSubscriptionList + */ + type record NotificationSubscriptionList { + Subscriptions subscription optional, + LinkType resourceURL + } + + /** + * @desc This type represents a subscription to the notifications from location server about events related with user location + * @member subscriptionType Shall be set to "UserLocationEventSubscription" + * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server + * @member callbackReference URI exposed by the client on which to receive notifications via HTTP + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member _links Hyperlink related to the resource + * @member address Address of user (e.g. 'sip' URI, 'tel' URI, 'acr' URI) to monitor + * @member userEventPara Requirements for user event reporting. + * @member locationEventCriteria List of user event values to generate notifications for (these apply to address specified). + * @member expiryDeadline The expiration time of the subscription determined by the UE Location Subscribe Service + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.4 Type: UserLocationEventSubscription + */ + type record UserLocationEventSubscription { + Json.String subscriptionType, + Json.String clientCorrelator optional, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + Address address_, + UserEventPara userEventPara optional, + LocationEventCriteria locationEventCriteria optional, + TimeStamp expiryDeadline optional } with { + variant (links_) "name as '_links'"; variant (address_) "name as 'address'"; - variant (timestamp_) "name as 'timestamp'"; - } + } // End of type UserLocationEventSubscription /** - * @desc A type containing zonal traffic subscription + * @desc This type represents a subscription to the notifications from location server about events triggered by timer expiration + * @member subscriptionType Shall be set to "UserLocationEventSubscription" * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server - * @member callbackReference - * @member zoneId Identifier of zone - * @member interestRealm Interest realms of access points within a zone (e.g. geographical area, a type of industry etc.). - * @member userEventCriteria List of user event values to generate notifications for (these apply to zone identifier or all interest realms within zone identifier specified). If this element is missing, a notification is requested to be generated for any change in user event. - * @member duration Period (in seconds) of time notifications are provided for - * @member resourceURL Self referring URL + * @member callbackReference URI exposed by the client on which to receive notifications via HTTP + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member _links Hyperlink related to the resource + * @member address_ Address of user (e.g. 'sip' URI, 'tel' URI, 'acr' URI) to monitor + * @member periodicEventInfo Information for periodic event reporting + * @member expiryDeadline The expiration time of the subscription determined by the UE Location Subscribe Service + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.5 Type: UserLocationPeriodicSubscription */ - type record ZonalTrafficSubscription { - ClientCorrelator clientCorrelator optional, - CallbackReference callbackReference, - ZoneId zoneId, - InterestRealm interestRealm optional, - UserEventCriteria userEventCriteria optional, - Duration duration optional, - ResourceURL resourceURL optional - } + type record UserLocationPeriodicSubscription{ + Json.String subscriptionType, + Json.String clientCorrelator optional, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + Address address_, + PeriodicEventInfo periodicEventInfo, + TimeStamp expiryDeadline optional + } with { + variant (links_) "name as '_links'"; + variant (address_) "name as 'address'"; + } // End of type UserLocationPeriodicSubscription /** - * @desc Identifier of zone + * @desc Information for periodic event reporting + * @member reportingAmount Number of event reports + * @member reportingInterval Interval of event reports + * @see ETSI TS 129 572 V16.7.0 Clause 6.1.6.2.24 Type: PeriodicEventInfo */ - type JSON.String ZoneId; + type record PeriodicEventInfo { + ReportingAmount reportingAmount, + ReportingInterval reportingInterval + } // End of type PeriodicEventInfo /** - * @desc A type containing zone status notification. - * @member callbackData CallBackData if passed by the application during the associated ZoneStatusSubscription operation - * @member zoneId Identifier of zone - * @member accessPointId Identifier of an access point - * @member numberOfUsersInZone This element shall be present when ZoneStatusSubscription includes numberOfUsersZoneThreshold element and the number of users in a zone exceeds the threshold defined in this subscription - * @member numberOfUsersInAP This element shall be present when ZoneStatusSubscription includes numberOfUsersAPThreshold element and the number of users in an access point exceeds the threshold defined in the subscription - * @member operationStatus - * @member timestamp_ - * @member link Link to other resources that are in relationship with this notification + * @desc Number of required periodic event reports. + * Minimum: 1. Maximum: 8639999. + * @see ETSI TS 129 572 V16.7.0 Clause 6.1.6.3.2 Simple data types */ - type record ZoneStatusNotification { - CallbackData callbackData optional, - ZoneId zoneId, - AccessPointId accessPointId optional, - NumberOfUsersInZone numberOfUsersInZone optional, - NumberOfUsersInAP numberOfUsersInAP optional, - OperationStatus operationStatus optional, - TimeStamp timestamp_, - Link link optional + type integer ReportingAmount; + + /** + * @desc Event reporting periodic interval in seconds. + * Minimum: 1. Maximum: 8639999. + * @remark ReportingInterval * ReportingAmount shall not exceed 8639999 + * @see ETSI TS 129 572 V16.7.0 Clause 6.1.6.3.2 Simple data types + */ + type integer ReportingInterval; + + /** + * @desc This type represents a subscription to the notifications from location server about user location events happened in the zone + * @desc This type represents a subscription to the notifications from location server about events related with user location + * @member subscriptionType Shall be set to "UserLocationEventSubscription" + * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server + * @member callbackReference URI exposed by the client on which to receive notifications via HTTP + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member _links Hyperlink related to the resource + * @member zoneId Identifier of zone (e.g. zone001) to monitor + * @member reportingCtrl Provides parameters that ctrl the reporting + * @member expiryDeadline The expiration time of the subscription determined by the UE Location Subscribe Service + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.6 Type: ZoneLocationEventSubscription + */ + type record ZoneLocationEventSubscription { + Json.String subscriptionType, + Json.String clientCorrelator optional, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + ZoneId zoneId, + LocationEventCriteria locationEventCriteria optional, + ReportingCtrl reportingCtrl optional, + TimeStamp expiryDeadline optional } with { - variant (timestamp_) "name as 'timestamp'"; - } + variant (links_) "name as '_links'"; + } // End of type ZoneLocationEventSubscription /** - * @desc A type containing zone status subscription. + * @desc This type represents a subscription to the notifications from location server about the number of users reaching the threshold or the status of access points changing + * @member subscriptionType Shall be set to "UserLocationEventSubscription" * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server - * @member resourceURL Self referring URL - * @member callbackReference - * @member zoneId Identifier of zone - * @member numberOfUsersZoneThreshold Threshold number of users in a zone which if crossed shall cause a notification - * @member numberOfUsersAPThreshold Threshold number of users in an access point which if crossed shall cause a notification - * @member operationStatus List of operation status values to generate notifications for (these apply to all access points within a zone). + * @member callbackReference URI exposed by the client on which to receive notifications via HTTP + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member _links Hyperlink related to the resource + * @member zoneId Identifier of zone (e.g. zone001) to monitor + * @member upperNumberOfUsersZoneThreshold Threshold number of users in a zone which if crossed upward shall cause a notification + * @member lowerNumberOfUsersZoneThreshold Threshold number of users in a zone which if crossed downward shall cause a notification + * @member upperNumberOfUsersAPThreshold Threshold number of users in an access point which if crossed upward shall cause a notification + * @member lowerNumberOfUsersAPThresholdThreshold number of users in an access point which ifcrossed downward shall cause a notification + * @member operationStatus List of operation status values to generate notifications for (these apply to all access points within a zone) + * @member reportingCtrl Provides parameters that ctrl the reporting + * @member expiryDeadline The expiration time of the subscription determined by the UE Location Subscribe Service + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.7 Type: ZoneStatusSubscription */ type record ZoneStatusSubscription { - ClientCorrelator clientCorrelator optional, - ResourceURL resourceURL optional, - CallbackReference callbackReference, - ZoneId zoneId, - NumberOfUsersZoneThreshold numberOfUsersZoneThreshold optional, - NumberOfUsersAPThreshold numberOfUsersAPThreshold optional, - OperationStatus operationStatus optional - } + Json.String subscriptionType, + Json.String clientCorrelator optional, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + ZoneId zoneId, + Json.UInteger upperNumberOfUsersZoneThreshold optional, + Json.UInteger lowerNumberOfUsersZoneThreshold optional, + Json.UInteger upperNumberOfUsersAPThreshold optional, + Json.UInteger lowerNumberOfUsersAPThreshold optional, + OperationStatus operationStatus optional, + ReportingCtrl reportingCtrl optional, + TimeStamp expiryDeadline optional + } with { + variant (links_) "name as '_links'"; + } // End of type ZoneStatusSubscription /** - * @desc A type containing data for notifications, when the area is defined as a circle - * @member address Address of terminals to monitor (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) - * @member callbackReference - * @member checkImmediate Check location immediately after establishing notification + * @desc This type represents a subscription to the notifications from location server about user location events happened in the area. + * @member subscriptionType Shall be set to "UserLocationEventSubscription" * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server - * @member count Maximum number of notifications per individual address. For no maximum, either do not include this element or specify a value of zero. Default value is 0 - * @member duration Period of time (in seconds) notifications are provided for. If set to “0” (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications - * @member enteringLeavingCriteria - * @member frequency Maximum frequency (in seconds) of notifications per subscription (can also be considered minimum time between notifications) - * @member latitude Latitude of center point - * @member link Link to other resources that are in relationship with the resource - * @member longitude Longitude of center point - * @member radius Radius circle around center point in meters - * @member requester Identifies the entity that is requesting the information (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) - * @member resourceURL Self referring URL - * @member trackingAccuracy Number of meters of acceptable error in tracking distance + * @member callbackReference URI exposed by the client on which to receive notifications via HTTP + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member _links Hyperlink related to the resource + * @member areaDefine The parameters describing the area to subscribe + * @member addressList The list of the users to be monitored + * @member trackingAccuracy Number of meters of acceptable error + * @member reportingCtrl Provides parameters that ctrl the reporting + * @member locationEventCriteria List of user event values to generate notifications for (these apply to address specified) + * @member reportingLocationReq This IE shall be set to true if a location estimate is required for each event report + * @member expiryDeadline The expiration time of the subscription determined by the UE Location Subscribe Service + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.8 Type: UserAreaSubscription */ - type record CircleNotificationSubscription { - Addresses address_, - CallbackReference callbackReference, - JSON.Bool checkImmediate, - ClientCorrelator clientCorrelator optional, - UInt32 count optional, - UInt32 duration optional, - EnteringLeavingCriteria enteringLeavingCriteria, - UInt32 frequency, - JSON.Number latitude, - Link link optional, - JSON.Number longitude, - JSON.Number radius, - JSON.AnyURI requester optional, - ResourceURL resourceURL optional, - JSON.Number trackingAccuracy + type record UserAreaSubscription { + Json.String subscriptionType, + Json.String clientCorrelator optional, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + AreaInfo areaDefine, + AddressList addressList, + Json.Number trackingAccuracy, + LocationEventCriteria locationEventCriteria optional, + ReportingCtrl reportingCtrl optional, + Json.Bool reportingLocationReq optional, + TimeStamp expiryDeadline optional } with { - variant (address_) "name as 'address'"; - } + variant (links_) "name as '_links'"; + } // End of type UserAreaSubscription - type enumerated EnteringLeavingCriteria { - Entering, - Leaving - } + /** + * @desc List of the users to be monitored + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.8 Type: UserAreaSubscription + */ + type set of Json.AnyURI AddressList; /** - * @desc A type containing information about the distance from a terminal to a location or between two terminals, in addition the accuracy and a timestamp of the information are provided - * @member distance Distance from terminal to a location or between two terminals specified in meters - * @member accuracy Accuracy of the provided distance in meters - * @member timestamp Date and time that location from which distance is calculated was collected + * @desc This type represents a subscription to the notifications from location server about changes in the geographical relationships between monitored users or between monitored users and reference users + * @member subscriptionType Shall be set to "UserLocationEventSubscription" + * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server + * @member callbackReference URI exposed by the client on which to receive notifications via HTTP + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member _links Hyperlink related to the resource + * @member referenceAddress If specified, indicates address of each user that will be used as reference users from which the distances towards monitored users indicated in the Addresses will be monitored + * @member monitoredAddress Contains addresses of users to monitor (e.g. 'sip' URI, 'tel' URI, 'acr' URI). Reference to a group could be provided here if supported by implementation + * @member distance Distance between users that shall be monitored. The unit is meter + * @member trackingAccuracy Number of meters of acceptable error in tracking distance + * @member criteria Indicates whether the notification should occur when the geographical relationship between monitored and referenced users' changes + * @member checkImmediate Check location immediately after establishing notification + * @member reportingCtrl Provides parameters that ctrl the reporting + * @member locationEventCriteria List of user event values to generate notifications for (these apply to address specified) + * @member expiryDeadline The expiration time of the subscription determined by the UE Location Subscribe Service + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.9 Type: UserDistanceSubscription */ - type record TerminalDistance { - JSON.Number distance, - JSON.Number accuracy optional, - TimeStamp timestamp_ optional + type record UserDistanceSubscription { + Json.String subscriptionType, + Json.String clientCorrelator optional, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + Json.AnyURIArray referenceAddress optional, + Json.AnyURIArray monitoredAddress, + Json.Number distance, + Json.Number trackingAccuracy, + DistanceCriteria criteria, + Json.Bool checkImmediate, + ReportingCtrl reportingCtrl optional, + TimeStamp expiryDeadline optional } with { - variant (timestamp_) "name as 'timestamp'"; - } + variant (links_) "name as '_links'"; + } // End of type UserDistanceSubscription /** - * @desc Distance criterium + * @desc This type represents a test notification from a location server to determine if the Websocket method is to be utilized for the location server to issue notifications for a subscription, as defined in clause 6.12a of ETSI GS MEC 009 [4] + * @member notificationType Shall be set to "TestNotification" + * @member _links Hyperlink related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.3 Type: TestNotification */ - type enumerated DistanceCriteria { - AllWithinDistance, - AnyWithinDistance, - AllBeyondDistance, - AnyBeyondDistance + type record TestNotification { + Json.String notificationType, + LinksSubscription links_ + } with { + variant (links_) "name as '_links'"; } /** - * @desc A type containing data for distance subscription, with reference to other devices - * @member callbackReference - * @member checkImmediate Check location immediately after establishing notification - * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server - * @member count Maximum number of notifications per individual address. For no maximum, either do not include this element or specify a value of zero. Default value is 0 - * @member criteria - * @member distance Distance between devices that shall be monitored - * @member duration Period of time (in seconds) notifications are provided for. If set to “0” (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications - * @member frequency Maximum frequency (in seconds) of notifications per subscription (can also be considered minimum time between notifications) - * @member link Link to other resources that are in relationship with the resource - * @member monitoredAddress Contains addresses of devices to monitor (e.g., 'sip' URI, 'tel' URI, 'acr' URI) - * @member referenceAddress Indicates address of each device that will be used as reference devices from which the distances towards monitored devices indicated in the Addresses will be monitored (e.g., 'sip' URI, 'tel' URI, 'acr' URI) - * @member requester Identifies the entity that is requesting the information (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) - * @member resourceURL Self referring URL - * @member trackingAccuracy Number of meters of acceptable error in tracking distance + * @desc Hyperlink related to the resource + * @member Identifying the subscription for the test notification + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.3 Type: TestNotification + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.4 Type: UserLocationEventNotification */ - type record DistanceNotificationSubscription { - CallbackReference callbackReference, - JSON.Bool checkImmediate, - ClientCorrelator clientCorrelator optional, - UInt32 count optional, - DistanceCriteria criteria, - JSON.Number distance, - UInt32 duration optional, - UInt32 frequency, - Link link optional, - Addresses monitoredAddress, - Addresses referenceAddress optional, - JSON.AnyURI requester optional, - ResourceURL resourceURL optional, - JSON.Number trackingAccuracy + type record LinksSubscription { + LinkType subscription } /** - * @desc A type containing data for periodic subscription - * @member address_ Address of terminals to monitor (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) - * @member callbackReference - * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server - * @member duration Period of time (in seconds) notifications are provided for. If set to “0” (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications - * @member frequency Maximum frequency (in seconds) of notifications per subscription (can also be considered minimum time between notifications) - * @member link Link to other resources that are in relationship with the resource - * @member monitoredAddress Contains addresses of devices to monitor (e.g., 'sip' URI, 'tel' URI, 'acr' URI) - * @member requestedAccuracy Accuracy of the provided distance in meters - * @member requester Identifies the entity that is requesting the information (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) - * @member resourceURL Self referring URL + * @desc This type represents a notification from location server with regards to UE location event. + * @member notificationType Shall be set to "UserLocationEventNotification" + * @member timeStamp TimeStamp + * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) + * @member userLocationEvent The specific event triggering this notification + * @member locationInfo The geographical coordinates where the user is + * @member civicInfo Contextual information of a user location + * @member relativeLocationInfo The relative location in a reference system + * @member zoneId The identity of the zone + * @member accessPointId The identity of the access point + * @member _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.4 Type: UserLocationEventNotification */ - type record PeriodicNotificationSubscription { - Addresses address_, - CallbackReference callbackReference, - ClientCorrelator clientCorrelator optional, - UInt32 duration optional, - UInt32 frequency, - Link link optional, - UInt32 requestedAccuracy, - JSON.AnyURI requester optional, - ResourceURL resourceURL optional + type record UserLocationEventNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Address address_, + LocationEventType userLocationEvent, + LocationInfo locationInfo optional, + CivicAddress civicInfo optional, + RelativeLocationInfo relativeLocationInfo optional, + ZoneId zoneId optional, + AccessPointId accessPointId optional, + LinksSubscription links_ } with { + variant (links_) "name as '_links'"; variant (address_) "name as 'address'"; - } + } // End of type UserLocationEventNotification - type record of JSON.String Variables; /** - * @desc Used to indicate a notification termination or cancellation - * @member messageId Message identifier, either with prefix SVC or with prefix POL - * @member text Message text, with replacement variables marked with %n, where n is an index into the list of elements, starting at 1 - * @member variables Variables to substitute into text string + * @desc This type represents a notification from location server with regards to UE location periodic reporting. + * @member notificationType Shall be set to "UserLocationPeriodicNotification" + * @member timeStamp TimeStamp + * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) + * @member userLocationEvent The specific event triggering this notification + * @member locationInfo The geographical coordinates where the user is + * @member civicInfo Contextual information of a user location + * @member relativeLocationInfo The relative location in a reference system + * @member zoneId The identity of the zone + * @member accessPointId The identity of the access point + * @member isFinalNotification Shall be set to true if it is a final notification + * @member _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.5 Type: UserLocationPeriodicNotification */ - type record ServiceError { - JSON.String messageId, - JSON.String text, - Variables variables optional - } + type record UserLocationPeriodicNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Address address_, + LocationEventType userLocationEvent, + LocationInfo locationInfo optional, + CivicAddress civicInfo optional, + RelativeLocationInfo relativeLocationInfo optional, + ZoneId zoneId optional, + AccessPointId accessPointId optional, + Json.Bool isFinalNotification optional, + LinksSubscription links_ + } with { + variant (links_) "name as '_links'"; + variant (address_) "name as 'address'"; + } // End of type UserLocationPeriodicNotification /** - * @desc A type containing device address, retrieval status and location information - * @member address_ Address of the terminal to which the location information applies (e.g., 'sip' URI, 'tel' URI, 'acr' URI) - * @member currentLocation - * @member errorInformation Used to indicate a notification termination or cancellation - * @member locationRetrievalStatus + * @desc This type represents a notification from location server with regards to UE location periodic reporting. + * @member notificationType Shall be set to "ZoneLocationEventNotification" + * @member timeStamp TimeStamp + * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) + * @member userLocationEvent The specific event triggering this notification + * @member zoneId The identity of the zone + * @member _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.6 Type: ZoneLocationEventNotification */ - type record TerminalLocation { - Address address_, - LocationInfo currentLocation optional, - ServiceError errorInformation optional, - RetrievalStatus locationRetrievalStatus + type record ZoneLocationEventNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Address address_, + LocationEventType userLocationEvent, + ZoneId zoneId optional, + LinksSubscription links_ } with { + variant (links_) "name as '_links'"; variant (address_) "name as 'address'"; - } - type record of TerminalLocation TerminalLocationList + } // End of type ZoneLocationEventNotification /** - * @desc A type containing the notification subscription - * @member callbackData CallbackData if passed by the application in the receiptRequest element during the associated subscription operation - * @member link Link to other resources that are in relationship with the resource - * @member isFinalNotification Set to true if it is a final notification about location change - * @member terminalLocation Collection of the terminal locations + * @desc This type represents a notification from location server with regards to status changing event or user number threshold event happened in a zone + * @member notificationType Shall be set to "ZoneStatusNotification" + * @member timeStamp TimeStamp + * @member userNumEvent + * @member operationStatus The specific event triggering this notification + * @member zoneId The identity of the zone + * @member accessPointId The identity of the access point + * @member _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.7 Type: ZoneStatusNotification */ - type record SubscriptionNotification { - CallbackData callbackData optional, - DistanceCriteria distanceCriteria optional, - JSON.Bool isFinalNotification optional, - Link link optional, - TerminalLocationList terminalLocation + type record ZoneStatusNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + UserNumEvent userNumEvent optional, + OperationStatus operationStatus optional, + ZoneId zoneId optional, + AccessPointId accessPointId optional, + LinksSubscription links_ + } with { + variant (links_) "name as '_links'"; + } // End of type ZoneStatusNotification + + type enumerated UserNumEvent { + OVER_ZONE_UPPER_THD, + UNDER_ZONE_LOWER_THD, + OVER_AP_UPPER_THD, + UNDER_AP_LOWER_THD + } with { + variant "JSON: as number" } /** - * @desc A type containing the subscription cancellation notification - * @member address_ Address of terminal if the error applies to an individual terminal - * @member callbackData CallbackData if passed by the application in the receiptRequest element during the associated subscription operation - * @member link Link to other resources that are in relationship with the resource - * @member reason Used to indicate a notification termination or cancellation + * @desc This type represents a notification from location server with regards to UE location events happened in an area. + * @member notificationType Shall be set to "UserAreaNotification" + * @member timeStamp TimeStamp + * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) + * @member locationInfo The geographical coordinates where the user is + * @member civicInfo Contextual information of a user location + * @member relativeLocationInfo The relative location in a reference system + * @member userLocationEvent The specific event triggering this notification + * @member _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.8 Type: UserAreaNotification */ - type record SubscriptionCancellationNotification { - Address address_, - CallbackData callbackData optional, - Link link optional, - ServiceError reason + type record UserAreaNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Address address_, + LocationInfo locationInfo optional, + CivicAddress civicInfo optional, + RelativeLocationInfo relativeLocationInfo optional, + LocationEventType userLocationEvent, + LinksSubscription links_ } with { + variant (links_) "name as '_links'"; variant (address_) "name as 'address'"; - } + } // End of type UserAreaNotification /** - * @desc This type contains a list of subscriptions - * @member zonalTrafficSubscription Collection of ZonalTrafficSubscription elements - * @member userTrackingSubscription Collection of UserTrackingSubscription elements - * @member periodicTrackingSubscription Collection of PeriodicNotificationSubscription elements - * @member zoneStatusSubscription Collection of ZoneStatusSubscription elements - * @member circleNotificationSubscription Collection of CircleNotificationSubscription elements - * @member distanceNotificationSubscription Collection of DistanceNotificationSubscription elements - * @member resourceURL Self-referring URL - * @ see ETSI GS MEC 013 V2.1.1 (2019-09) Clause 6.3.3 Type: NotificationSubscriptionList + * @desc This type represents a notification from location server with regards to UE location events happened in an area. + * @member notificationType Shall be set to "UserDistanceNotification" + * @member timeStamp TimeStamp + * @member monitoredUsers Indicates the location information related to monitored users + * @member distanceEvent Indicates the distance event triggering the notification + * @member _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.9 Type: UserDistanceNotification */ - type record NotificationSubscriptionList { - ZonalTrafficSubscription zonalTrafficSubscription optional, - UserTrackingSubscription userTrackingSubscription optional, - PeriodicTrackingSubscription periodicTrackingSubscription optional, - ZoneStatusSubscription zoneStatusSubscription optional, - CircleNotificationSubscription circleNotificationSubscription optional, - DistanceNotificationSubscription distanceNotificationSubscription optional, - ResourceURL resourceURL - } + type record UserDistanceNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + UserList monitoredUsers, + DistanceCriteria distanceEvent, + LinksSubscription links_ + } with { + variant (links_) "name as '_links'"; + } // End of type UserDistanceNotification + } with { encode "JSON" -} +} // End of module LocationAPI_TypesAndValues diff --git a/ttcn/LibMec/RnisAPI/json/RnisAPI.json b/ttcn/LibMec/RnisAPI/json/RnisAPI.json deleted file mode 100644 index a6c7ee5b57b7e59b66c46d5ef82f603628852885..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/RnisAPI/json/RnisAPI.json +++ /dev/null @@ -1,6574 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "description": "The ETSI MEC ISG MEC012 Radio Network Information API described using OpenAPI", - "version": "1.1.1", - "title": "RNI API", - "license": { - "name": "ETSI Forge copyright notice", - "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt" - } - }, - "externalDocs": { - "description": "ETSI GS MEC012 Radio Network Information API, V1.1.1", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/012/01.01.01_60/gs_mec012v010101p.pdf" - }, - "host": "127.0.0.1:8081", - "basePath": "/rni/v1", - "schemes": [ - "http", - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "security": [ - { - "OauthSecurity": [ - "all" - ] - } - ], - "securityDefinitions": { - "OauthSecurity": { - "type": "oauth2", - "flow": "application", - "tokenUrl": "https://oauth.exampleAPI/token", - "scopes": { - "all": "Single oauth2 scope for API" - } - } - }, - "parameters": { - "Body.CellChangeSubscriptionPost": { - "name": "CellChangeSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to cell change notifications based on the\n filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "CellChangeSubscription": { - "$ref": "#/definitions/CellChangeSubscriptionPost" - } - } - } - }, - "Body.CellChangeSubscription": { - "name": "CellChangeSubscription", - "in": "body", - "description": "Use to creates a subscription to cell change notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "CellChangeSubscription": { - "$ref": "#/definitions/CellChangeSubscription" - } - } - } - }, - "Body.S1BearerSubscriptionPost": { - "name": "S1BearerSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to S1 Bearer notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "S1BearerSubscription": { - "$ref": "#/definitions/S1BearerSubscriptionPost" - } - } - } - }, - "Body.S1BearerSubscription": { - "name": "S1BearerSubscription", - "in": "body", - "description": "Use to creates a subscription to S1 Bearer notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "S1BearerSubscription": { - "$ref": "#/definitions/S1BearerSubscription" - } - } - } - }, - "Body.MeasTaSubscriptionPost": { - "name": "MeasTaSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to UE Timing Advance notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "MeasTaSubscription": { - "$ref": "#/definitions/MeasTaSubscriptionPost" - } - } - } - }, - "Body.MeasTaSubscription": { - "name": "MeasTaSubscription", - "in": "body", - "description": "Use to creates a subscription to UE Timing Advance notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "MeasTaSubscription": { - "$ref": "#/definitions/MeasTaSubscription" - } - } - } - }, - "Body.MeasRepUeSubscriptionPost": { - "name": "MeasRepUeSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to UE measurement report notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "MeasRepUeSubscription": { - "$ref": "#/definitions/MeasRepUeSubscriptionPost" - } - } - } - }, - "Body.MeasRepUeSubscription": { - "name": "MeasRepUeSubscription", - "in": "body", - "description": "Use to creates a subscription to UE measurement report notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "MeasRepUeSubscription": { - "$ref": "#/definitions/MeasRepUeSubscription" - } - } - } - }, - "Body.RabEstSubscriptionPost": { - "name": "RabEstSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to RAB establishment notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "RabEstSubscription": { - "$ref": "#/definitions/RabEstSubscriptionPost" - } - } - } - }, - "Body.RabEstSubscription": { - "name": "RabEstSubscription", - "in": "body", - "description": "Use to creates a subscription to RAB establishment notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "RabEstSubscription": { - "$ref": "#/definitions/RabEstSubscription" - } - } - } - }, - "Body.RabModSubscriptionPost": { - "name": "RabEstSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to RAB Modification notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "RabModSubscription": { - "$ref": "#/definitions/RabModSubscriptionPost" - } - } - } - }, - "Body.RabModSubscription": { - "name": "RabEstSubscription", - "in": "body", - "description": "Use to creates a subscription to RAB Modification notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "RabModSubscription": { - "$ref": "#/definitions/RabModSubscription" - } - } - } - }, - "Body.RabRelSubscriptionPost": { - "name": "RabRelSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to RAB Release notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "RabRelSubscription": { - "$ref": "#/definitions/RabRelSubscriptionPost" - } - } - } - }, - "Body.RabRelSubscription": { - "name": "RabRelSubscription", - "in": "body", - "description": "Use to creates a subscription to RAB Release notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "RabRelSubscription": { - "$ref": "#/definitions/RabRelSubscription" - } - } - } - }, - "Body.CaReConfSubscriptionPost": { - "name": "CaReConfSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to Carrier Aggregation Reconfiguration notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "CaReConfSubscription": { - "$ref": "#/definitions/CaReConfSubscriptionPost" - } - } - } - }, - "Body.CaReConfSubscription": { - "name": "CaReConfSubscription", - "in": "body", - "description": "Use to creates a subscription to Carrier Aggregation Reconfiguration notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "CaReConfSubscription": { - "$ref": "#/definitions/CaReConfSubscription" - } - } - } - }, - "Path.subscrId": { - "name": "subscriptionId", - "in": "path", - "description": "Subscription Id, specifically the \"self\" returned in the subscription request", - "required": true, - "type": "string", - "format": "uri" - }, - "Query.AppInsId": { - "name": "app_ins_id", - "in": "query", - "description": "Application instance identifier", - "required": false, - "type": "string" - }, - "Query.AppInsIdArr": { - "name": "app_ins_id", - "in": "query", - "description": "Application instance identifier", - "required": true, - "type": "array", - "items": { - "type": "string" - } - }, - "Query.UeIpv4Address": { - "name": "ue_ipv4_address", - "in": "query", - "description": "Comma separated list of IE IPv4 addresses as defined for the type for AssociateId", - "required": false, - "type": "array", - "items": { - "type": "string" - } - }, - "Query.UeIpv6Address": { - "name": "ue_ipv6_address", - "in": "query", - "description": "Comma separated list of IE IPv6 addresses as defined for the type for AssociateId", - "required": false, - "type": "array", - "items": { - "type": "string" - } - }, - "Query.NatedIpAddress": { - "name": "nated_ip_address", - "in": "query", - "description": "Comma separated list of IE NATed IP addresses as defined for the type for AssociateId", - "required": false, - "type": "array", - "items": { - "type": "string" - } - }, - "Query.GtpTeId": { - "name": "gtp_teid", - "in": "query", - "description": "Comma separated list of GTP TEID addresses as defined for the type for AssociateId", - "required": false, - "type": "array", - "items": { - "type": "string" - } - }, - "Query.CellId": { - "name": "cell_id", - "in": "query", - "description": "E-UTRAN Cell Identity as a bit string (size (28)), as defined in ETSI TS 136 413", - "required": false, - "type": "array", - "items": { - "type": "string" - } - }, - "Query.ErabGbrDl": { - "name": "erab_gbr_dl", - "in": "query", - "description": "Guaranteed downlink E-RAB Bit Rate as defined in ETSI TS 123 401", - "required": false, - "type": "integer", - "format": "uint32" - }, - "Query.ErabGbrUl": { - "name": "erab_gbr_ul", - "in": "query", - "description": "Guaranteed uplink E-RAB Bit Rate as defined in ETSI TS 123 401", - "required": false, - "type": "integer", - "format": "uint32" - }, - "Query.ErabId": { - "name": "erab_id", - "in": "query", - "description": "E-RAB identifier", - "required": false, - "type": "integer", - "format": "uint32" - }, - "Query.ErabIdArr": { - "name": "erab_id", - "in": "query", - "description": "E-RAB identifier", - "required": false, - "type": "array", - "items": { - "type": "integer", - "format": "uint32" - } - }, - "Query.ErabMbrDl": { - "name": "erab_mbr_dl", - "in": "query", - "description": "Maximum downlink E-RAB Bit Rate as defined in ETSI TS 123 401", - "required": false, - "type": "integer", - "format": "uint32" - }, - "Query.ErabMbrUl": { - "name": "erab_mbr_ul", - "in": "query", - "description": "Maximum uplink E-RAB Bit Rate as defined in ETSI TS 123 401", - "required": false, - "type": "integer", - "format": "uint32" - }, - "Query.Qci": { - "name": "qci", - "in": "query", - "description": "QoS Class Identifier as defined in ETSI TS 123 401", - "required": false, - "type": "integer", - "format": "uint32" - }, - "Query.TempUeId": { - "name": "temp_ue_id", - "in": "query", - "description": "The temporary identifier allocated for the specific UE as defined in ETSI TS 136 413", - "required": false, - "type": "array", - "items": { - "type": "string" - } - } - }, - "paths": { - "/resources/rab_info": { - "get": { - "description": "Gets information on existing E-RABs that are associated with a specific mobile edge application instance", - "operationId": "rab_infoGET", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Query.AppInsId" - }, - { - "$ref": "#/parameters/Query.CellId" - }, - { - "$ref": "#/parameters/Query.UeIpv4Address" - }, - { - "$ref": "#/parameters/Query.UeIpv6Address" - }, - { - "$ref": "#/parameters/Query.NatedIpAddress" - }, - { - "$ref": "#/parameters/Query.GtpTeId" - }, - { - "$ref": "#/parameters/Query.ErabId" - }, - { - "$ref": "#/parameters/Query.Qci" - }, - { - "$ref": "#/parameters/Query.ErabMbrDl" - }, - { - "$ref": "#/parameters/Query.ErabMbrUl" - }, - { - "$ref": "#/parameters/Query.ErabGbrDl" - }, - { - "$ref": "#/parameters/Query.ErabGbrUl" - } - ], - "responses": { - "200": { - "description": "Successful response to rab_info request", - "schema": { - "type": "object", - "required": [ - "RabInfo" - ], - "properties": { - "RabInfo": { - "$ref": "#/definitions/RabInfo" - } - } - }, - "examples": { - "application/json": { - "RabInfo": { - "timeStamp": { - "seconds": 1577836800, - "nanoSeconds": 0 - }, - "appInId": "01", - "requestId": "01", - "cellUserInfo": { - "ecgi": { - "plmn": { - "mcc": "001", - "mnc": "01" - }, - "cellId": "0x800000A" - }, - "ueInfo": { - "associateId": null, - "type": "1", - "value": "192.0.2.0", - "erabInfo": { - "erabId": 10 - }, - "erabQosParameters": { - "qci": 7, - "qosInformation": { - "erabMbrDl": 10, - "erabMbrUl": 10, - "erabGbrDl": 10, - "erabGbrUl": 10 - } - } - } - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/resources/plmn_info": { - "get": { - "description": "Gets the information on Mobile Network(s) that are associated with a specific mobile edge application instance", - "operationId": "plmn_infoGET", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Query.AppInsIdArr" - } - ], - "responses": { - "200": { - "description": "Successful response to rab_info request", - "schema": { - "type": "object", - "properties": { - "PlmnInfo": { - "$ref": "#/definitions/PlmnInfo" - } - } - }, - "examples": { - "application/json": { - "PlmnInfo": { - "timeStamp": { - "seconds": 1577836800, - "nanoSeconds": 0 - }, - "appInId": "01", - "ecgi": { - "plmn": { - "mcc": "001", - "mnc": "01" - }, - "cellId": "0x800000A" - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/resources/s1_bearer_info": { - "get": { - "description": "Gets information on existing E-RABs that are associated with a specific mobile edge application instance", - "operationId": "s1_bearer_infoGET", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Query.TempUeId" - }, - { - "$ref": "#/parameters/Query.UeIpv4Address" - }, - { - "$ref": "#/parameters/Query.UeIpv6Address" - }, - { - "$ref": "#/parameters/Query.NatedIpAddress" - }, - { - "$ref": "#/parameters/Query.GtpTeId" - }, - { - "$ref": "#/parameters/Query.CellId" - }, - { - "$ref": "#/parameters/Query.ErabIdArr" - } - ], - "responses": { - "200": { - "description": "Successful response to s1_bearer_info request", - "schema": { - "type": "object", - "required": [ - "S1BearerInfo" - ], - "properties": { - "S1BearerInfo": { - "$ref": "#/definitions/S1BearerInfo" - } - } - }, - "examples": { - "application/json": { - "S1BearerInfo": { - "timeStamp": { - "seconds": 1577836800, - "nanoSeconds": 0 - }, - "s1UeInfo": [ - { - "tempUeId": { - "mmec": "0", - "mtmsi": "1234" - }, - "associateId": [ - { - "type": "1", - "value": "192.0.2.0" - }, - { - "type": "3", - "value": "198.51.100.0" - } - ], - "ecgi": { - "plmn": { - "mcc": "001", - "mnc": "01" - }, - "cellId": "0x800000A" - }, - "s1BearerInfoDetailed": [ - { - "erabId": 1, - "s1EnbInfo": { - "ipAddress": "192.0.2.0", - "tunnelId": "1111" - }, - "sGwInfo": { - "ipAddress": "192.0.2.1", - "tunnelId": "2222" - } - } - ] - }, - { - "tempUeId": { - "mmec": "0", - "mtmsi": "1234" - }, - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "ecgi": { - "plmn": { - "mcc": "001", - "mnc": "01" - }, - "cellId": "0x800000B" - }, - "s1BearerInfoDetailed": [ - { - "erabId": 2, - "s1EnbInfo": { - "ipAddress": "192.0.2.0", - "tunnelId": "3333" - }, - "sGwInfo": { - "ipAddress": "192.0.2.1", - "tunnelId": "4444" - } - } - ] - } - ] - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/": { - "get": { - "description": "The GET method can be used to request information about the subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/cell_change/77777", - "subscriptionType": "CELL_CHANGE" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/MeasTa/77777", - "subscriptionType": "MEAS_TIMING_ADVANCE" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/cell_change": { - "get": { - "description": "The GET method can be used to request information about the cell_change subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_cc_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors cell_change subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/cell_change", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/cell_change/77777", - "subscriptionType": "CELL_CHANGE" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/cell_change/77778", - "subscriptionType": "CELL_CHANGE" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to cell change notifications from Radio Network Information Service", - "operationId": "CellChange_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.CellChangeSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to response to UE cell change notifications", - "schema": { - "type": "object", - "properties": { - "CellChangeSubscription": { - "$ref": "#/definitions/CellChangeSubscription" - } - } - }, - "examples": { - "application/json": { - "CellChangeSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/cell_change/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/cell_change/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/cell_change/{subscriptionId}": { - "get": { - "description": "Get cell change subscription information", - "operationId": "CellChange_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding cell change notifications", - "schema": { - "type": "object", - "required": [ - "CellChangeSubscription" - ], - "properties": { - "CellChangeSubscription": { - "$ref": "#/definitions/CellChangeSubscription" - } - } - }, - "examples": { - "application/json": { - "CellChangeSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/cell_change/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/cell_change/sub123" - }, - "filterCriteria": { - "appInsId": "01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "hoStatus": 3 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to cell change notifications from Radio Network Information Service", - "operationId": "CellChange_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.CellChangeSubscription" - }, - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to cell change notifications", - "schema": { - "type": "object", - "properties": { - "CellChangeSubscription": { - "$ref": "#/definitions/CellChangeSubscription" - } - } - }, - "examples": { - "application/json": { - "CellChangeSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/cell_change/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/cell_change/sub123" - }, - "filterCriteria": { - "appInsId": "01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "hoStatus": 3 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "CellChange_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/s1_bearer": { - "get": { - "description": "The GET method can be used to request information about the s1_bearer subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_s1_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors s1_bearer subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/s1_bearer", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/s1_bearer/77777", - "subscriptionType": "S1_BEARER" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/s1_bearer/77778", - "subscriptionType": "S1_BEARER" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to S1 bearer notifications from Radio Network Information Service", - "operationId": "S1BearerSubscription_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.S1BearerSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to response to S1 Bearer notifications", - "schema": { - "type": "object", - "properties": { - "S1BearerSubscription": { - "$ref": "#/definitions/S1BearerSubscription" - } - } - }, - "examples": { - "application/json": { - "S1BearerSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/s1_bearer/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/s1_bearer/sub123" - }, - "eventType": 1, - "s1BearerSubscriptionCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "erabId": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/s1_bearer/{subscriptionId}": { - "get": { - "description": "Gets a subscription to S1 bearer notifications from Radio Network Information Service", - "operationId": "S1BearerSubscription_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to S1 Bearer notifications", - "schema": { - "type": "object", - "properties": { - "S1BearerSubscription": { - "$ref": "#/definitions/S1BearerSubscription" - } - } - }, - "examples": { - "application/json": { - "S1BearerSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/s1_bearer/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/s1_bearer/sub123" - }, - "eventType": 1, - "s1BearerSubscriptionCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "erabId": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to S1 bearer notifications from Radio Network Information Service", - "operationId": "S1BearerSubscription_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.S1BearerSubscription" - } - ], - "responses": { - "200": { - "description": "Successful subscription update to response to S1 Bearer notifications", - "schema": { - "type": "object", - "properties": { - "S1BearerSubscription": { - "$ref": "#/definitions/S1BearerSubscription" - } - } - }, - "examples": { - "application/json": { - "S1BearerSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/s1_bearer/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/s1_bearer/sub123" - }, - "eventType": 1, - "s1BearerSubscriptionCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "erabId": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "S1Bearer_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/ta": { - "get": { - "description": "The GET method can be used to request information about the ta subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_ta_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors ta subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ta", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/ta/77777", - "subscriptionType": "MEAS_REPORT_UE" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/ta/77778", - "subscriptionType": "MEAS_REPORT_UE" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to UE Timing Advance notifications from Radio Network Information Service", - "operationId": "MeasTa_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.MeasTaSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to response to UE Timing Advance notifications", - "schema": { - "type": "object", - "properties": { - "MeasTaSubscription": { - "$ref": "#/definitions/MeasTaSubscription" - } - } - }, - "examples": { - "application/json": { - "MeasTaSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/ta/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ta/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/ta/{subscriptionId}": { - "get": { - "description": "Gets UE Timing Advance subscription information from Radio Network Information Service", - "operationId": "MeasTa_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding UE Timing Advance notifications", - "schema": { - "type": "object", - "required": [ - "MeasTaSubscription" - ], - "properties": { - "MeasTaSubscription": { - "$ref": "#/definitions/MeasTaSubscription" - } - } - }, - "examples": { - "application/json": { - "MeasTaSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/ta/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ta/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to UE Timing Advance notifications from Radio Network Information Service", - "operationId": "MeasTa_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.MeasTaSubscription" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to UE Timing Advance notifications", - "schema": { - "type": "object", - "properties": { - "MeasTaSubscription": { - "$ref": "#/definitions/MeasTaSubscription" - } - } - }, - "examples": { - "application/json": { - "MeasTaSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/ta/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ta/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "MeasTa_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/meas_rep_ue": { - "get": { - "description": "The GET method can be used to request information about the meas_rep_ue subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_mr_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors meas_rep_ue subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/meas_rep_ue", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/meas_rep_ue/77777", - "subscriptionType": "MEAS_REPORT_UE" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/meas_rep_ue/77778", - "subscriptionType": "MEAS_REPORT_UE" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to UE measurement report notifications from Radio Network Information Service", - "operationId": "MeasRepUe_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.MeasRepUeSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to response to UE measurement report notifications", - "schema": { - "type": "object", - "properties": { - "MeasRepUeSubscription": { - "$ref": "#/definitions/MeasRepUeSubscription" - } - } - }, - "examples": { - "application/json": { - "MeasRepUeSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/meas_rep_ue/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/meas_rep_ue/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/meas_rep_ue/{subscriptionId}": { - "get": { - "description": "Gets a subscription to UE measurement report notifications from Radio Network Information Service", - "operationId": "MeasRepUe_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to UE measurement report notifications", - "schema": { - "type": "object", - "required": [ - "MeasRepUeSubscription" - ], - "properties": { - "MeasRepUeSubscription": { - "$ref": "#/definitions/MeasRepUeSubscription" - } - } - }, - "examples": { - "application/json": { - "MeasRepUeSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/meas_rep_ue/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/meas_rep_ue/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to UE measurement report notifications from Radio Network Information Service", - "operationId": "MeasRepUeReport_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.MeasRepUeSubscription" - } - ], - "responses": { - "200": { - "description": "Successful update subscription to response to UE measurement report notifications", - "schema": { - "type": "object", - "properties": { - "MeasRepUeSubscription": { - "$ref": "#/definitions/MeasRepUeSubscription" - } - } - }, - "examples": { - "application/json": { - "MeasRepUeSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/meas_rep_ue/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/meas_rep_ue/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "MeasRepUe_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content. Successful deletion of UE Measurment Report subscription" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/rab_est": { - "get": { - "description": "The GET method can be used to request information about the rab_est subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_re_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors rab_est subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_est", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/rab_est/77777", - "subscriptionType": "RAB_ESTABLISHMENT" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/rab_est/77778", - "subscriptionType": "RAB_ESTABLISHMENT" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to RAB establishment notifications from Radio Network Information Service", - "operationId": "RabEstSubscription_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.RabEstSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to RAB establishment notifications", - "schema": { - "type": "object", - "properties": { - "RabEstSubscription": { - "$ref": "#/definitions/RabEstSubscription" - } - } - }, - "examples": { - "application/json": { - "RabEstSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_est/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_est/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/rab_est/{subscriptionId}": { - "get": { - "description": "Gets a subscription to RAB establishment notifications from Radio Network Information Service", - "operationId": "RabEstSubscription_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding RAB establishment notifications", - "schema": { - "type": "object", - "required": [ - "RabEstSubscription" - ], - "properties": { - "RabEstSubscription": { - "$ref": "#/definitions/RabEstSubscription" - } - } - }, - "examples": { - "application/json": { - "RabEstSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_est/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_est/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to RAB establishment notifications from Radio Network Information Service", - "operationId": "RabEstSubscription_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.RabEstSubscription" - } - ], - "responses": { - "200": { - "description": "Successful subscription update to RAB establishment notifications", - "schema": { - "type": "object", - "properties": { - "RabEstSubscription": { - "$ref": "#/definitions/RabEstSubscription" - } - } - }, - "examples": { - "application/json": { - "RabEstSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_est/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_est/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "RabEst_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content. Successful deletion of Rab Establishment subscription" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/rab_mod": { - "get": { - "description": "The GET method can be used to request information about the rab_mod subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_rm_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors rab_mod subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_mod", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/rab_mod/77777", - "subscriptionType": "RAB_MODIFICATION" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/rab_mod/77778", - "subscriptionType": "RAB_MODIFICATION" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to RAB Modification notifications from Radio Network Information Service", - "operationId": "RabModSubscription_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.RabModSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to RAB Modification notifications", - "schema": { - "type": "object", - "properties": { - "RabModSubscription": { - "$ref": "#/definitions/RabModSubscription" - } - } - }, - "examples": { - "application/json": { - "RabModSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_mod/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_mod/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/rab_mod/{subscriptionId}": { - "get": { - "description": "Gets a subscription to RAB Modification notifications from Radio Network Information Service", - "operationId": "RabModSubscription_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding RAB Modification notifications", - "schema": { - "type": "object", - "required": [ - "RabModSubscription" - ], - "properties": { - "RabModSubscription": { - "$ref": "#/definitions/RabModSubscription" - } - } - }, - "examples": { - "application/json": { - "RabModSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_mod/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_mod/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to RAB Modification notifications from Radio Network Information Service", - "operationId": "RabModSubscription_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.RabModSubscription" - } - ], - "responses": { - "200": { - "description": "Successful subscription update to RAB Modification notifications", - "schema": { - "type": "object", - "properties": { - "RabModSubscription": { - "$ref": "#/definitions/RabModSubscription" - } - } - }, - "examples": { - "application/json": { - "RabModSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_mod/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_mod/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "RabMod_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content. Successful deletion of Rab Modification subscription" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/rab_rel": { - "get": { - "description": "The GET method can be used to request information about the rab_rel subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_rr_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors rab_rel subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_rel", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/rab_rel/77777", - "subscriptionType": "RAB_RELEASE" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/rab_rel/77778", - "subscriptionType": "RAB_RELEASE" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to RAB Release notifications from Radio Network Information Service", - "operationId": "RabRelSubscription_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.RabRelSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to RAB Release notifications", - "schema": { - "type": "object", - "properties": { - "RabRelSubscription": { - "$ref": "#/definitions/RabRelSubscription" - } - } - }, - "examples": { - "application/json": { - "RabRelSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_rel/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_rel/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/rab_rel/{subscriptionId}": { - "get": { - "description": "Gets a subscription to RAB Release notifications from Radio Network Information Service", - "operationId": "RabRelSubscription_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding RAB Release notifications", - "schema": { - "type": "object", - "required": [ - "RabRelSubscription" - ], - "properties": { - "RabRelSubscription": { - "$ref": "#/definitions/RabRelSubscription" - } - } - }, - "examples": { - "application/json": { - "RabRelSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_rel/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_rel/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to RAB Release notifications from Radio Network Information Service", - "operationId": "RabRelSubscription_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.RabRelSubscription" - } - ], - "responses": { - "200": { - "description": "Successful subscription update to RAB Release notifications", - "schema": { - "type": "object", - "properties": { - "RabRelSubscription": { - "$ref": "#/definitions/RabRelSubscription" - } - } - }, - "examples": { - "application/json": { - "RabRelSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_rel/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_rel/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "RabRel_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content. Successful deletion of Rab Release subscription" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/ca_reconf": { - "get": { - "description": "The GET method can be used to request information about the ca_reconf subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_cr_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors ca_reconf subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ca_reconf", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/ca_reconf/77777", - "subscriptionType": "CA_RECONF" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/ca_reconf/77778", - "subscriptionType": "CA_RECONF" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to Carrier Aggregation Reconfiguration notifications from Radio Network Information Service", - "operationId": "CaReConfSubscription_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.CaReConfSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to Carrier Aggregation Reconfiguration notifications", - "schema": { - "type": "object", - "properties": { - "CaReConfSubscription": { - "$ref": "#/definitions/CaReConfSubscription" - } - } - }, - "examples": { - "application/json": { - "CaReConfSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/ca_reconf/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ca_reconf/sub123" - }, - "filterCriteriaAssoc": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/ca_reconf/{subscriptionId}": { - "get": { - "description": "Gets a subscription to Carrier Aggregation Reconfiguration notifications from Radio Network Information Service", - "operationId": "CaReConfSubscription_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding Carrier Aggregation Reconfiguration notifications", - "schema": { - "type": "object", - "required": [ - "CaReConfSubscription" - ], - "properties": { - "CaReConfSubscription": { - "$ref": "#/definitions/CaReConfSubscription" - } - } - }, - "examples": { - "application/json": { - "CaReConfSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/ca_reconf/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ca_reconf/sub123" - }, - "filterCriteriaAssoc": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to Carrier Aggregation Reconfiguration notifications from Radio Network Information Service", - "operationId": "CaReConfSubscription_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.CaReConfSubscription" - } - ], - "responses": { - "200": { - "description": "Successful subscription to Carrier Aggregation Reconfiguration notifications", - "schema": { - "type": "object", - "properties": { - "CaReConfSubscription": { - "$ref": "#/definitions/CaReConfSubscription" - } - } - }, - "examples": { - "application/json": { - "CaReConfSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/ca_reconf/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ca_reconf/sub123" - }, - "filterCriteriaAssoc": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "CaReConf_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "x-swagger-router-controller": "Default" - } - } - }, - "definitions": { - "ProblemDetails": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/Problem.type" - }, - "title": { - "$ref": "#/definitions/Problem.title" - }, - "status": { - "$ref": "#/definitions/Problem.status" - }, - "detail": { - "$ref": "#/definitions/Problem.detail" - }, - "instance": { - "$ref": "#/definitions/Problem.instance" - } - } - }, - "Problem.type": { - "type": "string", - "format": "uri", - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type" - }, - "Problem.title": { - "type": "string", - "description": "A short, human-readable summary of the problem type" - }, - "Problem.status": { - "type": "integer", - "format": "uint32", - "description": "The HTTP status code for this occurrence of the problem" - }, - "Problem.detail": { - "type": "string", - "description": "A human-readable explanation specific to this occurrence of the problem" - }, - "Problem.instance": { - "type": "string", - "format": "uri", - "description": "A URI reference that identifies the specific occurrence of the problem" - }, - "PlmnInfo": { - "type": "object", - "required": [ - "appInsId", - "plmn" - ], - "properties": { - "timeStamp": { - "$ref": "#/definitions/TimeStamp" - }, - "appInsId": { - "$ref": "#/definitions/AppInsId" - }, - "plmn": { - "type": "array", - "items": { - "$ref": "#/definitions/Plmn" - } - } - } - }, - "RabInfo": { - "type": "object", - "required": [ - "appInsId", - "requestId" - ], - "properties": { - "timeStamp": { - "$ref": "#/definitions/TimeStamp" - }, - "appInsId": { - "$ref": "#/definitions/AppInsId" - }, - "requestId": { - "$ref": "#/definitions/RequestId" - }, - "cellUserInfo": { - "type": "array", - "items": { - "$ref": "#/definitions/CellUserInfo" - } - } - } - }, - "S1BearerInfo": { - "type": "object", - "required": [ - "s1UeInfo" - ], - "properties": { - "timeStamp": { - "$ref": "#/definitions/TimeStamp" - }, - "s1UeInfo": { - "type": "array", - "items": { - "$ref": "#/definitions/S1UeInfo" - } - } - } - }, - "S1UeInfo": { - "type": "object", - "required": [ - "ecgi", - "s1BearerInfoDetailed" - ], - "properties": { - "tempUeId": { - "type": "array", - "items": { - "$ref": "#/definitions/TempUeId" - } - }, - "associateId": { - "type": "array", - "items": { - "$ref": "#/definitions/AssociateId" - } - }, - "ecgi": { - "type": "array", - "items": { - "$ref": "#/definitions/Ecgi" - } - }, - "s1BearerInfoDetailed": { - "type": "array", - "items": { - "$ref": "#/definitions/S1BearerInfoDetailed" - } - } - }, - "description": "The information on users per cell." - }, - "S1BearerInfoDetailed": { - "type": "object", - "required": [ - "erabId", - "enbInfo", - "sGwInfo" - ], - "properties": { - "erabId": { - "$ref": "#/definitions/ErabId" - }, - "enbInfo": { - "$ref": "#/definitions/S1EnbInfo" - }, - "sGwInfo": { - "$ref": "#/definitions/SGwInfo" - } - }, - "description": "Information on UEs in the specific cell." - }, - "ErabId": { - "type": "integer", - "format": "int32", - "description": "The element that uniquely identifies a S1 bearer for a specific UE, as defined in ETSI TS 136 413", - "example": 10 - }, - "TempUeId": { - "type": "object", - "required": [ - "mmec", - "mtmsi" - ], - "properties": { - "mmec": { - "$ref": "#/definitions/Mmec" - }, - "mtmsi": { - "$ref": "#/definitions/Mtmsi" - } - } - }, - "Mmec": { - "type": "string", - "description": "MMEC as defined in ETSI TS 136 413", - "example": "0" - }, - "Mtmsi": { - "type": "string", - "description": "M-TMSI as defined in ETSI TS 136 413", - "example": "1234" - }, - "S1EnbInfo": { - "type": "object", - "required": [ - "ipAddress", - "tunnelId" - ], - "properties": { - "ipAddress": { - "type": "string", - "description": "eNB transport layer address of this S1 bearer.", - "example": "192.0.2.0" - }, - "tunnelId": { - "type": "string", - "description": "eNB GTP-U TEID of this S1 bearer.", - "example": "1111" - } - } - }, - "SGwInfo": { - "type": "object", - "required": [ - "ipAddress", - "tunnelId" - ], - "properties": { - "ipAddress": { - "type": "string", - "description": "SGW transport layer address of this S1 bearer.", - "example": "192.0.2.1" - }, - "tunnelId": { - "type": "string", - "description": "SGW GTP-U TEID of this S1 bearer.", - "example": "2222" - } - } - }, - "TimeStamp": { - "type": "object", - "required": [ - "nanoSeconds", - "seconds" - ], - "properties": { - "seconds": { - "type": "integer", - "format": "uint32", - "description": "The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "example": 1577836800 - }, - "nanoSeconds": { - "type": "integer", - "format": "uint32", - "description": "The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "example": 0 - } - } - }, - "AppInsId": { - "type": "string", - "format": "string", - "description": "Unique identifier for the mobile edge application instance", - "example": "01" - }, - "RequestId": { - "type": "string", - "format": "string", - "description": "Unique identifier allocated by the Mobile Edge application for the Information request.", - "example": "01" - }, - "CellUserInfo": { - "type": "object", - "required": [ - "ecgi", - "ueInfo" - ], - "properties": { - "ecgi": { - "$ref": "#/definitions/Ecgi" - }, - "ueInfo": { - "type": "array", - "items": { - "$ref": "#/definitions/UeInfo" - } - } - }, - "description": "The information on users per cell." - }, - "Ecgi": { - "type": "object", - "required": [ - "cellId", - "plmn" - ], - "properties": { - "plmn": { - "$ref": "#/definitions/Plmn" - }, - "cellId": { - "$ref": "#/definitions/CellId" - } - }, - "description": "E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413" - }, - "Plmn": { - "type": "object", - "required": [ - "mcc", - "mnc" - ], - "properties": { - "mcc": { - "type": "string", - "format": "string", - "description": "The Mobile Country Code part of PLMN Identity as defined in 3GPP TS 36.413", - "example": "001" - }, - "mnc": { - "type": "string", - "format": "string", - "description": "The Mobile Network Code part of PLMN Identity as defined in 3GPP TS 36.413", - "example": "01" - } - } - }, - "CellId": { - "type": "array", - "items": { - "type": "string", - "format": "binary" - }, - "description": "The E-UTRAN Cell Identity as a bit string (size (28)), as defined in 3GPP TS 36.413", - "example": "0x800000A" - }, - "UeInfo": { - "type": "object", - "required": [ - "erabInfo" - ], - "properties": { - "associateId": { - "type": "array", - "items": { - "$ref": "#/definitions/AssociateId" - } - }, - "erabInfo": { - "type": "array", - "items": { - "$ref": "#/definitions/ErabQosParameters" - } - } - }, - "description": "Information on UEs in the specific cell." - }, - "AssociateId": { - "type": "object", - "required": [ - "type", - "value" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "RESERVED", - "UE_IPV4_ADDRESS", - "UE_IPV6_ADDRESS", - "NATED_IP_ADDRESS", - "GTP_TEID" - ], - "description": "Numeric value (0-255) corresponding to specified type of identifier", - "example": "UE_IPV4_ADDRESS" - }, - "value": { - "type": "String", - "format": "String", - "description": "Value for the identifier", - "example": "192.0.0.2" - } - } - }, - "ErabQosParameters": { - "type": "object", - "properties": { - "qci": { - "$ref": "#/definitions/Qci" - }, - "qosInformation": { - "type": "array", - "items": { - "$ref": "#/definitions/QosInformation" - } - } - } - }, - "Qci": { - "type": "integer", - "format": "int32", - "description": "QoS Class Identifier as defined in TS 23.401", - "example": 7 - }, - "QosInformation": { - "type": "object", - "required": [ - "erabGbrDl", - "erabGbrUl", - "erabMbrDl", - "erabMbrUl" - ], - "properties": { - "erabMbrDl": { - "type": "integer", - "format": "int32", - "description": "This IE indicates the maximum downlink E-RAB Bit Rate as defined in TS 23.401 for this bearer.", - "example": 10 - }, - "erabMbrUl": { - "type": "integer", - "format": "int32", - "description": "This IE indicates the maximum uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer.", - "example": 10 - }, - "erabGbrDl": { - "type": "integer", - "format": "int32", - "description": "This IE indicates the guaranteed downlink E-RAB Bit Rate as defined in TS 23.401 for this bearer.", - "example": 10 - }, - "erabGbrUl": { - "type": "integer", - "format": "int32", - "description": "This IE indicates the guaranteed uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer.", - "example": 10 - } - } - }, - "SubscriptionLinkList": { - "type": "object", - "required": [ - "_links" - ], - "properties": { - "_links": { - "$ref": "#/definitions/Link" - }, - "subscription": { - "type": "array", - "items": { - "$ref": "#/definitions/Subscription" - } - } - } - }, - "MeasRepUeSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocTri" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "MeasRepUeSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocTri" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "S1BearerSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "s1BearerSubscriptionCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "eventType": { - "$ref": "#/definitions/EventType" - }, - "s1BearerSubscriptionCriteria": { - "$ref": "#/definitions/S1BearerSubscriptionCriteria" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "S1BearerSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "s1BearerSubscriptionCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "eventType": { - "$ref": "#/definitions/EventType" - }, - "s1BearerSubscriptionCriteria": { - "$ref": "#/definitions/S1BearerSubscriptionCriteria" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "RabEstSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocQci" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "RabEstSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocQci" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "RabModSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocQci" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "RabModSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocQci" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "RabRelSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocQci" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "RabRelSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocQci" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "CaReConfSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssoc" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "CaReConfSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssoc" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "CellChangeSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocHo" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "CellChangeSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocHo" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "MeasTaSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssoc" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "MeasTaSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssoc" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "CallbackReference": { - "type": "string", - "format": "uri", - "description": "URL selected by the Mobile Edge application to receive notifications on the subscribed RNIS information.", - "example": "http://meAppClient.example.com/rni/v1/" - }, - "Link": { - "type": "object", - "properties": { - "self": { - "$ref": "#/definitions/LinkType" - } - }, - "description": "List of hyperlinks related to the resource" - }, - "LinkType": { - "description": "URI referring to a resource", - "type": "string", - "format": "uri", - "example": "http://meAppClient.example.com/rni/v1/" - }, - "Subscription": { - "type": "object", - "required": [ - "href", - "subscriptionType" - ], - "properties": { - "href": { - "$ref": "#/definitions/LinkType" - }, - "subscriptionType": { - "$ref": "#/definitions/SubscriptionType" - } - }, - "description": "A link to a subscription." - }, - "SubscriptionType": { - "type": "string", - "description": "Numeric value corresponding to specified type of subscription.", - "enum": [ - "RESERVED", - "CELL_CHANGE", - "RAB_ESTABLISHMENT", - "RAB_MODIFICATION", - "RAB_RELEASE", - "MEAS_REPORT_UE", - "MEAS_TIMING_ADVANCE", - "CA_RECONF", - "S1_BEARE" - ], - "example": "CELL_CHANGE" - }, - "FilterCriteriaAssoc": { - "type": "object", - "properties": { - "appInsId": { - "$ref": "#/definitions/AppInsId" - }, - "associateId": { - "$ref": "#/definitions/AssociateId" - }, - "plmn": { - "$ref": "#/definitions/Plmn" - }, - "cellId": { - "$ref": "#/definitions/CellId" - } - }, - "description": "List of filtering criteria for the subscription." - }, - "FilterCriteriaAssocQci": { - "type": "object", - "properties": { - "appInsId": { - "$ref": "#/definitions/AppInsId" - }, - "associateId": { - "$ref": "#/definitions/AssociateId" - }, - "plmn": { - "$ref": "#/definitions/Plmn" - }, - "cellId": { - "$ref": "#/definitions/CellId" - }, - "qci": { - "$ref": "#/definitions/Qci" - } - }, - "description": "List of filtering criteria for the subscription." - }, - "FilterCriteriaAssocHo": { - "type": "object", - "properties": { - "appInsId": { - "$ref": "#/definitions/AppInsId" - }, - "associateId": { - "$ref": "#/definitions/AssociateId" - }, - "plmn": { - "$ref": "#/definitions/Plmn" - }, - "cellId": { - "$ref": "#/definitions/CellId" - }, - "hoStatus": { - "$ref": "#/definitions/HoStatus" - } - }, - "description": "List of filtering criteria for the subscription." - }, - "FilterCriteriaAssocTri": { - "type": "object", - "properties": { - "appInsId": { - "$ref": "#/definitions/AppInsId" - }, - "associateId": { - "$ref": "#/definitions/AssociateId" - }, - "plmn": { - "$ref": "#/definitions/Plmn" - }, - "cellId": { - "$ref": "#/definitions/CellId" - }, - "trigger": { - "$ref": "#/definitions/Trigger" - } - }, - "description": "List of filtering criteria for the subscription." - }, - "S1BearerSubscriptionCriteria": { - "type": "object", - "properties": { - "associateId": { - "$ref": "#/definitions/AssociateId" - }, - "plmn": { - "$ref": "#/definitions/Plmn" - }, - "cellId": { - "$ref": "#/definitions/CellId" - }, - "erabId": { - "$ref": "#/definitions/ErabId" - } - }, - "description": "List of filtering criteria for the subscription." - }, - "HoStatus": { - "type": "string", - "description": "Description of the subscribed to event", - "enum": [ - "RESERVED", - "IN_PREPARATION", - "IN_EXECUTION", - "COMPLETED", - "REJECTED", - "CANCELLED" - ], - "example": "COMPLETED" - }, - "EventType": { - "type": "string", - "description": "Description of the subscribed event.", - "enum": [ - "RESERVED", - "S1_BEARER_ESTABLISH", - "S1_BEARER_MODIFY", - "S1_BEARER_RELEASE" - ], - "example": "S1_BEARER_ESTABLISH" - }, - "Trigger": { - "type": "string", - "description": "Unique identifier for the mobile edge application instance", - "enum": [ - "NOT_AVAILABLE", - "PERIODICAL_REPORT_STRONGEST_CELLS", - "PERIODICAL_REPORT_STRONGEST_CELLS_FOR_SON", - "PERIODICAL_REPORT_CGI", - "EVENT_A1", - "EVENT_A2", - "EVENT_A3", - "EVENT_A4", - "EVENT_A5", - "EVENT_A6", - "EVENT_B1", - "EVENT_B2", - "EVENT_C1", - "EVENT_C2", - "EVENT_W1", - "EVENT_W2", - "EVENT_W3" - ], - "example": "EVENT_A3" - } - } -} diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn index dc220989fe36811bdd3e4f1ed4b77cd26ab387b7..3277c32b57f5accadedcec8df0c6f12e3406b47a 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn @@ -1,7 +1,7 @@ module RnisAPI_Pixits { // JSON - import from JSON all; + import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; @@ -9,21 +9,21 @@ module RnisAPI_Pixits { // LibMec/Rnis import from RnisAPI_TypesAndValues all; - modulepar JSON.String PX_SUBSCRIPTION_HREF_VALUE := "cell_change"; + modulepar Json.String PX_SUBSCRIPTION_HREF_VALUE := "cell_change"; - modulepar JSON.String PX_UNKNOWN_SUBSCRIPTION_ID := "0666"; + modulepar Json.String PX_UNKNOWN_SUBSCRIPTION_ID := "0666"; - modulepar Link PX_LINKS_SELF := { self_ := { href := "http://example.com/exampleAPI/rni/v2/subscriptions" } }; + modulepar Links PX_LINKS_SELF := { self_ := { href := "http://example.com/exampleAPI/rni/v2/subscriptions" } }; modulepar charstring PX_CALLBACK_URI := "/"; modulepar CallbackReference PX_CALLBACK_REFERENCE := "http://meAppClient.example.com/rni/v2/notifications/cell_change/77777"; - modulepar JSON.String PX_ASSOCIATE_ID_VALUE := "192.0.0.2"; + modulepar Json.String PX_ASSOCIATE_ID_VALUE := "192.0.0.2"; - modulepar CellId PX_CELL_ID := "0x0800000A"; + modulepar CellId PX_V2X_CELL_ID := "0x0800000A"; - modulepar CellId PX_UNKNOWN_CELL_ID := "0x0800000A"; + modulepar CellId PX_V2X_UNKNOWN_CELL_ID := "0x0800000A"; modulepar CellId PX_C_ID := "0xFFFFFFFF"; diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn index 153650521da03d5a315e73774f232123b930c183..83d31c10e80c358f22dec3474de2d830292ab522 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn @@ -1,7 +1,7 @@ module RnisAPI_Templates { // JSON - import from JSON all; + import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; @@ -42,7 +42,7 @@ module RnisAPI_Templates { template (value) Subscription_ m_subscription( in LinkType p_href, - in JSON.String p_subscriptionType + in Json.String p_subscriptionType ) := { href := p_href, subscriptionType := p_subscriptionType @@ -50,7 +50,7 @@ module RnisAPI_Templates { template (present) Subscription_ mw_subscription( template (present) LinkType p_href := ?, - template (present) JSON.String p_subscriptionType := ? + template (present) Json.String p_subscriptionType := ? ) := { href := p_href, subscriptionType := p_subscriptionType @@ -59,20 +59,26 @@ module RnisAPI_Templates { template (omit) CellChangeSubscription m_cell_change_subscription( in template (value) CallbackReference p_callbackReference, in template (value) FilterCriteriaAssocHo p_filterCriteriaAssocHo, - in template (omit) Link p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Links p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - subscriptionType := "CellChangeSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaAssocHo := p_filterCriteriaAssocHo, - expiryDeadline := p_expiryDeadline + subscriptionType := "CellChangeSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAssocHo := p_filterCriteriaAssocHo, + expiryDeadline := p_expiryDeadline } // End of template m_cell_change_subscription template (omit) CellChangeSubscription m_cell_change_subscription_wrong_subscription_type( in template (value) CallbackReference p_callbackReference, in template (value) FilterCriteriaAssocHo p_filterCriteriaAssocHo, - in template (omit) Link p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Links p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) modifies m_cell_change_subscription := { subscriptionType := "CellChangeSubscription_invalid" @@ -80,15 +86,19 @@ module RnisAPI_Templates { template CellChangeSubscription mw_cell_change_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) FilterCriteriaAssocHo p_filterCriteriaAssocHo := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "CellChangeSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaAssocHo := p_filterCriteriaAssocHo, - expiryDeadline := p_expiryDeadline + subscriptionType := "CellChangeSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAssocHo := p_filterCriteriaAssocHo, + expiryDeadline := p_expiryDeadline } // End of template mw_cell_change_subscription } // End of group subscriptions @@ -98,133 +108,173 @@ module RnisAPI_Templates { template (omit) RabEstSubscription m_rab_est_subscription( in template (value) CallbackReference p_callbackReference, in template (value) RabEstSubscription_FilterCriteriaQci p_filterCriteriaQci, - in template (omit) Link p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Links p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - subscriptionType := "RabEstSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaQci := p_filterCriteriaQci, - expiryDeadline := p_expiryDeadline + subscriptionType := "RabEstSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaQci := p_filterCriteriaQci, + expiryDeadline := p_expiryDeadline } // End of template m_rab_est_subscription template (present) RabEstSubscription mw_rab_est_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) RabEstSubscription_FilterCriteriaQci p_filterCriteriaQci := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "RabEstSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaQci := p_filterCriteriaQci, - expiryDeadline := p_expiryDeadline + subscriptionType := "RabEstSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaQci := p_filterCriteriaQci, + expiryDeadline := p_expiryDeadline } // End of template mw_rab_est_subscription template (omit) RabModSubscription m_rab_mod_subscription( in template (value) CallbackReference p_callbackReference, in template (value) RabModSubscription_FilterCriteriaQci p_filterCriteriaQci, - in template (omit) Link p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Links p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - subscriptionType := "RabModSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaQci := p_filterCriteriaQci, - expiryDeadline := p_expiryDeadline + subscriptionType := "RabModSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaQci := p_filterCriteriaQci, + expiryDeadline := p_expiryDeadline } // End of template m_rab_mod_subscription template (present) RabModSubscription mw_rab_mod_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) RabModSubscription_FilterCriteriaQci p_filterCriteriaQci := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "RabModSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaQci := p_filterCriteriaQci, - expiryDeadline := p_expiryDeadline + subscriptionType := "RabModSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaQci := p_filterCriteriaQci, + expiryDeadline := p_expiryDeadline } // End of template mw_rab_mod_subscription template (omit) RabRelSubscription m_rab_rel_subscription( in template (value) CallbackReference p_callbackReference, in template (value) RabModSubscription_FilterCriteriaQci p_filterCriteriaQci, - in template (omit) Link p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Links p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - subscriptionType := "RabRelSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaQci := p_filterCriteriaQci, - expiryDeadline := p_expiryDeadline + subscriptionType := "RabRelSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaQci := p_filterCriteriaQci, + expiryDeadline := p_expiryDeadline } // End of template m_rab_rel_subscription template (present) RabRelSubscription mw_rab_rel_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) RabModSubscription_FilterCriteriaQci p_filterCriteriaQci := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "RabRelSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaQci := p_filterCriteriaQci, - expiryDeadline := p_expiryDeadline + subscriptionType := "RabRelSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaQci := p_filterCriteriaQci, + expiryDeadline := p_expiryDeadline } // End of template mw_rab_rel_subscription template (present) MeasRepUeSubscription mw_meas_rep_ue_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) FilterCriteriaAssocTri p_filterCriteriaAssocTri := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "MeasRepUeSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaAssocTri := p_filterCriteriaAssocTri, - expiryDeadline := p_expiryDeadline + subscriptionType := "MeasRepUeSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAssocTri := p_filterCriteriaAssocTri, + expiryDeadline := p_expiryDeadline } // End of template mw_meas_rep_ue_subscription template (present) MeasTaSubscription mw_meas_ta_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, - template (present) FilterCriteriaAssocHo p_filterCriteriaAssocHo := ?, + template (present) Links p_links := ?, + template (present) FilterCriteriaAssoc p_filterCriteriaAssoc := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "MeasTaSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaAssocHo := p_filterCriteriaAssocHo, - expiryDeadline := p_expiryDeadline + subscriptionType := "MeasTaSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAssoc := p_filterCriteriaAssoc, + expiryDeadline := p_expiryDeadline } // End of template mw_meas_ta_subscription template (present) CaReConfSubscription mw_ca_reconfig_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) FilterCriteriaAssoc p_filterCriteriaAssoc := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "CaReConfSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaAssoc := p_filterCriteriaAssoc, - expiryDeadline := p_expiryDeadline + subscriptionType := "CaReConfSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAssoc := p_filterCriteriaAssoc, + expiryDeadline := p_expiryDeadline } // End of template mw_ca_reconfig_subscription template (present) S1BearerSubscription mw_s1_bearer_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) EventType p_eventType := ?, template (present) S1BearerSubscriptionCriteria p_s1BearerSubscriptionCriteria := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "S1BearerSubscription", - callbackReference := p_callbackReference, - links := p_links, - eventType := p_eventType, + subscriptionType := "S1BearerSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + eventType := p_eventType, s1BearerSubscriptionCriteria := p_s1BearerSubscriptionCriteria, - expiryDeadline := p_expiryDeadline + expiryDeadline := p_expiryDeadline } // End of template mw_s1_bearer_subscription } // End of group notifications @@ -269,7 +319,7 @@ module RnisAPI_Templates { template (omit) PlmnInfo m_plmn_info( in AppInstanceId p_appInstanceId, - in template (value) Plmns p_plmn, + in template (value) Plmn_list p_plmn, in template (omit) TimeStamp p_timeStamp := omit ) := { timeStamp := p_timeStamp, @@ -279,7 +329,7 @@ module RnisAPI_Templates { template (present) PlmnInfo mw_plmn_info( template (present) AppInstanceId p_appInstanceId := ?, - template (present) Plmns p_plmn := ?, + template (present) Plmn_list p_plmn := ?, template TimeStamp p_timeStamp := * ) := { timeStamp := p_timeStamp, @@ -398,22 +448,6 @@ module RnisAPI_Templates { s1BearerInfoDetailed := p_s1BearerInfoDetailed } // End of mw_s1_ue_info - template (value) TimeStamp m_time_stamp( - in UInt32 p_seconds, - in UInt32 p_nanoSeconds := 0 - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of temlate m_time_stamp - - template (present) TimeStamp mw_time_stamp( - template (present) UInt32 p_seconds := ?, - template (present) UInt32 p_nanoSeconds := ? - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of temlate mw_time_stamp - template (value) FilterCriteriaAssoc m_filter_criteria( in AppInstanceId p_appInstanceId, in template (value) AssociateId p_associateId, @@ -544,7 +578,7 @@ module RnisAPI_Templates { template (value) AssociateId_ m_associate_id( in AssociateId_type p_type_, - in JSON.String p_value_ + in Json.String p_value_ ) := { type_ := p_type_, value_ := p_value_ @@ -552,7 +586,7 @@ module RnisAPI_Templates { template (present) AssociateId_ mw_associate_id( template (present) AssociateId_type p_type_ := ?, - template (present) JSON.String p_value_ := ? + template (present) Json.String p_value_ := ? ) := { type_ := p_type_, value_ := p_value_ @@ -575,16 +609,16 @@ module RnisAPI_Templates { } // End of template mw_ecgi template (value) Plmn m_plmn( - in JSON.String p_mcc, - in JSON.String p_mnc + in Json.String p_mcc, + in Json.String p_mnc ) := { mcc := p_mcc, mnc := p_mnc } // End of template m_plmn template (present) Plmn mw_plmn( - template (present) JSON.String p_mcc := ?, - template (present) JSON.String p_mnc := ? + template (present) Json.String p_mcc := ?, + template (present) Json.String p_mnc := ? ) := { mcc := p_mcc, mnc := p_mnc diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn index 4687000a6b82149e52e4f4809bcaff74959758f0..7a0834698a1953d6219cf184ca880c2108f3f8a1 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn @@ -1,39 +1,31 @@ /** - * @desc The ETSI MEC ISG MEC012 Radio Network Information API described using OpenAPI - * @see http://www.etsi.org/deliver/etsi_gs/MEC/001_099/012/01.01.01_60/gs_mec012v010101p.pdf + * @author ETSI / STF569 / TTF T027 + * @version $Url$ + * $Id$ + * @desc Types ANd Values for ETSI GS MEC 012 V2.2.1 (2022-02) + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. */ module RnisAPI_TypesAndValues { // JSON - import from JSON all; + import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; - - /** - * @desc Represents a time stamp - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.3-1: Attributes of the TimeStamp - */ - type record TimeStamp { - UInt32 seconds, - UInt32 nanoSeconds - } - /** * @desc This type represents the information on Mobile Network(s), which a MEC application instance is associated to. * @member timeStamp Time stamp * @member appInsId Unique identifier for the MEC application instance * @member plmn Public Land Mobile Network Identity - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.2-1: Attributes of the PlmnInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.2-1: Attributes of the PlmnInfo */ type record PlmnInfo { TimeStamp timeStamp optional, AppInstanceId appInstanceId, - Plmns plmn + Plmn_list plmn } - type record of PlmnInfo PlmnInfos; + type set of PlmnInfo PlmnInfos; /** * @desc This type represents the information on existing E-RABs that are associated with a specific MEC application instance. @@ -41,7 +33,7 @@ module RnisAPI_TypesAndValues { * @member appInstanceId Unique identifier for the MEC application instance * @member requestId Unique identifier allocated by the service consumer for the RAB Information request * @member cellUserInfo The information on users per cell as defined below - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.3-1: Attributes of the RabInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.3-1: Attributes of the RabInfo */ type record RabInfo { TimeStamp timeStamp optional, @@ -54,19 +46,75 @@ module RnisAPI_TypesAndValues { * @desc The information on users per cell * @member ecgi E-UTRAN CelI Global Identifier * @member ueInfo Information on UEs in the specific cell - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.3-1: Attributes of the RabInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.3-1: Attributes of the RabInfo */ type record RabInfo_CellUserInfo_ { Ecgi ecgi, UeInfo ueInfo } - type record of RabInfo_CellUserInfo_ RabInfo_CellUserInfo; + type set of RabInfo_CellUserInfo_ RabInfo_CellUserInfo; + + /** + * @desc Information on UEs in the specific cell + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow. + * @member erabInfo Information on E-RAB as defined below + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.3-1: Attributes of the RabInfo + */ + type record UeInfo_ { + AssociateId associateId optional, + ErabInfo erabInfo + } + type set of UeInfo_ UeInfo; + + /** + * @desc Information on E-RAB + * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE as defined in ETSI TS 136 413 + * @member erabQosParameters QoS parameters for the E-RAB + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.3-1: Attributes of the RabInfo + */ + type record ErabInfo_ { + Json.UInteger erabId, + ErabQosParameters erabQosParameters optional + } + type set of ErabInfo_ ErabInfo; + + /** + * @desc QoS parameters for the E-RAB + * @member qci QoS Class Identifier as defined in TS 23.401 + * @member qci_information The QoS information for the E-RAB + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.3-1: Attributes of the RabInfo + */ + type record ErabQosParameters { + Qci qci, + QosInformation qosInformation optional + } + /** + * @desc QoS Class Identifier as defined in TS 23.401 + */ + type Json.UInteger Qci; + + /** + * @desc The QoS information for the E-RAB + * @member erabGbrDl This IE indicates the maximum downlink E-RAB Bit Rate as defined in TS 23.401 for this bearer + * @member erabGbrUl This IE indicates the maximum uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer + * @member erabGbrDl This IE indicates the guaranteed downlink E-RAB Bit Rate as defined in TS 23.401 for this bearer + * @member erabMbrUl This IE indicates the guaranteed uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.3-1: Attributes of the RabInfo + */ + type record QosInformation_ { + Json.UInteger erabMbrDl, + Json.UInteger erabMbrUl, + Json.UInteger erabGbrDl, + Json.UInteger erabGbrUl + } + type set of QosInformation_ QosInformation; + /** * @desc This type represents the information on S1-U bearer. * @member timeStamp Time stamp * @member S1UeInfo Information on a specific UE - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4-1 Attributes of the S1BearerInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4-1 Attributes of the S1BearerInfo */ type record S1BearerInfo { TimeStamp timeStamp optional, @@ -79,68 +127,68 @@ module RnisAPI_TypesAndValues { * @member associateId 1 to N identifiers to associate the information for a specific UE or flow * @member ecgi E-UTRAN CelI Global Identifier * @member s1BearerInfoDetailed S1 bearer information - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4-1 Attributes of the S1BearerInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4-1 Attributes of the S1BearerInfo */ type record S1UeInfo_ { TempUeId tempUeId optional, - AssociateId associateId, + AssociateId associateId optional, Ecgi ecgi, S1BearerInfoDetailed s1BearerInfoDetailed } - type record of S1UeInfo_ S1UeInfo; + type set of S1UeInfo_ S1UeInfo; - /** - * @desc Information on UEs in the specific cell - * @member erabId The element that uniquely identifies a S1 bearer for a specific UE, as defined in ETSI TS 136 413 - * @member enbInfo S1 bearer information on eNB side - * @member sGwInfo S1 bearer information on GW side - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4-1 Attributes of the S1BearerInfo - */ - type record S1BearerInfoDetailed_ { - UInt32 erabId, - S1EnbInfo s1EnbInfo, - SGwInfo sGwInfo - } - type record of S1BearerInfoDetailed_ S1BearerInfoDetailed; - - type record of UInt32 ErabId; - /** * @desc The temporary identifier allocated for the specific UE * @member mmec MMEC as defined in ETSI TS 136 413 * @member mtmsi M-TMSI as defined in ETSI TS 136 413 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4-1 Attributes of the S1BearerInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4-1 Attributes of the S1BearerInfo */ type record TempUeId_ { Mmec mmec, Mtmsi mtmsi } - type record of TempUeId_ TempUeId; + type set of TempUeId_ TempUeId; - type JSON.String Mmec; + type Json.String Mmec; - type JSON.String Mtmsi; + type Json.String Mtmsi; /** - * @desc S1 bearer information on eNB side - * @member ipAddress eNB transport layer address of this S1 bearer - * @member tunnelId eNB GTP-U TEID of this S1 bearer - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4-1 Attributes of the S1BearerInfo + * @desc Information on UEs in the specific cell + * @member erabId The element that uniquely identifies a S1 bearer for a specific UE, as defined in ETSI TS 136 413 + * @member enbInfo S1 bearer information on eNB side + * @member sGwInfo S1 bearer information on GW side + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4-1 Attributes of the S1BearerInfo */ - type record S1EnbInfo { - JSON.String ipAddress, - JSON.String tunnelId + type record S1BearerInfoDetailed_ { + Json.UInteger erabId, + S1EnbInfo s1EnbInfo, + SGwInfo sGwInfo } + type set of S1BearerInfoDetailed_ S1BearerInfoDetailed; + + type set of Json.UInteger ErabId; /** * @desc S1 bearer information on GW side * @member ipAddress SGW transport layer address of this S1 bearer * @member tunnelId SGW GTP-U TEID of this S1 bearer - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4-1 Attributes of the S1BearerInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4-1 Attributes of the S1BearerInfo */ type record SGwInfo { - JSON.String ipAddress, - JSON.String tunnelId + Json.String ipAddress, + Json.String tunnelId + } + + /** + * @desc S1 bearer information on eNB side + * @member ipAddress eNB transport layer address of this S1 bearer + * @member tunnelId eNB GTP-U TEID of this S1 bearer + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4-1 Attributes of the S1BearerInfo + */ + type record S1EnbInfo { // FIXME Check if it is usefull somewhere + Json.String ipAddress, + Json.String tunnelId } /** @@ -148,7 +196,7 @@ module RnisAPI_TypesAndValues { * @member timestamp Time stamp * @member cellInfo The per cell measurement information * @member cellUEInfo The per cell per UE layer 2 measurements information - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4a-1: Attributes of the L2Meas + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4a-1: Attributes of the L2Meas */ type record L2Meas { TimeStamp timeStamp optional, @@ -156,198 +204,7 @@ module RnisAPI_TypesAndValues { L2Meas_CellUEInfo cellUEInfo optional } - /** - * @desc Unique identifier for the mobile edge application instance", - */ - type JSON.String AppInstanceId; - - /** - * @desc Unique identifier allocated by the Mobile Edge application for the Information request - */ - type JSON.String RequestId; - - /** - * @desc E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413 - * @member ecgi Public Land Mobile Network Identity - * @member cellId E-UTRAN CelI Global Identifier - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.6-1: Attributes of the Ecgi - */ - type record Ecgi { - Plmn plmn, - CellId cellId - } - type record of Ecgi Ecgi_list; - - /** - * @desc New Radio CelI Global Identifier as defined in ETSI TS 138 423 - * @member ecgi Public Land Mobile Network Identity - * @member NrCellId NR CelI Global Identifier - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.6-1: Attributes of the Ecgi - */ - type record NRcgi { - Plmn plmn, - NrCellId nrcellId - } - type record of NRcgi NRcgi_list; - - /** - * @desc Beam level measurement results for a NR cell as defined in ETSI TS 138 331 - * @member resultsSsbIndexes Beam level measurement results based on SS/PBCH related measurements - * @member resultsCsiRsIndexes Beam level measurement results based on CSI-RS related measurements - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.8-1: Attributes of the RsIndexResults - */ - type record RsIndexResults { - ResultsPerSsbIndexList resultsSsbIndexes, - ResultsPerCsiRsIndexList resultsCsiRsIndexes - } - - /** - * @desc Beam level measurement results for a NR cell as defined in ETSI TS 138 331 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.9-1: Attributes of the ResultsPerSsbIndexList - */ - type record ResultsPerSsbIndexList { - ResultsPerSsbIndex resultsPerSsbIndex optional - } - type record ResultsPerSsbIndex { - UInt8 ssbIndex, - MeasQuantityResultsNr ssbResults optional - } - - /** - * @desc Beam level measurement results for a NR cell as defined in ETSI TS 138 331 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.10-1: Attributes of the ResultsPerCsiRsIndexList - */ - type record ResultsPerCsiRsIndexList { - ResultsPerCsiRsIndex resultsPerCsiRsIndex optional - } - type record ResultsPerCsiRsIndex { - UInt8 csiRsIndex, - MeasQuantityResultsNr csiRsResults optional - } - - /** - * @desc Collection of UE reported NR measurement quantity results as defined in ETSI TS 138 331 - @member rsrp Reference Signal Received Power as defined in ETSI TS 138 331 - @member rsrq Reference Signal Received Quality as defined in ETSI TS 138 331 - @member sinr Reference Signal to Interference & Noise Ratio as defined in ETSI TS 138 331 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.11-1: Attributes of the MeasQuantityResultsNr - */ - type record MeasQuantityResultsNr { - UInt8 rsrp optional, - UInt8 rsrq optional, - UInt8 sinr optional - } - - /** - * @desc E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413 - * @member mcc The Mobile Country Code part of PLMN Identity as defined in 3GPP TS 36.413 - * @member mnc The Mobile Network Code part of PLMN Identity as defined in 3GPP TS 36.413 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.5-1: Attributes of the Plmn - */ - type record Plmn { - JSON.String mcc, - JSON.String mnc - } - type record of Plmn Plmns; - - /** - * @desc The E-UTRAN Cell Identity as a bit string (size (28)), as defined in 3GPP TS 36.413 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.6.2-1: CellId - */ - type JSON.String CellId; - - /** - * @desc the NR Cell Identity. Encoded as a bit string (size (36)) as defined in ETSI TS 138 423 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.6.2-1: CellId - */ - type JSON.String NrCellId; - - /** - * @desc Information on UEs in the specific cell - * @member associateId 0 to N identifiers to associate the event for a specific UE or flow. - * @member erabInfo Information on E-RAB as defined below - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.3-1: Attributes of the RabInfo - */ - type record UeInfo_ { - AssociateId associateId optional, - ErabInfo erabInfo - } - type record of UeInfo_ UeInfo; - - /** - * @desc Information on UEs in the specific cell - * @member type Numeric value (0-255) corresponding to specified type of identifier - * @member value Value for the identifier - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.4-1: Attributes of the AssociateId - */ - type record AssociateId_ { - AssociateId_type type_, - JSON.String value_ - } with { - variant (type_) "name as 'type'"; - variant (value_) "name as 'value'"; - } - type record of AssociateId_ AssociateId; - - /** - * @desc Numeric value (0-255) corresponding to specified type of identifier - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.4-1: Attributes of the AssociateId - */ - type enumerated AssociateId_type { - RESERVED (0), - UE_IPV4_ADDRESS (1), - UE_IPV6_ADDRESS (2), - NATED_IP_ADDRESS (3), - GTP_TEID (4) - } with { - variant "JSON: as number" - } - - /** - * @desc Information on E-RAB - * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE as defined in ETSI TS 136 413 - * @member erabQosParameters QoS parameters for the E-RAB - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.3-1: Attributes of the RabInfo - */ - type record ErabInfo_ { - UInt32 erabId, - ErabQosParameters erabQosParameters optional - } - type record of ErabInfo_ ErabInfo; - - /** - * @desc QoS parameters for the E-RAB - * @member qci QoS Class Identifier as defined in TS 23.401 - * @member qci_information The QoS information for the E-RAB - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.3-1: Attributes of the RabInfo - */ - type record ErabQosParameters { - Qci qci, - QosInformation qosInformation optional - } - - /** - * @desc QoS Class Identifier as defined in TS 23.401 - */ - type UInt32 Qci; - - /** - * @desc The QoS information for the E-RAB - * @member erabGbrDl This IE indicates the maximum downlink E-RAB Bit Rate as defined in TS 23.401 for this bearer - * @member erabGbrUl This IE indicates the maximum uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer - * @member erabGbrDl This IE indicates the guaranteed downlink E-RAB Bit Rate as defined in TS 23.401 for this bearer - * @member erabMbrUl This IE indicates the guaranteed uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.3-1: Attributes of the RabInfo - */ - type record QosInformation_ { - UInt32 erabMbrDl, - UInt32 erabMbrUl, - UInt32 erabGbrDl, - UInt32 erabGbrUl - } - type record of QosInformation_ QosInformation; - - type integer UInt100 (0 .. 100) with {variant "unsigned 100 bit"}; + type integer UInt100 with {variant "unsigned 100 bit"}; /** * @desc The per cell measurement information @@ -369,7 +226,7 @@ module RnisAPI_TypesAndValues { * @member ul_gbr_pdr_cell It indicates the packet discard rate in percentage of the uplink GBR traffic in a cell, as defined in ETSI TS 136 314 * @member dl_nongbr_pdr_cell It indicates the packet discard rate in percentage of the downlink non-GBR traffic in a cell, as defined in ETSI TS 136 314 * @member ul_nongbr_pdr_cell It indicates the packet discard rate in percentage of the uplink non-GBR traffic in a cell, as defined in ETSI TS 136 314 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4a-1: Attributes of the L2Meas + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4a-1: Attributes of the L2Meas */ type record L2Meas_CellInfo_ { Ecgi ecgi optional, @@ -391,7 +248,7 @@ module RnisAPI_TypesAndValues { UInt100 dl_nongbr_pdr_cell optional, UInt100 ul_nongbr_pdr_cell optional } - type record of L2Meas_CellInfo_ L2Meas_CellInfo; + type set of L2Meas_CellInfo_ L2Meas_CellInfo; /** * @desc The per cell measurement information @@ -413,7 +270,7 @@ module RnisAPI_TypesAndValues { * @member ul_gbr_data_volume_ue It indicates the data volume of the uplink GBR traffic of a UE, as defined in ETSI TS 136 314 * @member dl_nongbr_data_volume_ue It indicates the data volume of the downlink non-GBR traffic of a UE, as defined in ETSI TS 136 314 * @member ul_nongbr_data_volume_ue It indicates the data volume of the uplink non-GBR traffic of a UE, as defined in ETSI TS 136 314 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4a-1: Attributes of the L2Meas + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4a-1: Attributes of the L2Meas */ type record L2Meas_CellUEInfo_ { Ecgi ecgi, @@ -435,135 +292,125 @@ module RnisAPI_TypesAndValues { integer dl_nongbr_data_volume_ue optional, integer ul_nongbr_data_volume_ue optional } - type record of L2Meas_CellUEInfo_ L2Meas_CellUEInfo; + type set of L2Meas_CellUEInfo_ L2Meas_CellUEInfo; /** - * @desc subscription to 5G UE measurement report notifications from Radio Network Information Service for UEs served by NR Cells - * @member subscriptionType Shall be set to "NrMeasRepUeSubscription" - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @desc Subscription to cell change notifications from Radio Network Information Service + * @member subscriptionType Shall be set to "CellChangeSubscription" + * @member callbackReference URI selected by the service consumerto receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications * @member links Hyperlink related to the resource - * @member filterCriteriaAssocTri List of filtering criteria for the subscription + * @member filterCriteriaAssocHo List of filtering criteria for the subscription * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.11-1: Attributes of the NrMeasRepUeSubscription - */ - type record NrMeasRepUeSubscription { - JSON.String subscriptionType, - CallbackReference callbackReference, - Link links optional, - FilterCriteriaNrMrs filterCriteriaNrMrs, - TimeStamp expiryDeadline optional - } with { - variant (links) "name as '_links'"; - } - - /** - * @desc List of links related to currently existing subscriptions for the service consumer - * @member links List of hyperlinks related to the resource - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.10-1: Attributes of the SubscriptionLinkList + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.2-1: Attributes of the CellChangeSubscription */ - type record SubscriptionLinkList { - SubscriptionLinkList_Link links + type record CellChangeSubscription { + Json.String subscriptionType, + CallbackReference callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteriaAssocHo filterCriteriaAssocHo, + TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } /** * @desc List of hyperlinks related to the resource - * @member self_ - * @member subscription A link to a subscription - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.10-1: Attributes of the SubscriptionLinkList + * @member self_ URI referring to a resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.2-1: Attributes of the CellChangeSubscription */ - type record SubscriptionLinkList_Link { - LinkType self_, - Subscription subscription optional + type record Links { + LinkType self_ } with { variant (self_) "name as 'self'"; } /** - * @desc A link to a subscription - * @member The URI referring to the subscription - * @member Type of the subscription - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.10-1: Attributes of the SubscriptionLinkList + * @desc List of filtering criteria for the subscription + * @member appInstanceId Unique identifier for the MEC application instance + * @member associateId 0 to N identifiers to associate the information for a specific UE or flow + * @member ecgi E-UTRAN CelI Global Identifier + * @member hoStatus Indicate the status of the UE handover procedure + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.2-1: Attributes of the CellChangeSubscription */ - type record Subscription_ { - LinkType href, - JSON.String subscriptionType + type record FilterCriteriaAssocHo { + AppInstanceId appInstanceId optional, + AssociateId associateId optional, + Ecgi_list ecgi optional, + HoStatus_list hoStatus optional } - type record of Subscription_ Subscription; /** - * @desc Subscription to UE measurement report notifications from Radio Network Information Service for UEs served by E-UTRA Cells - * @member subscriptionType Shall be set to "MeasRepUeSubscription" - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information - * @member links Hyperlink related to the resource - * @member filterCriteriaAssocTri List of filtering criteria for the subscription - * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.6-1: Attributes of the MeasRepUeSubscription - */ - type record MeasRepUeSubscription { - JSON.String subscriptionType, - CallbackReference callbackReference, - Link links optional, - FilterCriteriaAssocTri filterCriteriaAssocTri, - TimeStamp expiryDeadline optional - } with { - variant (links) "name as '_links'"; - } - - /** - * @desc Subscription to S1-U bearer information notification from Radio Network Information Service - * @member subscriptionType Shall be set to "S1BearerSubscription" - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information - * @member links Hyperlink related to the resource - * @member eventType Description of the subscribed event - * @member s1BearerSubscriptionCriteria List of filtering criteria for the subscription - * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.9-1: Attributes of the S1BearerSubscription + * @desc Description of the subscribed to event + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.2-1: Attributes of the CellChangeSubscription */ - type record S1BearerSubscription { - JSON.String subscriptionType, - CallbackReference callbackReference, - Link links optional, - EventType eventType, - S1BearerSubscriptionCriteria s1BearerSubscriptionCriteria, - TimeStamp expiryDeadline optional + type enumerated HoStatus { + IN_PREPARATION (1), + IN_EXECUTION (2), + COMPLETED (3), + REJECTED (4), + CANCELLED (5) } with { - variant (links) "name as '_links'"; + variant "JSON: as number" } + type set of HoStatus HoStatus_list; /** * @desc Subscription to RAB establishment notifications from Radio Network Information Service * @member subscriptionType Shall be set to "RabEstSubscription" * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications * @member links Hyperlink related to the resource * @member filterCriteriaQci List of filtering criteria for the subscription * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.3-1: Attributes of the RabEstSubscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.3-1: Attributes of the RabEstSubscription */ type record RabEstSubscription { - JSON.String subscriptionType, + Json.String subscriptionType, CallbackReference callbackReference, - Link links optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, RabEstSubscription_FilterCriteriaQci filterCriteriaQci, TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } + /** + * @desc List of filtering criteria for the subscription + * @member appInstanceId Unique identifier for the MEC application instance + * @member ecgi E-UTRAN CelI Global Identifier + * @member qci QoS Class Identifier as defined in ETSI TS 123 401 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.3-1: Attributes of the RabEstSubscription + */ + type record RabEstSubscription_FilterCriteriaQci { + AppInstanceId appInstanceId optional, + Ecgi_list ecgi optional, + Qci qci + } + /** * @desc Subscription to RAB modification notifications from Radio Network Information Service * @member subscriptionType Shall be set to "RabModSubscription" * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications * @member links Hyperlink related to the resource * @member filterCriteriaQci List of filtering criteria for the subscription * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.4-1: Attributes of the RabModSubscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.4-1: Attributes of the RabModSubscription */ type record RabModSubscription { - JSON.String subscriptionType, + Json.String subscriptionType, CallbackReference callbackReference, - Link links optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, RabModSubscription_FilterCriteriaQci filterCriteriaQci, TimeStamp expiryDeadline optional } with { @@ -574,15 +421,19 @@ module RnisAPI_TypesAndValues { * @desc Subscription to RAB release notifications from Radio Network Information Service * @member subscriptionType Shall be set to "RabRelSubscription" * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications * @member links Hyperlink related to the resource * @member filterCriteriaQci List of filtering criteria for the subscription * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.5-1: Attributes of the RabRelSubscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.5-1: Attributes of the RabRelSubscription */ type record RabRelSubscription { - JSON.String subscriptionType, + Json.String subscriptionType, CallbackReference callbackReference, - Link links optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, RabModSubscription_FilterCriteriaQci filterCriteriaQci, TimeStamp expiryDeadline optional } with { @@ -590,215 +441,942 @@ module RnisAPI_TypesAndValues { } /** - * @desc Subscription to UE carrier aggregation reconfiguration notifications from Radio Network Information Service - * @member subscriptionType Shall be set to "CaReConfSubscription" - * @member callbackReference URI selected by the service consumerto receive notifications on the subscribed RNIS information + * @desc List of filtering criteria for the subscription + * @member appInstanceId Unique identifier for the MEC application instance + * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE as defined in ETSI TS 136 413 + * @member ecgi E-UTRAN CelI Global Identifier + * @member qci QoS Class Identifier as defined in ETSI TS 123 401 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.4-1: Attributes of the RabModSubscription + */ + type record RabModSubscription_FilterCriteriaQci { + AppInstanceId appInstanceId optional, + Json.UInteger erabId, + Ecgi_list ecgi optional, + Qci qci + } + + /** + * @desc Subscription to UE measurement report notifications from Radio Network Information Service for UEs served by E-UTRA Cells + * @member subscriptionType Shall be set to "MeasRepUeSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications * @member links Hyperlink related to the resource - * @member filterCriteriaAssoc List of filtering criteria for the subscription + * @member filterCriteriaAssocTri List of filtering criteria for the subscription * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.8-1: Attributes of the CaReconfSubscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.6-1: Attributes of the MeasRepUeSubscription */ - type record CaReConfSubscription { - JSON.String subscriptionType, - CallbackReference callbackReference, - Link links optional, - FilterCriteriaAssoc filterCriteriaAssoc, - TimeStamp expiryDeadline optional + type record MeasRepUeSubscription { + Json.String subscriptionType, + CallbackReference callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteriaAssocTri filterCriteriaAssocTri, + TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } + + /** + * @desc List of filtering criteria for the subscription + * @member appInstanceId Unique identifier for the MEC application instance + * @member associateId 0 to N identifiers to associate the information for a specific UE or flow + * @member ecgi E-UTRAN CelI Global Identifier + * @member trigger_ Corresponds to a specific E-UTRAN UE Measurement Report trigger + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.6-1: Attributes of the MeasRepUeSubscription + */ + type record FilterCriteriaAssocTri { + AppInstanceId appInstanceId optional, + AssociateId associateId optional, + Ecgi_list ecgi optional, + Trigger trigger_ optional + } with { + variant (trigger_) "name as 'trigger'"; + } /** - * @desc Subscription to cell change notifications from Radio Network Information Service - * @member subscriptionType Shall be set to "CellChangeSubscription" - * @member callbackReference URI selected by the service consumerto receive notifications on the subscribed RNIS information + * @desc This type represents a subscription to UE timing advance notifications from Radio Network Information Service + * @member subscriptionType Shall be set to "MeasRepUeSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications * @member links Hyperlink related to the resource - * @member filterCriteriaAssocHo List of filtering criteria for the subscription + * @member filterCriteriaAssoc List of filtering criteria for the subscription * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.2-1: Attributes of the CellChangeSubscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.7 Type: MeasTaSubscription */ - type record CellChangeSubscription { - JSON.String subscriptionType, + type record MeasTaSubscription { + Json.String subscriptionType, CallbackReference callbackReference, - Link links optional, - FilterCriteriaAssocHo filterCriteriaAssocHo, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links, + FilterCriteriaAssoc filterCriteriaAssoc, TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } /** - * @desc - * @member callbackReference - * @member links - * @member filterCriteria - * @member expiryDeadline + * @desc List of filtering criteria for the subscription + * @member appInstanceId Unique identifier for the MEC application instance + * @member associateId 0 to N identifiers to associate the information for a specific UE or flow + * @member ecgi E-UTRAN CelI Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.7 Type: MeasTaSubscription */ - type record MeasTaSubscription { - JSON.String subscriptionType, - CallbackReference callbackReference, - Link links, - FilterCriteriaAssocHo filterCriteriaAssocHo, - TimeStamp expiryDeadline optional - } with { - variant (links) "name as '_links'"; + type record FilterCriteriaAssoc { + AppInstanceId appInstanceId optional, + AssociateId associateId optional, + Ecgi_list ecgi optional } /** - * @desc URL selected by the Mobile Edge application to receive notifications on the subscribed RNIS information + * @desc Subscription to UE carrier aggregation reconfiguration notifications from Radio Network Information Service + * @member subscriptionType Shall be set to "CaReConfSubscription" + * @member callbackReference URI selected by the service consumerto receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaAssoc List of filtering criteria for the subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.8-1: Attributes of the CaReconfSubscription */ - type JSON.AnyURI CallbackReference; + type record CaReConfSubscription { + Json.String subscriptionType, + CallbackReference callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteriaAssoc filterCriteriaAssoc, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } /** - * @desc List of hyperlinks related to the resource - * @member self_ URI referring to a resource + * @desc Subscription to S1-U bearer information notification from Radio Network Information Service + * @member subscriptionType Shall be set to "S1BearerSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member eventType Description of the subscribed event + * @member s1BearerSubscriptionCriteria List of filtering criteria for the subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.9-1: Attributes of the S1BearerSubscription */ - type record Link { - LinkType self_ + type record S1BearerSubscription { + Json.String subscriptionType, + CallbackReference callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + EventType eventType, + S1BearerSubscriptionCriteria s1BearerSubscriptionCriteria, + TimeStamp expiryDeadline optional } with { - variant (self_) "name as 'self'"; + variant (links) "name as '_links'"; } /** - * @desc URI referring to a resource - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.2-1: Attributes of the LinkType + * @desc Description of the subscribed event + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.9-1: Attributes of the S1BearerSubscription */ - type record LinkType { - JSON.AnyURI href + type enumerated EventType_ { + RESERVED (0), + S1_BEARER_ESTABLISH (1), + S1_BEARER_MODIFY (2), + S1_BEARER_RELEASE (3) + } with { + variant "JSON: as number" } - + type set of EventType_ EventType; + /** * @desc List of filtering criteria for the subscription - * @member appInstanceId Unique identifier for the MEC application instance - * @member associateId 0 to N identifiers to associate the information for a specific UE or flow + * @member associateId 0 to N identifiers to associate the events for a specific UE or a flow * @member ecgi E-UTRAN CelI Global Identifier - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.8-1: Attributes of the CaReconfSubscription + * @member erabId The attribute that uniquely identifies a S1 bearer for a specific UE, as defined in ETSI TS 136 413 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.9-1: Attributes of the S1BearerSubscription */ - type record FilterCriteriaAssoc { - AppInstanceId appInstanceId, + type record S1BearerSubscriptionCriteria { AssociateId associateId optional, - Ecgi_list ecgi optional + Ecgi ecgi optional, + ErabId erabId optional } /** - * @desc List of filtering criteria for the subscription - * @member appInstanceId Unique identifier for the MEC application instance - * @member ecgi E-UTRAN CelI Global Identifier - * @member qci QoS Class Identifier as defined in ETSI TS 123 401 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.3-1: Attributes of the RabEstSubscription + * @desc List of hyperlinks related to the resource + * @member self_ + * @member subscription A link to a subscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.10-1: Attributes of the SubscriptionLinkList */ - type record RabEstSubscription_FilterCriteriaQci { - AppInstanceId appInstanceId optional, - Ecgi_list ecgi optional, - Qci qci + type record SubscriptionLinkList_Link { + LinkType self_, + Subscription subscription optional + } with { + variant (self_) "name as 'self'"; } - + /** - * @desc List of filtering criteria for the subscription - * @member appInstanceId Unique identifier for the MEC application instance - * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE as defined in ETSI TS 136 413 - * @member ecgi E-UTRAN CelI Global Identifier - * @member qci QoS Class Identifier as defined in ETSI TS 123 401 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.4-1: Attributes of the RabModSubscription + * @desc A link to a subscription + * @member The URI referring to the subscription + * @member Type of the subscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.10-1: Attributes of the SubscriptionLinkList */ - type record RabModSubscription_FilterCriteriaQci { - AppInstanceId appInstanceId optional, - UInt32 erabId, - Ecgi_list ecgi optional, - Qci qci + type record Subscription_ { + LinkType href, + Json.String subscriptionType } - + type set of Subscription_ Subscription; + /** - * @desc List of filtering criteria for the subscription - * @member appInstanceId Unique identifier for the MEC application instance - * @member associateId 0 to N identifiers to associate the information for a specific UE or flow - * @member ecgi E-UTRAN CelI Global Identifier - * @member hoStatus - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.2-1: Attributes of the CellChangeSubscription + * @desc List of links related to currently existing subscriptions for the service consumer + * @member links List of hyperlinks related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.10-1: Attributes of the SubscriptionLinkList */ - type record FilterCriteriaAssocHo { - AppInstanceId appInstanceId optional, - AssociateId associateId optional, - Ecgi_list ecgi optional, - HoStatus_list hoStatus optional + type record SubscriptionLinkList { + SubscriptionLinkList_Link links + } with { + variant (links) "name as '_links'"; } /** - * @desc List of filtering criteria for the subscription - * @member appInstanceId Unique identifier for the MEC application instance - * @member associateId 0 to N identifiers to associate the information for a specific UE or flow - * @member ecgi E-UTRAN CelI Global Identifier - * @member trigger_ Corresponds to a specific E-UTRAN UE Measurement Report trigger - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.6-1: Attributes of the MeasRepUeSubscription + * @desc subscription to 5G UE measurement report notifications from Radio Network Information Service for UEs served by NR Cells + * @member subscriptionType Shall be set to "NrMeasRepUeSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaAssocTri List of filtering criteria for the subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.11-1: Attributes of the NrMeasRepUeSubscription */ - type record FilterCriteriaAssocTri { - AppInstanceId appInstanceId optional, - AssociateId associateId optional, - Ecgi_list ecgi optional, - Trigger trigger_ optional + type record NrMeasRepUeSubscription { + Json.String subscriptionType, + CallbackReference callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteriaNrMrs filterCriteriaNrMrs, + TimeStamp expiryDeadline optional } with { - variant (trigger_) "name as 'trigger'"; + variant (links) "name as '_links'"; } - + /** * @desc List of filtering criteria for the subscription * @member appInstanceId Unique identifier for the MEC application instance * @member associateId 0 to N identifiers to associate the information for a specific UE or flow * @member nrcgi NR Cell Global Identier * @member triggerNr Corresponds to a specific 5G UE Measurement Report trigger - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.11-1: Attributes of the NrMeasRepUeSubscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.11-1: Attributes of the NrMeasRepUeSubscription */ type record FilterCriteriaNrMrs { AppInstanceId appInstanceId optional, AssociateId associateId optional, - NRcgi_list nrcgi optional, + NRcgi_list nrcgi optional, TriggerNr triggerNr optional } /** - * @desc List of filtering criteria for the subscription - * @member associateId 0 to N identifiers to associate the events for a specific UE or a flow - * @member ecgi E-UTRAN CelI Global Identifier - * @member erabId The attribute that uniquely identifies a S1 bearer for a specific UE, as defined in ETSI TS 136 413 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.9-1: Attributes of the S1BearerSubscription + * @desc This type represents configuration for the delivery of subscription notifications over Websockets + * @member websocketUri Set by location server to indicate to the service consumer the Websocket URI to be used for delivering notifications + * @member requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Clause 6.3.12 Type: WebsockNotifConfig */ - type record S1BearerSubscriptionCriteria { - AssociateId associateId optional, - Ecgi ecgi optional, - ErabId erabId optional + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional } /** - * @desc Description of the subscribed to event - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.2-1: Attributes of the CellChangeSubscription + * @desc Unique identifier for the mobile edge application instance", */ - type enumerated HoStatus { - IN_PREPARATION (1), - IN_EXECUTION (2), - COMPLETED (3), - REJECTED (4), - CANCELLED (5) + type Json.String AppInstanceId; + + /** + * @desc Unique identifier allocated by the Mobile Edge application for the Information request + */ + type Json.String RequestId; + + /** + * @desc This type represents a subscription to 5G UE measurement report notifications from Radio Network Information Service for UEs served by NR Cells + * @member notificationType Shall be set to "CellChangeNotification" + * @member timeStamp Time stamp + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member srcEcgi E-UTRAN Cell Global Identifier of the source cell + * @member trgEcgi E-UTRAN Cell Global Identifier of the target cell + * @member hoStatus Indicate the status of the UE handover procedure + * @member tempUeId The temporary identifier allocated for the specific UE + * @member links Links to resources related to this notification + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.2-1: Attributes of the CellChangeNotification + */ + type record CellChangeNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + AssociateId associateId, + Ecgi srcEcgi, + Ecgi_list trgEcgi, + HoStatus hoStatus, + TempUeId_ tempUeId, + Links links optional } with { - variant "JSON: as number" + variant (links) "name as '_links'"; } - type record of HoStatus HoStatus_list; /** - * @desc Description of the subscribed event - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.9-1: Attributes of the S1BearerSubscription + * @desc This type represents a subscription to 5G UE measurement report notifications from Radio Network Information Service for UEs served by NR Cells + * @member notificationType Shall be set to "RabEstNotification"." + * @member timeStamp Time stamp + * @member ecgi E-UTRAN Cell Global Identifier + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE + * @member erabQosParameters QoS parameters for the E-RAB + * @member tempUeId The temporary identifier allocated for the specific UE + * @member links Links to resources related to this notification + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.3-1: Attributes of the RabEstNotification */ - type enumerated EventType { - RESERVED (0), - S1_BEARER_ESTABLISH (1), - S1_BEARER_MODIFY (2), - S1_BEARER_RELEASE (3) + type record RabEstNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Ecgi ecgi, + AssociateId associateId, + ErabId erabId, + ErabQosParameters erabQosParameters, + TempUeId_ tempUeId, + Links links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a notification from RNIS with regards to RAB modification procedure + * @member notificationType Shall be set to "RabModNotification"." + * @member timeStamp Time stamp + * @member ecgi E-UTRAN Cell Global Identifier + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE + * @member erabQosParameters QoS parameters for the E-RAB + * @member links Links to resources related to this notification + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.4-1: Attributes of the RabModNotification + */ + type record RabModNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Ecgi ecgi, + AssociateId associateId, + ErabId erabId, + ErabQosParameters erabQosParameters, + Links links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a notification from RNIS with regards to RAB release procedure + * @member notificationType Shall be set to "RabModNRabRelNotificationotification"." + * @member timeStamp Time stamp + * @member ecgi E-UTRAN Cell Global Identifier + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member erabReleaseInfo The release information for the E-RAB + * @member links Links to resources related to this notification + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.5-1: Attributes of the RabRelNotification + */ + type record RabRelNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Ecgi ecgi, + AssociateId associateId, + ErabReleaseInfo erabReleaseInfo, + Links links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc The release information for the E-RAB + * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.5-1: Attributes of the RabRelNotification + */ + type record ErabReleaseInfo { + ErabId erabId + } + + /** + * @desc Subscription to UE measurement report notifications from Radio Network Information Service for UEs served by E-UTRA Cells + * @member notificationType Shall be set to "MeasRepUeNotification" + * @member timeStamp Time stamp + * @member ecgi E-UTRAN Cell Global Identifier + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member rsrp Reference Signal Received Power + * @member rsrpEx Extended Reference Signal Received Power + * @member rsrq Reference Signal Received Quality + * @member rsrqEx Extended Reference Signal Received Quality + * @member sinr Reference Signal "Signal to Interference plus Noise Ratio" + * @member trigger Corresponds to a specific E-UTRAN UE Measurement Report trigger + * @member eutranNeighbourCell This parameter can be repeated to contain information of all the neighbouring cells + * @member carrierAggregationMeasInfo This parameter can be repeated to contain information of all the carriers assign for Carrier Aggregation + * @member heightUe Indicates height of the UE in meters relative to the sea + * @member newRadioMeasInfo 5G New Radio secondary serving cells measurement information + * @member newRadioMeasNeiInfo Measurement quantities concerning the 5G NR neighbours + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record MeasRepUeNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Ecgi ecgi, + AssociateId associateId, + Json.UInt8 rsrp, + Json.UInt8 rsrpEx optional, + Json.UInt8 rsrq, + Json.UInt8 rsrqEx optional, + Json.UInt8 sinr optional, + Trigger trigger_, + EutraNeighbourCellMeasInfo eutraNeighbourCellMeasInfo optional, + CarrierAggregationMeasInfo carrierAggregationMeasInfo optional, + Json.Integer heightUe optional, + NewRadioMeasInfo newRadioMeasInfo optional, + NewRadioMeasNeiInfo newRadioMeasNeiInfo optional, + Links links optional + } with { + variant (trigger_) "name as 'trigger'"; + variant (links) "name as '_links'"; + } + + /** + * @desc This parameter can be repeated to contain information of all the neighbouring cells + * @member ecgi E-UTRAN Cell Global Identifier + * @member rsrp Reference Signal Received Power + * @member rsrpEx Extended Reference Signal Received Power + * @member rsrq Reference Signal Received Quality + * @member rsrqEx Extended Reference Signal Received Quality + * @member sinr Reference Signal "Signal to Interference plus Noise Ratio" + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record EutraNeighbourCellMeasInfo_ { + Ecgi ecgi, + Json.UInt8 rsrp optional, + Json.UInt8 rsrpEx optional, + Json.UInt8 rsrq optional, + Json.UInt8 rsrqEx optional, + Json.UInt8 sinr optional + } + type set of EutraNeighbourCellMeasInfo_ EutraNeighbourCellMeasInfo; + + /** + * @desc This parameter can be repeated to contain information of all the carriers assign for Carrier Aggregation + * @member cellIdSrv E-UTRAN Cell Identity of a Secondary serving Cell (SCell) + * @member rsrpSrv Reference Signal Received Power + * @member rsrpSrvEx Extended Reference Signal Received Power + * @member rsrqSrv Reference Signal Received Quality + * @member rsrqSrvEx Extended Reference Signal Received Quality + * @member sinrSrv Reference Signal "Signal to Interference plus Noise Ratio" + * @member cellIdNei E-UTRAN Cell Identity of the best neighbouring cell (NCell) associated with the SCell + * @member rsrpNei Reference Signal Received Power + * @member rsrpNeiEx Extended Reference Signal Received Power + * @member rsrqNei Reference Signal Received Quality + * @member rsrqNeiEx Extended Reference Signal Received Quality + * @member sinrNei Reference Signal "Signal to Interference plus Noise Ratio" + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record CarrierAggregationMeasInfo_ { + CellId cellIdSrv, + Json.UInt8 rsrpSrv optional, + Json.UInt8 rsrpSrvEx optional, + Json.UInt8 rsrqSrv optional, + Json.UInt8 rsrqSrvEx optional, + Json.UInt8 sinrSrv optional, + CellId cellIdNei, + Json.UInt8 rsrpNei optional, + Json.UInt8 rsrpNeiEx optional, + Json.UInt8 rsrqNei optional, + Json.UInt8 rsrqNeiEx optional, + Json.UInt8 sinrNei optional + } + type set of CarrierAggregationMeasInfo_ CarrierAggregationMeasInfo; + + /** + * @desc 5G New Radio secondary serving cells measurement information + * @member nrCarrierFreq ARFCN applicable for a downlink, uplink or bi-directional (TDD) NR carrier frequency + * @member nrSCs Measurement quantities concerning the secondary serving cells + * @member nrBNCs Measurement quantities concerning the best neighbours of the secondary serving cells + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record NewRadioMeasInfo_ { + Json.UInteger nrCarrierFreq, + NrSCs nrSCs, + NrBNCs nrBNCs optional + } + type set of NewRadioMeasInfo_ NewRadioMeasInfo; + + /** + * @desc Measurement quantities concerning the 5G NR neighbours + * @member nrNCellInfo 5G NR neighbour cell info + * @member nrNCellRsrp Reference Signal Received Power measurement + * @member nrNCellRsrq Reference Signal Received Quality measurement + * @member nrNCellRssi Reference signal SINR measurement + * @member rsIndexResults Beam level measurements results of a NR cell + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record NewRadioMeasNeiInfo_ { + NrNCellInfo nrNCellInfo, + Json.UInt8 nrNCellRsrp optional, + Json.UInt8 nrNCellRsrq optional, + Json.UInt8 nrNCellRssi optional, + RsIndexResults rsIndexResults optional + } + type set of NewRadioMeasNeiInfo_ NewRadioMeasNeiInfo; + + /** + * @desc 5G NR neighbour cell info + * @member nrNCellPlmn Public land mobile network identities + * @member nrNCellGId Cell Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record NrNCellInfo_ { + Plmn_list nrNCellPlmn, + NrCellId nrNCellGId + } + type set of NrNCellInfo_ NrNCellInfo; + + /** + * @desc Measurement quantities concerning the secondary serving cells + * @member nrSCellInfo Secondary serving cell(s) info + * @member nrSCellGId Cell Global Identifier + * @member nrSCellRsrp Reference Signal Received Power measurement + * @member nrSCellRsrq Reference Signal Received Quality measurement + * @member nrSCellRssi Reference signal SINR measurement + * @member + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record NrSCs { + NrSCellInfo nrSCellInfo, + Json.UInt8 nrSCellRsrp optional, + Json.UInt8 nrSCellRsrq optional, + Json.UInt8 nrSCellRssi optional + } + + /** + * @desc Secondary serving cell(s) info + * @member nrSCellInfo Secondary serving cell(s) info + * @member nrSCellPlmn Public land mobile network identities + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record NrSCellInfo_ { + Plmn_list nrSCellInfo, + NrCellId_list nrSCellPlmn + } + type set of NrSCellInfo_ NrSCellInfo; + + /** + * @desc Measurement quantities concerning the best neighbours of the secondary serving cells + * @member nrBNCellInfo Best neighbours of the secondary serving cell(s) info + * @member nrBNCellRsrp Reference Signal Received Power measurement + * @member nrBNCellRsrq Reference Signal Received Quality measurement + * @member nrBNCellRssi Reference signal SINR measurement + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + * @member + */ + type record NrBNCs { + NrBNCellInfo nrBNCellInfo, + Json.UInt8 nrBNCellRsrp optional, + Json.UInt8 nrBNCellRsrq optional, + Json.UInt8 nrBNCellRss optional + } + + /** + * @desc Best neighbours of the secondary serving cell(s) info + * @member nrBNCellPlmn Public land mobile network identities + * @member nrBNCellGId Cell Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record NrBNCellInfo_ { + Plmn_list nrBNCellPlmn, + NrCellId nrBNCellGId + } + type set of NrBNCellInfo_ NrBNCellInfo; + + /** + * @desc This type represents a notification from RNIS with regards to UE Timing Advance measurements + * @member notificationType Shall be set to "MeasTaNotification" + * @member timeStamp Time stamp + * @member ecgi E-UTRAN Cell Global Identifier + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member timingAdvance The timing advance + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.7-1: Attributes of the MeasTaNotification + */ + type record MeasTaNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Ecgi ecgi, + AssociateId associateId, + Json.Integer timingAdvance optional, + Links links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a notification from RNIS with regards to UE carrier aggregation reconfigurations + * @member notificationType Shall be set to "CaReconfNotification" + * @member timeStamp Time stamp + * @member ecgi E-UTRAN Cell Global Identifier + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member secondaryCellAdd + * @member secondaryCellRemove + * @member carrierAggregationMeasInfo This parameter can be repeated to contain information of all the carriers assign for Carrier Aggregation + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.8-1: Attributes of the CaReconfNotification + */ + type record CaReconfNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Ecgi ecgi, + AssociateId associateId, + SecondaryCellAdd secondaryCellAdd optional, + SecondaryCellRemove secondaryCellRemove optional, + CarrierAggregationMeasInfo_CaReconfNotification + carrierAggregationMeasInfo optional, + Links links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc + * @member ecgi E-UTRAN Cell Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.8-1: Attributes of the CaReconfNotification + */ + type record SecondaryCellAdd_ { + Ecgi ecgi + } + type set of SecondaryCellAdd_ SecondaryCellAdd; + + /** + * @desc + * @member ecgi E-UTRAN Cell Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.8-1: Attributes of the CaReconfNotification + */ + type record SecondaryCellRemove_ { + Ecgi ecgi + } + type set of SecondaryCellRemove_ SecondaryCellRemove; + + /** + * @desc This parameter can be repeated to contain information of all the carriers assign for Carrier Aggregation + * @member cellIdSrv E-UTRAN Cell Identity of a Secondary serving Cell (SCell) + * @member rsrpSrv Reference Signal Received Power + * @member rsrqSrv Reference Signal Received Quality + * @member cellIdNei E-UTRAN Cell Identity of the best neighbouring cell (NCell) associated with the SCell + * @member rsrpNei Reference Signal Received Power + * @member rsrqNei Reference Signal Received Quality + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.8-1: Attributes of the CaReconfNotification + */ + type record CarrierAggregationMeasInfo_CaReconfNotification_ { + CellId cellIdSrv, + Json.UInt8 rsrpSrv optional, + Json.UInt8 rsrqSrv optional, + CellId cellIdNei, + Json.UInt8 rsrpNei optional, + Json.UInt8 rsrqNei optional + } + type set of CarrierAggregationMeasInfo_CaReconfNotification_ CarrierAggregationMeasInfo_CaReconfNotification; + + /** + * @desc This type represents a notification from RNIS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "ExpiryNotification" + * @member timeStamp Time stamp + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.9-1: Attributes of the ExpiryNotification + */ + type record ExpiryNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Links links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a notification from RNIS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "S1BearerNotification" + * @member timeStamp Time stamp + * @member s1Event The subscribed event that triggered this notification in S1BearerSubscription + * @member s1UeInfo Information on specific UE that matches the criteria in S1BearerSubscription + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.10-1 Attributes of the S1BearerNotification + */ + type record S1BearerNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + EventType s1Event, + S1UeInfo_ s1UeInfo, + Links links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a notification from RNIS with regards to 5G UE measurement report for UEs. + * @member notificationType Shall be set to "NrMeasRepUeNotification" + * @member timeStamp Time stamp + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member triggerNr Corresponds to a specific 5G UE Measurement Report trigger + * @member servCellMeasInfo This parameter can be repeated to contain information of all the serving cells + * @member nrNeighCellMeasInfo This parameter can be repeated to contain measurement information of all the neighbouring cells + * @member eutraNeighCellMeasInfo This parameter can be repeated to contain measurement information of all the neighbouring cells + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.11-1: Attributes of the NrMeasRepUeNotification + */ + type record NrMeasRepUeNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + AssociateId associateId, + TriggerNr triggerNr, + ServCellMeasInfo servCellMeasInfo optional, + NrNeighCellMeasInfo nrNeighCellMeasInfo optional, + EutraNeighbourCellMeasInfo_NrMeasRepUeNotification_ + eutraNeighCellMeasInfo optional, + Links links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This parameter can be repeated to contain information of all the serving cells + * @member nrcgi NR Cell Global Identifier + * @member sCell Measurement information relating to this serving cell + * @member nCell Measurement information relating to the best neighbour of this serving cell + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.11-1: Attributes of the NrMeasRepUeNotification + */ + type record ServCellMeasInfo { + Nrcgi nrcgi, + SCell sCell, + NCell nCell optional + } + + /** + * @desc Measurement information relating to this serving cell + * @member measQuantityResultsSsbCellM easurement quantity results relating to the Synchronization Signal Block + * @member measQuantityResultsCsiRsCell Measurement quantity results relating to the Channel State Information Reference Signal + * @member rsIndexResults Beam level measurement information + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.11-1: Attributes of the NrMeasRepUeNotification + */ + type record SCell { + MeasQuantityResultsNr measQuantityResultsSsbCell optional, + MeasQuantityResultsNr measQuantityResultsCsiRsCell optional, + RsIndexResults rsIndexResults optional + } + + /** + * @desc Measurement information relating to the best neighbour of this serving cell + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.11-1: Attributes of the NrMeasRepUeNotification + */ + type SCell NCell; + + /** + * @desc This parameter can be repeated to contain measurement information of all the neighbouring cells + * @member nrcgi NR Cell Global Identifier + * @member measQuantityResultsSsbCellM easurement quantity results relating to the Synchronization Signal Block + * @member measQuantityResultsCsiRsCell Measurement quantity results relating to the Channel State Information Reference Signal + * @member rsIndexResults Beam level measurement information + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.11-1: Attributes of the NrMeasRepUeNotification + */ + type record NrNeighCellMeasInfo { + Nrcgi nrcgi, + MeasQuantityResultsNr measQuantityResultsSsbCell optional, + MeasQuantityResultsNr measQuantityResultsCsiRsCell optional, + RsIndexResults rsIndexResults optional + } + + /** + * @desc This parameter can be repeated to contain information of all the neighbouring cells + * @member ecgi E-UTRAN Cell Global Identifier + * @member rsrp Reference Signal Received Power + * @member rsrq Reference Signal Received Quality + * @member sinr Reference Signal "Signal to Interference plus Noise Ratio" + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.11-1: Attributes of the NrMeasRepUeNotification + */ + type record EutraNeighbourCellMeasInfo_NrMeasRepUeNotification_ { + Ecgi ecgi, + Json.UInt8 rsrp optional, + Json.UInt8 rsrq optional, + Json.UInt8 sinr optional + } + type set of EutraNeighbourCellMeasInfo_NrMeasRepUeNotification_ EutraNeighbourCellMeasInfo_NrMeasRepUeNotification; + + /** + * @desc This type represents a notification from RNIS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "TestNotification" + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.12-1: Attributes of the TestNotification + */ + type record TestNotification { + Json.String notificationType, + Links links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc the NR Cell Identity. Encoded as a bit string (size (36)) as defined in ETSI TS 138 423 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.6.2-1: CellId + */ + type Json.String NrCellId; + type set of NrCellId NrCellId_list; + + /** + * @desc Numeric value (0-255) corresponding to specified type of identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.4-1: Attributes of the AssociateId + */ + type enumerated AssociateId_type { + RESERVED (0), + UE_IPV4_ADDRESS (1), + UE_IPV6_ADDRESS (2), + NATED_IP_ADDRESS (3), + GTP_TEID (4) } with { variant "JSON: as number" } + + /** + * @desc URL selected by the Mobile Edge application to receive notifications on the subscribed RNIS information + */ + type Json.AnyURI CallbackReference; + + /** + * @desc URI referring to a resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.2-1: Attributes of the LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc Represents a time stamp + * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.3-1: Attributes of the TimeStamp + */ + type record TimeStamp { + Json.UInteger seconds, + Json.UInteger nanoSeconds + } + + /** + * @desc Information on UEs in the specific cell + * @member type Numeric value (0-255) corresponding to specified type of identifier + * @member value Value for the identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.4-1: Attributes of the AssociateId + */ + type record AssociateId_ { + AssociateId_type type_, + Json.String value_ + } with { + variant (type_) "name as 'type'"; + variant (value_) "name as 'value'"; + } + type set of AssociateId_ AssociateId; + + /** + * @desc E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413 + * @member mcc The Mobile Country Code part of PLMN Identity as defined in 3GPP TS 36.413 + * @member mnc The Mobile Network Code part of PLMN Identity as defined in 3GPP TS 36.413 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.5-1: Attributes of the Plmn + */ + type record Plmn { + Json.String mcc, + Json.String mnc + } + type set of Plmn Plmn_list; + + /** + * @desc E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413 + * @member ecgi Public Land Mobile Network Identity + * @member cellId E-UTRAN CelI Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.5-1: Attributes of the Ecgi + */ + type record Ecgi { + Plmn plmn, + CellId cellId + } + type set of Ecgi Ecgi_list; + + /** + * @desc New Radio CelI Global Identifier as defined in ETSI TS 138 423 + * @member ecgi Public Land Mobile Network Identity + * @member NrCellId NR CelI Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.6-1: Attributes of the Ecgi + */ + type record Nrcgi { + Plmn plmn, + NrCellId nrcellId + } + type set of Nrcgi NRcgi_list; + + /** + * @desc Beam level measurement results for a NR cell as defined in ETSI TS 138 331 + * @member resultsSsbIndexes Beam level measurement results based on SS/PBCH related measurements + * @member resultsCsiRsIndexes Beam level measurement results based on CSI-RS related measurements + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.8-1: Attributes of the RsIndexResults + */ + type record RsIndexResults { + ResultsPerSsbIndexList resultsSsbIndexes, + ResultsPerCsiRsIndexList resultsCsiRsIndexes + } + + /** + * @desc Beam level measurement results for a NR cell as defined in ETSI TS 138 331 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.9-1: Attributes of the ResultsPerSsbIndexList + */ + type record ResultsPerSsbIndexList { + ResultsPerSsbIndex resultsPerSsbIndex optional + } + type record ResultsPerSsbIndex { + UInt8 ssbIndex, + MeasQuantityResultsNr ssbResults optional + } + + /** + * @desc Beam level measurement results for a NR cell as defined in ETSI TS 138 331 + * @member resultsPerCsiRsIndex + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.10-1: Attributes of the ResultsPerCsiRsIndexList + */ + type record ResultsPerCsiRsIndexList { + ResultsPerCsiRsIndex resultsPerCsiRsIndex optional + } + type record ResultsPerCsiRsIndex_ { + UInt8 csiRsIndex, + MeasQuantityResultsNr csiRsResults optional + } + type set of ResultsPerCsiRsIndex_ ResultsPerCsiRsIndex; + + /** + * @desc Collection of UE reported NR measurement quantity results as defined in ETSI TS 138 331 + * @member rsrp Reference Signal Received Power as defined in ETSI TS 138 331 + * @member rsrq Reference Signal Received Quality as defined in ETSI TS 138 331 + * @member sinr Reference Signal to Interference & Noise Ratio as defined in ETSI TS 138 331 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.11-1: Attributes of the MeasQuantityResultsNr + */ + type record MeasQuantityResultsNr { + UInt8 rsrp optional, + UInt8 rsrq optional, + UInt8 sinr optional + } + /** + * @desc The E-UTRAN Cell Identity as a bit string (size (28)), as defined in 3GPP TS 36.413 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.6.2-1: CellId + */ + type Json.String CellId; + /** * @desc Unique identifier for the mobile edge application instance - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.6.3-1: Enumeration Trigger + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.6.3-1: Enumeration Trigger */ type enumerated Trigger { NOT_AVAILABLE (0), @@ -832,7 +1410,7 @@ module RnisAPI_TypesAndValues { /** * @desc specified triggers for a 5G UE Measurement Report. Full details can be found in ETSI TS 138 331 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.6.4-1: Enumeration TriggerNr + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.6.4-1: Enumeration TriggerNr */ type enumerated TriggerNr { NOT_AVAILABLE (0), diff --git a/ttcn/LibMec/TrafficManagementAPI/json/BwManagementApi.json b/ttcn/LibMec/TrafficManagementAPI/json/BwManagementApi.json deleted file mode 100644 index 12010d61681535518f6f016b684d3c422a5d0f8b..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/TrafficManagementAPI/json/BwManagementApi.json +++ /dev/null @@ -1,629 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "contact": { - "url": "https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api" - }, - "title": "ETSI GS MEC 015 Bandwidth Management API", - "version": "2.1.1", - "description": "The ETSI MEC ISG Bandwidth Management API described using OpenAPI.", - "license": { - "name": "BSD-3-Clause", - "url": "https://forge.etsi.org/legal-matters" - } - }, - "externalDocs": { - "description": "ETSI GS MEC015 V2.1.1 Traffic Management APIs", - "url": "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/02.01.01_60/gs_MEC015v020101p.pdf" - }, - "servers": [ - { - "url": "https://localhost/bwm/v1" - } - ], - "tags": [ - { - "name": "bwm" - } - ], - "paths": { - "/bw_allocations": { - "get": { - "tags": [ - "bwm" - ], - "summary": "Retrieve information about a list of bandwidthAllocation resources", - "description": "Retrieves information about a list of bandwidthAllocation resources. Typically used in 'Get configured bandwidth allocation from Bandwidth Management Service' procedure as described in clause 6.2.5.", - "operationId": "bandwidthAllocationListGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.app_instance_id" - }, - { - "$ref": "#/components/parameters/Query.app_name" - }, - { - "$ref": "#/components/parameters/Query.session_id" - } - ], - "responses": { - "200": { - "description": "Upon success, a response body containing an array of the bandwidthAllocations is returned.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - }, - "post": { - "tags": [ - "bwm" - ], - "summary": "Create a bandwidthAllocation resource", - "description": "Used to create a bandwidthAllocation resource. Typically used in 'Register to Bandwidth Management Service' procedure as described in clause 6.2.1.", - "operationId": "bandwidthAllocationPOST", - "parameters": [], - "requestBody": { - "description": "Entity body in the request contains BwInfo to be created.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - }, - "responses": { - "201": { - "description": "Upon success, the HTTP response shall include a 'Location' HTTP header that contains the resource URI of the created resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - }, - "/bw_allocations/{allocationId}": { - "get": { - "tags": [ - "bwm" - ], - "summary": "Retrieve information about a specific bandwidthAllocation", - "description": "Retrieves information about a bandwidthAllocation resource. Typically used in 'Get configured bandwidth allocation from Bandwidth Management Service' procedure as described in clause 6.2.5.", - "operationId": "bandwidthAllocationGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.allocationId" - } - ], - "responses": { - "200": { - "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - }, - "put": { - "tags": [ - "bwm" - ], - "summary": "Update the information about a specific bandwidthAllocation", - "description": "Updates the information about a bandwidthAllocation resource. As specified in ETSI GS MEC 009 [6], the PUT HTTP method has 'replace' semantics.", - "operationId": "bandwidthAllocationPUT", - "requestBody": { - "description": "BwInfo with updated information is included as entity body of the request.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.allocationId" - } - ], - "responses": { - "200": { - "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "412": { - "$ref": "#/components/responses/412" - } - } - }, - "patch": { - "tags": [ - "bwm" - ], - "summary": "Modify the information about a specific existing bandwidthAllocation by sending updates on the data structure", - "description": "Updates the information about a bandwidthAllocation resource. As specified in ETSI GS MEC 009 [6], the PATCH HTTP method updates a resource on top of the existing resource state by just including the changes ('deltas') in the request body.", - "operationId": "bandwidthAllocationPATCH", - "requestBody": { - "description": "Description of the changes to instruct the server how to modify the resource representation.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfoDeltas" - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.allocationId" - } - ], - "responses": { - "200": { - "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "412": { - "$ref": "#/components/responses/412" - } - } - }, - "delete": { - "tags": [ - "bwm" - ], - "summary": "Remove a specific bandwidthAllocation", - "description": "Used in 'Unregister from Bandwidth Management Service' procedure as described in clause 6.2.3.", - "operationId": "bandwidthAllocationDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.allocationId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - } - }, - "components": { - "responses": { - "204": { - "description": "Upon success, a response 204 No Content without any response body is returned." - }, - "400": { - "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden : operation is not allowed given the current status of the resource.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "parameters": { - "Path.allocationId": { - "name": "allocationId", - "in": "path", - "description": "Represents a bandwidth allocation instance", - "required": true, - "schema": { - "type": "string" - } - }, - "Query.app_instance_id": { - "name": "app_instance_id", - "in": "query", - "description": "A MEC application instance may use multiple app_instance_ids as an input parameter to query the bandwidth allocation of a list of MEC application instances. See note.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.app_name": { - "name": "app_name", - "in": "query", - "description": "A MEC application instance may use multiple app_names as an input parameter to query the bandwidth allocation of a list of MEC application instances. See note.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.session_id": { - "name": "session_id", - "in": "query", - "description": "A MEC application instance may use session_id as an input parameter to query the bandwidth allocation of a list of sessions. See note.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "schemas": { - "BwInfo": { - "properties": { - "allocationDirection": { - "description": "The direction of the requested BW allocation: 00 = Downlink (towards the UE) 01 = Uplink (towards the application/session) 10 = Symmetrical", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appInsId": { - "description": "Application instance identifier", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "fixedAllocation": { - "description": "Size of requested fixed BW allocation in [bps]", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "fixedBWPriority": { - "description": "Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document", - "enum": [ - "SEE_DESCRIPTION" - ], - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Enum" - }, - "requestType": { - "description": "Numeric value (0 - 255) corresponding to specific type of consumer as following: 0 = APPLICATION_SPECIFIC_BW_ALLOCATION 1 = SESSION_SPECIFIC_BW_ALLOCATION", - "type": "integer", - "enum": [ - 0, - 1 - ], - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "sessionFilter": { - "description": "Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only. In case multiple sessions match sessionFilter the request shall be rejected", - "items": { - "type": "object", - "properties": { - "dstAddress": { - "description": "Destination address identity of session (including range)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "dstPort": { - "description": "Destination port identity of session", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - }, - "protocol": { - "description": "Protocol number", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "sourceIp": { - "description": "Source address identity of session (including range)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "sourcePort": { - "description": "Source port identity of session", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - } - } - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "timeStamp": { - "description": "Time stamp to indicate when the corresponding information elements are sent", - "properties": { - "nanoSeconds": { - "description": "The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "seconds": { - "format": "uint32", - "type": "integer", - "description": "The seconds part of the Time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "required": [ - "seconds", - "nanoSeconds" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - } - }, - "required": [ - "appInsId", - "requestType", - "fixedAllocation", - "allocationDirection" - ], - "type": "object", - "x-etsi-ref": "7.2.2" - }, - "BwInfoDeltas": { - "properties": { - "allocationDirection": { - "description": "The direction of the requested BW allocation: 00 = Downlink (towards the UE) 01 = Uplink (towards the application/session) 10 = Symmetrical", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "appInsId": { - "description": "Application instance identifier", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "fixedAllocation": { - "description": "Size of requested fixed BW allocation in [bps]", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "fixedBWPriority": { - "description": "Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document", - "enum": [ - "SEE DESCRIPTION" - ], - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "requestType": { - "description": "Numeric value (0 - 255) corresponding to specific type of consumer as following: 0 = APPLICATION_SPECIFIC_BW_ALLOCATION 1 = SESSION_SPECIFIC_BW_ALLOCATION", - "type": "string", - "enum": [ - 0, - 1 - ], - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "sessionFilter": { - "description": "Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only. In case multiple sessions match sessionFilter the request shall be rejected", - "items": { - "type": "object", - "properties": { - "dstAddress": { - "description": "Destination address identity of session (including range)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "dstPort": { - "description": "Destination port identity of session", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - }, - "protocol": { - "description": "Protocol number", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "sourceIp": { - "description": "Source address identity of session (including range)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "sourcePort": { - "description": "Source port identity of session ", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - } - } - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Structure (inlined)" - } - }, - "required": [ - "appInsId", - "requestType" - ], - "type": "object", - "x-etsi-ref": "7.2.3" - }, - "ProblemDetails": { - "properties": { - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "instance": { - "description": "A URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "status": { - "description": "The HTTP status code for this occurrence of the problem", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "title": { - "description": "A short, human-readable summary of the problem type", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "type": { - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - } - }, - "type": "object" - } - } - } -} diff --git a/ttcn/LibMec/TrafficManagementAPI/json/TrafficSteeringApi.json b/ttcn/LibMec/TrafficManagementAPI/json/TrafficSteeringApi.json deleted file mode 100644 index 2a5b2920b6c2d95274a201a002527de07bf7c70b..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/TrafficManagementAPI/json/TrafficSteeringApi.json +++ /dev/null @@ -1,657 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "contact": { - "url": "https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api" - }, - "title": "ETSI GS MEC 015 Multi-access Traffic Steering APIs", - "version": "2.1.1", - "description": "The present document focuses on the Multi-access Traffic Steering multi-access edge service. It describes the related application policy information including authorization and access control, information flows, required information and service aggregation patterns. The present document specifies the necessary API with the data model and data format.", - "license": { - "name": "BSD-3-Clause", - "url": "https://forge.etsi.org/legal-matters" - } - }, - "externalDocs": { - "description": "ETSI GS MEC015 V2.1.1 Traffic Management APIs", - "url": "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/02.01.01_60/gs_MEC015v020101p.pdf" - }, - "servers": [ - { - "url": "https://localhost/mts/v1" - } - ], - "tags": [ - { - "name": "mts" - } - ], - "paths": { - "/mts_capability_info": { - "get": { - "tags": [ - "mts" - ], - "summary": "Retrieve the MTS capability informations", - "description": "Used to query information about the MTS information. Typically used in the 'Get MTS service Info from the MTS Service' procedure as described in clause 6.2.6.", - "operationId": "mtsCapabilityInfoGET", - "parameters": [], - "responses": { - "200": { - "description": "Upon success, a response body containing the MTS capability information is returned.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MtsCapabilityInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - }, - "/mts_sessions": { - "get": { - "tags": [ - "mts" - ], - "summary": "Retrieve information about a list of MTS sessions", - "description": "Retrieves information about a list of MTS sessions. Typically used in the 'Get configured MTS Session Info from the MTS Service' procedure as described in clause 6.2.10.", - "operationId": "mtsSessionsListGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.app_instance_id" - }, - { - "$ref": "#/components/parameters/Query.app_name" - }, - { - "$ref": "#/components/parameters/Query.session_id" - } - ], - "responses": { - "200": { - "description": "Upon success, a response body containing an array of the MTS sessions is returned.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - }, - "post": { - "tags": [ - "mts" - ], - "summary": "Create a MTS session", - "description": "Used to create a MTS session. This method is typically used in 'Register application to the MTS Service' procedure as described in clause 6.2.7.", - "operationId": "mtsSessionPOST", - "parameters": [], - "requestBody": { - "description": "Entity body in the request contains MtsSessionInfo to be created.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } - } - }, - "responses": { - "201": { - "description": "Upon success, the HTTP response shall include a 'Location' HTTP header that contains the resource URI of the created resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - }, - "/mts_sessions/{sessionId}": { - "get": { - "tags": [ - "mts" - ], - "summary": "Retrieve information about specific MTS session", - "description": "Retrieves information about an individual MTS session. Typically used in the 'Get configured MTS Session Info from the MTS Service' procedure as described in clause 6.2.10.", - "operationId": "mtsSessionGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.sessionId" - } - ], - "responses": { - "200": { - "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - }, - "put": { - "tags": [ - "mts" - ], - "summary": "Update the information about specific MTS session", - "description": "Updates the information about an individual MTS session. As specified in ETSI GS MEC 009 [6], the PUT HTTP method has 'replace' semantics. ", - "operationId": "mtsSessionPUT", - "parameters": [ - { - "$ref": "#/components/parameters/Path.sessionId" - } - ], - "requestBody": { - "description": "MtsSessionInfo with updated information is included as entity body of the request.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } - } - }, - "responses": { - "200": { - "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "412": { - "$ref": "#/components/responses/412" - } - } - }, - "delete": { - "tags": [ - "mts" - ], - "summary": "Remove specific MTS session", - "description": "DELETE method is typically used in 'Unregister from the MTS Service' procedure as described in clause 6.2.8.", - "operationId": "mtsSessionDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.sessionId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - } - }, - "components": { - "responses": { - "204": { - "description": "Upon success, a response 204 No Content without any response body is returned." - }, - "400": { - "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden : operation is not allowed given the current status of the resource.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "parameters": { - "Path.sessionId": { - "name": "sessionId", - "in": "path", - "description": "Represents a MTS session instance", - "required": true, - "schema": { - "type": "string" - } - }, - "Query.app_instance_id": { - "name": "app_instance_id", - "in": "query", - "description": "A MEC application instance may use multiple app_instance_ids as an input parameter to query the MTS session of a list of MEC application instances. See note.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.app_name": { - "name": "app_name", - "in": "query", - "description": "A MEC application instance may use multiple app_names as an input parameter to query the MTS session of a list of MEC application instances. See note.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.session_id": { - "name": "session_id", - "in": "query", - "description": "A MEC application instance may use session_id as an input parameter to query the information of a list of MTS sessions. See note.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "schemas": { - "MtsCapabilityInfo": { - "properties": { - "mtsAccessInfo": { - "description": "The information on access network connection as defined below", - "items": { - "type": "object", - "properties": { - "accessId": { - "format": "uint32", - "type": "integer", - "description": "Unique identifier for the access network connection", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "accessType": { - "format": "uint32", - "type": "integer", - "description": "Numeric value (0-255) corresponding to specific type of access network as following: 0 = Unknown 1 = Any IEEE802.11-based WLAN technology 2 = Any 3GPP-based Cellular technology 3 = Any Fixed Access 11 = IEEE802.11 a/b/g WLAN 12 = IEEE 802.11 a/b/g/n WLAN 13 = IEEE 802.11 a/b/g/n/ac WLAN 14 = IEEE 802.11 a/b/g/n/ac/ax WLAN (Wi-Fi 6) 15 = IEEE 802.11 b/g/n WLAN 31 = 3GPP GERAN/UTRA (2G/3G) 32 = 3GPP E-UTRA (4G/LTE) 33 = 3GPP NR (5G)", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "metered": { - "format": "uint32", - "type": "integer", - "description": "Numeric value (0-255) corresponding to the following: 0: the connection is not metered (see note) 1: the connection is metered 2: unknown ", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - } - } - }, - "required": [ - "accessId", - "accessType", - "metered" - ], - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "mtsMode": { - "description": "Numeric value corresponding to a specific MTS operation supported by the TMS 0 = low cost, i.e. using the unmetered access network connection whenever it is available 1 = low latency, i.e. using the access network connection with lower latency 2 = high throughput, i.e. using the access network connection with higher throughput, or/and multiple access network connection simultaneously if supported 3 = redundancy, i.e. sending duplicated (redundancy) packets over multiple access network connections for highreliability and low-latency applications 4 = QoS, i.e. performing MTS based on the specific QoS requirements from the app", - "items": { - "type": "integer", - "format": "uint32" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "Uint32" - }, - "timeStamp": { - "description": "Time stamp to indicate when the corresponding information elements are sent", - "properties": { - "nanoSeconds": { - "format": "uint32", - "type": "integer", - "description": "Time in nanoseconds in Unix-time since January 1, 1970, 00:00:00 UTC", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "seconds": { - "description": "Time in seconds in Unix-time since January 1, 1970, 00:00:00 UTC", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "required": [ - "seconds", - "nanoSeconds" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - } - }, - "required": [ - "mtsAccessInfo", - "mtsMode" - ], - "type": "object", - "x-etsi-notes": "NOTE:\tA metered connection is a network connection that has a maximum data usage in a specific period, e.g. per hour/day/week/month. The user may get billed extra charges if they go over the allotted amount.", - "x-etsi-ref": "7.2.4" - }, - "MtsSessionInfo": { - "properties": { - "appInsId": { - "description": "Application instance identifier", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "flowFilter": { - "description": "Traffic flow filtering criteria, applicable only if when requestType is set as FLOW_SPECIFIC_MTS_SESSION. Any filtering criteria shall define a single session only. In case multiple sessions match flowFilter the request shall be rejected. If the flowFilter field is included, at least one of its subfields shall be included. Any flowFilter subfield that is not included shall be ignored in traffic flow filtering", - "items": { - "type": "object", - "properties": { - "dscp": { - "format": "uint32", - "type": "integer", - "description": "DSCP in the IPv4 header or Traffic Class in the IPv6 header", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dstIp": { - "description": "Destination address identity of session (including range)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "dstPort": { - "description": "Destination port identity of session", - "items": { - "type": "integer", - "format": "uint32" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Uint32" - }, - "flowlabel": { - "format": "uint32", - "type": "integer", - "description": "Flow Label in the IPv6 header, applicable only if the flow is IPv6", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "protocol": { - "format": "uint32", - "type": "integer", - "description": "Protocol number", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "sourceIp": { - "description": "Source address identity of session (including range)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "sourcePort": { - "description": "Source port identity of session", - "items": { - "type": "integer", - "format": "uint32" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Uint32" - } - } - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "mtsMode": { - "format": "uint32", - "type": "integer", - "description": "Numeric value (0 - 255) corresponding to a specific MTS mode of the MTS session: 0 = low cost, i.e. using the unmetered access network connection whenever it is available 1 = low latency, i.e. using the access network connection with lower latency 2 = high throughput, i.e. using the access network connection with higher throughput, or multiple access network connection simultaneously 3 = redundancy, i.e. sending duplicated (redundancy) packets over multiple access network connections for high-reliability and low-latency applications 4 = QoS, i.e. performing MTS based on the QoS requirement (qosD)", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "qosD": { - "description": "QoS requirement description of the MTS session, applicable only if mtsMode = 4 (QoS). If the qosD field is included, at least one of its subfields shall be included. Any qosD subfield that is not included shall be ignored in Multi-access Traffic Steering (MTS)", - "properties": { - "maxJitter": { - "description": "tolerable jitter in [10 nanoseconds]", - "type": "integer", - "format": "uint32", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "maxLatency": { - "description": "tolerable (one-way) delay in [10 nanoseconds]", - "type": "integer", - "format": "uint32", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "maxLoss": { - "description": "tolerable packet loss rate in [1/10^x]", - "type": "integer", - "format": "uint32", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "minTpt": { - "description": "minimal throughput in [kbps]", - "type": "integer", - "format": "uint32", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "priority": { - "description": "numeric value (0 - 255) corresponding to the traffic priority 0: low; 1: medium; 2: high; 3: critical", - "type": "integer", - "format": "uint32", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "type": "object", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Structure" - }, - "requestType": { - "description": "Numeric value (0 - 255) corresponding to specific type of consumer as following: 0 = APPLICATION_SPECIFIC_MTS_SESSION 1 = FLOW_SPECIFIC_MTS_SESSION", - "enum": [ - 0, - 1 - ], - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "timeStamp": { - "description": "Time stamp to indicate when the corresponding information elements are sent ", - "properties": { - "nanoSeconds": { - "format": "uint32", - "type": "integer", - "description": "The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "seconds": { - "format": "uint32", - "type": "integer", - "description": "The seconds part of the Time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "required": [ - "seconds", - "nanoSeconds" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "trafficDirection": { - "description": "The direction of the requested MTS session: 00 = Downlink (towards the UE) 01 = Uplink (towards the application/session) 10 = Symmetrical (see note) ", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "appInsId", - "requestType", - "flowFilter", - "qosD", - "mtsMode", - "trafficDirection" - ], - "type": "object", - "x-etsi-notes": "NOTE:\tFor the downlink direction of a symmetrical flow, \"sourceIp\" and \"sourcePort\" in the \"flowFilter\" structure are used for source address and port, respectively; \"dstIp\" and \"dstPort\" are used for destination address and port, respectively. For the uplink direction of a symmetrical flow, \"sourceIp\" and \"sourcePort\" are used for destination address and port, respectively; \"dstIp\" and \"dstPort\" are used for source address and port, respectively.", - "x-etsi-ref": "7.2.5" - }, - "ProblemDetails": { - "properties": { - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "instance": { - "description": "A URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "status": { - "description": "The HTTP status code for this occurrence of the problem", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "title": { - "description": "A short, human-readable summary of the problem type", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "type": { - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - } - }, - "type": "object" - } - } - } -} diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn index 1d86a9e14286e197a97b33d985db05359113f1fb..c678558f380be9b27c0f26c9050a524438f96f1f 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn @@ -1,7 +1,7 @@ module TrafficManagementAPI_Functions { // JSON - import from JSON all; + import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; @@ -10,11 +10,11 @@ module TrafficManagementAPI_Functions { import from LibCommon_Sync all; // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; // LibMec/TrafficManagementAPI import from TrafficManagementAPI_TypesAndValues all; @@ -28,7 +28,7 @@ module TrafficManagementAPI_Functions { import from LibMec_Pixits all; function f_create_bw_allocation_resource( - in JSON.String p_app_instance_id, + in Json.String p_app_instance_id, out charstring p_bw_allocation_id, out BwInfo p_bw_info ) runs on HttpComponent { @@ -40,7 +40,7 @@ module TrafficManagementAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PX_ME_BWM_URI, + PICS_ROOT_API & PX_ME_BWM_URI, v_headers, m_http_message_body_json( m_body_json_bw_info( @@ -60,16 +60,18 @@ module TrafficManagementAPI_Functions { mw_bw_info( p_app_instance_id )))))) -> value v_response { - var charstring_list v_bw_allocation_id; + var charstring_list v_header_location; tc_ac.stop; log("f_create_bw_allocation_resource: BwInfo resource created: ", v_response); - f_get_header(valueof(v_response.response.header), "Location", v_bw_allocation_id); - if (lengthof(v_bw_allocation_id) != 0) { - p_bw_allocation_id := v_bw_allocation_id[0]; - p_bw_info := v_response.response.body.json_body.bwInfo; - } + f_get_header(valueof(v_response.response.header), "Location", v_header_location); + p_bw_allocation_id := regexp( + v_header_location[0], + "?+" & PX_ME_BWM_URI & "/(?*)", + 0 + ); + p_bw_info := v_response.response.body.json_body.bwInfo; } [] tc_ac.timeout { log("f_create_bw_allocation_resource: Expected message not received"); @@ -78,7 +80,7 @@ module TrafficManagementAPI_Functions { } // End of function f_create_bw_allocation_resource function f_delete_bw_allocation_resource( - in JSON.String p_app_instance_id, + in Json.String p_app_instance_id, in charstring p_bw_allocation_id ) runs on HttpComponent { var Headers v_headers; @@ -87,7 +89,7 @@ module TrafficManagementAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PX_ME_BWM_URI & "/" & p_bw_allocation_id, + PICS_ROOT_API & PX_ME_BWM_URI & "/" & p_bw_allocation_id, v_headers ))); tc_ac.start; @@ -105,7 +107,7 @@ module TrafficManagementAPI_Functions { } // End of function f_delete_bw_allocation_resource function f_create_mts_session_info_resource( - in JSON.String p_app_instance_id, + in Json.String p_app_instance_id, out charstring p_mts_session_id, out MtsSessionInfo p_mts_session_info ) runs on HttpComponent { @@ -117,22 +119,16 @@ module TrafficManagementAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PX_ME_MTS_SESSIONS_URI, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI, v_headers, m_http_message_body_json( m_body_json_mts_session_info( m_mts_session_info( PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type + APPLICATION_SPECIFIC_MTS_SESSION, // Request type m_qosd, // QoS LowCost, // MtsMode - Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"1010"} - ) - } // FlowFilter + Downlink // TrafficDirection )))))); tc_ac.start; alt { @@ -162,16 +158,16 @@ module TrafficManagementAPI_Functions { } // End of function f_create_mts_session_info_resource function f_delete_mts_session_info_resource( - in JSON.String p_app_instance_id, - in charstring p_mts_session_id - ) runs on HttpComponent { + in Json.String p_app_instance_id, + in charstring p_mts_session_id + ) runs on HttpComponent { var Headers v_headers; f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PX_ME_MTS_SESSIONS_URI & "/" & p_mts_session_id, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & p_mts_session_id, v_headers ))); tc_ac.start; diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn index fa8cf88ce21d803c7f09b04e4a62c9d20fd33f7a..7250495f4187d559de3f0b0f59eb0a9de4bec0a2 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn @@ -5,4 +5,9 @@ module TrafficManagementAPI_Pics { */ modulepar boolean PICS_BWMANAGEMENT_API_SUPPORTED := true; + /** + * @desc Does the IUT support Multi-access Traffic Steering API? + */ + modulepar boolean PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED := true; + } // End of module TrafficManagementAPI_Pics diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn index 033dcfa7d5611be9256c886d5b0d0730ea36b681..02851fdecdb13a0274855ef4beccda0731e7b4df 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn @@ -1,16 +1,31 @@ module TrafficManagementAPI_Pixits { + // JSON + import from Json all; + // LibCommon import from LibCommon_BasicTypesAndValues all; - // LibMec/BwManagementAPI - import from BwManagementAPI_TypesAndValues all; + // LibMec/TrafficManagementAPI + import from TrafficManagementAPI_TypesAndValues all; // LibMec/LocationAPI import from LocationAPI_TypesAndValues all; - modulepar Address PX_APP_INSTANCE_ID := "appInst01"; + modulepar Json.String PX_APP_INSTANCE_ID := "appInst01"; + + modulepar Json.String PX_APP_INSTANCE_ID_2 := "appInst02"; + + modulepar Json.String PX_APP_ALLOCATION_ID := "appAllocationId01"; + + modulepar Json.String PX_APP_NAME := "appName01"; + + modulepar Json.String PX_UNKNOWN_APP_INSTANCE_ID := "appInst99"; + + modulepar Json.String PX_UNKNOWN_APP_NAME := "appName99"; + + modulepar Json.String PX_UNKNOWN_APP_ALLOCATION_ID := "appAllocationId99"; - modulepar Address PX_UNKNOWN_APP_INSTANCE_ID := "appInst99"; + modulepar Json.String PX_UNKNOWN_BW_ALLOCATION_ID := "bwAllocationId99"; modulepar ResourceURL PX_RESOURCE_URL := "http://example.com/exampleAPI/location/v2/users?address:acr:192.0.0.1"; diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn index 93e9faac6eacf564b2019cd39eb35f341a9cd57d..7eb39f08ece78a067f43eb9ea40cd5ec6bd2cb42 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn @@ -1,11 +1,14 @@ module TrafficManagementAPI_Templates { // JSON - import from JSON all; + import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; + // LibMec/TrafficManagementAPI import from TrafficManagementAPI_TypesAndValues all; import from TrafficManagementAPI_Pixits all; @@ -15,11 +18,15 @@ module TrafficManagementAPI_Templates { in BwRequestType p_requestType, in FixedAllocation p_fixedAllocation, in AllocationDirection p_allocationDirection, + in template (omit) Json.String p_appName := omit, + in template (omit) AllocationId p_allocationId := omit, in template (omit) SessionFilter p_sessionFilter := omit, in template (omit) FixedBWPriority p_fixedBWPriority := omit ) := { + allocationId := p_allocationId, timeStamp := omit, appInsId := p_appInsId, + appName := p_appName, requestType := p_requestType, sessionFilter := p_sessionFilter, fixedBWPriority := p_fixedBWPriority, @@ -32,11 +39,15 @@ module TrafficManagementAPI_Templates { template (present) BwRequestType p_requestType := ?, template (present) FixedAllocation p_fixedAllocation := ?, template (present) AllocationDirection p_allocationDirection := ?, + template Json.String p_appName := *, + template AllocationId p_allocationId := *, template SessionFilter p_sessionFilter := *, template FixedBWPriority p_fixedBWPriority := * ) := { + allocationId := p_allocationId, timeStamp := *, appInsId := p_appInsId, + appName := p_appName, requestType := p_requestType, sessionFilter := p_sessionFilter, fixedBWPriority := p_fixedBWPriority, @@ -47,11 +58,13 @@ module TrafficManagementAPI_Templates { template (omit) BwInfoDeltas m_bw_info_deltas( in AppInsId p_appInsId := PX_APP_INSTANCE_ID, in BwRequestType p_requestType, + in template (omit) AllocationId p_allocationId := omit, in template (omit) SessionFilter p_sessionFilter := omit, in template (omit) FixedAllocation p_fixedAllocation := omit, in template (omit) AllocationDirection p_allocationDirection := omit, in template (omit) FixedBWPriority p_fixedBWPriority := omit ) := { + allocationId := p_allocationId, appInsId := p_appInsId, requestType := p_requestType, sessionFilter := p_sessionFilter, @@ -66,8 +79,10 @@ module TrafficManagementAPI_Templates { template (present) SessionFilter p_sessionFilter := ?, template (present) FixedAllocation p_fixedAllocation := ?, template (present) AllocationDirection p_allocationDirection := ?, + template AllocationId p_allocationId := *, template FixedBWPriority p_fixedBWPriority := * ) := { + allocationId := p_allocationId, appInsId := p_appInsId, requestType := p_requestType, sessionFilter := p_sessionFilter, @@ -76,7 +91,7 @@ module TrafficManagementAPI_Templates { allocationDirection := p_allocationDirection } // End of template mw_bw_info_deltas - template (omit) SessionFilterItems m_session_filter( + template (omit) SessionFilterItem m_session_filter( in template (value) SourceIp p_sourceIp, in template (value) SourcePort p_sourcePort, in template (omit) DstAddress p_dstAddress := omit, @@ -90,7 +105,7 @@ module TrafficManagementAPI_Templates { protocol := p_protocol } // End of template m_session_filter - template SessionFilterItems mw_session_filter( + template SessionFilterItem mw_session_filter( template (present) SourceIp p_sourceIp := ?, template (present) SourcePort p_sourcePort := ?, template DstAddress p_dstAddress := *, @@ -130,29 +145,37 @@ module TrafficManagementAPI_Templates { in template (value) QosD p_qosD, in template (value) MtsMode p_mtsMode, in template (value) TrafficDirection p_trafficDirection, + in template (omit) SessionId p_sessionId := omit, + in template (omit) Json.String p_appName := omit, in template (omit) FlowFilter p_flowFilter := omit, in template (omit) TimeStamp p_timeStamp := omit ) := { + sessionId := p_sessionId, timeStamp := p_timeStamp, appInsId := p_appInsId, + appName := p_appName, requestType := p_requestType, flowFilter := p_flowFilter, qosD := p_qosD, mtsMode := p_mtsMode, trafficDirection := p_trafficDirection } // End of template m_mts_session_info - + template MtsSessionInfo mw_mts_session_info( template (present) AppInsId p_appInsId := ?, template (present) MtsRequestType p_requestType := ?, template (present) QosD p_qosD := ?, template (present) MtsMode p_mtsMode := ?, template (present) TrafficDirection p_trafficDirection := ?, + template SessionId p_sessionId := *, + template Json.String p_appName := *, template FlowFilter p_flowFilter := *, template TimeStamp p_timeStamp := * ) := { + sessionId := p_sessionId, timeStamp := p_timeStamp, appInsId := p_appInsId, + appName := p_appName, requestType := p_requestType, flowFilter := p_flowFilter, qosD := p_qosD, @@ -160,6 +183,42 @@ module TrafficManagementAPI_Templates { trafficDirection := p_trafficDirection } // End of template mw_mts_session_info + template (omit) FlowFilterItem m_flow_filter( + in template (value) SourceIp p_sourceIp, + in template (value) SourcePort p_sourcePort, + in template (omit) DstAddress p_dstIp := omit, + in template (omit) DstPort p_dstPort := omit, + in template (omit) Protocol p_protocol := omit, + in template (omit) Dscp p_dscp := omit, + in template (omit) Flowlabel p_flowlabel := omit + ) := { + sourceIp := p_sourceIp, + sourcePort := p_sourcePort, + dstIp := p_dstIp, + dstPort := p_dstPort, + protocol := p_protocol, + dscp := p_dscp, + flowlabel := p_flowlabel + } // End of template m_flow_filter + + template FlowFilterItem mw_flow_filter( + template (present) SourceIp p_sourceIp := ?, + template (present) SourcePort p_sourcePort := ?, + template DstAddress p_dstIp := *, + template DstPort p_dstPort := *, + template Protocol p_protocol := *, + template Dscp p_dscp := omit, + template Flowlabel p_flowlabel := omit + ) := { + sourceIp := p_sourceIp, + sourcePort := p_sourcePort, + dstIp := p_dstIp, + dstPort := p_dstPort, + protocol := p_protocol, + dscp := p_dscp, + flowlabel := p_flowlabel + } // End of template mw_flow_filter + template (value) QosD m_qosd( in UInt32 p_minTpt := 128, in UInt32 p_maxLatency := 128, diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn index 6b460308cd65b1333163f85ea9c368cb68f87bc6..f9d5380dba43d2a0efa42f3e636d5bb7e2c6769b 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn @@ -1,13 +1,14 @@ module TrafficManagementAPI_TypesAndValues { // JSON - import from JSON all; - - // LibCommon - import from LibCommon_BasicTypesAndValues all; + import from Json all; + + // LibMec + import from LibMec_TypesAndValues all; /** * @desc Information of bandwidth resource + * @member allocationId Bandwidth allocation instance identifier * @member timeStamp Time stamp to indicate when the corresponding information elements are sent * @member appInsId Application instance identifier * @member sessionFilter Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only @@ -15,28 +16,34 @@ module TrafficManagementAPI_TypesAndValues { * @member fixedBWPriority Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document * @member fixedAllocation Size of requested fixed BW allocation in [bps] * @member allocationDirection The direction of the requested BW allocation + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ type record BwInfo { + AllocationId allocationId optional, TimeStamp timeStamp optional, - AppInsId appInsId, + AppInsId appInsId optional, + Json.String appName, BwRequestType requestType, SessionFilter sessionFilter optional, FixedBWPriority fixedBWPriority optional, FixedAllocation fixedAllocation, AllocationDirection allocationDirection } - type record of BwInfo BwInfoList; + type set of BwInfo BwInfoList; /** * @desc Conform to JSON merge patch format and processing rules specified IETF RFC 7396 [8], this type represents the attributes whose value are allowed to be updated with HTTP PATCH method in content format JSON + * @member allocationId Bandwidth allocation instance identifier * @member appInsId Application instance identifier * @member requestType Numeric value (0 - 255) corresponding to specific type of consumer * @member sessionFilter Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION * @member fixedBWPriority Indicates the allocation priority when dealing with several applications or sessions in parallel * @member fixedAllocation Size of requested fixed BW allocation in [bps] * @member allocationDirection The direction of the requested BW allocation + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.3 Type: BwInfoDeltas */ type record BwInfoDeltas { + Json.String allocationId, AppInsId appInsId, BwRequestType requestType, SessionFilter sessionFilter optional, @@ -46,22 +53,20 @@ module TrafficManagementAPI_TypesAndValues { } /** - * @desc Time stamp description - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @desc Bandwidth allocation instance identifier + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } + type Json.String AllocationId; /** * @desc Application instance identifier + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ - type JSON.String AppInsId; + type Json.String AppInsId; /** * @desc Numeric value (0 - 255) corresponding to specific type of consumer + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ type enumerated BwRequestType { APPLICATION_SPECIFIC_BW_ALLOCATION (0), @@ -70,17 +75,22 @@ module TrafficManagementAPI_TypesAndValues { variant "JSON: as number" } + /** + * @desc Numeric value (0 - 255) corresponding to specific type of consumer + * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + */ type enumerated MtsRequestType { - APPLICATION_SPECIFIC_MTS_ALLOCATION (0), - SESSION_SPECIFIC_MTS_ALLOCATION (1) + APPLICATION_SPECIFIC_MTS_SESSION (0), + FLOW_SPECIFIC_MTS_SESSION (1) } with { variant "JSON: as number" } /** * @desc Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only. In case multiple sessions match sessionFilter the request shall be rejected + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ - type record of SessionFilterItems SessionFilter; + type set of SessionFilterItem SessionFilter; /** * @desc Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only. In case multiple sessions match sessionFilter the request shall be rejected * @member sourceIp Source address identity of session (including range) @@ -88,8 +98,9 @@ module TrafficManagementAPI_TypesAndValues { * @member dstAddress Destination address identity of session (including range) * @member dstPort Destination port identity of session * @member protocol Protocol number + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ - type record SessionFilterItems { + type record SessionFilterItem { SourceIp sourceIp optional, SourcePort sourcePort optional, DstAddress dstAddress optional, @@ -98,7 +109,8 @@ module TrafficManagementAPI_TypesAndValues { } /** - * @desc Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document + * @desc Indicates the allocation priority when dealing with several applications or sessions in parallel. + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ type enumerated FixedBWPriority { reserved @@ -106,22 +118,26 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Size of requested fixed BW allocation in [bps] + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ - type JSON.String FixedAllocation; + type Json.String FixedAllocation; /** * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ - type UInt32 Seconds; + type Json.UInteger Seconds; /** * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ - type UInt32 NanoSeconds; + type Json.UInteger NanoSeconds; /** * @desc The direction of the requested BW allocation + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ type enumerated AllocationDirection { Downlink, @@ -131,135 +147,208 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Source address identity of session (including range) + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ - type JSON.String SourceIp; + type Json.String SourceIp; /** * @desc Source port identity of session + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ - type record of JSON.String SourcePort; + type Json.UInteger SourcePort; /** * @desc Destination address identity of session (including range) + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ - type JSON.String DstAddress; + type Json.String DstAddress; /** * @desc Destination port identity of session + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ - type record of JSON.String DstPort; + type Json.UInteger DstPort; /** * @desc Protocol number + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ - type JSON.String Protocol; + type Json.String Protocol; /** * @desc The information on access network connection * @member timeStamp Time stamp to indicate when the corresponding information elements are sent * @member mtsAccessInfo The information on access network connection as defined below * @member mtsMode Numeric value corresponding to a specific MTS operation supported by the TMS + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo */ type record MtsCapabilityInfo { - TimeStamp timeStamp optional, + TimeStamp timeStamp optional, MtsAccessInfos mtsAccessInfo, - MtsModes mtsMode + MtsModes mtsMode } + /** + * @desc The information on access network connection as defined below + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + */ type enumerated MtsMode { - LowCost (0), - LowLatency (1), + LowCost (0), + LowLatency (1), HighThroughput (2), - Redundancy (3), - QoS (4) + Redundancy (3), + QoS (4) } with { variant "JSON: as number" } - type record of MtsMode MtsModes; + type set of MtsMode MtsModes; /** * @desc The information on access network connection as defined below * @member accessId Unique identifier for the access network connection * @member accessType Numeric value (0-255) corresponding to specific type of access network * @member metered Numeric value (0-255) + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo */ type record MtsAccessInfo { - AccessId accessId, + AccessId accessId, AccessType accessType, - Metered metered + Metered metered } - type record of MtsAccessInfo MtsAccessInfos; + type set of MtsAccessInfo MtsAccessInfos; - type UInt32 AccessId; + /** + * @desc Unique identifier for the access network connection + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + */ + type Json.UInteger AccessId; + + /** + * @desc Numeric value (0-255) corresponding to specific type of access network + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + */ type enumerated AccessType { - Unknown (0), - IEEE802_11_Based (1), - ThreeGPP_Based (2), - Fixed_Access (3), - IEEE802_11abg (11), - IEEE802_11abgn (12), - IEEE802_11abgnac (13), - IEEE802_11abgnacax (14), - IEEE802_11bgn (15), + Unknown (0), + IEEE802_11_Based (1), + ThreeGPP_Based (2), + Fixed_Access (3), + IEEE802_11abg (11), + IEEE802_11abgn (12), + IEEE802_11abgnac (13), + IEEE802_11abgnacax (14), + IEEE802_11bgn (15), ThreeGPP_GERAN_UTRA (31), - ThreeGPP_E_UTRA (32), - Three3GPP_NR (33) + ThreeGPP_E_UTRA (32), + Three3GPP_NR (33) } with { variant "JSON: as number" } + + /** + * @desc Numeric value (0-255) + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + */ type enumerated Metered { CxNotMetered (0), - CxMetered (1), - Unknown (2) + CxMetered (1), + Unknown (2) } with { variant "JSON: as number" } /** * @desc The information on access network connection as defined below + * @member sessionId MTS session instance identifier * @member timeStamp Time stamp to indicate when the corresponding information elements are sent * @member appInsId Application instance identifier + * @member appName Name of the application * @member requestType Numeric value (0 - 255) corresponding to specific type of consumer * @member flowFilter Traffic flow filtering criteria, applicable only * @member qosD QoS requirement description of the MTS session * @member mtsMode Numeric value corresponding to a specific MTS operation * @member trafficDirection The direction of the requested MTS session supported by the TMS + * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo */ type record MtsSessionInfo { - TimeStamp timeStamp optional, - AppInsId appInsId, - MtsRequestType requestType, - FlowFilter flowFilter optional, - QosD qosD, - MtsMode mtsMode, + SessionId sessionId optional, + TimeStamp timeStamp optional, + AppInsId appInsId, + Json.String appName optional, + MtsRequestType requestType, + FlowFilter flowFilter, + QosD qosD, + MtsMode mtsMode, TrafficDirection trafficDirection } - type record of MtsSessionInfo MtsSessionInfos + type set of MtsSessionInfo MtsSessionInfos - type SessionFilter FlowFilter; + /** + * @desc MTS session instance identifier + * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + */ + type Json.String SessionId; + + /** + * @desc Traffic flow filtering criteria, applicable only if when requestType is set as FLOW_SPECIFIC_MTS_SESSION + * @member sourceIp Source address identity of session (including range) + * @member sourcePort Source port identity of session + * @member dstAddress Destination address identity of session (including range) + * @member dstPort Destination port identity of session + * @member protocol Protocol number + * @member dscp DSCP in the IPv4 header or Traffic Class in the IPv6 header + * @member flowlabel Flow Label in the IPv6 header, applicable only if the flow is IPv6 + * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + */ + type record FlowFilterItem { + SourceIp sourceIp optional, + SourcePort sourcePort optional, + DstAddress dstIp optional, + DstPort dstPort optional, + Protocol protocol optional, + Dscp dscp optional, + Flowlabel flowlabel optional + } + type set of FlowFilterItem FlowFilter; + /** + * @desc The direction of the requested MTS session supported by the TMS + * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + */ type AllocationDirection TrafficDirection; /** - * @desc + * @desc DSCP in the IPv4 header or Traffic Class in the IPv6 header + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.5 Type: MtsSessionInfo + */ + type Json.UInteger Dscp; + + /** + * @desc Flow Label in the IPv6 header, applicable only if the flow is IPv6 + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.5 Type: MtsSessionInfo + */ + type Json.UInteger Flowlabel; + + /** + * @desc QoS requirement description of the MTS session, applicable only if mtsMode = 4 (QoS) * @member minTpt Minimal throughput in [kbps] * @member maxLatency Tolerable (one-way) delay in [10 nanoseconds] * @member maxLoss Tolerable packet loss rate in [1/10^x] * @member maxJitter Tolerable jitter in [10 nanoseconds] * @member priority numeric value (0 - 255) corresponding to the traffic priority + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.5 Type: MtsSessionInfo */ type record QosD { - UInt32 minTpt optional, - UInt32 maxLatency optional, - UInt32 maxLoss optional, - UInt32 maxJitter optional, - Priority priority optional + Json.UInteger minTpt optional, + Json.UInteger maxLatency optional, + Json.UInteger maxLoss optional, + Json.UInteger maxJitter optional, + Priority priority optional } type enumerated Priority { - Low (0), - Medium (1), - High (2), + Low (0), + Medium (1), + High (2), Critical (3) } with { variant "JSON: as number" diff --git a/ttcn/LibMec/UEAppInterfaceAPI/json/UEAppInterfaceAPI.json b/ttcn/LibMec/UEAppInterfaceAPI/json/UEAppInterfaceAPI.json deleted file mode 100644 index c5ee3fcda73baa582e50733f936af0fb7c26a484..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/UEAppInterfaceAPI/json/UEAppInterfaceAPI.json +++ /dev/null @@ -1,618 +0,0 @@ -{ - "openapi": "3.0.2", - "info": { - "title": "UE Application Interface API", - "version": "1.1.1", - "description": "The ETSI MEC ISG MEC016 UE Application Interface API described using OpenAPI", - "license": { - "name": "ETSI Forge copyright notice", - "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt" - }, - "contact": { - "email": "cti_support@etsi.org" - } - }, - "externalDocs": { - "description": "ETSI GS MEC016 UE Application Interface API, V1.1.1", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/01.01.01_60/gs_MEC016v010101p.pdf" - }, - "security": [ - { - "OauthSecurity": [ - "all" - ] - } - ], - "servers": [ - { - "url": "http://127.0.0.1:8081/mx2/v1" - }, - { - "url": "https://127.0.0.1:8081/mx2/v1" - } - ], - "tags": [ - { - "name": "appList" - }, - { - "name": "appContext" - } - ], - "paths": { - "/app_list": { - "get": { - "description": "Used to query information about the available MEC applications.", - "operationId": "AppList_GET", - "tags": [ - "appList" - ], - "parameters": [ - { - "$ref": "#/components/parameters/Query.AppName" - }, - { - "$ref": "#/components/parameters/Query.AppProvider" - }, - { - "$ref": "#/components/parameters/Query.AppSoftVersion" - }, - { - "$ref": "#/components/parameters/Query.ServiceCont" - }, - { - "$ref": "#/components/parameters/Query.VendorId" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/AppList" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "401": { - "$ref": "#/components/responses/Error.401" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/app_contexts": { - "post": { - "description": "The POST method can be used to create a new application context. Upon success, the response contains entity body describing the created application context.", - "operationId": "AppContext_POST", - "tags": [ - "appContext" - ], - "requestBody": { - "$ref": "#/components/requestBodies/AppContext" - }, - "responses": { - "201": { - "$ref": "#/components/responses/AppContext" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "401": { - "$ref": "#/components/responses/Error.401" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/app_contexts/{contextId}": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.ContextId" - } - ], - "put": { - "description": "The PUT method is used to update the callback reference of the existing application context. Upon successful operation, the target resource is updated with new callback reference.", - "operationId": "AppContextId_PUT", - "tags": [ - "appContext" - ], - "requestBody": { - "$ref": "#/components/requestBodies/AppContext" - }, - "responses": { - "204": { - "description": "No Content." - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "401": { - "$ref": "#/components/responses/Error.401" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "delete": { - "description": "The DELETE method is used to delete the resource that represents the existing application context.", - "operationId": "AppContextId_DEL", - "tags": [ - "appContext" - ], - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "401": { - "$ref": "#/components/responses/Error.401" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - } - }, - "components": { - "parameters": { - "Query.AppName": { - "name": "appName", - "in": "query", - "description": "Name to identify the MEC application", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.AppProvider": { - "name": "appProvider", - "in": "query", - "description": "Provider of the MEC application", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.AppSoftVersion": { - "name": "appSoftVersion", - "in": "query", - "description": "Software version of the MEC application", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.ServiceCont": { - "name": "serviceCont", - "in": "query", - "description": "Required service continuity mode for this application", - "required": false, - "schema": { - "type": "string", - "enum": [ - "SERVICE_CONTINUITY_NOT_REQUIRED", - "SERVICE_CONTINUITY_REQUIRED" - ] - } - }, - "Query.VendorId": { - "name": "vendorId", - "in": "query", - "description": "Vendor identifier", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Path.ContextId": { - "name": "contextId", - "in": "path", - "description": "Uniquely identifies the application context in the MEC system. It is assigned by the MEC system and included in the response to an AppContext create.", - "required": true, - "schema": { - "type": "string" - } - } - }, - "requestBodies": { - "AppContext": { - "description": "Uniquely identifies the application context in the MEC system. It is assigned by the MEC system and included in the response to an AppContext create.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppContext" - } - } - }, - "required": true - } - }, - "responses": { - "AppContext": { - "description": "The response body contains the Application Context as it was created by the MEC system", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppContext" - } - } - } - }, - "AppList": { - "description": "The response body contains the ApplicationList resource available for the querying UE application", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApplicationList" - } - } - } - }, - "Error.400": { - "description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - }, - "Error.401": { - "description": "Unauthorized. It is used when the client did not submit the appropriate credentials.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - }, - "Error.403": { - "description": "Forbidden. The operation is not allowed given the current status of the resource. ", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "Error.404": { - "description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - } - }, - "securitySchemes": { - "OauthSecurity": { - "type": "oauth2", - "flows": { - "clientCredentials": { - "tokenUrl": "https://oauth.exampleAPI/token", - "scopes": { - "all": "Single oauth2 scope for API" - } - } - } - } - }, - "schemas": { - "Empty": { - "description": "Empty schema" - }, - "ProblemDetails": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/Problem.type" - }, - "title": { - "$ref": "#/components/schemas/Problem.title" - }, - "status": { - "$ref": "#/components/schemas/Problem.status" - }, - "detail": { - "$ref": "#/components/schemas/Problem.detail" - }, - "instance": { - "$ref": "#/components/schemas/Problem.instance" - } - } - }, - "Problem.type": { - "type": "string", - "format": "uri", - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type" - }, - "Problem.title": { - "type": "string", - "description": "A short, human-readable summary of the problem type" - }, - "Problem.status": { - "type": "integer", - "format": "uint32", - "description": "The HTTP status code for this occurrence of the problem" - }, - "Problem.detail": { - "type": "string", - "description": "A human-readable explanation specific to this occurrence of the problem" - }, - "Problem.instance": { - "type": "string", - "format": "uri", - "description": "A URI reference that identifies the specific occurrence of the problem" - }, - "ApplicationList": { - "description": "Information on available applications", - "type": "object", - "properties": { - "appInfo": { - "$ref": "#/components/schemas/AppInfo" - }, - "vendorSpecificExt": { - "$ref": "#/components/schemas/VendorSpecificExt" - } - } - }, - "AppContext": { - "description": "Information on application context created by the MEC system", - "type": "object", - "required": [ - "contextId", - "associateUeAppId", - "appInfo" - ], - "properties": { - "contextId": { - "$ref": "#/components/schemas/ContextId" - }, - "associateUeAppId": { - "$ref": "#/components/schemas/AssociateUeAppId" - }, - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "appInfo": { - "$ref": "#/components/schemas/RequiredAppInfo" - } - } - }, - "NotificationEvent": { - "description": "The parameters used in the method \"Receiving notification events\".", - "type": "object", - "required": [ - "referenceURI" - ], - "properties": { - "referenceURI": { - "$ref": "#/components/schemas/ReferenceURL" - } - } - }, - "VendorSpecificExtList": { - "description": "Extension for vendor specific information.", - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/VendorSpecificExt" - } - }, - "VendorSpecificExt": { - "description": "Extension for vendor-specific information", - "required": [ - "vendorId" - ], - "properties": { - "vendorId": { - "$ref": "#/components/schemas/VendorId" - } - } - }, - "ContextId": { - "description": "Uniquely identifies the application context in the MEC system. Assigned by the MEC system and included in the response. The length of the value shall not exceed 32 characters.", - "type": "string" - }, - "AssociateUeAppId": { - "description": "Uniquely identifies the UE application. Included in the request. The length of the value shall not exceed 32 characters.", - "type": "string" - }, - "VendorId": { - "description": "Vendor identifier. The length of the value shall not exceed 32 characters. The rest of the structure of this vendor specific extension is not defined", - "type": "string" - }, - "AppInfo": { - "description": "User applications available for the UE application", - "type": "array", - "items": { - "$ref": "#/components/schemas/AppInfoList" - } - }, - "AppInfoList": { - "type": "object", - "required": [ - "appName", - "appProvider", - "appDescription" - ], - "properties": { - "appName": { - "$ref": "#/components/schemas/AppName" - }, - "appProvider": { - "$ref": "#/components/schemas/AppProvider" - }, - "appSoftVersion": { - "$ref": "#/components/schemas/AppSoftVersion" - }, - "appDescription": { - "$ref": "#/components/schemas/AppDescription" - }, - "appCharcs": { - "$ref": "#/components/schemas/AppCharcs" - } - } - }, - "RequiredAppInfo": { - "description": "Included in the request", - "type": "object", - "required": [ - "appName", - "appProvider", - "referenceURL" - ], - "properties": { - "appName": { - "$ref": "#/components/schemas/AppName" - }, - "appProvider": { - "$ref": "#/components/schemas/AppProvider" - }, - "appSoftVersion": { - "$ref": "#/components/schemas/AppSoftVersion" - }, - "appDescription": { - "$ref": "#/components/schemas/AppDescription" - }, - "referenceURL": { - "$ref": "#/components/schemas/ReferenceURL" - }, - "appPackageSource": { - "$ref": "#/components/schemas/AppPackageSource" - } - } - }, - "AppCharcs": { - "description": "The application characteristics relate to the system resources consumed by the application. UE application can use this information e.g., for estimating the cost of use of the application or for the expected user experience", - "type": "object", - "properties": { - "memory": { - "$ref": "#/components/schemas/Memory" - }, - "storage": { - "$ref": "#/components/schemas/Storage" - }, - "latency": { - "$ref": "#/components/schemas/Latency" - }, - "bandwidth": { - "$ref": "#/components/schemas/Bandwidth" - }, - "serviceCont": { - "$ref": "#/components/schemas/ServiceCont" - } - } - }, - "Memory": { - "description": "The maximum size in Mbytes of the memory resource reserved for the MEC application instance in the MEC system", - "type": "integer", - "format": "uint32" - }, - "Storage": { - "description": "The maximum size in Mbytes of the storage resource expected to be used by the MEC application instance in the MEC system", - "type": "integer", - "format": "uint32" - }, - "Latency": { - "description": "The target round trip time in milliseconds supported by the MEC system for the MEC application instance", - "type": "integer", - "format": "uint32" - }, - "Bandwidth": { - "description": "The required connection bandwidth in kbit/s for the use of the mobile edge application instance", - "type": "integer", - "format": "uint32" - }, - "ServiceCont": { - "description": "Required service continuity mode for this application.", - "type": "string", - "enum": [ - "SERVICE_CONTINUITY_NOT_REQUIRED", - "SERVICE_CONTINUITY_REQUIRED" - ] - }, - "AppName": { - "description": "Name of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string" - }, - "AppProvider": { - "description": "Provider of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string" - }, - "AppSoftVersion": { - "description": "Software version of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string" - }, - "AppDescription": { - "description": "Human readable description of the MEC application. NOTE the language support may be limited. The length of the value shall not exceed 128 characters.", - "type": "string" - }, - "CallbackReference": { - "description": "URI assigned by the UE application to receive application lifecycle related notifications. Included in the request. This subscription stays alive for the lifetime of the application context.", - "type": "string", - "format": "uri" - }, - "ReferenceURL": { - "description": "Address of the user application. Used as the reference URL for the application. Assigned by the MEC system and included in the response", - "type": "string", - "format": "uri" - }, - "AppPackageSource": { - "description": "URI of the application package. Included in the request if the application is not one in the ApplicationList. appPackageSource enables on-boarding of the application package into the MEC system. The application package shall comply with the definitions in clause 6.2.1.2 of ETSI GS MEC 010-2", - "type": "string", - "format": "uri" - } - } - } -} \ No newline at end of file diff --git a/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_Functions.ttcn b/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_Functions.ttcn index 30bd45758f7fb8ad6f8c0ae4436768500cb58fcf..651f082d292797d410f1726d16d43094243b5dcd 100644 --- a/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_Functions.ttcn +++ b/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_Functions.ttcn @@ -1,11 +1,11 @@ module UEAppInterfaceAPI_Functions { // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; // LibMec/UEAppInterfaceAPI import from UEAppInterfaceAPI_Templates all; diff --git a/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_Templates.ttcn b/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_Templates.ttcn index 30963cb582a77750e8370f651f24275cbfcf08ca..a8b4f357c7810926f5e2aca152ded49b4292f1e7 100644 --- a/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_Templates.ttcn +++ b/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_Templates.ttcn @@ -5,7 +5,7 @@ module UEAppInterfaceAPI_Templates { // JSON - import from JSON all; + import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; diff --git a/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_TypesAndValues.ttcn b/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_TypesAndValues.ttcn index 97e050a2a7fa357c7d544acc1370750b050aff6f..3711395c38e46a7e9f91849ad5eb926a6e39a7e7 100644 --- a/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_TypesAndValues.ttcn @@ -5,7 +5,7 @@ module UEAppInterfaceAPI_TypesAndValues { // JSON - import from JSON all; + import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; @@ -50,22 +50,22 @@ module UEAppInterfaceAPI_TypesAndValues { /** * @desc Uniquely identifies the application context in the MEC system. Assigned by the MEC system and included in the response. The length of the value shall not exceed 32 characters. */ - type JSON.String ContextId length(1..32) with {encode "length(1..32)"}; + type Json.String ContextId length(1..32) with {encode "length(1..32)"}; /** * @desc Uniquely identifies the UE application. Included in the request. The length of the value shall not exceed 32 characters. */ - type JSON.String AssociateUeAppId length(1..32) with {encode "length(1..32)"}; + type Json.String AssociateUeAppId length(1..32) with {encode "length(1..32)"}; /** * @desc Vendor identifier. The length of the value shall not exceed 32 characters. The rest of the structure of this vendor specific extension is not defined. */ - type JSON.String VendorId; + type Json.String VendorId; /** * @desc User applications available for the UE application. */ - type record of AppInfoList AppInfo; + type set of AppInfoList AppInfo; /** * @desc User applications available for the UE application. @@ -132,37 +132,37 @@ module UEAppInterfaceAPI_TypesAndValues { /** * @desc Name of the MEC application. The length of the value shall not exceed 32 characters. */ - type JSON.String AppName length(1..32) with {encode "length(1..32)"}; + type Json.String AppName length(1..32) with {encode "length(1..32)"}; /** * @desc Provider of the MEC application. The length of the value shall not exceed 32 characters. */ - type JSON.String AppProvider length(1..32) with {encode "length(1..32)"}; + type Json.String AppProvider length(1..32) with {encode "length(1..32)"}; /** * @desc Software version of the MEC application. The length of the value shall not exceed 32 characters. */ - type JSON.String AppSoftVersion length(1..32) with {encode "length(1..32)"}; + type Json.String AppSoftVersion length(1..32) with {encode "length(1..32)"}; /** * @desc Human readable description of the MEC application. NOTE the language support may be limited. The length of the value shall not exceed 128 characters. */ - type JSON.String AppDescription length(1..128) with {encode "length(1..128)"}; + type Json.String AppDescription length(1..128) with {encode "length(1..128)"}; /** * @desc URI assigned by the UE application to receive application lifecycle related notifications. Included in the request. This subscription stays alive for the lifetime of the application context. */ - type JSON.String CallbackReference; + type Json.String CallbackReference; /** * @desc Address of the user application. Used as the reference URL for the application. Assigned by the MEC system and included in the response. */ - type JSON.AnyURI ReferenceURL; + type Json.AnyURI ReferenceURL; /** * @desc URI of the application package. Included in the request if the application is not one in the ApplicationList. appPackageSource enables on-boarding of the application package into the MEC system. The application package shall comply with the definitions in clause 6.2.1.2 of ETSI GS MEC 010-2. */ - type JSON.AnyURI AppPackageSource; + type Json.AnyURI AppPackageSource; } with { encode "JSON" diff --git a/ttcn/LibMec/UEidentityAPI/json/UEidentityAPI.json b/ttcn/LibMec/UEidentityAPI/json/UEidentityAPI.json deleted file mode 100644 index cc5098e9ed472c9dec4e55745584d9e974327ce8..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/UEidentityAPI/json/UEidentityAPI.json +++ /dev/null @@ -1,310 +0,0 @@ -{ - "openapi": "3.0.2", - "info": { - "title": "UE Identity API", - "version": "1.1.1", - "description": "The ETSI MEC ISG MEC014 UE Identity API described using OpenAPI", - "license": { - "name": "ETSI Forge copyright notice", - "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt" - }, - "contact": { - "email": "cti_support@etsi.org" - } - }, - "externalDocs": { - "description": "ETSI GS MEC014 UE Identity API, V1.1.1", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/014/01.01.01_60/gs_mec014v010101p.pdf" - }, - "security": [ - { - "OauthSecurity": [ - "all" - ] - } - ], - "servers": [ - { - "url": "http://127.0.0.1:8081/ui/v1" - }, - { - "url": "https://127.0.0.1:8081/ui/v1" - } - ], - "tags": [ - { - "name": "ueIdentityTagInfo" - } - ], - "paths": { - "/{appInstanceId}/ue_identity_tag_info": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - } - ], - "get": { - "description": "Retrieves information about a specific UeIdentityTagInfo resource", - "operationId": "UeIdentityTagInfo_GET", - "tags": [ - "ueIdentityTagInfo" - ], - "parameters": [ - { - "$ref": "#/components/parameters/Query.UeIdentityTag" - } - ], - "responses": { - "200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the UeIdentityTagInfo resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UeIdentityTagInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "put": { - "description": "Register/De-register the information about specific a UeIdentityTagInfo resource", - "operationId": "UeIdentityTagInfo_PUT", - "tags": [ - "ueIdentityTagInfo" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UeIdentityTagInfo" - } - } - }, - "description": "'The updated \"state\" for each included UE Identity tag is included in the entity body of the request'", - "required": true - }, - "responses": { - "200": { - "description": "It is used to indicate success. The response body contains a representation of the UeIdentityTagInfo resource", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UeIdentityTagInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - }, - "412": { - "$ref": "#/components/responses/Error.412" - } - } - } - } - }, - "components": { - "parameters": { - "Path.AppInstanceId": { - "name": "appInstanceId", - "in": "path", - "description": "Represents a mobile edge application instance", - "required": true, - "schema": { - "type": "string" - } - }, - "Query.UeIdentityTag": { - "name": "ueIdentityTag", - "in": "query", - "description": "Represents a UE", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "responses": { - "Error.400": { - "description": "Bad Request. Incorrect parameters were passed in the request.In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - }, - "Error.403": { - "description": "Forbidden. The operation is not allowed given the current status of the resource. More information should be provided in the \"detail\" attribute of the \"ProblemDetails\" structure.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "Error.404": { - "description": "Not Found. The client provided a URI that cannot be mapped to a valid resource URL. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - }, - "Error.412": { - "description": "Precondition Failed. It is used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts.In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - } - }, - "securitySchemes": { - "OauthSecurity": { - "type": "oauth2", - "flows": { - "clientCredentials": { - "tokenUrl": "https://oauth.exampleAPI/token", - "scopes": { - "all": "Single oauth2 scope for API" - } - } - } - } - }, - "schemas": { - "Empty": { - "description": "Empty schema" - }, - "ProblemDetails": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/Problem.type" - }, - "title": { - "$ref": "#/components/schemas/Problem.title" - }, - "status": { - "$ref": "#/components/schemas/Problem.status" - }, - "detail": { - "$ref": "#/components/schemas/Problem.detail" - }, - "instance": { - "$ref": "#/components/schemas/Problem.instance" - } - } - }, - "Problem.type": { - "type": "string", - "format": "uri", - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type" - }, - "Problem.title": { - "type": "string", - "description": "A short, human-readable summary of the problem type" - }, - "Problem.status": { - "type": "integer", - "format": "uint32", - "description": "The HTTP status code for this occurrence of the problem" - }, - "Problem.detail": { - "type": "string", - "description": "A human-readable explanation specific to this occurrence of the problem" - }, - "Problem.instance": { - "type": "string", - "format": "uri", - "description": "A URI reference that identifies the specific occurrence of the problem" - }, - "UeIdentityTagInfo": { - "description": "information of UE identity tag used in UE Identity feature", - "type": "object", - "required": [ - "ueIdentityTags" - ], - "properties": { - "ueIdentityTags": { - "$ref": "#/components/schemas/UeIdentityTags" - } - } - }, - "UeIdentityTags": { - "description": "1 to N tags presented by a ME Application instance to a ME Platform", - "type": "array", - "items": { - "required": [ - "ueIdentityTag", - "state" - ], - "properties": { - "ueIdentityTag": { - "$ref": "#/components/schemas/UeIdentityTag" - }, - "state": { - "$ref": "#/components/schemas/State" - } - } - } - }, - "UeIdentityTag": { - "description": "Specific tag presented by a ME Application instance to a ME Platform", - "type": "string", - "example": "UeTagA" - }, - "State": { - "description": "Status of the resource ueIdentityTagInfo", - "type": "string", - "enum": [ - "UNREGISTERED", - "REGISTERED" - ], - "example": "REGISTERED" - } - } - } -} \ No newline at end of file diff --git a/ttcn/LibMec/UEidentityAPI/module.mk b/ttcn/LibMec/UEidentityAPI/module.mk index 60c20d0a1b04dc6daf7625bada6f34ed53ad9811..2e5bb0d3de8dc1f4f2b231652c5978fa731e0078 100644 --- a/ttcn/LibMec/UEidentityAPI/module.mk +++ b/ttcn/LibMec/UEidentityAPI/module.mk @@ -2,4 +2,5 @@ sources := \ ttcn/UEidentityAPI_Pics.ttcn \ ttcn/UEidentityAPI_Pixits.ttcn \ ttcn/UEidentityAPI_Templates.ttcn \ + ttcn/UEidentityAPI_Functions.ttcn \ ttcn/UEidentityAPI_TypesAndValues.ttcn diff --git a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_Functions.ttcn b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_Functions.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7b48d6409f38817a2199c558e7ae637871718573 --- /dev/null +++ b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_Functions.ttcn @@ -0,0 +1,83 @@ +module UEidentityAPI_Functions { + + // Libcommon + import from LibCommon_BasicTypesAndValues all; + import from LibCommon_Sync all; + + // LibMec + import from LibMec_Pixits all; + import from LibMec_Pics all; + + // LibMec_UEidentityAPI + import from UEidentityAPI_TypesAndValues all; + import from UEidentityAPI_Templates all; + import from UEidentityAPI_Pixits all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_JsonMessageBodyTypes all; + import from LibHttp_Templates all; + import from LibHttp_TestSystem all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_Pics all; + + /** + * @desc Check if the user is registered or not + * @param p_ue_identity_tag The UE identity tag + * @param p_headers The HTTP headers + * @return 0 if unregistered, 1 if registered, -1 otherwise + */ + function f_check_user_register_state( + in UeIdentityTag p_ue_identity_tag := PX_UE_IDENTITY_TAG, + in Headers p_headers + ) runs on HttpComponent return integer { + var HttpMessage v_response; + var integer v_result := -1; + + // Send request + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(p_ue_identity_tag, "UTF-8")), + p_headers + ) + ) + ); + // Await for the response + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ue_identity_tag_info( + mw_ue_identity_tag_info( + { *, mw_ue_identity_tag_item(PX_UE_IDENTITY_TAG), * } + )))))) -> value v_response { + tc_ac.stop; + + for (var integer v_i := 0; v_i < lengthof(v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags); v_i := v_i + 1) { + if (v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].ueIdentityTag == p_ue_identity_tag) { + //log("Processing ", v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].ueIdentityTag); + //log("State ", v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].state); + if (v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].state == UNREGISTERED) { + v_result := 0; + } else if (v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].state == REGISTERED) { + v_result := 1; + } else if (v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].state == INVALID_STATE) { + v_result := 2; + } + break; + } + } + } + [] tc_ac.timeout { + } + } // End of 'alt' statement + + //log("<<< f_check_user_register_state: v_result: ", v_result); + return v_result; + } // End of function f_check_user_register_state + +} // End of module UEidentAPI_Functions \ No newline at end of file diff --git a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_Templates.ttcn b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_Templates.ttcn index c460ef1c5e228615634c50db22531e47c9bb4430..a081e9a18e138fa49ddf7e033eb2ec6ce0e7fb8a 100644 --- a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_Templates.ttcn +++ b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_Templates.ttcn @@ -1,7 +1,7 @@ module UEidentityAPI_Templates { // JSON - import from JSON all; + import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; diff --git a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn index dae40f1a2d3e03f7f8fce6d47be92ee36071e6b1..e7fe2cd791c48b530919269fddac12086de35ecd 100644 --- a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn @@ -1,8 +1,8 @@ /** - * @author ETSI / STF569 + * @author ETSI / STF569 / TTF T027 * @version $URL$ * $Id$ - * @desc Module containing types and values for UeIdentiyAPI protocol + * @desc Module containing types and values for ETSI GS MEC 014 V3.1.1 (2023-06) * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. @@ -11,15 +11,12 @@ module UEidentityAPI_TypesAndValues { // JSON - import from JSON all; - - // LibCommon - import from LibCommon_BasicTypesAndValues all; + import from Json all; /** * @desc Information of UE identity tag used in UE Identity feature * @member ueIdentityTags 1 to N tags presented by a ME Application instance to a ME Platform - * @see ETSI GS MEC 014 Clause 7.2 Global definitions and resource structure + * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type record UeIdentityTagInfo { UeIdentityTags ueIdentityTags @@ -27,13 +24,13 @@ module UEidentityAPI_TypesAndValues { /** * @desc Specific tag presented by a ME Application instance to a ME Platform - * @see ETSI GS MEC 014 Clause 6.2.2 Type: UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ - type JSON.String UeIdentityTag; + type Json.String UeIdentityTag; /** * @desc Status of the resource ueIdentityTagInfo - * @see ETSI GS MEC 014 Clause 6.2.2 Type: UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type enumerated State { UNREGISTERED, @@ -45,18 +42,18 @@ module UEidentityAPI_TypesAndValues { * @desc ME Application instance to a ME Platform * @member ueIdentityTag Specific tag presented by a ME Application instance to a ME Platform * @member state Status of the resource ueIdentityTagInfo - * @see ETSI GS MEC 014 Clause 6.2.2 Type: UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type record UeIdentityTagItem { - JSON.String ueIdentityTag, + Json.String ueIdentityTag, State state } /** * @desc 1 to N tags presented by a ME Application instance to a ME Platform - * @see ETSI GS MEC 014 Clause 6.2.2 Type: UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ - type record of UeIdentityTagItem UeIdentityTags; + type set of UeIdentityTagItem UeIdentityTags; } with { encode "JSON" diff --git a/ttcn/LibMec/V2XInformationServiceAPI/json/MEC030_V2XInformationService.yaml b/ttcn/LibMec/V2XInformationServiceAPI/json/MEC030_V2XInformationService.yaml deleted file mode 100644 index 4dc7cf39c11dac42c53e343a293c427dd1285efe..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/V2XInformationServiceAPI/json/MEC030_V2XInformationService.yaml +++ /dev/null @@ -1,1568 +0,0 @@ -info: - title: "ETSI GS MEC 030 V2X Information Service API" - version: 2.1.1 - description: "ETSI GS MEC 030 V2X Information Service API described using OpenAPI." - contact: - name: ETSI Forge - email: cti_support@etsi.org - url: https://forge.etsi.org/rep/mec/gs030-vis-api - license: - name: BSD-3-Clause - url: 'https://forge.etsi.org/legal-matters' -externalDocs: - description: "ETSI GS MEC 030 V2X Information Service API, v2.1.1" - url: 'https://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.01.01_60/gs_mec030v020101p.pdf' -openapi: 3.0.0 -servers: - - url: 'https://localhost/vis/v1' -tags: - - name: queries - description: Queries - - name: subscription - description: Subscription - -paths: - /queries/uu_unicast_provisioning_info: - get: - tags: - - 'queries' - summary: 'Used to query provisioning information for V2X communication over Uu unicast.' - description: 'Used to query provisioning information for V2X communication over Uu unicast.' - operationId: prov_info_uu_unicastGET - parameters: - - in: query - name: location_info - schema: - type: string - required: true - description: 'Comma separated list of locations to identify a cell of a base station or a particular geographical area' - - responses: - '200': - description: 'A response body containing the Uu unicast provisioning information. ' - content: - application/json: - schema: - $ref: '#/components/schemas/UuUnicastProvisioningInfo' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - - /queries/uu_mbms_provisioning_info: - get: - tags: - - 'queries' - summary: 'retrieve information required for V2X communication over Uu MBMS.' - description: 'retrieve information required for V2X communication over Uu MBMS.' - operationId: prov_info_uu_mbmsGET - parameters: - - in: query - name: location_info - schema: - type: string - required: true - description: 'omma separated list of locations to identify a cell of a base station or a particular geographical area' - - responses: - '200': - description: 'A response body containing the Uu unicast provisioning information. ' - content: - application/json: - schema: - $ref: '#/components/schemas/UuMbmsProvisioningInfo' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - - /queries/pc5_provisioning_info: - get: - tags: - - 'queries' - summary: 'Query provisioning information for V2X communication over PC5.' - description: 'Query provisioning information for V2X communication over PC5.' - operationId: prov_infoGET - parameters: - - in: query - name: location_info - schema: - type: string - required: true - description: 'Comma separated list of locations to identify a cell of a base station or a particular geographical area' - responses: - '200': - description: 'A response body containing the PC5 provisioning information is returned.' - content: - application/json: - schema: - $ref: '#/components/schemas/Pc5ProvisioningInfo' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - - /provide_predicted_qos: - post: - tags: - - 'QoS' - summary: 'Request the predicted QoS correspondent to potential routes of a vehicular UE.' - description: 'Request the predicted QoS correspondent to potential routes of a vehicular UE.' - operationId: predicted_qosPOST - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PredictedQos' - responses: - '200': - description: 'The response body shall contain the predicted QoS corresponding to potential routes of a vehicular UE' - content: - application/json: - schema: - $ref: '#/components/schemas/PredictedQos' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - - /publish_v2x_message: - post: - tags: - - 'V2X_msg' - summary: 'Used to publish a V2X message.' - description: 'Used to publish a V2X message.' - operationId: v2x_messagePOST - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/V2xMsgPublication' - responses: - '204': - $ref: '#/components/responses/204' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - - /subscriptions: - get: - tags: - - 'subscription' - summary: 'Request information about the subscriptions for this requestor.' - description: 'Request information about the subscriptions for this requestor.' - operationId: subGET - parameters: - - in: query - name: subscription_type - description: 'Query parameter to filter on a specific subscription type. Permitted values: prov_chg_uu_uni: provisioning information change for V2X communication over Uuunicast prov_chg_uu_mbms: provisioning information change for V2X communication over Uu MBMS prov_chg_uu_pc5: provisioning information change for V2X communication over PC5. v2x_msg: V2X interoperability message' - schema: - type: string - required: false - responses: - '200': - description: 'A response body containing the list of links to requestor subscriptions is returned.' - content: - application/json: - schema: - $ref: '#/components/schemas/SubscriptionLinkList' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - post: - tags: - - 'subscription' - summary: ' create a new subscription to VIS notifications.' - description: ' create a new subscription to VIS notifications.' - operationId: subPOST - requestBody: - required: true - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/ProvChgUuUniSubscription' - - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - - $ref: '#/components/schemas/ProvChgPc5Subscription' - - $ref: '#/components/schemas/V2xMsgSubscription' - responses: - '201': - description: 'In the returned NotificationSubscription structure, the created subscription is described using the appropriate data type.' - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/ProvChgUuUniSubscription' - - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - - $ref: '#/components/schemas/ProvChgPc5Subscription' - - $ref: '#/components/schemas/V2xMsgSubscription' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '415': - $ref: '#/components/responses/415' - '422': - $ref: '#/components/responses/422' - '429': - $ref: '#/components/responses/429' - - callbacks: - notification: - '{$request.body#/callbackReference}': - post: - summary: 'Callback POST used to send a notification' - description: 'A notification from VIS.' - operationId: notificationPOST - requestBody: - description: Subscription notification - required: true - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/ProvChgUuUniNotification' - - $ref: '#/components/schemas/ProvChgUuMbmsNotification' - - $ref: '#/components/schemas/ProvChgPc5Notification' - - $ref: '#/components/schemas/V2xMsgNotification' - responses: - '204': - $ref: '#/components/responses/204' - - /subscriptions/{subscriptionId}: - parameters: - - in: path - name: subscriptionId - description: 'Refers to created subscription, where the VIS API allocates a unique resource name for this subscription' - schema: - type: string - required: true - - - get: - tags: - - 'subscription' - summary: 'Retrieve information about this subscription.' - description: 'Retrieve information about this subscription.' - operationId: individualSubscriptionGET - - responses: - '200': - description: 'A response body containing the data type describing the specific RNI event subscription is returned' - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/ProvChgUuUniSubscription' - - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - - $ref: '#/components/schemas/ProvChgPc5Subscription' - - $ref: '#/components/schemas/V2xMsgSubscription' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - - put: - tags: - - 'subscription' - summary: 'Used to update the existing subscription.' - description: 'Used to update the existing subscription.' - operationId: individualSubscriptionPUT - requestBody: - required: true - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/ProvChgUuUniSubscription' - - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - - $ref: '#/components/schemas/ProvChgPc5Subscription' - - $ref: '#/components/schemas/V2xMsgSubscription' - responses: - '200': - description: 'A response body containing data type describing the updated subscription is returned' - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/ProvChgUuUniSubscription' - - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - - $ref: '#/components/schemas/ProvChgPc5Subscription' - - $ref: '#/components/schemas/V2xMsgSubscription' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - - '403': - $ref: '#/components/responses/403' - - '404': - $ref: '#/components/responses/404' - - '406': - $ref: '#/components/responses/406' - - '412': - $ref: '#/components/responses/412' - - '422': - $ref: '#/components/responses/422' - - '429': - $ref: '#/components/responses/429' - delete: - tags: - - 'subscription' - summary: 'Used to cancel the existing subscription.' - description: 'Used to cancel the existing subscription.' - operationId: individualSubscriptionDELETE - responses: - '204': - $ref: '#/components/responses/204' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '429': - $ref: '#/components/responses/429' - - # /notifitication_end_point_provided_by_client - #post: - -components: - schemas: - CellId: - properties: - cellId: - description: E-UTRAN Cell Identity as a bit string (size (28)). - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - cellId - type: object - x-etsi-ref: 6.6.2 - Earfcn: - properties: - earfcn: - description: E-UTRA Absolute Radio Frequency Channel Number, range (0... 65535) - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Integer - required: - - earfcn - type: object - x-etsi-ref: 6.6.3 - Ecgi: - properties: - cellId: - # description': The E-UTRAN Cell Identity. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': CellId - $ref: '#/components/schemas/CellId' - plmn: - # description': Public Land Mobile Network Identity. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Plmn - $ref: '#/components/schemas/Plmn' - required: - - plmn - - cellId - type: object - x-etsi-ref: 6.5.5 - FddInfo: - properties: - dlEarfcn: - # description': '' - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Earfcn - $ref: '#/components/schemas/Earfcn' - dlTransmissionBandwidth: - # description': '' - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': TransmissionBandwidth - $ref: '#/components/schemas/TransmissionBandwidth' - ulEarfcn: - # description': '' - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Earfcn - $ref: '#/components/schemas/Earfcn' - ulTransmissionBandwidth: - # description': '' - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': TransmissionBandwidth - $ref: '#/components/schemas/TransmissionBandwidth' - required: - - ulEarfcn - - dlEarfcn - - ulTransmissionBandwidth - - dlTransmissionBandwidth - type: object - x-etsi-ref: 6.5.6 - - LocationInfo.geoArea: - description: Information of a geographical area. - properties: - latitude: - description: 'Latitude (DATUM = WGS84) -90 to 90 in decimal degree format DDD.ddd' - format: Float - type: number - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Float - longitude: - description: 'Longitude (DATUM = WGS84)-180 to 180 in decimal degree format DDD.ddd' - format: Float - type: number - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Float - required: - - latitude - - longitude - type: object - x-etsi-mec-cardinality: 0..1 - - LocationInfo: - properties: - ecgi: - # description': E-UTRAN CelI Global Identifier of the serving cell. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': Ecgi - $ref: '#/components/schemas/Ecgi' - geoArea: - $ref: '#/components/schemas/LocationInfo.geoArea' - type: object - x-etsi-notes: "NOTE:\tEither ecgi or geoArea shall be present, but not both." - x-etsi-ref: 6.5.3 - Pc5NeighbourCellInfo: - properties: - ecgi: - # description': E-UTRAN CelI Global Identifier. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Ecgi - $ref: '#/components/schemas/Ecgi' - plmn: - # description': Public Land Mobile Network Identity. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Plmn - $ref: '#/components/schemas/Plmn' - siV2xConfig: - description: V2X sidelink communication configuration, as defined in ETSI TS 136 331 [i.11]. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': SystemInformationBlockType21 (as defined in ETSI TS 136 331 [i.11]) - type: string - required: - - plmn - - ecgi - - siV2xConfig - type: object - x-etsi-ref: 6.5.12 - - - Pc5ProvisioningInfo.proInfoPc5: - description: The provisioning information per location as defined below. - - properties: - dstLayer2Id: - description: "For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID, see ETSI TS\_136\_321 [i.12].\nPLMN operators coordinate to make sure Destination Layer-2 ID(s) for different V2X services are configured in a consistent manner." - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5. - items: - $ref: '#/components/schemas/Pc5NeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: Pc5NeighbourCellInfo - required: - - locationInfo - - dstLayer2Id - - Pc5ProvisioningInfo: - properties: - proInfoPc5: - type: array - items: - $ref: '#/components/schemas/Pc5ProvisioningInfo.proInfoPc5' - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - required: - - proInfoPc5 - type: object - x-etsi-ref: 6.2.4 - - Plmn: - properties: - mcc: - description: The Mobile Country Code part of PLMN Identity. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - mnc: - description: The Mobile Network Code part of PLMN Identity. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - mcc - - mnc - type: object - x-etsi-ref: 6.5.4 - - PredictedQos.routes.routeInfo: - required: - - location - properties: - location: - $ref: '#/components/schemas/LocationInfo' - time: - $ref: '#/components/schemas/TimeStamp' - rsrp: - description: 'Reference Signal Received Quality as defined in ETSI TS 136 214 [i.13]. Shall only be included in the response' - type: integer - format: Uint8 - - rsrq: - description: 'Reference Signal Received Quality as defined in ETSI TS 136 214 [i.13]. Shall only be included in the response' - type: integer - format: Uint8 - - PredictedQos.routes: - properties: - routeinfo: - description: 'Information relating to a specific route. The first structure shall relate to the route origin and the last to the route destination. Intermediate waypoint locations may also be provided. ' - type: array - minItems: 2 - items: - $ref: '#/components/schemas/PredictedQos.routes.routeInfo' - required: - - routeinfo - - PredictedQos: - description: 'predicted QoS of a vehicular UE' - properties: - timeGranularity: - $ref: '#/components/schemas/TimeStamp' - locationGranularity: - description: 'Granularity of visited location. Measured in meters' - type: string - routes: - type: array - items: - $ref: '#/components/schemas/PredictedQos.routes' - required: - - locationGranularity - - routes - type: object - x-etsi-mec-cardinality: 0..1 - - - ProvChgPc5Notification: - properties: - dstLayer2Id: - description: For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID, see ETSI TS 136 321 [i.12]. - type: string - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: String - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5. - items: - $ref: '#/components/schemas/Pc5NeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: Pc5NeighbourCellInfo - notificationType: - description: Shall be set to "ProvChgPc5Notification". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - required: - - notificationType - - locationInfo - type: object - x-etsi-ref: 6.4.4 - - ProvChgPc5Subscription.links: - description: Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests. - properties: - self: - # description': Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LinkType - $ref: '#/components/schemas/LinkType' - required: - - self - type: object - x-etsi-mec-cardinality: 0..1 - - ProvChgPc5Subscription.filterCriteria: - description: List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response. - properties: - dstLayer2Id: - description: For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID, see ETSI TS 136 321 [i.12]. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5. - items: - $ref: '#/components/schemas/Pc5NeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: Pc5NeighbourCellInfo - required: - - locationInfo - - dstLayer2Id - type: object - x-etsi-mec-cardinality: '1' - ProvChgPc5Subscription: - properties: - _links: - $ref: '#/components/schemas/ProvChgPc5Subscription.links' - callbackReference: - description: URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response. - format: uri - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: URI - expiryDeadline: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - filterCriteria: - $ref: '#/components/schemas/ProvChgPc5Subscription.filterCriteria' - subscriptionType: - description: Shall be set to "ProvChgPc5Subscription". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - subscriptionType - - callbackReference - - filterCriteria - type: object - x-etsi-ref: 6.3.4 - ProvChgUuMbmsNotification: - properties: - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS. - items: - $ref: '#/components/schemas/UuMbmsNeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: UuMbmsNeighbourCellInfo - notificationType: - description: Shall be set to "ProvChgUuMbmsNotification". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - v2xServerUsd: - # description': User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': V2xServerUsd - $ref: '#/components/schemas/V2xServerUsd' - required: - - notificationType - - locationInfo - type: object - x-etsi-ref: 6.4.3 - ProvChgUuMbmsSubscription.links: - description: Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests. - properties: - self: - # description': Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LinkType - $ref: '#/components/schemas/LinkType' - required: - - self - type: object - x-etsi-mec-cardinality: 0..1 - - ProvChgUuMbmsSubscription.filterCriteria: - description: List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response. - properties: - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS. - items: - $ref: '#/components/schemas/UuMbmsNeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: UuMbmsNeighbourCellInfo - v2xServerUsd: - # description': User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': V2xServerUsd - $ref: '#/components/schemas/V2xServerUsd' - required: - - locationInfo - - v2xServerUsd - type: object - x-etsi-mec-cardinality: '1' - - ProvChgUuMbmsSubscription: - properties: - _links: - $ref: '#/components/schemas/ProvChgUuMbmsSubscription.links' - callbackReference: - description: URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response. - format: uri - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: URI - expiryDeadline: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - filterCriteria: - $ref: '#/components/schemas/ProvChgUuMbmsSubscription.filterCriteria' - subscriptionType: - description: Shall be set to "ProvChgUuMbmsSubscription". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - subscriptionType - - callbackReference - - filterCriteria - type: object - x-etsi-ref: 6.3.3 - ProvChgUuUniNotification: - properties: - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast. - items: - $ref: '#/components/schemas/UuUniNeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: UuUniNeighbourCellInfo - notificationType: - description: Shall be set to "ProvChgUuUniNotification". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - v2xApplicationServer: - # description': V2X Application Server address (consisting of IP address and UDP port) for unicast. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': V2xApplicationServer - $ref: '#/components/schemas/V2xApplicationServer' - required: - - notificationType - - locationInfo - type: object - x-etsi-ref: 6.4.2 - ProvChgUuUniSubscription.links: - description: Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests. - properties: - self: - # description': Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LinkType - $ref: '#/components/schemas/LinkType' - required: - - self - type: object - x-etsi-mec-cardinality: 0..1 - - ProvChgUuUniSubscription.filterCriteria: - description: List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response. - properties: - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast. - items: - $ref: '#/components/schemas/UuUniNeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: UuUniNeighbourCellInfo - v2xApplicationServer: - # description': V2X Application Server address (consisting of IP address and UDP port) for unicast. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': V2xApplicationServer - $ref: '#/components/schemas/V2xApplicationServer' - required: - - locationInfo - - v2xApplicationServer - type: object - x-etsi-mec-cardinality: '1' - - ProvChgUuUniSubscription: - properties: - _links: - $ref: '#/components/schemas/ProvChgUuUniSubscription.links' - callbackReference: - description: URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response. - format: uri - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: URI - expiryDeadline: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - filterCriteria: - $ref: '#/components/schemas/ProvChgUuUniSubscription.filterCriteria' - subscriptionType: - description: Shall be set to "ProvChgUuUniSubscription". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - subscriptionType - - callbackReference - - filterCriteria - type: object - x-etsi-ref: 6.3.2 - - SubscriptionLinkList.links.subscriptions: - description: "The service consumer\u2019s subscriptions." - properties: - href: - description: The URI referring to the subscription. - format: uri - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: URI - subscriptionType: - description: Type of the subscription. The values are as defined in the \"subscriptionType\" attribute for each different V2X information event subscription data type. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - href - - subscriptionType - x-etsi-mec-cardinality: 0..N - - SubscriptionLinkList.links: - description: List of hyperlinks related to the resource. - properties: - self: - # description': URI of this resource. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LinkType - $ref: '#/components/schemas/LinkType' - subscriptions: - type: array - items: - $ref: '#/components/schemas/SubscriptionLinkList.links.subscriptions' - type: object - required: - - self - x-etsi-mec-cardinality: '1' - - SubscriptionLinkList: - properties: - _links: - $ref: '#/components/schemas/SubscriptionLinkList.links' - required: - - _links - type: object - x-etsi-ref: 6.3.6 - - TddInfo: - properties: - earfcn: - # description': '' - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Earfcn - $ref: '#/components/schemas/Earfcn' - subframeAssignment: - description: Uplink-downlink subframe configuration information. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - transmissionBandwidth: - # description': '' - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': TransmissionBandwidth - $ref: '#/components/schemas/TransmissionBandwidth' - required: - - earfcn - - transmissionBandwidth - - subframeAssignment - type: object - x-etsi-ref: 6.5.7 - TimeStamp: - properties: - nanoSeconds: - description: The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. - format: Uint32 - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Uint32 - seconds: - description: The seconds part of the time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC. - format: Uint32 - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Uint32 - required: - - seconds - - nanoSeconds - type: object - x-etsi-ref: 6.5.2 - TransmissionBandwidth.transmissionBandwidth: - description: 'Numeric value corresponding to the transmission bandwidth expressed in units of resource blocks as follows:1 = bw6 (6 resource blocks)2 = bw15 (15 resource blocks) 3 = bw25 (25 resource blocks) 4 = bw50 (50 resource blocks) 5 = bw75 (75 resource blocks) 6 = bw100 (100 resource blocks)' - enum: - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Enum - - TransmissionBandwidth: - properties: - transmissionBandwidth: - $ref: '#/components/schemas/TransmissionBandwidth.transmissionBandwidth' - required: - - transmissionBandwidth - type: object - x-etsi-ref: 6.6.4 - UuMbmsNeighbourCellInfo: - properties: - ecgi: - # description': E-UTRAN CelI Global Identifier. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Ecgi - $ref: '#/components/schemas/Ecgi' - fddInfo: - # description': Information for FDD operation. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': FddInfo - $ref: '#/components/schemas/FddInfo' - mbmsServiceAreaIdentity: - description: Supported MBMS Service Area Identities in the cell. - items: - type: string - minItems: 1 - type: array - x-etsi-mec-cardinality: 1..N - x-etsi-mec-origin-type: String - pci: - description: Physical Cell Identifier. - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Integer - plmn: - # description': Public Land Mobile Network Identity. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Plmn - $ref: '#/components/schemas/Plmn' - tddInfo: - # description': Information for TDD operation. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': TddInfo - $ref: '#/components/schemas/TddInfo' - required: - - plmn - - ecgi - - pci - - fddInfo - - tddInfo - - mbmsServiceAreaIdentity - type: object - x-etsi-ref: 6.5.11 - - UuMbmsProvisioningInfo.proInfoUuMbms: - description: The provisioning information per location as defined below. - properties: - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS. - type: array - items: - $ref: '#/components/schemas/UuMbmsNeighbourCellInfo' - minItems: 0 - - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: UuMbmsNeighbourCellInfo - v2xServerUsd: - # description': User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': V2xServerUsd - $ref: '#/components/schemas/V2xServerUsd' - required: - - locationInfo - - v2xServerUsd - - UuMbmsProvisioningInfo: - properties: - proInfoUuMbms: - $ref: '#/components/schemas/UuMbmsProvisioningInfo.proInfoUuMbms' - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - required: - - proInfoUuMbms - type: object - x-etsi-ref: 6.2.3 - - UuUniNeighbourCellInfo: - properties: - ecgi: - # description': E-UTRAN CelI Global Identifier. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Ecgi - $ref: '#/components/schemas/Ecgi' - fddInfo: - # description': Information for FDD operation. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': FddInfo - $ref: '#/components/schemas/FddInfo' - pci: - description: Physical Cell Identifier. - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Integer - plmn: - # description': Public Land Mobile Network Identity. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Plmn - $ref: '#/components/schemas/Plmn' - tddInfo: - # description': Information for TDD operation. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': TddInfo - $ref: '#/components/schemas/TddInfo' - required: - - plmn - - ecgi - - pci - - fddInfo - - tddInfo - type: object - x-etsi-ref: 6.5.9 - - UuUnicastProvisioningInfo.proInfoUuUnicast: - description: The provisioning information per location as defined below. - properties: - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast. - items: - $ref: '#/components/schemas/UuUniNeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: UuUniNeighbourCellInfo - v2xApplicationServer: - # description': V2X Application Server address (consisting of IP address and UDP port) for unicast. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': V2xApplicationServer - $ref: '#/components/schemas/V2xApplicationServer' - required: - - locationInfo - - v2xApplicationServer - x-etsi-mec-cardinality: 1..N - UuUnicastProvisioningInfo: - properties: - proInfoUuUnicast: - type: array - items: - $ref: '#/components/schemas/UuUnicastProvisioningInfo.proInfoUuUnicast' - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - required: - - proInfoUuUnicast - type: object - x-etsi-ref: 6.2.2 - V2xApplicationServer: - properties: - ipAddress: - description: '' - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - udpPort: - description: '' - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - ipAddress - - udpPort - type: object - x-etsi-ref: 6.5.8 - - - msgType: - description: '− denm(1): Decentralized Environmental Notification Message (DENM) as specified in ETSI EN 302 637-3 [i.3], − cam(2): Cooperative Awareness Message (CAM) as specified in ETSI EN 302 637-2 [i.2], − poi(3): Point of Interest message as specified in ETSI TS 101 556-1 [i.11], − spat(4): Signal Phase And Timing (SPAT) message as specified in SAE J2735 [i.12], − map(5): MAP message as specified in SAE J2735 [i.12], − ivi(6): In Vehicle Information (IVI) message as defined in ISO TS 19321 [i.13], − ev-rsr(7): Electric vehicle recharging spot reservation message, as defined in ETSI TS 101 556-3 [i.14], ' - enum: - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Enum - - V2xMsgPublication: - properties: - msgContent: - description: Published V2X message content. Its format is defined by the standardization organization indicated by the attribute stdOrganization. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - msgEncodeFormat: - description: The encode format of the V2X message, for example base64. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - msgType: - $ref: '#/components/schemas/msgType' - #x-etsi-mec-origin-type: Enum - stdOrganization: - description: "Standardization organization which defines the published V2X message type: \nETSI: European Telecommunications Standards Institute. \nSee note 1." - enum: - - ETSI - type: string - x-etsi-mec-cardinality: '1' - #-etsi-mec-origin-type: Enum - required: - - stdOrganization - - msgType - - msgEncodeFormat - - msgContent - type: object - x-etsi-notes: "NOTE 1: Other standardization organizations could be added as needed.NOTE 2:The V2X message types of ETSI shall be used as specified in ETSI TS 102 894-2 [6], clause A.114." - x-etsi-ref: 6.2.6 - - V2xMsgSubscription.links: - description: Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests. - properties: - self: - # description': Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LinkType - $ref: '#/components/schemas/LinkType' - required: - - self - type: object - x-etsi-mec-cardinality: 0..1 - - V2xMsgSubscription.filterCriteria: - description: List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response. - properties: - msgType: - description: Subscribed V2X message type. Its value is defined by the standardization organization indicated by the attribute stdOrganization. See note 2. - items: - type: string - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: Enum - stdOrganization: - description: "Standardization organization which defines the subscribed V2X message type: \nETSI: European Telecommunications Standards Institute. \nSee note 1." - enum: - - ETSI - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Enum - required: - - stdOrganization - type: object - x-etsi-mec-cardinality: '1' - - V2xMsgSubscription: - properties: - _links: - $ref: '#/components/schemas/V2xMsgSubscription.links' - callbackReference: - description: URI selected by the service consumer to receive notifications on the subscribed V2X message. This shall be included both in the request and in response. - format: uri - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: URI - expiryDeadline: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - filterCriteria: - $ref: '#/components/schemas/V2xMsgSubscription.filterCriteria' - subscriptionType: - description: Shall be set to "V2xMsgSubscription". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - subscriptionType - - callbackReference - - filterCriteria - type: object - x-etsi-notes: "NOTE 1:\tOther standardization organizations could be added as needed.\nNOTE 2:\tThe V2X message types of ETSI shall be used as specified in ETSI TS 102 894-2 [6], clause A.114." - x-etsi-ref: 6.3.5 - - - V2xMsgNotification.links: - description: 'Links to resources related to this notification.' - properties: - subscription: - # description': Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LinkType - $ref: '#/components/schemas/LinkType' - required: - - subscription - type: object - x-etsi-mec-cardinality: 0..1 - - V2xMsgNotification: - properties: - notificationType: - description: Shall be set to "V2xMsgNotification". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - stdOrganization: - description: 'Standardization organization which defines the published V2X message type ETSI: European Telecommunications Standards Institute. See note 1.' - enum: - - "ETSI" - type: string - msgType: - $ref: '#/components/schemas/msgType' - msgEncodeFormat: - description: 'The encode format of the V2X message, for example base64 ' - type: string - msgContent: - description: 'Published V2X message content. The format of the string is defined by the standardization organization indicated by the attribute stdOrganization.' - type: string - _links: - $ref: '#/components/schemas/V2xMsgNotification.links' - required: - - notificationType - - timeStamp - - stdOrganization - - msgType - - msgEncodeFormat - - msgContent - - _links - type: object - x-etsi-notes: "NOTE 1: Other standardization organizations could be added as needed. NOTE 2: The V2X message types of ETSI shall be used as specified in ETSI TS 102 894-2 [6], clause A.114" - - V2xServerUsd.sdpInfo: - description: SDP with IP multicast address and port number used for V2X communication via MBMS. - properties: - ipMulticastAddress: - description: '' - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - portNumber: - description: '' - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - ipMulticastAddress - - portNumber - type: object - x-etsi-mec-cardinality: '1' - V2xServerUsd.tmgi: - description: Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services. - properties: - mbmsServiceId: - description: MBMS Service ID consisting of three octets. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - mcc: - description: The Mobile Country Code part of PLMN Identity. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - mnc: - description: The Mobile Network Code part of PLMN Identity. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - mbmsServiceId - - mcc - - mnc - type: object - x-etsi-mec-cardinality: '' - - V2xServerUsd: - properties: - sdpInfo: - $ref: '#/components/schemas/V2xServerUsd.sdpInfo' - serviceAreaIdentifier: - description: A list of service area identifier for the applicable MBMS broadcast area. - items: - type: string - minItems: 1 - type: array - x-etsi-mec-cardinality: 1..N - x-etsi-mec-origin-type: String - tmgi: - $ref: '#/components/schemas/V2xServerUsd.tmgi' - required: - - tmgi - - serviceAreaIdentifier - - sdpInfo - type: object - x-etsi-ref: 6.5.10 - - LinkType: - description: >- - 'This data type represents a type of link' - type: object - required: - - href - properties: - href: - $ref: '#/components/schemas/Href' - Href: - description: >- - The URI referring to the subscription. - type: string - format: uri - ProblemDetails: - properties: - detail: - description: A human-readable explanation specific to this occurrence of the problem - type: string - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: String - instance: - description: A URI reference that identifies the specific occurrence of the problem - format: uri - type: string - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: URI - status: - description: The HTTP status code for this occurrence of the problem - format: uint32 - type: integer - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: Uint32 - title: - description: A short, human-readable summary of the problem type - type: string - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: String - type: - description: A URI reference according to IETF RFC 3986 that identifies the problem type - format: uri - type: string - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: URI - type: object - responses: - 204: - description: No Content - 206: - description: Partial content - 400: - description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 401: - description: 'Unauthorized : used when the client did not submit credentials.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 403: - description: 'Forbidden : operation is not allowed given the current status of the resource.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 404: - description: 'Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 406: - description: 'Not Acceptable : used to indicate that the server cannot provide the any of the content formats supported by the client.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 409: - description: 'Conflict : The operation cannot be executed currently, due to a conflict with the state of the resource' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 412: - description: 'Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 415: - description: 'Unsupported Media Type : used to indicate that the server or the client does not support the content type of the entity body.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 422: - description: 'Unprocessable Entity : used to indicate that the server understands the content type of the request entity and that the syntax of the request entity is correct but that the server is unable to process the contained instructions. This error condition can occur if an JSON request body is syntactically correct but semantically incorrect, for example if the target area for the request is considered too large. This error condition can also occur if the capabilities required by the request are not supported.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 429: - description: 'Too Many Requests : used when a rate limiter has triggered.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn index a3ba215346f6fd4f7f850f541d6ec337948a9912..7f606ceebb656d1dc57cf243bac20e2b370b082e 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn @@ -11,7 +11,7 @@ module V2XInformationServiceAPI_Functions { // JSON - import from JSON all; + import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; @@ -20,11 +20,11 @@ module V2XInformationServiceAPI_Functions { import from LibCommon_Sync all; // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; // LibMec/V2XInformationServiceAPI import from V2XInformationServiceAPI_TypesAndValues all; @@ -38,7 +38,8 @@ module V2XInformationServiceAPI_Functions { import from LibMec_Pixits all; function f_create_prov_uu_uni_subscription( - out ProvChgUuUniSubscription p_prov_chg_uu_uni_subscription + out ProvChgUuUniSubscription p_prov_chg_uu_uni_subscription, + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -47,16 +48,15 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_uni", + PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_prov_chg_uu_uni_subscription( m_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, m_prov_chg_uu_uni_filter_criteria( m_location_info( m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area( 43.72, @@ -65,7 +65,9 @@ module V2XInformationServiceAPI_Functions { m_v2x_application_server( oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )))))))); + )), + PX_PROV_UU_UNI_SUB_CALLBACK + )))))); tc_ac.start; alt { @@ -75,14 +77,24 @@ module V2XInformationServiceAPI_Functions { mw_http_message_body_json( mw_body_json_prov_chg_uu_uni_subscription( mw_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, -, + PX_PROV_UU_UNI_SUB_CALLBACK, ? - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); p_prov_chg_uu_uni_subscription := v_response.response.body.json_body.provChgUuUniSubscription; - log("f_create_prov_uu_uni_subscription: IUT successfully registers subscription: ", p_prov_chg_uu_uni_subscription); + log("f_create_prov_uu_uni_subscription: INFO: IUT successfully registers subscription: ", p_prov_chg_uu_uni_subscription); + log("f_create_prov_uu_uni_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_prov_uu_uni_subscription: Expected message not received"); @@ -92,7 +104,7 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_prov_uu_uni_subscription function f_delete_prov_uu_uni_subscription( - in ProvChgUuUniSubscription p_prov_chg_uu_uni_subscription + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; @@ -100,16 +112,16 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & p_prov_chg_uu_uni_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, v_headers - ))); + ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { @@ -120,7 +132,8 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_prov_uu_uni_subscription function f_create_prov_uu_mbms_subscription( - out ProvChgUuMbmsSubscription p_prov_chg_uu_mbms_subscription + out ProvChgUuMbmsSubscription p_prov_chg_uu_mbms_subscription, + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -129,33 +142,34 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_mbms", + PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_prov_chg_uu_mbms_subscription( m_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, m_prov_chg_uu_mbms_filter_criteria( m_location_info( m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area( 43.72, 10.41 )), - m_v2x_server_usd( - { PX_V2X_MBMS_SERVICE_ID }, - m_sdp_info( - PX_V2X_MC_SERVER, - PX_V2X_MC_PORT - ), - m_tmgi( - PX_V2X_SERVICE_AREA_ID, - PX_MCC, - PX_MNC + m_v2x_server_usd( + { PX_V2X_MBMS_SERVICE_ID }, + m_sdp_info( + PX_V2X_MC_SERVER, + PX_V2X_MC_PORT + ), + m_tmgi( + PX_V2X_SERVICE_AREA_ID, + PX_MCC, + PX_MNC ) - )))))))); + )), + PX_PROV_UU_MBMS_SUB_CALLBACK + )))))); tc_ac.start; alt { @@ -165,14 +179,24 @@ module V2XInformationServiceAPI_Functions { mw_http_message_body_json( mw_body_json_prov_chg_uu_mbms_subscription( mw_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, -, + PX_PROV_UU_MBMS_SUB_CALLBACK, ? )))))) -> value v_response { tc_ac.stop; + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); p_prov_chg_uu_mbms_subscription := v_response.response.body.json_body.provChgUuMbmsSubscription; log("f_create_prov_uu_mbms_subscription: IUT successfully registers subscription: ", p_prov_chg_uu_mbms_subscription); + log("f_create_prov_uu_mbms_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_prov_uu_mbms_subscription: Expected message not received"); @@ -182,15 +206,15 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_prov_uu_mbms_subscription function f_delete_prov_uu_mbms_subscription( - in ProvChgUuMbmsSubscription p_prov_chg_uu_mbms_subscription - ) runs on HttpComponent { + in charstring p_subscription_id + ) runs on HttpComponent { var Headers v_headers; f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & p_prov_chg_uu_mbms_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, v_headers ))); @@ -199,7 +223,7 @@ module V2XInformationServiceAPI_Functions { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { @@ -210,7 +234,8 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_prov_uu_mbms_subscription function f_create_prov_pc5_subscription( - out ProvChgPc5Subscription p_prov_chg_pc5_subscription + out ProvChgPc5Subscription p_prov_chg_pc5_subscription, + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -219,22 +244,23 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_pc5", + PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_prov_chg_pc5_subscription( m_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, m_filter_criteria( PX_V2X_DST_LAYER_2_ID, m_location_info( m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area( 43.72, 10.41 - ))))))))); + ))), + PX_PROV_PC5_SUB_CALLBACK + )))))); tc_ac.start; alt { @@ -243,15 +269,25 @@ module V2XInformationServiceAPI_Functions { mw_http_response_201_created( mw_http_message_body_json( mw_body_json_prov_chg_pc5_subscription( - mw_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, - -, - ? - )))))) -> value v_response { + mw_prov_chg_pc5_subscription( + -, + PX_PROV_PC5_SUB_CALLBACK, + ? + )))))) -> value v_response { tc_ac.stop; + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); p_prov_chg_pc5_subscription := v_response.response.body.json_body.provChgPc5Subscription; - log("f_create_prov_pc5_subscription: IUT successfully registers subscription: ", p_prov_chg_pc5_subscription); + log("f_create_prov_pc5_subscription: INFO: IUT successfully registers subscription: ", p_prov_chg_pc5_subscription); + log("f_create_prov_pc5_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_prov_pc5_subscription: Expected message not received"); @@ -261,7 +297,7 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_prov_pc5_subscription function f_delete_prov_pc5_subscription( - in ProvChgPc5Subscription p_prov_chg_pc5_subscription + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; @@ -269,16 +305,16 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & p_prov_chg_pc5_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, v_headers - ))); + ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { @@ -289,7 +325,8 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_prov_pc5_subscription function f_create_v2x_msg_subscription( - out V2xMsgSubscription p_v2x_msg_subscription + out V2xMsgSubscription p_v2x_msg_subscription, + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -298,14 +335,14 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/V2xMsgSubscription", + PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_v2x_msg_subscription( m_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, - m_v2x_msg_subscription_filter_criteria - )))))); + m_v2x_msg_subscription_filter_criteria, + PX_PROV_V2X_SUB_CALLBACK + )))))); tc_ac.start; alt { @@ -315,14 +352,24 @@ module V2XInformationServiceAPI_Functions { mw_http_message_body_json( mw_body_json_v2x_msg_subscription( mw_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, -, + PX_PROV_V2X_SUB_CALLBACK, ? - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); p_v2x_msg_subscription := v_response.response.body.json_body.v2xMsgSubscription; - log("f_create_v2x_msg_subscription: IUT successfully registers subscription: ", p_v2x_msg_subscription); + log("f_create_v2x_msg_subscription: INFO: IUT successfully registers subscription: ", p_v2x_msg_subscription); + log("f_create_v2x_msg_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_v2x_msg_subscription: Expected message not received"); @@ -332,7 +379,7 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_v2x_msg_subscription function f_delete_v2x_msg_subscription( - in V2xMsgSubscription p_v2x_msg_subscription + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; @@ -340,16 +387,16 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & p_v2x_msg_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, v_headers - ))); + ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { @@ -359,4 +406,86 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_v2x_msg_subscription + function f_create_pred_qos_subscription( + out PredQosSubscription p_pred_qos_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_pred_qos_subscription( + m_pred_qos_subscription( + m_qos_pred_filter_criteria, + PX_PRED_QOS_SUB_CALLBACK + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_pred_qos_subscription( + mw_pred_qos_subscription( + -, + PX_PRED_QOS_SUB_CALLBACK, + ? + )))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); + p_pred_qos_subscription := v_response.response.body.json_body.predQosSubscription; + log("f_create_pred_qos_subscription: INFO: IUT successfully registers subscription: ", p_pred_qos_subscription); + log("f_create_pred_qos_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_pred_qos_subscription: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_pred_qos_subscription + + function f_delete_pred_qos_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, + v_headers + ))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_pred_qos_subscription: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_pred_qos_subscription + } // End of module V2XInformationServiceAPI_Functions diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn index 70f38ce801df399622d5a8c9a94a73c977ef067f..e58c57590065a85691de6cd7b77467754a791139 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn @@ -4,35 +4,43 @@ module V2XInformationServiceAPI_Pixits { import from LibCommon_BasicTypesAndValues all; // JSON - import from JSON all; + import from Json all; - modulepar charstring PX_V2X_ECGI := "ecgi,135792468"; + modulepar charstring PX_V2X_ECGI := "268804901557"; - modulepar charstring PX_V2X_UNKNOWN_ECGI := "ecgi,1357924689"; + modulepar charstring PX_V2X_CELL_ID := "101010101"; - modulepar charstring PX_V2X_LATITUDE := "latitude,000.000,001.000,longitude,000.000,001.000"; + modulepar Json.Number PX_V2X_ECGI_LAT := 43.730846; - modulepar charstring PX_LOC_GRANULARITY := "17"; + modulepar Json.Number PX_V2X_ECGI_LONG := 7.415385; + + modulepar charstring PX_V2X_UNKNOWN_ECGI := "1357924689"; - modulepar charstring PX_CELL_ID := "4680"; + modulepar charstring PX_V2X_UNKNOWN_CELL_ID := "666666666"; - modulepar charstring PX_UNKNOWN_CELL_ID := "4680"; + modulepar charstring PX_V2X_LATITUDE := "latitude,43.730846,longitude,7.415385"; + + modulepar charstring PX_LOC_GRANULARITY := "17"; - modulepar charstring PX_MCC := "135"; + modulepar charstring PX_MCC := "1"; - modulepar charstring PX_MNC := "792"; + modulepar charstring PX_MNC := "1"; modulepar charstring PX_UNKNOWN_MCC := "136"; modulepar charstring PX_UNKNOWN_MNC := "796"; - modulepar JSON.AnyURI PX_PROV_UU_UNI_SUB_CALLBACK := ""; + modulepar charstring PX_NON_EXISTENT_SUBSCRIPTION_ID := "subscription0666"; + + modulepar Json.AnyURI PX_PROV_UU_UNI_SUB_CALLBACK := ""; - modulepar JSON.AnyURI PX_PROV_UU_MBMS_SUB_CALLBACK := ""; + modulepar Json.AnyURI PX_PROV_UU_MBMS_SUB_CALLBACK := ""; - modulepar JSON.AnyURI PX_PROV_PC5_SUB_CALLBACK := ""; + modulepar Json.AnyURI PX_PROV_PC5_SUB_CALLBACK := ""; - modulepar JSON.AnyURI PX_PROV_V2X_SUB_CALLBACK := ""; + modulepar Json.AnyURI PX_PROV_V2X_SUB_CALLBACK := ""; + + modulepar Json.AnyURI PX_PRED_QOS_SUB_CALLBACK := ""; modulepar charstring PX_V2X_SERVER_IP_ADDRESS := ""; @@ -40,12 +48,18 @@ module V2XInformationServiceAPI_Pixits { modulepar charstring PX_V2X_MBMS_SERVICE_ID := ""; - modulepar charstring PX_V2X_MC_SERVER := ""; + modulepar charstring PX_V2X_MC_SERVER := "test.mosquito.org"; - modulepar charstring PX_V2X_MC_PORT := ""; + modulepar charstring PX_V2X_MC_PORT := "1338"; modulepar charstring PX_V2X_SERVICE_AREA_ID := ""; modulepar charstring PX_V2X_DST_LAYER_2_ID := ""; + modulepar charstring PX_PROT_IMPLEMENTATION := ""; + + modulepar Json.String PX_V2X_MSG_DISTRIBUTION_SERVER_IP_ADDRESS := "10.8.0.1"; + + modulepar Json.UInt16 PX_V2X_MSG_DISTRIBUTION_SERVER_PORT := 12345; + } // End of module V2XInformationServiceAPI_Pixits diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn index 7cd78d21fedbb6e2d3992821eb6c62912859b33a..dc06b5659b0d8b8ae84513776cd908f2309b0f7f 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn @@ -11,11 +11,14 @@ module V2XInformationServiceAPI_Templates { // JSON - import from JSON all; + import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; + // LibMec/V2XInformationServiceAPI import from V2XInformationServiceAPI_TypesAndValues all; import from V2XInformationServiceAPI_Pixits all; @@ -24,104 +27,228 @@ module V2XInformationServiceAPI_Templates { in template (value) ProInfoUuUnicastList p_proInfoUuUnicast, in template (omit) TimeStamp p_timeStamp := omit ) := { - proInfoUuUnicast := p_proInfoUuUnicast, - timeStamp := p_timeStamp + timeStamp := p_timeStamp, + proInfoUuUnicast := p_proInfoUuUnicast } // End of template m_uu_unicast_provisioning_info template (present) UuUnicastProvisioningInfo mw_uu_unicast_provisioning_info( template (present) ProInfoUuUnicastList p_proInfoUuUnicast := ?, template TimeStamp p_timeStamp := * ) := { - proInfoUuUnicast := p_proInfoUuUnicast, - timeStamp := p_timeStamp + timeStamp := p_timeStamp, + proInfoUuUnicast := p_proInfoUuUnicast } // End of template mw_uu_unicast_provisioning_info template (omit) UuMbmsProvisioningInfo m_uu_mbms_provisioning_info( in template (value) ProInfoUuMbmsList p_proInfoUuMbms, in template (omit) TimeStamp p_timeStamp := omit ) := { - proInfoUuMbms := p_proInfoUuMbms, - timeStamp := p_timeStamp + timeStamp := p_timeStamp, + proInfoUuMbms := p_proInfoUuMbms } // End of template m_uu_mbms_provisioning_info template (present) UuMbmsProvisioningInfo mw_uu_mbms_provisioning_info( template (present) ProInfoUuMbmsList p_proInfoUuMbms := ?, template TimeStamp p_timeStamp := * ) := { - proInfoUuMbms := p_proInfoUuMbms, - timeStamp := p_timeStamp + timeStamp := p_timeStamp, + proInfoUuMbms := p_proInfoUuMbms } // End of template mw_uu_mbms_provisioning_info template (omit) Pc5ProvisioningInfo m_pc5_provisioning_info( in template (value) Pc5ProvisioningInfoProInfoPc5List p_proInfoPc5, in template (omit) TimeStamp p_timeStamp := omit ) := { - proInfoPc5 := p_proInfoPc5, - timeStamp := p_timeStamp + timeStamp := p_timeStamp, + proInfoPc5 := p_proInfoPc5 } // End of template m_pc5_provisioning_info template (present) Pc5ProvisioningInfo mw_pc5_provisioning_info( template (present) Pc5ProvisioningInfoProInfoPc5List p_proInfoPc5 := ?, template TimeStamp p_timeStamp := * ) := { - proInfoPc5 := p_proInfoPc5, - timeStamp := p_timeStamp + timeStamp := p_timeStamp, + proInfoPc5 := p_proInfoPc5 } // End of template mw_pc5_provisioning_info + template (omit) ProInfoUuUnicast m_proInfoUuUnicast( + in template (value) LocationInfo p_locationInfo, + in template (value) V2xApplicationServer p_v2xApplicationServer, + in template (omit) UuUniNeighbourCellInfoList p_neighbourCellInfo := omit + ) := { + locationInfo := p_locationInfo, + v2xApplicationServer := p_v2xApplicationServer, + neighbourCellInfo := p_neighbourCellInfo + } // End of template m_proInfoUuUnicast + + template (present) ProInfoUuUnicast mw_proInfoUuUnicast( + template (present) LocationInfo p_locationInfo := ?, + template (present) V2xApplicationServer p_v2xApplicationServer := ?, + template UuUniNeighbourCellInfoList p_neighbourCellInfo := omit + ) := { + locationInfo := p_locationInfo, + v2xApplicationServer := p_v2xApplicationServer, + neighbourCellInfo := p_neighbourCellInfo + } // End of template mw_proInfoUuUnicast + + template (omit) V2xMsgDistributionServerInfo m_v2x_msg_distribution_server_info( + in template (value) V2xMsgDistributionServers p_v2xMsgDistributionServer, + in template (omit) LocationInfo p_locationInfo := omit + ) := { + v2xMsgDistributionServer := p_v2xMsgDistributionServer, + locationInfo := p_locationInfo + } // End of template m_v2x_msg_distribution_server_info + + template (present) V2xMsgDistributionServerInfo mw_v2x_msg_distribution_server_info( + template (present) V2xMsgDistributionServers p_v2xMsgDistributionServer := ?, + template LocationInfo p_locationInfo := * + ) := { + v2xMsgDistributionServer := p_v2xMsgDistributionServer, + locationInfo := p_locationInfo + } // End of template mw_v2x_msg_distribution_server_info + + template (omit) V2xMsgDistributionServer m_v2x_msg_distribution_server( + in template (value) InfoProtocol p_infoProtocol, + in template (omit) InfoConnection p_infoConnection := omit + ) := { + infoProtocol := p_infoProtocol, + infoConnection := p_infoConnection + } // End of template m_v2x_msg_distribution_server + + template (present) V2xMsgDistributionServer mw_v2x_msg_distribution_server( + template (present) InfoProtocol p_infoProtocol := ?, + template InfoConnection p_infoConnection := * + ) := { + infoProtocol := p_infoProtocol, + infoConnection := p_infoConnection + } // End of template mw_v2x_msg_distribution_server + + template (value) InfoProtocol m_info_protocol( + in MsgProtocols p_msgProtocol := { MQTT_v3_1_1 }, + in Json.String p_protImplementation := PX_PROT_IMPLEMENTATION + ) := { + msgProtocol := p_msgProtocol, + protImplementation := p_protImplementation + } // End of template m_info_protocol + + template (present) InfoProtocol mw_info_protocol( + template (present) MsgProtocols p_msgProtocol := { MQTT_v3_1_1 }, + template (present) Json.String p_protImplementation := PX_PROT_IMPLEMENTATION + ) := { + msgProtocol := p_msgProtocol, + protImplementation := p_protImplementation + } // End of template mw_info_protocol + + template (value) InfoConnection m_info_connection( + in Json.String p_ipAddress, + in Json.UInt16 p_port_number + ) := { + ipAddress := p_ipAddress, + port_number := p_port_number + } // End of template m_info_connection + + template (present) InfoConnection mw_info_connection( + template (present) Json.String p_ipAddress := ?, + template (present) Json.UInt16 p_port_number := ? + ) := { + ipAddress := p_ipAddress, + port_number := p_port_number + } // End of template mw_info_connection + template (omit) PredictedQos m_predicted_qos( - in template (value) JSON.String p_locationGranularity, - in template (value) PredictedQosRoutesList p_routes, + in template (value) PredictionTarget p_predictionTarget := E2E_APPLICATION_INSTANCE_PREDICTION, + in template (value) Json.String p_locationGranularity, + in template (value) Qos p_qos, + in template (omit) TimeStamp p_noticePeriod := omit, + in template (omit) PredictionArea p_predictionArea := omit, + in template (omit) Routes p_routes := omit, in template (omit) TimeStamp p_timeGranularity := omit ) := { + predictionTarget := p_predictionTarget, timeGranularity := p_timeGranularity, locationGranularity := p_locationGranularity, - routes := p_routes + noticePeriod := p_noticePeriod, + predictionArea := p_predictionArea, + routes := p_routes, + qos := p_qos } // End of template m_predicted_qos template PredictedQos mw_predicted_qos( - template (present) JSON.String p_locationGranularity := ?, - template (present) PredictedQosRoutesList p_routes := ?, + template (present) PredictionTarget p_predictionTarget := ?, + template (present) Json.String p_locationGranularity := ?, + template (present) Qos p_qos := ?, + template TimeStamp p_noticePeriod := *, + template PredictionArea p_predictionArea := *, + template Routes p_routes := *, template TimeStamp p_timeGranularity := * - ) := { + ) := { + predictionTarget := p_predictionTarget, timeGranularity := p_timeGranularity, locationGranularity := p_locationGranularity, - routes := p_routes + noticePeriod := p_noticePeriod, + predictionArea := p_predictionArea, + routes := p_routes, + qos := p_qos } // End of template mw_predicted_qos - template (value) PredictedQosRoutes m_predicted_qos_routes( - in template (value) RouteInfoList p_routeinfo - ) := { - routeinfo := p_routeinfo - } // End of template m_predicted_qos_routes - - template (present) PredictedQosRoutes mw_predicted_qos_routes( - template (present) RouteInfoList p_routeinfo := ? - ) := { - routeinfo := p_routeinfo - } // End of template mw_predicted_qos_routes + template (value) Qos m_qos( + in template (value) StreamList p_stream + ) := { + stream := p_stream + } // End of template m_qos + + template (present) Qos mw_qos( + template (present) StreamList p_stream := ? + ) := { + stream := p_stream + } // End of template mw_qos + + template (value) Stream m_stream( + in template (value) QosKpiList p_qos_kpi + ) := { + qosKpi := p_qos_kpi + } // End of template m_stream + + template (present) Stream mw_stream( + template (present) QosKpiList p_qos_kpi := ? + ) := { + qosKpi := p_qos_kpi + } // End of template mw_stream + + template (omit) QosKpi m_qos_kpi( + in Json.String p_kpi_name, + in Json.String p_kpi_value, + in template (omit) Json.String p_confidence := omit + ) := { + kpiName := p_kpi_name, + kpiValue := p_kpi_value, + confidence := p_confidence + } // End of template m_qos_kpi + + template (present) QosKpi mw_qos_kpi( + template (present) Json.String p_kpi_name := ?, + template (present) Json.String p_kpi_value := ?, + template Json.String p_confidence := * + ) := { + kpiName := p_kpi_name, + kpiValue := p_kpi_value, + confidence := p_confidence + } // End of template mw_qos_kpi template (omit) RouteInfo m_route_info( - in template (value) LocationInfo p_location, - in template (omit) TimeStamp p_time := omit, - in template (omit) UInt8 p_rsrp := omit, - in template (omit) UInt8 p_rsrq := omit + in template (value) LocationInfo p_location, + in template (omit) TimeStamp p_time := omit ) := { location := p_location, - time := p_time, - rsrp := p_rsrp, - rsrq := p_rsrq + time := p_time } // End of template m_route_info template RouteInfo mw_route_info( template (present) LocationInfo p_location := ?, - template TimeStamp p_time := *, - template UInt8 p_rsrp := *, - template UInt8 p_rsrq := * + template TimeStamp p_time := * ) := { location := p_location, - time := p_time, - rsrp := p_rsrp, - rsrq := p_rsrq + time := p_time } // End of template mw_route_info template (omit) LocationInfo m_location_info( @@ -141,118 +268,144 @@ module V2XInformationServiceAPI_Templates { } // End of template mw_location_info template (value) LocationInfoGeoArea m_location_info_geo_area( - in JSON.Number p_latitude, - in JSON.Number p_longitude + in Json.Number p_latitude, + in Json.Number p_longitude ) := { latitude := p_latitude, longitude := p_longitude } // End of m_location_info_geo_area template (present) LocationInfoGeoArea mw_location_info_geo_area( - template (present) JSON.Number p_latitude := ?, - template (present) JSON.Number p_longitude := ? + template (present) Json.Number p_latitude := ?, + template (present) Json.Number p_longitude := ? ) := { latitude := p_latitude, longitude := p_longitude } // End of mw_location_info_geo_area template (value) Ecgi m_ecgi( - in JSON.String p_cellId, + in Json.String p_cellId, in template (value) Plmn p_plmn ) := { + plmn := p_plmn, cellId := { cellId := p_cellId - }, - plmn := p_plmn + } } // End of template m_ecgi template (present) Ecgi mw_ecgi( - template (present) JSON.String p_cellId := ?, + template (present) Json.String p_cellId := ?, template (present) Plmn p_plmn := ? ) := { + plmn := p_plmn, cellId := { cellId := p_cellId - }, - plmn := p_plmn + } } // End of template mw_ecgi template (value) Plmn m_plmn( - in JSON.String p_mcc, - in JSON.String p_mnc + in Json.String p_mcc, + in Json.String p_mnc ) := { mcc := p_mcc, mnc := p_mnc } // End of template m_plmn template (present) Plmn mw_plmn( - template (present) JSON.String p_mcc := ?, - template (present) JSON.String p_mnc := ? + template (present) Json.String p_mcc := ?, + template (present) Json.String p_mnc := ? ) := { mcc := p_mcc, mnc := p_mnc } // End of template mw_plmn template (value) V2xMsgPublication m_v2x_message( - in JSON.String p_msgContent := "AgIAEPQ9JwVAWXGJVq3AIK5gAgAgADDUHgAAASAWhAMQpQcz/+H/+gAQAA==", - in JSON.String p_msgEncodeFormat := "base64", - in MsgType p_msgType := cam, - in StdOrganization p_stdOrganization := ETSI + in template (value) V2xMsgPropertiesValues p_msgPropertiesValues, + in Json.String p_msgRepresentationFormat := "base64", + in Json.String p_msgContent := "AgIAEPQ9JwVAWXGJVq3AIK5gAgAgADDUHgAAASAWhAMQpQcz/+H/+gAQAA==" ) := { - msgContent := p_msgContent, - msgEncodeFormat := p_msgEncodeFormat, - msgType := p_msgType, - stdOrganization := p_stdOrganization + msgPropertiesValues := p_msgPropertiesValues, + msgRepresentationFormat := p_msgRepresentationFormat, + msgContent := p_msgContent } // End of template m_v2x_message template (present) V2xMsgPublication mw_v2x_message( - template (present) JSON.String p_msgContent := ?, - template (present) JSON.String p_msgEncodeFormat := "base64", - template (present) MsgType p_msgType := ?, - template (present) StdOrganization p_stdOrganization := ETSI + template (present) V2xMsgPropertiesValues p_msgPropertiesValues := ?, + template (present) Json.String p_msgRepresentationFormat := ?, + template (present) Json.String p_msgContent := ? ) := { - msgContent := p_msgContent, - msgEncodeFormat := p_msgEncodeFormat, - msgType := p_msgType, - stdOrganization := p_stdOrganization + msgPropertiesValues := p_msgPropertiesValues, + msgRepresentationFormat := p_msgRepresentationFormat, + msgContent := p_msgContent } // End of template mw_v2x_message + template (value) V2xMsgPropertiesValues m_v2x_msg_properties_values( + in StdOrganization p_std_organization := ETSI, + in MsgType p_msg_type := cam, + in Json.Integer p_msg_protocol_version := 1, + in template (value) LocationInfo p_location_info + ) := { + stdOrganization := p_std_organization, + msgType := p_msg_type, + msgProtocolVersion := p_msg_protocol_version, + locationInfo := p_location_info + } // End of template m_v2x_msg_properties_values + + template (present) V2xMsgPropertiesValues mw_v2x_msg_properties_values( + template (present) StdOrganization p_std_organization := ?, + template (present) MsgType p_msg_type := ?, + template (present) Json.Integer p_msg_protocol_version := ?, + template (present) LocationInfo p_location_info := ? + ) := { + stdOrganization := p_std_organization, + msgType := p_msg_type, + msgProtocolVersion := p_msg_protocol_version, + locationInfo := p_location_info + } // End of template mw_v2x_msg_properties_values + template (omit) ProvChgUuUniSubscription m_prov_chg_uu_uni_subscription( - in template (value) JSON.AnyURI p_callbackReference, in template (value) ProvChgUuUniSubscriptionFilterCriteria p_filterCriteria, - in template (omit) LinkType p_links := omit, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "ProvChgUuUniSubscription" + subscriptionType := "ProvChgUuUniSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template m_prov_chg_uu_uni_subscription template (omit) ProvChgUuUniSubscription m_prov_chg_uu_uni_subscription_invalid( - in template (value) JSON.AnyURI p_callbackReference, in template (value) ProvChgUuUniSubscriptionFilterCriteria p_filterCriteria, - in template (omit) LinkType p_links := omit, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) TimeStamp p_expiryDeadline := omit - ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "InvalidProvChgUuUniSubscription" + ) modifies m_prov_chg_uu_uni_subscription := { + subscriptionType := "InvalidProvChgUuUniSubscription" } // End of template m_prov_chg_uu_uni_subscription template ProvChgUuUniSubscription mw_prov_chg_uu_uni_subscription( - template (present) JSON.AnyURI p_callbackReference := ?, template (present) ProvChgUuUniSubscriptionFilterCriteria p_filterCriteria := ?, - template LinkType p_links := *, + template Json.AnyURI p_callbackReference := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "ProvChgUuUniSubscription" + subscriptionType := "ProvChgUuUniSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template mw_prov_chg_uu_uni_subscription template (omit) ProvChgUuUniSubscriptionFilterCriteria m_prov_chg_uu_uni_filter_criteria( @@ -261,8 +414,8 @@ module V2XInformationServiceAPI_Templates { in template (omit) UuMbmsNeighbourCellInfoList p_neighbourCellInfo := omit ) := { locationInfo := p_location_info, - neighbourCellInfo := p_neighbourCellInfo, - v2xApplicationServer := p_v2xApplicationServer + v2xApplicationServer := p_v2xApplicationServer, + neighbourCellInfo := p_neighbourCellInfo } // End of template m_prov_chg_uu_uni_filter_criteria template ProvChgUuUniSubscriptionFilterCriteria mw_prov_chg_uu_uni_filter_criteria( @@ -271,50 +424,58 @@ module V2XInformationServiceAPI_Templates { template UuMbmsNeighbourCellInfoList p_neighbourCellInfo := * ) := { locationInfo := p_location_info, - neighbourCellInfo := p_neighbourCellInfo, - v2xApplicationServer := p_v2xApplicationServer + v2xApplicationServer := p_v2xApplicationServer, + neighbourCellInfo := p_neighbourCellInfo } // End of template mw_prov_chg_uu_uni_filter_criteria template (value) V2xApplicationServer m_v2x_application_server( - in JSON.String p_ip_address, - in JSON.String p_udp_port + in Json.String p_ip_address, + in Json.String p_udp_port ) := { ipAddress := p_ip_address, - udpPort := p_udp_port + udpPort := p_udp_port } // End of template m_v2x_application_server template (present) V2xApplicationServer mw_v2x_application_server( - template (present) JSON.String p_ip_address := ?, - template (present) JSON.String p_udp_port := ? + template (present) Json.String p_ip_address := ?, + template (present) Json.String p_udp_port := ? ) := { ipAddress := p_ip_address, - udpPort := p_udp_port + udpPort := p_udp_port } // End of template mw_v2x_application_server template (omit) ProvChgUuMbmsSubscription m_prov_chg_uu_mbms_subscription( - in template (value) JSON.AnyURI p_callbackReference, in template (value) ProvChgUuMbmsSubscriptionFilterCriteria p_filterCriteria, - in template (omit) LinkType p_links := omit, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "ProvChgUuMbmsSubscription" + subscriptionType := "ProvChgUuMbmsSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template m_prov_chg_uu_mbms_subscription template ProvChgUuMbmsSubscription mw_prov_chg_uu_mbms_subscription( - template (present) JSON.AnyURI p_callbackReference := ?, template (present) ProvChgUuMbmsSubscriptionFilterCriteria p_filterCriteria := ?, - template LinkType p_links := *, + template Json.AnyURI p_callbackReference := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * - ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "ProvChgUuMbmsSubscription" + ) := { + subscriptionType := "ProvChgUuMbmsSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template mw_prov_chg_uu_mbms_subscription template (omit) ProvChgUuMbmsSubscriptionFilterCriteria m_prov_chg_uu_mbms_filter_criteria( @@ -323,8 +484,8 @@ module V2XInformationServiceAPI_Templates { template (omit) UuMbmsNeighbourCellInfoList p_neighbourCellInfo := omit ) := { locationInfo := p_locationInfo, - neighbourCellInfo := p_neighbourCellInfo, - v2xServerUsd := p_v2xServerUsd + v2xServerUsd := p_v2xServerUsd, + neighbourCellInfo := p_neighbourCellInfo } // End of template m_prov_chg_uu_mbms_filter_criteria template (present) ProvChgUuMbmsSubscriptionFilterCriteria mw_prov_chg_uu_mbms_filter_criteria( @@ -333,8 +494,8 @@ module V2XInformationServiceAPI_Templates { template UuMbmsNeighbourCellInfoList p_neighbourCellInfo := * ) := { locationInfo := p_locationInfo, - neighbourCellInfo := p_neighbourCellInfo, - v2xServerUsd := p_v2xServerUsd + v2xServerUsd := p_v2xServerUsd, + neighbourCellInfo := p_neighbourCellInfo } // End of template mw_prov_chg_uu_mbms_filter_criteria template (value) V2xServerUsd m_v2x_server_usd( @@ -342,9 +503,9 @@ module V2XInformationServiceAPI_Templates { in template (value) SdpInfo p_sdpInfo, in template (value) Tmgi p_tmgi ) := { + tmgi := p_tmgi, serviceAreaIdentifier := p_serviceAreaIdentifier, - sdpInfo := p_sdpInfo, - tmgi := p_tmgi + sdpInfo := p_sdpInfo } // End of template m_v2x_server_usd template (present) V2xServerUsd mw_v2x_server_usd( @@ -352,31 +513,31 @@ module V2XInformationServiceAPI_Templates { template (present) SdpInfo p_sdpInfo := ?, template (present) Tmgi p_tmgi := ? ) := { + tmgi := p_tmgi, serviceAreaIdentifier := p_serviceAreaIdentifier, - sdpInfo := p_sdpInfo, - tmgi := p_tmgi + sdpInfo := p_sdpInfo } // End of template mw_v2x_server_usd template (value) SdpInfo m_sdp_info( - in JSON.String p_ipMulticastAddress, - in JSON.String p_portNumber + in Json.String p_ipMulticastAddress, + in Json.String p_portNumber ) := { ipMulticastAddress := p_ipMulticastAddress, portNumber := p_portNumber } // End of template m_sdp_info template (present) SdpInfo mw_sdp_info( - template (present) JSON.String p_ipMulticastAddress := ?, - template (present) JSON.String p_portNumber := ? + template (present) Json.String p_ipMulticastAddress := ?, + template (present) Json.String p_portNumber := ? ) := { ipMulticastAddress := p_ipMulticastAddress, portNumber := p_portNumber } // End of template mw_sdp_info template (value) Tmgi m_tmgi( - in JSON.String p_mbmsServiceId, - in JSON.String p_mcc, - in JSON.String p_mnc + in Json.String p_mbmsServiceId, + in Json.String p_mcc, + in Json.String p_mnc ) := { mbmsServiceId := p_mbmsServiceId, mcc := p_mcc, @@ -384,9 +545,9 @@ module V2XInformationServiceAPI_Templates { } // End of template m_tmgi template (present) Tmgi mw_tmgi( - template (present) JSON.String p_mbmsServiceId := ?, - template (present) JSON.String p_mcc := ?, - template (present) JSON.String p_mnc := ? + template (present) Json.String p_mbmsServiceId := ?, + template (present) Json.String p_mcc := ?, + template (present) Json.String p_mnc := ? ) := { mbmsServiceId := p_mbmsServiceId, mcc := p_mcc, @@ -394,91 +555,161 @@ module V2XInformationServiceAPI_Templates { } // End of template mw_tmgi template (omit) ProvChgPc5Subscription m_prov_chg_pc5_subscription( - in template (value) JSON.AnyURI p_callbackReference, in template (value) FilterCriteria p_filterCriteria, - in template (omit) LinkType p_links := omit, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "ProvChgPc5Subscription" + subscriptionType := "ProvChgPc5Subscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template m_prov_chg_pc5_subscription template (present) ProvChgPc5Subscription mw_prov_chg_pc5_subscription( - template (present) JSON.AnyURI p_callbackReference := ?, template (present) FilterCriteria p_filterCriteria := ?, - template LinkType p_links := *, + template Json.AnyURI p_callbackReference := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "ProvChgPc5Subscription" + subscriptionType := "ProvChgPc5Subscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template mw_prov_chg_pc5_subscription template (omit) FilterCriteria m_filter_criteria( - in template (value) JSON.String p_dstLayer2Id, + in template (value) Json.String p_dstLayer2Id, in template (value) LocationInfo p_locationInfo, in template (omit) Pc5NeighbourCellInfoList p_neighbourCellInfo := omit ) := { - dstLayer2Id := p_dstLayer2Id, locationInfo := p_locationInfo, + dstLayer2Id := p_dstLayer2Id, neighbourCellInfo := p_neighbourCellInfo } // End of template m_filter_criteria template (present) FilterCriteria mw_filter_criteria( - template (present) JSON.String p_dstLayer2Id := ?, + template (present) Json.String p_dstLayer2Id := ?, template (present) LocationInfo p_locationInfo := ?, template Pc5NeighbourCellInfoList p_neighbourCellInfo := * ) := { - dstLayer2Id := p_dstLayer2Id, locationInfo := p_locationInfo, + dstLayer2Id := p_dstLayer2Id, neighbourCellInfo := p_neighbourCellInfo } // End of template mw_filter_criteria template (omit) V2xMsgSubscription m_v2x_msg_subscription( - in template (value) JSON.AnyURI p_callbackReference, - in template (value) V2xMsgSubscriptionFilterCriteria p_filterCriteria, - in template (omit) LinkType p_links := omit, + in template (value) V2xMsgFilterCriteria p_filterCriteria, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "V2xMsgSubscription" + subscriptionType := "V2xMsgSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template m_v2x_msg_subscription template (present) V2xMsgSubscription mw_v2x_msg_subscription( - template (present) JSON.AnyURI p_callbackReference := ?, - template (present) V2xMsgSubscriptionFilterCriteria p_filterCriteria := ?, - template LinkType p_links := *, + template (present) V2xMsgFilterCriteria p_filterCriteria := ?, + template Json.AnyURI p_callbackReference := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "V2xMsgSubscription" + subscriptionType := "V2xMsgSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template mw_v2x_msg_subscription - template (omit) V2xMsgSubscriptionFilterCriteria m_v2x_msg_subscription_filter_criteria( - in StdOrganization p_stdOrganization := ETSI, - in template (omit) MsgTypeList p_msgType := { cam, denm } - ) := { - msgType := p_msgType, - stdOrganization := p_stdOrganization + template (omit) V2xMsgFilterCriteria m_v2x_msg_subscription_filter_criteria( + in StdOrganization p_stdOrganization := ETSI, + in template (omit) MsgTypeList p_msgType := { cam, denm }, + in template (omit) MsgProtocolVersionList p_msgProtocolVersion := omit, + in template (omit) LocationInfoList p_locationInfo := omit + ) := { + stdOrganization := p_stdOrganization, + msgType := p_msgType, + msgProtocolVersion := p_msgProtocolVersion, + locationInfo := p_locationInfo } // End of template m_v2x_msg_subscription_filter_criteria - template (present) V2xMsgSubscriptionFilterCriteria mw_v2x_msg_subscription_filter_criteria( - template (present) StdOrganization p_stdOrganization := ETSI, - template MsgTypeList p_msgType := * - ) := { - msgType := p_msgType, - stdOrganization := p_stdOrganization + template (present) V2xMsgFilterCriteria mw_v2x_msg_subscription_filter_criteria( + template (present) StdOrganization p_stdOrganization := ETSI, + template MsgTypeList p_msgType := *, + template MsgProtocolVersionList p_msgProtocolVersion := *, + template LocationInfoList p_locationInfo := * + ) := { + stdOrganization := p_stdOrganization, + msgType := p_msgType, + msgProtocolVersion := p_msgProtocolVersion, + locationInfo := p_locationInfo } // End of template mw_v2x_msg_subscription_filter_criteria + template (omit) PredQosSubscription m_pred_qos_subscription( + in template (value) QosPredFilterCriteria p_filterCriteria, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "PredQosSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } // End of template m_pred_qos_subscription + + template (present) PredQosSubscription mw_pred_qos_subscription( + template (present) QosPredFilterCriteria p_filterCriteria := ?, + template Json.AnyURI p_callbackReference := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "PredQosSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } // End of template mw_pred_qos_subscription + + template (omit) QosPredFilterCriteria m_qos_pred_filter_criteria( + in template (omit) Json.String p_streamId := omit + ) := { + streamId := p_streamId + } // End of template m_filterCriteria + + template QosPredFilterCriteria mw_qos_pred_filter_criteria( + template Json.String p_streamId := * + ) := { + streamId := p_streamId + } // End of template mw_filterCriteria + } // End of module V2XInformationServiceAPI_Templates diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn index 29ebd242023d26ac595a3e8a77dc69c232bd5949..450308e5d71d3dbc378848cb050fe95001652dc3 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn @@ -2,7 +2,7 @@ * @author ETSI / TTF T012 * @version $Url$ * $Id$ - * @desc Types ANd Values for ETSI GS MEC 030 V2.1.1 (2020-04) + * @desc Types And Values for ETSI GS MEC 030 V3.1.1 (2023-03) * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. @@ -11,494 +11,749 @@ module V2XInformationServiceAPI_TypesAndValues { // JSON - import from JSON all; + import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; /** - * @desc E-UTRAN Cell Identity as a bit string (size (28)) - * @see ETSI TS 136 413 + * @desc Provisioning information required for V2X communication over Uu unicast + * @member timeStamp_ Time stamp + * @member proInfoUuUnicast The provisioning information per location + * @see ETSI GS MEC 030 V3.1.1 (2023-03) V3.1.1 (2023-03) Table 6.2.2-1: Attributes of the UuUnicastProvisioningInfo */ - type record CellId { - JSON.String cellId + type record UuUnicastProvisioningInfo { + TimeStamp timeStamp optional, + ProInfoUuUnicastList proInfoUuUnicast } - /** - * @desc E-UTRA Absolute Radio Frequency Channel Number, range (0... 65535) - * @see ETSI TS 136 413 + /** + * @desc The provisioning information per location as defined below + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member neighbourCellInfoThe information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast + * @member v2xApplicationServer V2X Application Server address (consisting of IP address and UDP port) for unicast + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.2-1: Attributes of the UuUnicastProvisioningInfo */ - type UInt16 Earfcn; + type record ProInfoUuUnicast { + LocationInfo locationInfo, + V2xApplicationServer v2xApplicationServer, + UuUniNeighbourCellInfoList neighbourCellInfo optional + } + type set of ProInfoUuUnicast ProInfoUuUnicastList; /** - * @desc Transmission Bandwidth, which is used to indicate the UL or DL transmission bandwidth expressed in units of resource blocks - * @see ETSI TS 136 413 + * @desc Provisioning information required for V2X communication over Uu MBMS + * @member proInfoUuMbms The provisioning information per location as defined below + * @member timeStamp_ TimeStamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.3-1: Attributes of the UuMbmsProvisioningInfo */ - type enumerated TransmissionBandwidth { - bw6 (1), - bw15 (2), - bw25 (3), - bw50 (4), - bw75 (6), - bw100 (7) - } with { - variant "JSON: as number" + type record UuMbmsProvisioningInfo { + TimeStamp timeStamp optional, + ProInfoUuMbmsList proInfoUuMbms } /** - * @desc E-UTRAN Cell Global Identifier - * @member cellId The E-UTRAN Cell Identity - * @member plmn Public Land Mobile Network Identity - * @see ETSI TS 136 413 + * @desc The provisioning information per location + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.3-1: Attributes of the UuMbmsProvisioningInfo */ - type record Ecgi { - CellId cellId, - Plmn plmn + type record ProInfoUuMbms { + LocationInfo locationInfo, + UuMbmsNeighbourCellInfoList neighbourCellInfo optional, + V2xServerUsd v2xServerUsd } + type set of ProInfoUuMbms ProInfoUuMbmsList; /** - * @desc FDD information - * @member dlEarfcn Downlink E-UTRA Absolute Radio Frequency Channel Number - * @member dlTransmissionBandwidth Downlink Transmission Bandwidth - * @member ulEarfcn Uplink E-UTRA Absolute Radio Frequency Channel Number - * @member ulTransmissionBandwidth Uplink Transmission Bandwidth - * @see ETSI TS 136 413 + * @desc Provisioning information required for V2X communication over PC5 + * @member proInfoPc5 The provisioning information per location + * @member timeStamp Time stamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.4-1: Attributes of the Pc5ProvisioningInfo */ - type record FddInfo { - Earfcn dlEarfcn, - TransmissionBandwidth dlTransmissionBandwidth, - Earfcn ulEarfcn, - TransmissionBandwidth ulTransmissionBandwidth + type record Pc5ProvisioningInfo { + TimeStamp timeStamp optional, + Pc5ProvisioningInfoProInfoPc5List proInfoPc5 } /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @desc The provisioning information per location + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member dstLayer2Id For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID + * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5 + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.4-1: Attributes of the Pc5ProvisioningInfo */ - type UInt32 Seconds; + type record Pc5ProvisioningInfoProInfoPc5 { + LocationInfo locationInfo, + Json.String dstLayer2Id, + Pc5NeighbourCellInfoList neighbourCellInfo optional + } + type set of Pc5ProvisioningInfoProInfoPc5 Pc5ProvisioningInfoProInfoPc5List; /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @desc This type represents the information of one or more V2X Message Distribution Servers that is exchanged between the VIS and a service consumer (e.g. a MEC application) to enable a direct interaction among the service consumer and one or multiple V2X Message Distribution Servers + * @member v2xMsgDistributionServer Describes the information of the V2X Message Distribution Servers supported by the service consumer for direct communication + * @member locationInfo Location information to identify a particular geographical area of interest to the service consumer for receiving V2X messages + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.5-1: Attributes of the V2xMsgDistributionServerInfo */ - type UInt32 NanoSeconds; + type record V2xMsgDistributionServerInfo { + V2xMsgDistributionServers v2xMsgDistributionServer, + LocationInfo locationInfo optional + } /** - * @desc Time stamp description - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see MEC030 Clause 6.5.2 Type: TimeStamp + * @desc Predicted QoS of a vehicular UE + * @member predictionTarget Indicates target of QoS prediction + * @member timeGranularity Granularity of visited location. Measured in meters + * @member locationGranularity Granularity of visited location. Measured in meters + * @member noticePeriod Information on when the predicted QoS is needed at the service consumer interface + * @member predictionArea Geographical area including the two ends of the user plane link between two V2X application instances + * @member routes Information relating to the potential routes of a vehicular UE + * @member qos Predicted QoS at the related time and vehicular UE location + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds + type record PredictedQos { + PredictionTarget predictionTarget, + TimeStamp timeGranularity optional, + Json.String locationGranularity, + TimeStamp noticePeriod optional, + PredictionArea predictionArea optional, + Routes routes optional, + Qos qos + } + + type enumerated PredictionTarget { + SINGLE_UE_PREDICTION (1), + E2E_APPLICATION_INSTANCE_PREDICTION (2) + } with { + variant "JSON: as number" } /** - * @desc Information of a geographical area - * @member latitude Latitude (DATUM = WGS84) -90 to 90 in decimal degree format DDD.ddd - * @member longitude Longitude (DATUM = WGS84)-180 to 180 in decimal degree format DDD.ddd - * @see MEC030 Clause 6.5.3 Type: LocationInfo + * @desc Geographical area including the two ends of the user plane link between two V2X application instances + * @member center Center of geographical area including the two ends of the user plane link between two V2X application instances + * @member radius Radius of geographical area including the two ends of the user plane link between two V2X application instances. Measured in meters + * @member + * @member + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record LocationInfoGeoArea { - JSON.Number latitude, - JSON.Number longitude + type record PredictionArea { + LocationInfo center, + Json.String radius } /** - * @desc Location information - * @member ecgi E-UTRAN CelI Global Identifier of the serving cell - * @member geoArea Information of a geographical area - * @see MEC030 Clause 6.5.3 Type: LocationInfo + * @desc Information relating to the potential routes of a vehicular UE + * @member routeinfo Information relating to a specific route + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record LocationInfo { - Ecgi ecgi, - LocationInfoGeoArea geoArea optional + type record Route { + RouteInfoList routeinfo } - type record of LocationInfo LocationInfoList; + type set of Route Routes; /** - * @desc Location information - * @member ecgi E-UTRAN CelI Global Identifier - * @member plmn Public Land Mobile Network Identity - * @member siV2xConfig V2X sidelink communication configuration, as defined in ETSI TS 136 331 - * @see MEC030 Clause 6.5.12 Type: Pc5NeighbourCellInfo + * @desc Information relating to a specific route + * @member location Vehicular UE location + * @member time Estimated time at the location + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record Pc5NeighbourCellInfo { - Ecgi ecgi, - Plmn plmn, - JSON.String siV2xConfig + type record RouteInfo { + LocationInfo location, + TimeStamp time optional } - type record of Pc5NeighbourCellInfo Pc5NeighbourCellInfoList; + type set of RouteInfo RouteInfoList; /** - * @desc The provisioning information per location - * @member dstLayer2Id For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID - * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5 - * @see MEC030 Clause 6.2.4 Type: Pc5ProvisioningInfo + * @desc Predicted QoS at the related time and vehicular UE location + * @member stream Predicted QoS at the related time and vehicular UE location for the specific data stream + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record Pc5ProvisioningInfoProInfoPc5 { - JSON.String dstLayer2Id, - LocationInfo locationInfo, - Pc5NeighbourCellInfoList neighbourCellInfo optional + type record Qos { + StreamList stream } - type record of Pc5ProvisioningInfoProInfoPc5 Pc5ProvisioningInfoProInfoPc5List; /** - * @desc Provisioning information required for V2X communication over PC5 - * @member proInfoPc5 The provisioning information per location - * @member timeStamp Time stamp - * @see MEC030 Clause 6.5.12 Type: Pc5NeighbourCellInfo + * @desc Predicted QoS at the related time and vehicular UE location + * @member qosKpi This structure contains the prediction for a specific QoS KPI related to a given data stream + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record Pc5ProvisioningInfo { - Pc5ProvisioningInfoProInfoPc5List proInfoPc5, - TimeStamp timeStamp optional + type record Stream { + QosKpiList qosKpi } + type set of Stream StreamList; /** - * @desc PLMN Identity - * @member mcc The Mobile Country Code part of PLMN Identity - * @member mnc The Mobile Network Code part of PLMN Identity - * @see MEC030 Clause 6.5.4 Type: Plmn + * @desc This structure contains the prediction for a specific QoS KPI related to a given data stream + * @member kpiName The name of the KPI (e.g. latency, UL bitrate, etc.) + * @member kpiValue Information on the predicted value for the specific QoS KPI + * @member confidence Confidence of the prediction, as returned by the relevant domain PF + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record Plmn { - JSON.String mcc, - JSON.String mnc + type record QosKpi { + Json.String kpiName, + Json.String kpiValue, + Json.String confidence optional } + type set of QosKpi QosKpiList; /** - * @desc Information relating to a specific route - * @member location Vehicular UE location - * @member time Estimated time at the location - * @member rsrp Reference Signal Received Quality as defined in ETSI TS 136 214 - * @member rsrq Reference Signal Received Quality as defined in ETSI TS 136 214 [i.13]. Shall only be included in the response - * @see MEC030 Clause 6.2.5 Type: PredictedQos + * @desc V2X message that a service consumer publishes to VIS + * @member msgPropertiesValues List of message properties that is associated to the V2X message publication that can be used for filtering messages at the reception of the V2X message + * @member msgRepresentationFormat The representation format of the binary V2X message, for example base64 or hexadecimal representation + * @member msgType Published V2X message content. Its format is defined by the standardization organization indicated by the attribute stdOrganization of the msgPropertiesValues attribute + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.7-1: Attributes of the V2xMsgPublication */ - type record RouteInfo { - LocationInfo location, - TimeStamp time optional, - UInt8 rsrp optional, - UInt8 rsrq optional + type record V2xMsgPublication { + V2xMsgPropertiesValues msgPropertiesValues, + Json.String msgRepresentationFormat, + Json.String msgContent } - type record of RouteInfo RouteInfoList; /** - * @desc Information relating to the potential routes of a vehicular UE - * @member routeinfo Information relating to a specific route - * @see MEC030 Clause 6.2.5 Type: PredictedQos + * @desc Subscription to the notifications from VIS about the provisioning information changes for V2X communication over Uu unicast + * @member subscriptionType Shall be set to "ProvChgUuUniSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteria List of filtering criteria for the subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.2-1: Attributes of the ProvChgUuUniSubscription */ - type record PredictedQosRoutes { - RouteInfoList routeinfo + type record ProvChgUuUniSubscription { + Json.String subscriptionType, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + ProvChgUuUniSubscriptionFilterCriteria filterCriteria, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; } - type record of PredictedQosRoutes PredictedQosRoutesList; /** - * @desc Predicted QoS of a vehicular UE - * @member timeGranularity Granularity of visited location. Measured in meters - * @member locationGranularity Granularity of visited location. Measured in meters - * @member routes Information relating to the potential routes of a vehicular UE - * @see MEC030 Clause 6.2.5 Type: PredictedQos + * @desc URI exposed by the client on which to receive notifications via HTTP */ - type record PredictedQos { - TimeStamp timeGranularity optional, - JSON.String locationGranularity, - PredictedQosRoutesList routes + type Json.AnyURI CallbackReference; + + /** + * @desc List of hyperlinks related to the resource + * @member self_ URI referring to a resource + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.2-1: Attributes of the ProvChgUuUniSubscription + */ + type record Links { + LinkType self_ + } with { + variant (self_) "name as 'self'"; } /** - * @desc Notification from VIS with regards to the provisioning information changes for V2X communication over PC5 - * @member dstLayer2Id For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID + * @desc List of filtering criteria for the subscription. * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5 - * @member notificationType Shall be set to "ProvChgPc5Notification" - * @see MEC030 Clause 6.4.4 Type: ProvChgPc5Notification + * @member v2xApplicationServer V2X Application Server address (consisting of IP address and UDP port) for unicast + * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.2-1: Attributes of the ProvChgUuUniSubscription */ - type record ProvChgPc5Notification { - JSON.String dstLayer2Id optional, - LocationInfo locationInfo, - Pc5NeighbourCellInfoList neighbourCellInfo optional, - JSON.String notificationType, - TimeStamp timeStamp optional + type record ProvChgUuUniSubscriptionFilterCriteria { + LocationInfo locationInfo, + V2xApplicationServer v2xApplicationServer, + UuMbmsNeighbourCellInfoList neighbourCellInfo optional } /** - * @desc Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests - * @member self_ Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription - * @see MEC030 Clause 6.3.4 Type: ProvChgPc5Subscription + * @desc Subscription to the notifications from VIS about the provisioning information changes for V2X communication over Uu MBMS + * @member subscriptionType Shall be set to "ProvChgUuMbmsSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteria List of filtering criteria for the subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.3-1: Attributes of the ProvChgUuMbmsSubscription */ - type record LinkType { - JSON.AnyURI self_ + type record ProvChgUuMbmsSubscription { + Json.String subscriptionType, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + ProvChgUuMbmsSubscriptionFilterCriteria filterCriteria, + TimeStamp expiryDeadline optional } with { - variant (self_) "name as 'self'"; + variant (links) "name as '_links'"; } /** - * @desc List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response - * @member dstLayer2Id For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID + * @desc List of filtering criteria for the subscription * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5 - * @see MEC030 Clause 6.3.4 Type: ProvChgPc5Subscription + * @member v2xServerUsd User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS + * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.3-1: Attributes of the ProvChgUuMbmsSubscription */ - type record FilterCriteria { - JSON.String dstLayer2Id, - LocationInfo locationInfo, - Pc5NeighbourCellInfoList neighbourCellInfo optional + type record ProvChgUuMbmsSubscriptionFilterCriteria { + LocationInfo locationInfo, + V2xServerUsd v2xServerUsd, + UuMbmsNeighbourCellInfoList neighbourCellInfo optional } /** * @desc Subscription to the notifications from VIS about the provisioning information changes for V2X communication over PC5 - * @member links URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response - * @member expiryDeadline Time stamp - * @member filterCriteria List of filtering criteria for the subscription * @member subscriptionType Shall be set to "ProvChgPc5Subscription" - * @see MEC030 Clause 6.3.4 Type: ProvChgPc5Subscription + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteria List of filtering criteria for the subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.4-1: Attributes of the ProvChgPc5Subscription */ type record ProvChgPc5Subscription { - LinkType links optional, - JSON.AnyURI callbackReference, - TimeStamp expiryDeadline optional, - FilterCriteria filterCriteria, - JSON.String subscriptionType + Json.String subscriptionType, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteria filterCriteria, + TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } /** - * @desc Notification from VIS with regards to the provisioning information changes for V2X communication over Uu MBMS + * @desc List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS - * @member notificationType Shall be set to "ProvChgUuMbmsNotification" - * @member timeStamp_ Time stamp - * @member v2xServerUsd User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS - * @see MEC030 Clause 6.4.3 Type: ProvChgUuMbmsNotification + * @member dstLayer2Id For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID + * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5 + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 6.3.4 Type: ProvChgPc5Subscription */ - type record ProvChgUuMbmsNotification { - LocationInfo locationInfo, - UuMbmsNeighbourCellInfoList neighbourCellInfo optional, - JSON.String notificationType, - TimeStamp timeStamp optional, - V2xServerUsd v2xServerUsd optional + type record FilterCriteria { + LocationInfo locationInfo, + Json.String dstLayer2Id, + Pc5NeighbourCellInfoList neighbourCellInfo optional } /** - * @desc List of filtering criteria for the subscription - * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS - * @member v2xServerUsd User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS - * @see MEC030 Clause 6.3.3 Type: ProvChgUuMbmsSubscription + * @desc Subscription to notification of V2X message + * @member subscriptionType Shall be set to "V2xMsgSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteria List of filtering criteria for the subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.5-1: Attributes of the V2xMsgSubscription */ - type record ProvChgUuMbmsSubscriptionFilterCriteria { - LocationInfo locationInfo, - UuMbmsNeighbourCellInfoList neighbourCellInfo optional, - V2xServerUsd v2xServerUsd + type record V2xMsgSubscription { + Json.String subscriptionType, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + V2xMsgFilterCriteria filterCriteria, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; } /** - * @desc Subscription to the notifications from VIS about the provisioning information changes for V2X communication over Uu MBMS - * @member links URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response - * @member callbackReferenceURI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response - * @member expiryDeadline Time stamp + * @desc This type represents a subscription to notification of predicted QoS information + * @member subscriptionType Shall be set to "PredQosSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource * @member filterCriteria List of filtering criteria for the subscription - * @member subscriptionType Shall be set to "ProvChgUuMbmsSubscription" - * @see MEC030 Clause 6.3.3 Type: ProvChgUuMbmsSubscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.6-1: Attributes of the PredQosSubscription + */ + type record PredQosSubscription { + Json.String subscriptionType, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + QosPredFilterCriteria filterCriteria, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a list of links related to currently existing subscriptions for the service consumer + * @member links Hyperlink related to the resource + * @member subscription The service consumer's subscriptions + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.7-1: Attributes of the SubscriptionLinkList */ - type record ProvChgUuMbmsSubscription { - LinkType links optional, - JSON.AnyURI callbackReference, - TimeStamp expiryDeadline optional, - ProvChgUuMbmsSubscriptionFilterCriteria filterCriteria, - JSON.String subscriptionType + type record SubscriptionLinkList { + SubscriptionLinks links } with { variant (links) "name as '_links'"; } + /** + * @desc Hyperlink related to the resource + * @member self_ URI of this resource. + * @member subscription The service consumer's subscriptions + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.7-1: Attributes of the SubscriptionLinkList + */ + type record SubscriptionLinks { + LinkType self_, + SubscriptionList subscription optional + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc A link to a subscription + * @member href The URI referring to the subscription. + * @member subscriptionType Type of subscription + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.7-1: Attributes of the SubscriptionLinkList + */ + type record Subscription_ { + Json.AnyURI href, + Json.String subscriptionType + } + type set of Subscription_ SubscriptionList; + /** * @desc Notification from VIS with regards to the provisioning information changes for V2X communication over Uu unicast - * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast * @member notificationType Shall be set to "ProvChgUuUniNotification" * @member timeStamp_ Time stamp + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area * @member v2xApplicationServer V2X Application Server address (consisting of IP address and UDP port) for unicast - * @see MEC030 Clause 6.4.2 Type: ProvChgUuUniNotification + * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.4.2-1: Attributes of the ProvChgUuUniNotification */ type record ProvChgUuUniNotification { - LocationInfo locationInfo, - UuUniNeighbourCellInfoList neighbourCellInfo optional, - JSON.String notificationType, + Json.String notificationType, TimeStamp timeStamp optional, - V2xApplicationServer v2xApplicationServer optional + LocationInfo locationInfo, + V2xApplicationServer v2xApplicationServer optional, + UuUniNeighbourCellInfoList neighbourCellInfo optional } /** - * @desc List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response + * @desc Notification from VIS with regards to the provisioning information changes for V2X communication over Uu MBMS + * @member notificationType Shall be set to "ProvChgUuMbmsNotification" + * @member timeStamp_ Time stamp * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member v2xServerUsd User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS - * @member v2xApplicationServer V2X Application Server address (consisting of IP address and UDP port) for unicast - * @see MEC030 Clause 6.3.3 Type: ProvChgUuMbmsSubscription + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.4.3-1: Attributes of the ProvChgUuMbmsNotification */ - type record ProvChgUuUniSubscriptionFilterCriteria { + type record ProvChgUuMbmsNotification { + Json.String notificationType, + TimeStamp timeStamp optional, LocationInfo locationInfo, - UuMbmsNeighbourCellInfoList neighbourCellInfo optional, - V2xApplicationServer v2xApplicationServer + V2xServerUsd v2xServerUsd optional, + UuMbmsNeighbourCellInfoList neighbourCellInfo optional } /** - * @desc Subscription to the notifications from VIS about the provisioning information changes for V2X communication over Uu unicast - * @member links URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response - * @member callbackReferenceURI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response - * @member expiryDeadline Time stamp - * @member filterCriteria List of filtering criteria for the subscription - * @member subscriptionType Shall be set to "ProvChgUuUniSubscription" - * @see MEC030 Clause 6.3.2 Type: ProvChgUuUniSubscription + * @desc Notification from VIS with regards to the provisioning information changes for V2X communication over PC5 + * @member notificationType Shall be set to "ProvChgPc5Notification" + * @member timeStamp_ Time stamp + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member dstLayer2Id For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID + * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5 + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.4.4-1: Attributes of the ProvChgPc5Notification */ - type record ProvChgUuUniSubscription { - LinkType links optional, - JSON.AnyURI callbackReference, - TimeStamp expiryDeadline optional, - ProvChgUuUniSubscriptionFilterCriteria filterCriteria, - JSON.String subscriptionType + type record ProvChgPc5Notification { + Json.String notificationType, + TimeStamp timeStamp optional, + LocationInfo locationInfo, + Json.String dstLayer2Id optional, + Pc5NeighbourCellInfoList neighbourCellInfo optional + } + + /** + * @desc Notification for informing the subscribers about the V2X message + * @member notificationType Shall be set to "V2xMsgNotification" + * @member timeStamp Time stamp + * @member msgPropertiesValues List of message properties that is associated to the V2X message + * @member msgRepresentationFormat The representation format of the binary V2X message, for example base64 or hexadecimal representation + * @member msgContent Published V2X message content. The format of the string is defined by the standardization organization + * @member links Link to resources related to this notification + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.4.5-1: Attributes of the V2xMsgNotification + */ + type record V2xMsgNotification { + Json.String notificationType, + TimeStamp timeStamp, + V2xMsgPropertiesValues msgPropertiesValues, + Json.String msgRepresentationFormat, + Json.String msgContent, + Links_Notification links } with { variant (links) "name as '_links'"; } /** - * @desc The service consumers subscriptions - * @member href The URI referring to the subscription - * @member subscriptionType Type of the subscription. The values are as defined in the \"subscriptionType\" attribute for each different V2X information event subscription data type - * @see MEC030 Clause 6.3.6 Type: SubscriptionLinkList + * @desc Link to resources related to this notification + * @member subscription A link to the related subscription + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.4.5-1: Attributes of the V2xMsgNotification */ - type record SubscriptionsLink_ { - JSON.AnyURI href, - JSON.String subscriptionType + type record Links_Notification { + LinkType subscription } - type record of SubscriptionsLink_ SubscriptionLinkList_; /** - * @desc List of hyperlinks related to the resource - * @member self_ URI of this resource - * @member subscriptions The service consumer’s subscriptions - * @see MEC030 Clause 6.3.6 Type: SubscriptionLinkList + * @desc This type represents a notification from RNIS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "TestNotification" + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.4.6-1: Attributes of the TestNotification */ - type record SubscriptionLinkList { - LinkType self_, - SubscriptionLinkList_ subscriptions + type record TestNotification { + Json.String notificationType, + Links_Notification links optional } with { - variant (self_) "name as 'self'"; + variant (links) "name as '_links'"; + } + + /** + * @desc Location information + * @member ecgi E-UTRAN CelI Global Identifier of the serving cell + * @member geoArea Information of a geographical area + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.3-1: Attributes of the LocationInfo + */ + type record LocationInfo { + Ecgi ecgi, + LocationInfoGeoArea geoArea optional + } + type set of LocationInfo LocationInfoList; + + /** + * @desc Information of a geographical area + * @member latitude Latitude (DATUM = WGS84) -90 to 90 in decimal degree format DDD.ddd + * @member longitude Longitude (DATUM = WGS84)-180 to 180 in decimal degree format DDD.ddd + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.3-1: Attributes of the LocationInfo + */ + type record LocationInfoGeoArea { + Json.Number latitude, + Json.Number longitude + } + + /** + * @desc PLMN Identity + * @member mcc The Mobile Country Code part of PLMN Identity + * @member mnc The Mobile Network Code part of PLMN Identity + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.4-1: Attributes of the Plmn + */ + type record Plmn { + Json.String mcc, + Json.String mnc + } + + /** + * @desc E-UTRAN Cell Global Identifier + * @member plmn Public Land Mobile Network Identity + * @member cellId The E-UTRAN Cell Identity + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.5-1: Attributes of the Ecgi + */ + type record Ecgi { + Plmn plmn, + CellId cellId + } + + /** + * @desc E-UTRAN Cell Identity as a bit string (size (28)) + * @see ETSI TS 136 413 + */ + type record CellId { + Json.String cellId + } + + /** + * @desc FDD information + * @member ulEarfcn Uplink E-UTRA Absolute Radio Frequency Channel Number + * @member dlEarfcn Downlink E-UTRA Absolute Radio Frequency Channel Number + * @member ulTransmissionBandwidth Uplink Transmission Bandwidth + * @member dlTransmissionBandwidth Downlink Transmission Bandwidth + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.6-1: Attributes of the FddInfo + */ + type record FddInfo { + Earfcn ulEarfcn, + Earfcn dlEarfcn, + TransmissionBandwidth ulTransmissionBandwidth, + TransmissionBandwidth dlTransmissionBandwidth + } + + /** + * @desc E-UTRA Absolute Radio Frequency Channel Number, range (0... 65535) + * @see ETSI TS 136 413 + */ + type Json.UInt16 Earfcn; + + /** + * @desc Transmission Bandwidth, which is used to indicate the UL or DL transmission bandwidth expressed in units of resource blocks + * @see ETSI TS 136 413 + */ + type enumerated TransmissionBandwidth { + bw6 (1), + bw15 (2), + bw25 (3), + bw50 (4), + bw75 (6), + bw100 (7) + } with { + variant "JSON: as number" } /** * @desc TDD information * @member earfcn E-UTRA Absolute Radio Frequency Channel Number - * @member subframeAssignment Uplink-downlink subframe configuration information * @member transmissionBandwidth Transmission Bandwidth - * @see MEC030 Clause 6.5.7 Type: TddInfo + * @member subframeAssignment Uplink-downlink subframe configuration information + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.7-1: Attributes of the TddInfo */ type record TddInfo { Earfcn earfcn, - JSON.String subframeAssignment, - TransmissionBandwidth transmissionBandwidth + TransmissionBandwidth transmissionBandwidth, + Json.String subframeAssignment } /** - * @desc Neighbour cell information in a visiting PLMN that supports V2X communication over Uu MBMS + * @desc V2X Application Server address (consisting of IP address and UDP port) for unicast + * @member ipAddress + * @member udpPort + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.8-1: Attributes of the V2xApplicationServer + */ + type record V2xApplicationServer { + Json.String ipAddress, + Json.String udpPort + } + + /** + * @desc Neighbour cell information in a visiting PLMN that supports V2X communication over Uu unicast + * @member plmn Public Land Mobile Network Identity * @member ecgi E-UTRAN CelI Global Identifier - * @member fddInfo Information for FDD operation - * @member mbmsServiceAreaIdentity Supported MBMS Service Area Identities in the cell * @member pci Physical Cell Identifier - * @member plmn Public Land Mobile Network Identity + * @member fddInfo Information for FDD operation * @member tddInfo Information for TDD operation - * @see MEC030 Clause 6.5.11 Type: UuMbmsNeighbourCellInfo + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.9-1: Attributes of the UuUniNeighbourCellInfo */ - type record UuMbmsNeighbourCellInfo { - Ecgi ecgi, - FddInfo fddInfo, - MbmsServiceAreaIdentityList mbmsServiceAreaIdentity, - integer pci, - Plmn plmn, - TddInfo tddInfo + type record UuUniNeighbourCellInfo { + Plmn plmn, + Ecgi ecgi, + Json.Integer pci, + FddInfo fddInfo, + TddInfo tddInfo } - type record of JSON.String MbmsServiceAreaIdentityList; - type record of UuMbmsNeighbourCellInfo UuMbmsNeighbourCellInfoList; + type set of UuUniNeighbourCellInfo UuUniNeighbourCellInfoList; /** - * @desc The provisioning information per location - * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS + * @desc Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services + * @member tmgi Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services + * @member serviceAreaIdentifier A list of service area identifier for the applicable MBMS broadcast area + * @member sdpInfo SDP with IP multicast address and port number used for V2X communication via MBMS + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.10-1: Attributes of the V2xServerUsd */ - type record ProInfoUuMbms { - LocationInfo locationInfo, - UuMbmsNeighbourCellInfoList neighbourCellInfo optional, - V2xServerUsd v2xServerUsd + type record V2xServerUsd { + Tmgi tmgi, + ServiceAreaIdentifier serviceAreaIdentifier, + SdpInfo sdpInfo } - type record of ProInfoUuMbms ProInfoUuMbmsList; /** - * @desc Provisioning information required for V2X communication over Uu MBMS - * @member proInfoUuMbms The provisioning information per location as defined below - * @member timeStamp_ TimeStamp - * @see MEC030 Clause 6.2.3 Type: UuMbmsProvisioningInfo + * @desc Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services + * @member mbmsServiceId MBMS Service ID consisting of three octets + * @member mcc The Mobile Country Code part of PLMN Identity + * @member mnc The Mobile Network Code part of PLMN Identity + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.10-1: Attributes of the V2xServerUsd */ - type record UuMbmsProvisioningInfo { - ProInfoUuMbmsList proInfoUuMbms, - TimeStamp timeStamp optional + type record Tmgi { + Json.String mbmsServiceId, + Json.String mcc, + Json.String mnc } + type set of Json.String ServiceAreaIdentifier; + /** - * @desc Neighbour cell information in a visiting PLMN that supports V2X communication over Uu unicast + * @desc SDP with IP multicast address and port number used for V2X communication via MBMS + * @member ipMulticastAddress + * @member portNumber + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.10-1: Attributes of the V2xServerUsd + */ + type record SdpInfo { + Json.String ipMulticastAddress, + Json.String portNumber + } + type set of SdpInfo SdpInfoList; + + /** + * @desc Neighbour cell information in a visiting PLMN that supports V2X communication over Uu MBMS + * @member plmn Public Land Mobile Network Identity * @member ecgi E-UTRAN CelI Global Identifier - * @member fddInfo Information for FDD operation * @member pci Physical Cell Identifier - * @member plmn Public Land Mobile Network Identity + * @member fddInfo Information for FDD operation * @member tddInfo Information for TDD operation - * @see MEC030 Clause 6.5.9 Type: UuUniNeighbourCellInfo + * @member mbmsServiceAreaIdentity Supported MBMS Service Area Identities in the cell + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 6.5.11 Type: UuMbmsNeighbourCellInfo */ - type record UuUniNeighbourCellInfo { - Ecgi ecgi, - FddInfo fddInfo, - integer pci, - Plmn plmn, - TddInfo tddInfo + type record UuMbmsNeighbourCellInfo { + Plmn plmn, + Ecgi ecgi, + Json.Integer pci, + FddInfo fddInfo, + TddInfo tddInfo, + MbmsServiceAreaIdentityList mbmsServiceAreaIdentity } - type record of UuUniNeighbourCellInfo UuUniNeighbourCellInfoList; + type set of Json.String MbmsServiceAreaIdentityList; + type set of UuMbmsNeighbourCellInfo UuMbmsNeighbourCellInfoList; /** - * @desc The provisioning information per location as defined below - * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member neighbourCellInfoThe information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast - * @member v2xApplicationServer V2X Application Server address (consisting of IP address and UDP port) for unicast - * @see MEC030 Clause 6.2.2 Type: UuUnicastProvisioningInfo + * @desc Location information + * @member ecgi E-UTRAN CelI Global Identifier + * @member plmn Public Land Mobile Network Identity + * @member siV2xConfig V2X sidelink communication configuration, as defined in ETSI TS 136 331 + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.12-1: Attributes of the Pc5NeighbourCellInfo */ - type record ProInfoUuUnicast { - LocationInfo locationInfo, - V2xApplicationServer v2xApplicationServer, - UuUniNeighbourCellInfoList neighbourCellInfo optional + type record Pc5NeighbourCellInfo { + Plmn plmn, + Ecgi ecgi, + SystemInformationBlockType21 siV2xConfig } - type record of ProInfoUuUnicast ProInfoUuUnicastList; + type set of Pc5NeighbourCellInfo Pc5NeighbourCellInfoList; + + type Json.String SystemInformationBlockType21; // FIXME Not defined anywhere in ETSI GS MEC 030 V3.1.1 and previous versions /** - * @desc Provisioning information required for V2X communication over Uu unicast - * @member proInfoUuUnicast The provisioning information per location - * @member timeStamp_ Time stamp - * @see MEC030 Clause 6.2.2 Type: UuUnicastProvisioningInfo + * @desc This type represents a type of link + * @member self_ URI referring to a resource + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.13-1: Attributes of the LinkType */ - type record UuUnicastProvisioningInfo { - ProInfoUuUnicastList proInfoUuUnicast, - TimeStamp timeStamp optional + type record LinkType { + Json.AnyURI href } /** - * @desc V2X Application Server address (consisting of IP address and UDP port) for unicast - * @member ipAddress - * @member udpPort - * @see MEC030 Clause 6.5.8 Type: V2xApplicationServer + * @desc This type represents the properties that can be associated to a V2X message when it is published, or a notification in relation to the V2X message is issued + * @member stdOrganization Standardization organization which defines the published V2X + * @member msgType Published V2X message type. Its value is defined by the standardization organization indicated by the attribute stdOrganization + * @member msgProtocolVersion Protocol version of the V2X message (0..255) + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area to which the V2X message can be associated + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.14-1: Attributes of the V2xMsgPropertiesValues */ - type record V2xApplicationServer { - JSON.String ipAddress, - JSON.String udpPort + type record V2xMsgPropertiesValues { + StdOrganization stdOrganization, + MsgType msgType, + Json.Integer msgProtocolVersion, + LocationInfo locationInfo + } + + /** + * @desc Standardization organization which defines the published V2X message type + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.14-1: Attributes of the V2xMsgPropertiesValues + */ + type enumerated StdOrganization { + ETSI } /** * @desc Published V2X message type. Its value is defined by the standardization organization + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.14-1: Attributes of the V2xMsgPropertiesValues */ type enumerated MsgType { denm (1), @@ -508,133 +763,95 @@ module V2XInformationServiceAPI_TypesAndValues { map_ (5), ivi (6), ev_rsr(7) - } with { - variant "JSON: as number" + // } with { + // variant "JSON: as number" } - type record of MsgType MsgTypeList; + type set of MsgType MsgTypeList; /** - * @desc Standardization organization which defines the published V2X message type - */ - type enumerated StdOrganization { - ETSI - } - - /** - * @desc V2X message that a service consumer publishes to VIS - * @member msgContent Published V2X message content. Its format is defined by the standardization organization indicated by the attribute stdOrganization - * @member msgEncodeFormat The encode format of the V2X message, for example base64 + * @desc This type represents the filter criteria that can be used when performing a subscription to notification of V2X messages + * @member stdOrganization Standardization organization which defines the published V2X * @member msgType Published V2X message type. Its value is defined by the standardization organization indicated by the attribute stdOrganization - * @member stdOrganization Standardization organization which defines the published V2X message type - * @see MEC030 Clause 6.2.6 Type: V2xMsgPublication + * @member msgProtocolVersion Protocol version of the V2X message (0..255) + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area to which the V2X message can be associated + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.15-1: Attributes of the V2xMsgFilterCriteria */ - type record V2xMsgPublication { - JSON.String msgContent, - JSON.String msgEncodeFormat, - MsgType msgType, - StdOrganization stdOrganization + type record V2xMsgFilterCriteria { + StdOrganization stdOrganization, + MsgTypeList msgType optional, + MsgProtocolVersionList msgProtocolVersion optional, + LocationInfoList locationInfo optional } + type set of Json.Integer MsgProtocolVersionList; /** - * @desc List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response - * @member msgType Subscribed V2X message type. Its value is defined by the standardization organization indicated by the attribute stdOrganization - * @member stdOrganization Standardization organization which defines the published V2X message type - * @see MEC030 Clause 6.3.5 Type: V2xMsgSubscription + * @desc This type represents the information about a V2X Message Distribution Server that can be exchanged between a service consumer (e.g. a MEC application) and the VIS + * @member infoProtocol Specifics of the application layer protocol of V2X Message Distribution Server + * @member infoConnection Connection information of the V2X Message Distribution Server the service consumer can use for direct connection + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.16-1: Attributes of the V2xMsgDistributionServer */ - type record V2xMsgSubscriptionFilterCriteria { - MsgTypeList msgType optional, - StdOrganization stdOrganization - } - -/** - * @desc Subscription to notification of V2X message - * @member links Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed V2X message. This shall be included both in the request and in response - * @member expiryDeadline Time stamp - * @member filterCriteria List of filtering criteria for the subscription - * @member subscriptionType Shall be set to "V2xMsgSubscription" - * @see MEC030 Clause 6.3.5 Type: V2xMsgSubscription - */ - type record V2xMsgSubscription { - LinkType links optional, - JSON.AnyURI callbackReference, - TimeStamp expiryDeadline optional, - V2xMsgSubscriptionFilterCriteria filterCriteria, - JSON.String subscriptionType - } with { - variant (links) "name as '_links'"; + type record V2xMsgDistributionServer { + InfoProtocol infoProtocol, + InfoConnection infoConnection optional } + type set of V2xMsgDistributionServer V2xMsgDistributionServers; /** - * @desc Link to resources related to this notification - * @member subscription Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription - * @see MEC030 Clause 6.4.5 Type: V2xMsgNotification + * @desc Specifics of the application layer protocol of V2X Message Distribution Server + * @member msgProtocol Numerical value corresponding to the application layer protocol supported by the service consumer + * @member protImplementation Implementation specifics of application layer protocol, e.g. programming language + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.16-1: Attributes of the V2xMsgDistributionServer */ - type record V2xMsgNotificationLinks { - LinkType subscription + type record InfoProtocol { + MsgProtocols msgProtocol, + Json.String protImplementation } /** - * @desc Notification for informing the subscribers about the V2X message - * @member notificationType Shall be set to "V2xMsgNotification" - * @member timeStamp_ Time stamp - * @member stdOrganization Standardization organization which defines the published V2X message type ETSI: European Telecommunications Standards Institute - * @member msgType Published V2X message type. Its value is defined by the standardization organization - * @member msgEncodeFormat The encode format of the V2X message, for example base64 - * @member msgContent Published V2X message content. The format of the string is defined by the standardization organization - * @member links Link to resources related to this notification - * @see MEC030 Clause 6.4.5 Type: V2xMsgNotification + * @desc Numerical value corresponding to the application layer protocol supported by the service consumer + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.16-1: Attributes of the V2xMsgDistributionServer */ - type record V2xMsgNotification { - JSON.String notificationType, - TimeStamp timeStamp, - StdOrganization stdOrganization, - MsgType msgType, - JSON.String msgEncodeFormat, - JSON.String msgContent, - V2xMsgNotificationLinks links + type enumerated MsgProtocol { + MQTT_v3_1_0 (0), + MQTT_v3_1_1 (1), + MQTT_v5 (2), + MQTT_SN (3), + AMQP_1_0 (4) } with { - variant (links) "name as '_links'"; + variant "JSON: as number" } + type set of MsgProtocol MsgProtocols /** - * @desc SDP with IP multicast address and port number used for V2X communication via MBMS - * @member ipMulticastAddress - * @member portNumber - * @see MEC030 Clause 6.5.10 Type: V2xServerUsd + * @desc Connection information of the V2X Message Distribution Server the service consumer can use for direct connection + * @member ipAddress IP address of the V2X Message Distribution Server + * @member port_number Port number of the V2X Message Distribution Server + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.16-1: Attributes of the V2xMsgDistributionServer */ - type record SdpInfo { - JSON.String ipMulticastAddress, - JSON.String portNumber + type record InfoConnection { + Json.String ipAddress, + Json.UInt16 port_number } - type record of SdpInfo SdpInfoList; /** - * @desc Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services - * @member mbmsServiceId MBMS Service ID consisting of three octets - * @member mcc The Mobile Country Code part of PLMN Identity - * @member mnc The Mobile Network Code part of PLMN Identity - * @see MEC030 Clause 6.5.10 Type: V2xServerUsd + * @desc This type represents the filter criteria that can be used when performing a subscription to notification of QoS prediction messages + * @member streamId The predicted QoS at the related time and vehicular UE location is provided for a specific data stream. In case of 3GPP network, this is mapped to a QoS flow + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.17-1: Attributes of the QosPredFilterCriteria */ - type record Tmgi { - JSON.String mbmsServiceId, - JSON.String mcc, - JSON.String mnc + type record QosPredFilterCriteria { + Json.String streamId optional } /** - * @desc Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services - * @member serviceAreaIdentifier A list of service area identifier for the applicable MBMS broadcast area - * @member sdpInfo SDP with IP multicast address and port number used for V2X communication via MBMS - * @member tmgi Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services - * @see MEC030 Clause 6.5.10 Type: V2xServerUsd + * @desc This type represents configuration for the delivery of subscription notifications over Websockets + * @member websocketUri Set by location server to indicate to the service consumer the Websocket URI to be used for delivering notifications + * @member requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.18-1: Attributes of the WebsockNotifConfig */ - type record V2xServerUsd { - ServiceAreaIdentifier serviceAreaIdentifier, - SdpInfo sdpInfo, - Tmgi tmgi + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional } - type record of JSON.String ServiceAreaIdentifier; } with { encode "JSON" diff --git a/ttcn/LibMec/WlanInformationAPI/json/WlanInformationAPI.json b/ttcn/LibMec/WlanInformationAPI/json/WlanInformationAPI.json deleted file mode 100644 index 73fd3482425eaba9603887e6e282f8ff9b35dc9e..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/WlanInformationAPI/json/WlanInformationAPI.json +++ /dev/null @@ -1,2701 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "contact": { - "url": "https://forge.etsi.org/rep/mec/gs028-wai-api" - }, - "title": "ETSI GS MEC 028 - WLAN Access Information API", - "version": "2.1.1", - "description": "The ETSI MEC ISG MEC028 WLAN Access Information API described using OpenAPI", - "license": { - "name": "BSD-3-Clause", - "url": "https://forge.etsi.org/legal-matters" - } - }, - "externalDocs": { - "description": "ETSI MEC028 V2.1.1 WLAN Information API", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/028/02.01.01_60/gs_mec028v020101p.pdf" - }, - "servers": [ - { - "url": "https://localhost/wai/v2" - } - ], - "tags": [ - { - "name": "wai" - } - ], - "paths": { - "/queries/ap/ap_information": { - "get": { - "tags": [ - "wai" - ], - "summary": "Retrieve information on existing Access Points", - "description": "Queries information about existing WLAN Access Points", - "operationId": "apInfoGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.Filter" - }, - { - "$ref": "#/components/parameters/Query.AllFields" - }, - { - "$ref": "#/components/parameters/Query.Fields" - }, - { - "$ref": "#/components/parameters/Query.ExcludeFields" - }, - { - "$ref": "#/components/parameters/Query.ExcludeDefault" - } - ], - "responses": { - "200": { - "description": "Successful response to ap_info request", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApInfo" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - } - } - }, - "/queries/sta/sta_information": { - "get": { - "tags": [ - "wai" - ], - "summary": "Retrieve information on existing Stations", - "description": "Queries information about existing WLAN stations", - "operationId": "staInfoGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.Filter" - }, - { - "$ref": "#/components/parameters/Query.AllFields" - }, - { - "$ref": "#/components/parameters/Query.Fields" - }, - { - "$ref": "#/components/parameters/Query.ExcludeFields" - }, - { - "$ref": "#/components/parameters/Query.ExcludeDefault" - } - ], - "responses": { - "200": { - "description": "Successful response to sta_info request", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StaInfo" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - } - } - }, - "/subscriptions": { - "get": { - "tags": [ - "wai" - ], - "summary": "Retrieve information on subscriptions for notifications", - "description": "Queries information on subscriptions for notifications", - "operationId": "subscriptionLinkList_subscriptionsGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.SubscriptionType" - } - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors subscriptions.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubscriptionLinkList" - }, - "example": { - "_links": { - "self": { - "href": "http://meAppServer.example.com/wai/v2/subscriptions" - } - }, - "subscription": [ - { - "_links": { - "self": { - "href": "http://meAppServer.example.com/wai/v2/subscriptions/sub123" - } - }, - "callbackReference": "http://my.callback.com/wai/assocStaSubscription/some-id", - "subscriptionType": "AssocStaSubscription" - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - } - }, - "post": { - "tags": [ - "wai" - ], - "summary": "Create a new subscription", - "description": "Creates a new subscription to WLAN Access Information notifications", - "operationId": "subscriptionsPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineSubscription" - }, - "example": { - "subscriptionType": "AssocStaSubscription", - "callbackReference": "http://meAppClient.example.com/wai/v2/notifications/1", - "expiryDeadline": { - "seconds": 1977836800, - "nanoSeconds": 0 - }, - "apId": { - "macId": "005C0A0A0A0A", - "ssid": "myNetworkSsid", - "ipAddress": "10.10.100.1" - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineSubscription" - }, - "example": { - "subscriptionType": "AssocStaSubscription", - "callbackReference": "http://meAppClient.example.com/wai/v2/notifications/1", - "_links": { - "self": { - "href": "http://meAppServer.example.com/wai/v2/subscriptions/sub123" - } - }, - "expiryDeadline": { - "seconds": 1977836800, - "nanoSeconds": 0 - }, - "apId": { - "macId": "005C0A0A0A0A", - "ssid": "myNetworkSsid", - "ipAddress": "10.10.100.1" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "415": { - "$ref": "#/components/responses/415" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/callbackReference}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from WAIS, content based on subscription type", - "operationId": "notificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineNotification" - }, - "example": { - "notificationType": "AssocStaNotification", - "timeStamp": { - "seconds": 1977836800, - "nanoseconds": 0 - }, - "apId": { - "macId": "005C0A0A0A0A", - "ssid": "myNetworkSsid", - "ipAddress": "10.10.100.1" - }, - "staId": { - "macId": "005C01111111", - "ssid": [ - "myNetworkSsid", - "myOtherNetworkSsid" - ], - "aid": "1122", - "ipAddress": "10.10.1.255" - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - } - } - }, - "/subscriptions/{subscriptionId}": { - "get": { - "tags": [ - "wai" - ], - "summary": "Retrieve information on current specific subscription", - "description": "Queries information about an existing subscription, identified by its self-referring URI returned on creation (initial POST)", - "operationId": "subscriptionsGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineSubscription" - }, - "example": { - "subscriptionType": "AssocStaSubscription", - "callbackReference": "http://meAppClient.example.com/wai/v2/notifications/1", - "_links": { - "self": { - "href": "http://meAppServer.example.com/wai/v2/subscriptions/sub123" - } - }, - "expiryDeadline": { - "seconds": 1977836800, - "nanoSeconds": 0 - }, - "apId": { - "macId": "005C0A0A0A0A", - "ssid": "myNetworkSsid", - "ipAddress": "10.10.100.1" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - } - }, - "put": { - "tags": [ - "wai" - ], - "summary": "Modify an existing subscription", - "description": "Updates an existing subscription, identified by its self-referring URI returned on creation (initial POST)", - "operationId": "subscriptionsPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineSubscription" - }, - "example": { - "subscriptionType": "AssocStaSubscription", - "callbackReference": "http://meAppClient.example.com/wai/v2/notifications/1", - "_links": { - "self": { - "href": "http://meAppServer.example.com/wai/v2/subscriptions/sub123" - } - }, - "expiryDeadline": { - "seconds": 1977836800, - "nanoSeconds": 0 - }, - "apId": { - "macId": "005C0A0A0A0A", - "ssid": "myNetworkSsid", - "ipAddress": "10.10.100.1" - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription modification", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineSubscription" - }, - "example": { - "_links": { - "self": { - "href": "http://[hostIP]/sbox-xyz123/wai/v2/subscriptions/sub123" - } - }, - "callbackReference": "http://my.callback.com/wai/some-id", - "apId": { - "macId": "005C0A0A0A0A" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - } - }, - "delete": { - "tags": [ - "wai" - ], - "summary": "Cancel an existing subscription", - "description": "Cancels an existing subscription, identified by its self-referring URI returned on creation (initial POST)", - "operationId": "subscriptionsDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - } - } - } - }, - "components": { - "responses": { - "200": { - "description": "OK" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized : used when the client did not submit credentials.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden : operation is not allowed given the current status of the resource.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable : used to indicate that the server cannot provide the any of the content formats supported by the client.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type : used to indicate that the server or the client does not support the content type of the entity body.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity : used to indicate that the server understands the content type of the request entity and that the syntax of the request entity is correct but that the server is unable to process the contained instructions. This error condition can occur if an JSON request body is syntactically correct but semantically incorrect, for example if the target area for the request is considered too large. This error condition can also occur if the capabilities required by the request are not supported.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - }, - "example": { - "application/problem+json": { - "type": "https://meAppServer.example.com/wai/v2/probs/too-many targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - } - }, - "429": { - "description": "Too Many Requests : used when a rate limiter has triggered.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "parameters": { - "Path.subscrId": { - "name": "subscriptionId", - "in": "path", - "description": "Subscription Id, specifically the \"self\" returned in the subscription request", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - }, - "Query.Filter": { - "name": "filter", - "in": "query", - "description": "Attribute-based filtering expression according to clause 6.19 of ETSI GS MEC 009. .", - "required": false, - "schema": { - "type": "string" - } - }, - "Query.AllFields": { - "name": "all_fields", - "in": "query", - "description": "Include all complex attributes in the response. See clause 6.18 of ETSI GS MEC 009 for details.", - "required": false, - "schema": { - "type": "string" - } - }, - "Query.Fields": { - "name": "fields", - "in": "query", - "description": "Complex attributes to be included into the response. See clause 6.18 of ETSI GS MEC 009 for details.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.ExcludeFields": { - "name": "exclude_fields", - "in": "query", - "description": "Complex attributes to be excluded from the response. See clause 6.18 of ETSI GS MEC 009 for details.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.ExcludeDefault": { - "name": "exclude_default", - "in": "query", - "description": "Indicates to exclude the following complex attributes from the response. See clause 6.18 of ETSI GS MEC 009 for details. The following attributes shall be excluded from the structure in the response body if this parameter is provided, or none of the parameters \"all_fields\", \"fields\", \"exclude_fields\", \"exclude_default\" are provided: Not applicable", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.SubscriptionType": { - "name": "subscription_type", - "in": "query", - "description": "Filter on a specific subscription type. Permitted values: assoc_sta, sta_data_rate.", - "required": false, - "schema": { - "type": "string" - } - } - }, - "schemas": { - "ApAssociated": { - "properties": { - "assocId": { - "description": "Unique number which identifies a particular association between the station and Access Point.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "ipAddress": { - "description": "IPv4 or IPv6 address allocated for the Access Point.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "string" - }, - "macId": { - "description": "Unique identifier assigned to the Access Point (as network interface controller) for communications at the data link layer of a network segment.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "string" - }, - "ssid": { - "description": "Service Set Identifier to identify logical networks.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "macId" - ], - "type": "object", - "x-etsi-ref": "6.5.12" - }, - "ApIdentity": { - "properties": { - "ipAddress": { - "description": "IPv4 or IPv6 address allocated for the Access Point.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - }, - "macId": { - "description": "Unique Identifier assigned to an Access Point (as network interface controller) for communications at the data link layer of a network segment.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "ssid": { - "description": "Service Set Identifier to identify logical networks including Basic Service Set and Extended Service Set.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "macId" - ], - "type": "object", - "x-etsi-ref": "6.5.3" - }, - "ApInfo": { - "properties": { - "apId": { - "$ref": "#/components/schemas/ApIdentity" - }, - "apLocation": { - "$ref": "#/components/schemas/ApLocation" - }, - "apNeighbor": { - "$ref": "#/components/schemas/NeighborReport" - }, - "bssLoad": { - "$ref": "#/components/schemas/BssLoad" - }, - "channel": { - "description": "Channel configured for the Access Point.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "extBssLoad": { - "$ref": "#/components/schemas/ExtBssLoad" - }, - "timeStamp": { - "$ref": "#/components/schemas/TimeStamp" - }, - "wanMetrics": { - "$ref": "#/components/schemas/WanMetrics" - }, - "wlanCap": { - "$ref": "#/components/schemas/WlanCapabilities" - } - }, - "required": [ - "apId" - ], - "type": "object", - "x-etsi-ref": "6.2.2" - }, - "ApLocation": { - "properties": { - "civicLocation": { - "$ref": "#/components/schemas/CivicLocation" - }, - "geolocation": { - "$ref": "#/components/schemas/GeoLocation" - } - }, - "type": "object", - "x-etsi-ref": "6.5.9" - }, - "AssocStaNotification": { - "properties": { - "apId": { - "$ref": "#/components/schemas/ApIdentity" - }, - "notificationType": { - "description": "Shall be set to \"AssocStaNotification\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "staId": { - "description": "Identifier(s) to uniquely specify the client station(s) associated.", - "items": { - "$ref": "#/components/schemas/StaIdentity" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "StaIdentity" - }, - "timeStamp": { - "$ref": "#/components/schemas/TimeStamp" - } - }, - "required": [ - "notificationType", - "apId" - ], - "type": "object", - "x-etsi-ref": "6.4.2" - }, - "AssocStaSubscription": { - "properties": { - "_links": { - "description": "Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests.", - "properties": { - "self": { - "$ref": "#/components/schemas/LinkType" - } - }, - "required": [ - "self" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "apId": { - "$ref": "#/components/schemas/ApIdentity" - }, - "callbackReference": { - "description": "URI selected by the service consumer to receive notifications on the subscribed WLAN information. This shall be included both in the request and in response.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "URI" - }, - "expiryDeadline": { - "$ref": "#/components/schemas/TimeStamp" - }, - "subscriptionType": { - "description": "Shall be set to \"AssocStaSubscription\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "subscriptionType", - "callbackReference", - "apId" - ], - "type": "object", - "x-etsi-ref": "6.3.2" - }, - "AssociatedStations": { - "properties": { - "assocId": { - "description": "Unique number which identifies a particular association between an Access Point and a station.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "ipAddress": { - "description": "IPv4 or IPv6 address allocated for the station associated with the Access Point.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "string" - }, - "macId": { - "description": "Unique identifier assigned to a station (as network interface controller) for communications at the data link layer of a network segment.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "macId" - ], - "type": "object", - "x-etsi-ref": "6.5.5" - }, - "BeaconReport": { - "properties": { - "bssId": { - "description": "The BSSID field indicates the BSSID of the BSS(s) for which a beacon report has been received.", - "items": { - "type": "string" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "String" - }, - "channelId": { - "description": "Channel number where the beacon was received.", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "measurementId": { - "description": "Measurement ID of the Measurement configuration applied to this Beacon Report.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "reportingCondition": { - "description": "As in table T9-89 of IEEE 802.11-2012 [8].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "ssId": { - "description": "(Optional) The SSID subelement indicates the ESS(s) or IBSS(s) for which a beacon report is received.", - "items": { - "type": "string" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "String" - }, - "staId": { - "$ref": "#/components/schemas/StaIdentity" - } - }, - "required": [ - "staId", - "measurementId", - "channelId", - "bssId", - "ssId", - "reportingCondition" - ], - "type": "object", - "x-etsi-ref": "6.5.27" - }, - "BeaconRequestConfig": { - "properties": { - "bssId": { - "description": "The BSSID field indicates the BSSID of the BSS(s) for which a beacon report is requested. When requesting beacon reports for all BSSs on the channel, the BSSID field contains the wildcard BSSID.", - "items": { - "type": "string" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "String" - }, - "channelId": { - "description": "Channel number to scan. A Channel Number of 0 indicates a request to make iterative measurements for all supported channels in the Operating Class where the measurement is permitted on the channel and the channel is valid for the current regulatory domain. A Channel Number of 255 indicates a request to make iterative measurements for all supported channels in the current Operating Class listed in the latest AP Channel Report received from the serving AP.", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "measurementMode": { - "description": "0 for passive.\n1 for active.\n2 for beacon table.", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "reportingCondition": { - "description": "As in table T9-89 of IEEE 802.11-2012 [8].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "ssId": { - "description": "(Optional) The SSID subelement indicates the ESS(s) or IBSS(s) for which a beacon report is requested.", - "items": { - "type": "string" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "String" - }, - "staId": { - "$ref": "#/components/schemas/StaIdentity" - } - }, - "required": [ - "staId", - "channelId", - "measurementMode", - "bssId", - "ssId", - "reportingCondition" - ], - "type": "object", - "x-etsi-ref": "6.5.25" - }, - "BssLoad": { - "properties": { - "availAdmCap": { - "description": "Available Admission Capacity that specifies the remaining amount of medium time available via explicit admission control, in units of 32 s/s.", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint16" - }, - "channelUtilization": { - "description": "The percentage of time, linearly scaled with 255 representing 100 %, that the AP sensed the medium was busy, as indicated by either the physical or virtual Carrier Sense (CS) mechanism.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt8" - }, - "staCount": { - "description": "An unsigned integer that indicates the total number of STAs currently associated with this BSS.", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt16" - } - }, - "required": [ - "staCount", - "channelUtilization", - "availAdmCap" - ], - "type": "object", - "x-etsi-ref": "6.5.7" - }, - "ChannelLoadConfig": { - "properties": { - "apId": { - "$ref": "#/components/schemas/ApIdentity" - }, - "cChannelId": { - "description": "Channel number which load is reported", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "channelLoad": { - "description": "Channel load as per IEEE 802.11-2012 [8], section 11.11.9.3", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - } - }, - "required": [ - "apId", - "cChannelId", - "channelLoad" - ], - "type": "object", - "x-etsi-ref": "6.5.24" - }, - "CivicLocation": { - "properties": { - "ca0": { - "description": "Language", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca1": { - "description": "National subdivisions (state, canton, region,province, prefecture) ", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca128": { - "description": "Script", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca16": { - "description": "Leading street direction", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca17": { - "description": "Trailing street suffix", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca18": { - "description": "Street suffix or type", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca19": { - "description": "House number", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca2": { - "description": "County, parish, gun (JP), district (IN)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca20": { - "description": "House number suffix", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca21": { - "description": "Landmark of vanity address", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca22": { - "description": "Additional location information", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca23": { - "description": "Name (residence and office occupant)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca24": { - "description": "Postal/zip code", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca25": { - "description": "Building (structure)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca26": { - "description": "Unit (apartment/suite)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca27": { - "description": "Floor", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca28": { - "description": "Room", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca29": { - "description": "Type of place", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca3": { - "description": "City, township, shi (JP)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca30": { - "description": "Postal community name", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca31": { - "description": "Post office box", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca32": { - "description": "Additional code", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca33": { - "description": "Seat (desk.cubicle, workstation)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca34": { - "description": "Primary road name", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca35": { - "description": "Road section", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca36": { - "description": "Branch road name", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca37": { - "description": "Sub-branch road name", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca38": { - "description": "Street name pre-modifier", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca39": { - "description": "Street name post-modifier", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca4": { - "description": "City division, borough, city district, ward, chou (JP)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca5": { - "description": "Neighborhood, block", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca6": { - "description": "Group of streets below the neighborhood level ", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "country": { - "description": "The two-letter ISO 3166 [i.9] country code in capital ASCII letters, e.g. DE or US, as per ISO 3166 [i.9]", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "country" - ], - "type": "object", - "x-etsi-ref": "6.5.20" - }, - "DmgCapabilities": { - "properties": { - "ExtScMcsCap": { - "description": "Extended SC MCS capabilities as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dmgApOrPcpCapInfo": { - "description": "DMG AP or PCP capabilities information as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint16" - }, - "dmgStaBeamTrackTimeLimit": { - "description": "DMG station beam tracking time limit as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint16" - }, - "dmgStaCapInfo": { - "description": "DMG station capabilities information as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint64" - }, - "maxNrBasicAmsduSubframes": { - "description": "Number of basic A-MSDU subframes in A-MSDU as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "maxNrShortAmsduSubframes": { - "description": "Number of short A-MSDU subframes in A-MSDU as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "sarCap": { - "description": "SAR capabilities as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "tddCap": { - "description": "TDD capabilities as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint16" - } - }, - "required": [ - "dmgStaCapInfo", - "dmgApOrPcpCapInfo", - "dmgStaBeamTrackTimeLimit", - "ExtScMcsCap", - "maxNrBasicAmsduSubframes", - "maxNrShortAmsduSubframes", - "tddCap", - "sarCap" - ], - "type": "object", - "x-etsi-ref": "6.5.17" - }, - "EdmgCapabilities": { - "properties": { - "ampduParameters": { - "description": "A-MPDU parameters as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "reserved": { - "description": "", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "supportedMcs": { - "description": "Supported MCS as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "trnParameters": { - "description": "Training parameters as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint16" - } - }, - "required": [ - "ampduParameters", - "trnParameters", - "supportedMcs" - ], - "type": "object", - "x-etsi-ref": "6.5.18" - }, - "ExtBssLoad": { - "properties": { - "muMimoStaCount": { - "description": "Indicates the total number of STAs currently associated with this BSS that have a 1 in the MU Beamformee Capable field of their VHT Capabilities element.", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt16" - }, - "obsSec20MhzUtil": { - "description": "Observable loading on each of the secondary 20 MHz channel.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "obsSec40MhzUtil": { - "description": "Observable loading on each of the secondary 40 MHz channel.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "obsSec80MhzUtil": { - "description": "Observable loading on each of the secondary 80 MHz channel.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "spatStreamUnderUtil": { - "description": "The percentage of time, linearly scaled with 255 representing 100 %, that the AP has underutilized spatial domain resources for given busy time of the medium.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt8" - } - }, - "required": [ - "muMimoStaCount", - "spatStreamUnderUtil", - "obsSec20MhzUtil", - "obsSec40MhzUtil", - "obsSec80MhzUtil" - ], - "type": "object", - "x-etsi-ref": "6.5.8" - }, - "GeoLocation": { - "properties": { - "altitude": { - "description": "The altitude value of location as defined in IETF RFC 6225 [6]", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "altitudeType": { - "description": "The type description for altitude information e.g. floors or meters as defined in IETF RFC 6225 [6]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "altitudeUncertainty": { - "description": "The uncertainty for altitude information as defined in IETF RFC 6225 [6]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "datum": { - "description": "The datum value to express how coordinates are organized and related to real world as defined in IETF RFC 6225 [6]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "lat": { - "description": "The latitude value of location as defined in IETF RFC 6225 [6]", - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint64" - }, - "latUncertainty": { - "description": "The uncertainty for Latitude information as defined in IETF RFC 6225 [6]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "long": { - "description": "The longitude value of location as defined in IETF RFC 6225 [6]", - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint64" - }, - "longUncertainty": { - "description": "The uncertainty for Longitude information as defined in IETF RFC 6225 [6]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - } - }, - "required": [ - "latUncertainty", - "lat", - "longUncertainty", - "long", - "datum" - ], - "type": "object", - "x-etsi-ref": "6.5.19" - }, - "HeCapabilities": { - "properties": { - "heMacCapInfo": { - "description": "MAC capabilities of an Access Point.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "hePhyCapinfo": { - "description": "PHY capabilities of an Access Point.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "ppeThresholds": { - "description": "PPE Threshold determines the nominal packet padding value for a HE PPDU.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "not defined" - }, - "supportedHeMcsNssSet": { - "description": "Supported MCS and NSS Set.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - } - }, - "required": [ - "heMacCapInfo", - "hePhyCapinfo", - "supportedHeMcsNssSet" - ], - "type": "object", - "x-etsi-ref": "6.5.16" - }, - "HtCapabilities": { - "properties": { - "ampduParameters": { - "description": "A-MPDU parameters as defined in IEEE 802.11-2016 [8].", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt8" - }, - "aselCap": { - "description": "ASEL capabilities as defined in IEEE 802.11-2016 [8].", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt8" - }, - "htCapabilityInfo": { - "description": "HT Capability Information as defined in IEEE 802.11-2016 [8].", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt16" - }, - "htExtendedCap": { - "description": "Extended HT Capabilities as defined in IEEE 802.11-2016 [8].", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt16" - }, - "supportedMcsSet": { - "description": "Supported MCS set as defined in IEEE 802.11-2016 [8].", - "format": "uint128", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint128" - }, - "txBeamFormCap": { - "description": "Transmit Beamforming Capabilities as defined in IEEE 802.11-2016 [8].", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt32" - } - }, - "required": [ - "htCapabilityInfo", - "ampduParameters", - "supportedMcsSet", - "htExtendedCap", - "txBeamFormCap", - "aselCap" - ], - "type": "object", - "x-etsi-ref": "6.5.14" - }, - "InlineNotification": { - "oneOf": [ - { - "$ref": "#/components/schemas/AssocStaNotification" - }, - { - "$ref": "#/components/schemas/StaDataRateNotification" - } - ], - "discriminator": { - "propertyName": "notificationType" - } - }, - "InlineSubscription": { - "oneOf": [ - { - "$ref": "#/components/schemas/AssocStaSubscription" - }, - { - "$ref": "#/components/schemas/StaDataRateSubscription" - } - ], - "discriminator": { - "propertyName": "subscriptionType" - } - }, - "LinkType": { - "properties": { - "href": { - "description": "URI referring to a resource", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "href" - ], - "type": "object", - "x-etsi-ref": "6.5.23" - }, - "MeasurementConfig": { - "properties": { - "beaconRequest": { - "$ref": "#/components/schemas/BeaconRequestConfig" - }, - "channelLoad": { - "$ref": "#/components/schemas/ChannelLoadConfig" - }, - "measurementDuration": { - "description": "Duration of the measurement, shall be lower than Maximum Measurement Duration in TU as defined in section 11.11.4 of IEEE 802.11 [8].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "measurementId": { - "description": "Identifier of this measurement configuration.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "randomnInterval": { - "description": "Random interval to be used for starting the measurement. In units of TU as specifed in section 11.11.3 of IEEE 802.11 [8].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "staStatistics": { - "$ref": "#/components/schemas/StaStatisticsConfig" - } - }, - "required": [ - "measurementId", - "measurementDuration", - "randomnInterval" - ], - "type": "object", - "x-etsi-notes": "NOTE:\tThis element enables the configuration of the channelLoad, beaconRequest and staStatistics in a single resource data type, although only one of each measurement. Multiple measurement configurations of each kind are not allowed.", - "x-etsi-ref": "6.2.4" - }, - "NeighborReport": { - "properties": { - "bssid": { - "description": "BSS Id of the Access Point that is being reported.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "bssidInfo": { - "description": "Additional information related to Access Point that is being reported such as AP reachability, security, key scope, Mobility Domain, HT/VHT capability and Fine Time Measurements.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt32" - }, - "channel": { - "description": "The channel currently used by this Access Point.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "operatingClass": { - "description": "The channel set of the AP indicated by this BSSID.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "phyType": { - "description": "PHY type of the AP indicated by this BSSID. It is an integer value coded according to the value of the dot11PHYType.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - } - }, - "required": [ - "bssid", - "bssidInfo", - "operatingClass", - "channel", - "phyType" - ], - "type": "object", - "x-etsi-ref": "6.5.10" - }, - "ProblemDetails": { - "properties": { - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "instance": { - "description": "A URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "status": { - "description": "The HTTP status code for this occurrence of the problem", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "title": { - "description": "A short, human-readable summary of the problem type", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "type": { - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - } - }, - "type": "object" - }, - "Rssi": { - "properties": { - "rssi": { - "description": "The Received Signal Strength Indicator from a station", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - } - }, - "required": [ - "rssi" - ], - "type": "object", - "x-etsi-ref": "6.5.21" - }, - "StaDataRate": { - "properties": { - "staId": { - "$ref": "#/components/schemas/StaIdentity" - }, - "staLastDataDownlinkRate": { - "description": "The data transmit rate in kbps that was most recently used for transmission of data PPDUs from the access point to the station.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "staLastDataUplinkRate": { - "description": "The data transmit rate in Kbps that was most recently used for transmission of data PPDUs from the associated station to the access point.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "type": "object", - "x-etsi-ref": "6.5.22" - }, - "StaDataRateNotification": { - "properties": { - "notificationType": { - "description": "Shall be set to \"StaDataRateNotification\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "staDataRate": { - "description": "Data rates of a client station.", - "items": { - "$ref": "#/components/schemas/StaDataRate" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "StaDataRate" - }, - "timeStamp": { - "$ref": "#/components/schemas/TimeStamp" - } - }, - "required": [ - "notificationType" - ], - "type": "object", - "x-etsi-ref": "6.4.3" - }, - "StaDataRateSubscription": { - "properties": { - "_links": { - "description": "Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests.", - "properties": { - "self": { - "$ref": "#/components/schemas/LinkType" - } - }, - "required": [ - "self" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "callbackReference": { - "description": "URI selected by the service consumer to receive notifications on the subscribed WLAN Access Information Service. This shall be included both in the request and in response.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "URI" - }, - "expiryDeadline": { - "$ref": "#/components/schemas/TimeStamp" - }, - "staId": { - "description": "Identifier(s) to uniquely specify the target client station(s) for the subscription", - "items": { - "$ref": "#/components/schemas/StaIdentity" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "StaIdentity" - }, - "subscriptionType": { - "description": "Shall be set to \"StaDataRateSubscription\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "subscriptionType", - "callbackReference", - "staId" - ], - "type": "object", - "x-etsi-ref": "6.3.3" - }, - "StaIdentity": { - "properties": { - "aid": { - "description": "Number which identifies a particular association between a station and an Access Point ", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ipAddress": { - "description": "IPv4 or IPv6 address allocated for the station.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - }, - "macId": { - "description": "Unique identifier assigned to station (as network interface controller) for communications at the data link layer of a network segment.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "ssid": { - "description": "Service Set Identifier to identify logical networks.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "macId" - ], - "type": "object", - "x-etsi-ref": "6.5.11" - }, - "StaInfo": { - "properties": { - "apAssociated": { - "$ref": "#/components/schemas/ApAssociated" - }, - "beaconReport": { - "$ref": "#/components/schemas/BeaconReport" - }, - "channel": { - "description": "Channel currently used by the station.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "rssi": { - "$ref": "#/components/schemas/Rssi" - }, - "staDataRate": { - "$ref": "#/components/schemas/StaDataRate" - }, - "staId": { - "$ref": "#/components/schemas/StaIdentity" - }, - "staStatistics": { - "$ref": "#/components/schemas/StaStatistics" - }, - "timeStamp": { - "$ref": "#/components/schemas/TimeStamp" - } - }, - "required": [ - "staId" - ], - "type": "object", - "x-etsi-ref": "6.2.3" - }, - "StaStatistics": { - "properties": { - "groupIdentity": { - "description": "Indicates the requested statistics group describing the Statistics Group Data according to table 9-114 of IEEE 802.11-2016 [8].", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt8" - }, - "md": { - "description": "Measurement Duration.", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt16" - }, - "statisticsGroupData": { - "$ref": "#/components/schemas/StatisticsGroupData", - "description": "Statistics Group Data as defined in Annex C of IEEE 802.112016 [8].", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "not specified" - } - }, - "required": [ - "md", - "groupIdentity", - "statisticsGroupData" - ], - "type": "object", - "x-etsi-ref": "6.5.13" - }, - "StaStatisticsConfig": { - "properties": { - "groupIdentity": { - "description": "As per table T 9-114 of IEEE 802.11-2012 [8].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "staId": { - "$ref": "#/components/schemas/StaIdentity" - }, - "triggerCondition": { - "type": "integer" - }, - "triggerTimeout": { - "description": "The Trigger Timeout field contains a value in units of 100 TUs during which a measuring STA does not generate further triggered STA Statistics Reports after a trigger condition has been met.", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "triggeredReport": { - "type": "boolean" - } - }, - "required": [ - "staId", - "groupIdentity", - "triggeredReport", - "triggerTimeout", - "triggerCondition" - ], - "type": "object", - "x-etsi-ref": "6.5.26" - }, - "StatisticsGroupData": { - "properties": { - "dot11AMPDUDelimiterCRCErrorCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11AMPDUReceivedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11AMSDUAckFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11AckFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11BeamformingFrameCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11ChannelWidthSwitchCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11DualCTSFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11DualCTSSuccessCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11ExplicitBARFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11FCSErrorCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11FailedAMSDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11FailedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11FortyMHzFrameReceivedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11FortyMHzFrameTransmittedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11FrameDuplicateCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11GrantedRDGUnusedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11GrantedRDGUsedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11GroupReceivedFrameCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11GroupTransmittedFrameCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11ImplicitBARFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11MPDUInReceivedAMPDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11MultipleRetryAMSDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11MultipleRetryCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11PSMPUTTGrantDuration": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11PSMPUTTUsedDuration": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosAckFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosDiscardedFrameCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosFailedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosFrameDuplicateCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosMPDUsReceivedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosMultipleRetryCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosRTSFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosRTSSuccessCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosReceivedFragmentCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosRetriesReceivedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosRetryCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosTransmittedFragmentCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosTransmittedFrameCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsBIPMICErrors": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsCCMPDecryptErrors": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsCCMPReplays": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsCMACReplays": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsRobustMgmtCCMPReplays": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsTKIPICVErrors": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsTKIPReplays": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RTSFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RTSLSIGFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RTSLSIGSuccessCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RTSSuccessCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11ReceivedAMSDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11ReceivedFragmentCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11ReceivedOctetsInAMPDUCount": { - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint64" - }, - "dot11ReceivedOctetsInAMSDUCount": { - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint64" - }, - "dot11RetryAMSDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RetryCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11STAStatisticsAPAverageAccessDelay": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STAStatisticsAverageAccessDelayBackGround": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STAStatisticsAverageAccessDelayBestEffort": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STAStatisticsAverageAccessDelayVideo": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STAStatisticsAverageAccessDelayVoice": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STAStatisticsChannelUtilization": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STAStatisticsStationCount": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STBCCTSFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11STBCCTSSuccessCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedAMPDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedAMSDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedFragmentCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedFrameCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedFramesInGrantedRDGCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedMPDUsInAMPDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedOctetsInAMPDUCount": { - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint64" - }, - "dot11TransmittedOctetsInAMSDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedOctetsInGrantedRDGCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TwentyMHzFrameReceivedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TwentyMHzFrameTransmittedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11nonSTBCCTSFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11nonSTBCCTSSuccessCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "type": "object" - }, - "SubscriptionLinkList": { - "properties": { - "_links": { - "description": "Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests.", - "properties": { - "self": { - "$ref": "#/components/schemas/LinkType" - } - }, - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "assocStaSubscription": { - "items": { - "$ref": "#/components/schemas/AssocStaSubscription" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "AssocStaSubscription" - }, - "staDataRateSubscription": { - "items": { - "$ref": "#/components/schemas/StaDataRateSubscription" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "StaDataRateSubscription" - } - }, - "required": [ - "_links" - ], - "type": "object" - }, - "TimeStamp": { - "properties": { - "nanoSeconds": { - "description": "The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "seconds": { - "description": "The seconds part of the time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "required": [ - "seconds", - "nanoSeconds" - ], - "type": "object", - "x-etsi-ref": "6.5.2" - }, - "VhtCapabilities": { - "properties": { - "vhtCapInfo": { - "description": "VHT capabilities Info as defined in IEEE 802.11-2016 [8].", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt32" - }, - "vhtMcsNss": { - "description": "Supported VHT-MCS and NSS Set as defined in IEEE 802.11-2016 [8].", - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt64" - } - }, - "required": [ - "vhtCapInfo", - "vhtMcsNss" - ], - "type": "object", - "x-etsi-ref": "6.5.15" - }, - "WanMetrics": { - "properties": { - "downlinkLoad": { - "description": "1-octet positive integer representing the current percentage loading of the downlink WAN connection, scaled linearly with 255 representing 100 %, as measured over an interval the duration of which is reported in Load Measurement Duration. In cases where the downlink load is unknown to the AP, the value is set to zero.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt8" - }, - "downlinkSpeed": { - "description": "4-octet positive integer whose value is an estimate of the WAN Backhaul link current downlink speed in kilobits per second.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "lmd": { - "description": "The LMD (Load Measurement Duration) field is a 2-octet positive integer representing the duration over which the Downlink Load and Uplink Load have been measured, in tenths of a second. When the actual load measurement duration is greater than the maximum value, the maximum value will be reported. The value of the LMD field is set to 0 when neither the uplink nor downlink load can be computed. When the uplink and downlink loads are computed over different intervals, the maximum interval is reported.", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint16" - }, - "uplinkLoad": { - "description": "1-octet positive integer representing the current percentage loading of the uplink WAN connection, scaled linearly with 255 representing 100 %, as measured over an interval, the duration of which is reported in Load Measurement Duration. In cases where the uplink load is unknown to the AP, the value is set to zero.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "uplinkSpeed": { - "description": "4-octet positive integer whose value is an estimate of the WAN Backhaul link's current uplink speed in kilobits per second.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt32" - }, - "wanInfo": { - "description": "Info about WAN link status, link symmetricity and capacity currently used.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - } - }, - "required": [ - "wanInfo", - "downlinkSpeed", - "uplinkSpeed", - "downlinkLoad", - "uplinkLoad", - "lmd" - ], - "type": "object", - "x-etsi-ref": "6.5.6" - }, - "WlanCapabilities": { - "properties": { - "dmg": { - "$ref": "#/components/schemas/DmgCapabilities" - }, - "edmg": { - "$ref": "#/components/schemas/EdmgCapabilities" - }, - "he": { - "$ref": "#/components/schemas/HeCapabilities" - }, - "ht": { - "$ref": "#/components/schemas/HtCapabilities" - }, - "vht": { - "$ref": "#/components/schemas/VhtCapabilities" - } - }, - "type": "object", - "x-etsi-ref": "6.5.4" - } - } - } -} diff --git a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn index edc53f6d96722b8b92d71b35bb72ad2d3067961c..d80e08d6a50c86d6c502c0e2d7ca4234e65352b6 100644 --- a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn +++ b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn @@ -11,7 +11,7 @@ module WlanInformationAPI_Functions { // JSON - import from JSON all; + import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; @@ -20,11 +20,11 @@ module WlanInformationAPI_Functions { import from LibCommon_Sync all; // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_Functions all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_TestSystem all; + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; // LibMec/WlanInformationAPI import from WlanInformationAPI_TypesAndValues all; @@ -38,7 +38,8 @@ module WlanInformationAPI_Functions { import from LibMec_Pixits all; function f_create_assoc_sta_subscription( - out AssocStaSubscription p_assoc_sta_subscription + out AssocStaSubscription p_assoc_sta_subscription, + out Json.String p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -47,7 +48,7 @@ module WlanInformationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions", + PICS_ROOT_API & PX_ME_WLAN_URI_SUB, v_headers, m_http_message_body_json( m_body_json_assoc_sta_subscription( @@ -61,7 +62,7 @@ module WlanInformationAPI_Functions { -, m_time_stamp( f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds - ))))))); + ))))))); tc_ac.start; alt { @@ -72,14 +73,23 @@ module WlanInformationAPI_Functions { mw_body_json_assoc_sta_subscription( mw_assoc_sta_subscription( PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, - -, - -, -, + -, -, -, ? - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_WLAN_URI_SUB & "/(?*)", + 0 + ); p_assoc_sta_subscription := v_response.response.body.json_body.assocStaSubscription; log("f_create_assoc_sta_subscription: INFO: IUT successfully responds to the subscription: ", p_assoc_sta_subscription); + log("f_create_assoc_sta_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_assoc_sta_subscription: INCONC: Expected message not received"); @@ -89,29 +99,25 @@ module WlanInformationAPI_Functions { } // End of function "f_create_assoc_sta_subscription function f_delete_assoc_sta_subscription( - in AssocStaSubscription p_assoc_sta_subscription + in Json.String p_subscription_id ) runs on HttpComponent { var Headers v_headers; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_assoc_sta_subscription.links.self_.href)), - "?+(" & PX_ME_WLAN_URI & "?*)", - 0 - ); + f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & v_uri, + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & oct2char(unichar2oct(p_subscription_id, "UTF-8")), v_headers - ))); + ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { @@ -122,7 +128,8 @@ module WlanInformationAPI_Functions { } // End of function f_delete_assoc_sta_subscription function f_create_measurement_config( - out MeasurementConfig p_measurement_config + out MeasurementConfig p_measurement_config, + out Json.String p_measurement_config_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -131,7 +138,7 @@ module WlanInformationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements", + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS, v_headers, m_http_message_body_json( m_body_json_wlan_measurement_config( @@ -140,14 +147,14 @@ module WlanInformationAPI_Functions { { m_sta_identity( PX_MAC_ID, - PX_SSID, + { PX_SSID }, -, - PX_IP_ADDRESS + { PX_IP_ADDRESS } ) }, PX_MEASUREMENT_ID, m_measurement_info(1000, 10) - )))))); + )))))); tc_ac.start; alt { @@ -158,11 +165,17 @@ module WlanInformationAPI_Functions { mw_body_json_wlan_measurement_config( mw_measurement_config( ? - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; p_measurement_config := v_response.response.body.json_body.measurementConfig; + p_measurement_config_id := regexp( + oct2char(unichar2oct(p_measurement_config.links.self_.href)), + "?+" & PX_ME_WLAN_URI_MEAS & "/" & "(?*)", + 0 + ); log("f_create_measurement_config: INFO: IUT successfully responds to the subscription: ", p_measurement_config); + log("f_create_measurement_config: INFO: p_measurement_config_id = ", p_measurement_config_id); } [] tc_ac.timeout { log("f_create_measurement_config: INCONC: Expected message not received"); @@ -172,30 +185,24 @@ module WlanInformationAPI_Functions { } // End of function "f_create_measurement_config function f_delete_measurement_config( - in MeasurementConfig p_measurement_config + in Json.String p_measurement_config_id ) runs on HttpComponent { var Headers v_headers; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_measurement_config.links.self_.href)), - "?+(" & PX_ME_WLAN_URI & "?*)", - 0 - ); - log("====> v_uri: ", v_uri); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & v_uri, + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & oct2char(unichar2oct(p_measurement_config_id, "UTF-8")), v_headers - ))); + ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { diff --git a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Pixits.ttcn b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Pixits.ttcn index 7f6d43adceef5dd71526c2ab75fd00b660e1e0a3..0c60f093bb4f64a1db5b4b8ee18071647d159e03 100644 --- a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Pixits.ttcn +++ b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Pixits.ttcn @@ -1,20 +1,24 @@ module WlanInformationAPI_Pixits { // JSON - import from JSON all; + import from Json all; modulepar charstring PX_WLAN_FILTER_FIELD := "ap/macId"; - modulepar charstring PX_WLAN_FILTER_VALUE := "005C06060606"; + modulepar charstring PX_WLAN_FILTER_VALUE := "005C0A0A0002"; - modulepar JSON.String PX_MAC_ID := "005C06060606"; + modulepar Json.String PX_MAC_ID := "005C07070707"; - modulepar JSON.AnyURI PX_ASSOC_STA_SUBSCRIPTION_CALLBACK := "https://127.0.0.1/wai/v1/assoc_notif"; + modulepar charstring PX_LATITUDE := "361447414"; - modulepar JSON.String PX_SSID := "WLAN_SSID"; + modulepar charstring PX_LONGITUDE := "59145544"; - modulepar JSON.String PX_IP_ADDRESS := "10.10.10.10"; + modulepar Json.AnyURI PX_ASSOC_STA_SUBSCRIPTION_CALLBACK := "https://127.0.0.1/wai/v1/assoc_notif"; - modulepar JSON.String PX_MEASUREMENT_ID := "1"; + modulepar Json.String PX_SSID := "WLAN_SSID"; + + modulepar Json.String PX_IP_ADDRESS := "10.10.10.10"; + + modulepar Json.String PX_MEASUREMENT_ID := "1"; } // End of module WlanInformationAPI_Pixits diff --git a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn index feea0687a4fefc338b8f31a7ea9f96ae5128206c..959a32627130936929d4e15d17fda32ae8a25b1e 100644 --- a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn +++ b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn @@ -1,31 +1,18 @@ module WlanInformationAPI_Templates { // JSON - import from JSON all; + import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; + // LibMec/WlanInformationAPI import from WlanInformationAPI_TypesAndValues all; import from WlanInformationAPI_Pixits all; - template (value) TimeStamp m_time_stamp( - in Seconds p_seconds, - in NanoSeconds p_nanoSeconds := 0 - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of template m_time_stamp - - template (present) TimeStamp mw_time_stamp( - template (present) Seconds p_seconds := ?, - template (present) NanoSeconds p_nanoSeconds := ? - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of template mw_time_stamp - template (omit) ApInfo m_ap_info( in template (value) ApIdentity p_apId, in template (omit) UInt32 p_channel := omit, @@ -119,12 +106,12 @@ module WlanInformationAPI_Templates { } // End of template mw_sta_info template (omit) AssocStaSubscription m_assoc_sta_subscription( - in template (value) JSON.AnyURI p_callbackReference, + in template (value) Json.AnyURI p_callbackReference, in template (value) ApIdentity p_apId, - in template (omit) JSON.Bool p_requestTestNotification := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, - in template (omit) LinkTypes p_links := omit, - in template (omit) UInt8 p_notificationPeriod := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.UInt8 p_notificationPeriod := omit, in template (omit) NotificationEvent p_notificationEvent := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { @@ -140,12 +127,12 @@ module WlanInformationAPI_Templates { } // End of template m_assoc_sta_subscription template (omit) AssocStaSubscription m_assoc_sta_subscription_invalid( - in template (value) JSON.AnyURI p_callbackReference, + in template (value) Json.AnyURI p_callbackReference, in template (value) ApIdentity p_apId, - in template (omit) JSON.Bool p_requestTestNotification := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, - in template (omit) LinkTypes p_links := omit, - in template (omit) UInt8 p_notificationPeriod := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.UInt8 p_notificationPeriod := omit, in template (omit) NotificationEvent p_notificationEvent := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { @@ -161,12 +148,12 @@ module WlanInformationAPI_Templates { } // End of template m_assoc_sta_subscription_invalid template (present) AssocStaSubscription mw_assoc_sta_subscription( - template (present) JSON.AnyURI p_callbackReference := ?, + template (present) Json.AnyURI p_callbackReference := ?, template (present) ApIdentity p_apId := ?, - template JSON.Bool p_requestTestNotification := *, + template Json.Bool p_requestTestNotification := *, template WebsockNotifConfig p_websockNotifConfig := *, - template LinkTypes p_links := *, - template UInt8 p_notificationPeriod := *, + template Links p_links := *, + template Json.UInt8 p_notificationPeriod := *, template NotificationEvent p_notificationEvent := *, template TimeStamp p_expiryDeadline := * ) := { @@ -182,13 +169,13 @@ module WlanInformationAPI_Templates { } // End of template mw_assoc_sta_subscription template (omit) StaDataRateSubscription m_sta_data_rate_subscription( - in template (value) JSON.AnyURI p_callbackReference, - in template (value) StaIdentities p_staId, - in template (omit) JSON.Bool p_requestTestNotification := omit, + in template (value) Json.AnyURI p_callbackReference, + in template (value) StaIdentityList p_staId, + in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, - in template (omit) LinkTypes p_links := omit, - in template (omit) UInt8 p_notificationPeriod := omit, - in template (omit) NotificationEvent p_notificationEvent := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.UInt8 p_notificationPeriod := omit, + in template (omit) NotificationEvent_StaDataRateSubscription p_notificationEvent := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { subscriptionType := "StaDataRateSubscription", @@ -203,13 +190,13 @@ module WlanInformationAPI_Templates { } // End of template m_sta_data_rate_subscription template (omit) StaDataRateSubscription m_sta_data_rate_subscription_invalid( - in template (value) JSON.AnyURI p_callbackReference, - in template (value) StaIdentities p_staId, - in template (omit) JSON.Bool p_requestTestNotification := omit, + in template (value) Json.AnyURI p_callbackReference, + in template (value) StaIdentityList p_staId, + in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, - in template (omit) LinkTypes p_links := omit, - in template (omit) UInt8 p_notificationPeriod := omit, - in template (omit) NotificationEvent p_notificationEvent := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.UInt8 p_notificationPeriod := omit, + in template (omit) NotificationEvent_StaDataRateSubscription p_notificationEvent := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { subscriptionType := "InvalidStaDataRateSubscription", @@ -224,13 +211,13 @@ module WlanInformationAPI_Templates { } // End of template m_sta_data_rate_subscription_invalid template (present) StaDataRateSubscription mw_sta_data_rate_subscription( - template (present) JSON.AnyURI p_callbackReference := ?, - template (present) StaIdentities p_staId := ?, - template JSON.Bool p_requestTestNotification := *, + template (present) Json.AnyURI p_callbackReference := ?, + template (present) StaIdentityList p_staId := ?, + template Json.Bool p_requestTestNotification := *, template WebsockNotifConfig p_websockNotifConfig := *, - template LinkTypes p_links := *, - template UInt8 p_notificationPeriod := *, - template NotificationEvent p_notificationEvent := *, + template Links p_links := *, + template Json.UInt8 p_notificationPeriod := *, + template NotificationEvent_StaDataRateSubscription p_notificationEvent := *, template TimeStamp p_expiryDeadline := * ) := { subscriptionType := "StaDataRateSubscription", @@ -244,11 +231,53 @@ module WlanInformationAPI_Templates { expiryDeadline := p_expiryDeadline } // End of template mw_sta_data_rate_subscription + + + template (omit) AssocStaNotification m_assoc_sta_notification( + in template (value) ApIdentity p_apId, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) StaIdentityList p_staId := omit + ) := { + notificationType := "AssocStaNotification", + timeStamp := p_timeStamp, + apId := p_apId, + staId := p_staId + } // End of template m_assoc_sta_notification + + template (present) AssocStaNotification mw_assoc_sta_notification( + template (present) ApIdentity p_apId := ?, + template TimeStamp p_timeStamp := *, + template StaIdentityList p_staId := * + ) := { + notificationType := "AssocStaNotification", + timeStamp := p_timeStamp, + apId := p_apId, + staId := p_staId + } // End of template mw_assoc_sta_notification + + template (omit) StaDataRateNotification m_sta_data_rate_notification( + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) StaDataRateList p_staDataRate := omit + ) := { + notificationType := "AssocStaDatarateNotification", + timeStamp := p_timeStamp, + staDataRate := p_staDataRate + } // End of template m_sta_data_rate_notification + + template (present) StaDataRateNotification mw_sta_data_rate_notification( + template TimeStamp p_timeStamp := *, + template StaDataRateList p_staDataRate := * + ) := { + notificationType := "AssocStaDatarateNotification", + timeStamp := p_timeStamp, + staDataRate := p_staDataRate + } // End of template mw_sta_data_rate_notification + template (omit) StaIdentity m_sta_identity( - in JSON.String p_macId, - in template (omit) JSON.String p_ssid := omit, - in template (omit) JSON.String p_aid := omit, - in template (omit) JSON.String p_ipAddress := omit + in Json.String p_macId, + in template (omit) SsidList p_ssid := omit, + in template (omit) Json.String p_aid := omit, + in template (omit) IpAddressList p_ipAddress := omit ) := { macId := p_macId, ssid := p_ssid, @@ -257,10 +286,10 @@ module WlanInformationAPI_Templates { } // End of template m_sta_identity template (present) StaIdentity mw_sta_identity( - template (present) JSON.String p_macId := ?, - template JSON.String p_ssid := *, - template JSON.String p_aid := *, - template JSON.String p_ipAddress := * + template (present) Json.String p_macId := ?, + template SsidList p_ssid := *, + template Json.String p_aid := *, + template IpAddressList p_ipAddress := * ) := { macId := p_macId, ssid := p_ssid, @@ -269,7 +298,7 @@ module WlanInformationAPI_Templates { } // End of template mw_sta_identity template (omit) SubscriptionLinkList m_subscription_link_list( - in template (value) LinkTypes p_links, + in template (value) Links p_links, in template (omit) Subscription p_subscription := omit ) := { links := p_links, @@ -277,15 +306,31 @@ module WlanInformationAPI_Templates { } // End of template m_subscription_link_list template (present) SubscriptionLinkList mw_subscription_link_list( - template (present) LinkTypes p_links := ?, + template (present) Links p_links := ?, template Subscription p_subscription := * ) := { links := p_links, subscription := p_subscription } // End of template mw_subscription_link_list + template (value) Subscription_ m_subscription( + in Json.AnyURI p_href, + in Json.String p_subscriptionType + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template m_subscription + + template (present) Subscription_ mw_subscription( + template (present) Json.AnyURI p_href := ?, + template (present) Json.String p_subscriptionType := ? + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template mw_subscription + template (omit) ApIdentity m_ap_identity( - in JSON.String p_bssid, + in Json.String p_bssid, in template (omit) SsidList p_ssid := omit, in template (omit) IpAddressList p_ipAddress := omit ) := { @@ -295,7 +340,7 @@ module WlanInformationAPI_Templates { } // End of template m_ap_identity template (present) ApIdentity mw_ap_identity( - template (present) JSON.String p_bssid := ?, + template (present) Json.String p_bssid := ?, template SsidList p_ssid := *, template IpAddressList p_ipAddress := * ) := { @@ -305,7 +350,7 @@ module WlanInformationAPI_Templates { } // End of template mw_ap_identity template (omit) MeasurementConfigLinkList m_measurement_config_list( - in template (omit) LinkTypes p_links := omit, + in template (omit) Links p_links := omit, in template (value) MeasurementConfig_MeasurementConfigLinkList p_measurementConfig ) := { links := p_links, @@ -313,7 +358,7 @@ module WlanInformationAPI_Templates { } // End of template m_measurement_config_list template (present) MeasurementConfigLinkList mw_measurement_config_list( - template LinkTypes p_links := *, + template Links p_links := *, template (present) MeasurementConfig_MeasurementConfigLinkList p_measurementConfig := ? ) := { links := p_links, @@ -321,25 +366,25 @@ module WlanInformationAPI_Templates { } // End of template mw_measurement_config_list template (value) MeasurementConfig_MeasurementConfigLinkList m_measurement_config_link_list( - in JSON.AnyURI p_href, - in JSON.String p_measurementId + in Json.AnyURI p_href, + in Json.String p_measurementId ) := { href := p_href, measurementId := p_measurementId } // End of template m_measurement_config_link_list template (present) MeasurementConfig_MeasurementConfigLinkList mw_measurement_config_link_list( - template (present) JSON.AnyURI p_href := ?, - template (present) JSON.String p_measurementId := ? + template (present) Json.AnyURI p_href := ?, + template (present) Json.String p_measurementId := ? ) := { href := p_href, measurementId := p_measurementId } // End of template mw_measurement_config_link_list template (omit) MeasurementConfig m_measurement_config( - in template (omit) LinkTypes p_links := omit, - in template (value) StaIdentities p_staId, - in JSON.String p_measurementId, + in template (omit) Links p_links := omit, + in template (value) StaIdentityList p_staId, + in Json.String p_measurementId, in template (value) MeasurementInfo p_measurementInfo ) := { links := p_links, @@ -349,9 +394,9 @@ module WlanInformationAPI_Templates { } // End of template m_measurement_config template (present) MeasurementConfig mw_measurement_config( - template LinkTypes p_links := *, - template (present) StaIdentities p_staId := ?, - template (present) JSON.String p_measurementId := ?, + template Links p_links := *, + template (present) StaIdentityList p_staId := ?, + template (present) Json.String p_measurementId := ?, template (present) MeasurementInfo p_measurementInfo := ? ) := { links := p_links, @@ -361,8 +406,8 @@ module WlanInformationAPI_Templates { } // End of template mw_measurement_config template (omit) MeasurementInfo m_measurement_info( - in template (omit) UInt16 p_measurementDuration := omit, - in template (omit) UInt16 p_randomInterval:= omit, + in template (omit) Json.UInt16 p_measurementDuration := omit, + in template (omit) Json.UInt16 p_randomInterval:= omit, in template (omit) ChannelLoadConfig p_channelLoadConf := omit, in template (omit) BeaconRequestConfig p_beaconRequestConf := omit, in template (omit) StaStatisticsConfig p_staStatisticsConf := omit, @@ -377,8 +422,8 @@ module WlanInformationAPI_Templates { } // End of template m_measurement_info template MeasurementInfo mw_measurement_info( - template UInt16 p_measurementDuration := *, - template UInt16 p_randomInterval:= *, + template Json.UInt16 p_measurementDuration := *, + template Json.UInt16 p_randomInterval:= *, template ChannelLoadConfig p_channelLoadConf := *, template BeaconRequestConfig p_beaconRequestConf := *, template StaStatisticsConfig p_staStatisticsConf := *, diff --git a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn index 4ca5adbec19fa2651b81b74144e9287306acd89b..2479f35d0842912422f895b942848bfb8e8885d2 100644 --- a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn @@ -1,8 +1,8 @@ /** - * @author ETSI / TTF T012 + * @author ETSI / TTF T012 // TTF T027 * @version $Url$ * $Id$ - * @desc Types ANd Values for ETSI GS MEC 028 V2.1.1 (2020-06) + * @desc Types And Values for ETSI GS MEC 028 V2.3.1 (2022-07) * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. @@ -11,124 +11,352 @@ module WlanInformationAPI_TypesAndValues { // JSON - import from JSON all; + import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @desc This type represents the information on Access Points available from the WLAN Access Information Service. + * @member timeStamp TimeStamp + * @member apId Identifier(s) to uniquely specify the Access Point whose information is exposed within this data type + * @member channel Channel configured for the Access Point + * @member wlanCap WLAN capabilities of Access Point + * @member wanMetrics WAN Metrics element provides information about the WAN link connecting an IEEE 802.11 Access Node and the Internet + * @member bssLoad BSS Load attribute contains information on the current STA population and traffic levels in the BSS + * @member extBssLoad Extended BSS Load attribute contains more detailed information on the current STA population and traffic levels in the BSS + * @member apLocation The location on the Access Point + * @see ETSI GS MEC 028 V2.3.1 Clause 6.2.2 Type: ApInfo */ - type UInt32 Seconds; + type record ApInfo { + TimeStamp timeStamp optional, + ApIdentity apId, + Json.UInteger channel optional, + WlanCapabilities wlanCap optional, + WanMetrics wanMetrics optional, + BssLoad bssLoad optional, + ExtBssLoad extBssLoad optional, + OBssLoad oBssLoad optional, + ApLocation apLocation optional + } + type set of ApInfo ApInfoList; /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @desc Information on wireless stations available from the WLAN Access Information Service + * @member timeStamp TimeStamp + * @member staId Identifier(s) to uniquely specify station whose information is exposed within this data type + * @member channel Channel configured for the Access Point + * @member apAssociated Information about the Access Point that this Client Station is associated to + * @member rssi Receive Signal Strength Indicator + * @member staDataRate Station Data Rate + * @member staStatistics Statistics as defined in IEEE 802.11-2016 for the client station collected over measurement duration + * @member beaconReport Beacon Report as defined in Wi-Fi Agile Multiband Specification + * @member neighborReport Information about neighbor Access Points seen by the station + * @member channelLoad Channel Load reports as seen by the station + * @see ETSI GS MEC 028 V2.3.1 Table 6.2.3-1: Attributes for StaInfo */ - type UInt32 NanoSeconds; + type record StaInfo { + TimeStamp timeStamp optional, + StaIdentity staId, + Json.UInteger channel optional, + ApAssociated apAssociated optional, + Rssi rssi optional, + StaDataRate staDataRate optional, + StaStatistics staStatistics optional, + BeaconReport beaconReport optional, + NeighborReport neighborReport optional, + ChannelLoad channelLoad optional + + } + type set of StaInfo StaInfoList; /** - * @desc Time stamp description - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see MEC030 Clause 6.5.2 Type: TimeStamp + * @desc Different measurements configuration available from the WLAN Access Information Service + * @member _links Hyperlink related to the resource + * @member staId Identifier(s) to uniquely specify the target client station(s) for the measurement configuration + * @member measurementId Identifier of this measurement configuration + * @member measurementInfo Information used to configure this measurement + * @see ETSI GS MEC 028 V2.3.1 Table 6.2.4-1: Attributes for MeasurementConfig */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds + type record MeasurementConfig { + Links links optional, + StaIdentityList staId, + Json.String measurementId, + MeasurementInfo measurementInfo + } with { + variant (links) "name as '_links'"; } - type record of JSON.String SsidList; - type record of JSON.String IpAddressList; /** - * @desc Identifiers determining a specific Access Point - * @member bssid Basic Service Set Identifier (BSSID) is a unique Identifier assigned to an Access Point (as network interface controller) for communications at the data link layer of a network segment - * @member ssid Service Set Identifier to identify logical networks including Basic Service Set and Extended Service Set - * @member ipAddress IPv4 or IPv6 address allocated for the Access Point - * @see ETSI GS MEC 028 Clause 6.5.3 Type: ApIdentity + * @desc Hyperlink related to the resource + * @member self_ Self-referring URI + * @see ETSI GS MEC 028 V2.3.1 Table 6.2.4-1: Attributes for MeasurementConfig */ - type record ApIdentity { - JSON.String bssid, - SsidList ssid optional, - IpAddressList ipAddress optional + type record Links { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + /** + * @desc The different measurement configurations available from the WLAN Access Information Service + * @member _links Hyperlink related to the resource + * @member measurementConfig + * @see ETSI GS MEC 028 V2.3.1 Table 6.2.5-1: Attributes of the MeasurementConfigLinkList + */ + type record MeasurementConfigLinkList { + Links links optional, + MeasurementConfig_MeasurementConfigLinkList measurementConfig + } with { + variant (links) "name as '_links'"; } /** - * @desc information on HT capabilities of an Access Point - * @member htCapabilityInfo HT Capability Information - * @member ampduParameters A-MPDU parameters - * @member supportedMcsSet Supported MCS set - * @member htExtendedCap Extended HT Capabilities - * @member txBeamFormCap Transmit Beamforming Capabilities - * @member aselCap ASEL capabilities - * @see ETSI GS MEC 028 Clause 6.5.14 Type: HtCapabilities + * @desc + * @member href The URI referring to a measurement configuration + * @member measurementId Unique identifier allocated by the service consumer to identify measurement reports associated with this measurement configuration + * @see ETSI GS MEC 028 V2.3.1 Table 6.2.5-1: Attributes of the MeasurementConfigLinkList */ - type integer UInt128 with {variant "unsigned 128 bit"}; - type record HtCapabilities { - UInt16 htCapabilityInfo, - UInt8 ampduParameters, - UInt128 supportedMcsSet, - UInt16 htExtendedCap, - UInt32 txBeamFormCap, - UInt8 aselCap + type record MeasurementConfig_MeasurementConfigLinkList { + Json.AnyURI href, + Json.String measurementId } /** - * @desc Information on VHT Capabilities of an Access Point - * @member vhtCapInfo VHT capabilities Info - * @member vhtMcsNss Supported VHT-MCS and NSS Set - * @see ETSI GS MEC 028 Clause 6.5.15 Type: VhtCapabilities + * @desc Subscription to get updates on client stations that are associated to an Access Point + * @member subscriptionType Shall be set to "AssocStaSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed WLAN information + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification on the callbackReference URI to determine if it is reachable by the WAIS for notifications + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the WAIS and the service consumer for notifications, either in place of the callbackReference URI or if it is not reachable via the test notification + * @member _links Hyperlink related to the resource + * @member apId Identifier(s) to uniquely specify the target Access Point for the subscription + * @member notificationPeriod Set for periodic notification reporting + * @member notificationEvent Set for trigger-based event notification reporting + * @member expiryDeadline The expiration time of the subscription determined by the WLAN Access Information Service + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.2-1: Attributes of the AssocStaSubscription */ - type record VhtCapabilities { - UInt32 vhtCapInfo, - UInt64 vhtMcsNss + type record AssocStaSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + ApIdentity apId, + Json.UInt8 notificationPeriod optional, + NotificationEvent notificationEvent optional, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; } + type set of AssocStaSubscription AssocStaSubscriptionList; /** - * @desc Information on VHT Capabilities of an Access Point - * @member heMacCapInfo MAC capabilities of an Access Point - * @member hePhyCapinfo PHY capabilities of an Access Point - * @member supportedHeMcsNssSet Supported MCS and NSS Set - * @see ETSI GS MEC 028 Clause 6.5.16 Type: HeCapabilities + * @desc Set for trigger-based event notification reporting + * @member trigger_ Trigger for the notification + * @member threshold Number of connected stations threshold for trigger-based event reporting + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.2-1: Attributes of the AssocStaSubscription */ - type record HeCapabilities { - UInt8 heMacCapInfo, - UInt8 hePhyCapinfo, - UInt8 supportedHeMcsNssSet + type record NotificationEvent { + Json.UInt8 trigger_, + Json.UInt8 threshold + } with { + variant (trigger_) "name as 'trigger'"; } /** - * @desc Information on DMG Capabilities of an Access Point - * @member dmgStaCapInfo DMG station capabilities information - * @member dmgApOrPcpCapInfo DMG AP or PCP capabilities information - * @member dmgStaBeamTrackTimeLimit DMG station beam tracking time limit - * @member extScMcsCap Extended SC MCS capabilities - * @member maxNrBasicAmsduSubframes Number of basic A-MSDU subframes in A-MSDU - * @member maxNrShortAmsduSubframes Number of short A-MSDU subframes in A-MSDU - * @see ETSI GS MEC 028 Clause 6.5.17 Type: DmgCapabilities + * @desc Subscription to get updates on the Data Rate of targeted client station(s) + * @member subscriptionType Shall be set to "AssocStaSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed WLAN information + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification on the callbackReference URI to determine if it is reachable by the WAIS for notifications + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the WAIS and the service consumer for notifications, either in place of the callbackReference URI or if it is not reachable via the test notification + * @member _links Hyperlink related to the resource + * @member staId Identifier(s) to uniquely specify the target client station(s) for the subscription + * @member notificationPeriod Set for periodic notification reporting + * @member notificationEvent Set for trigger-based event notification reporting + * @member expiryDeadline The expiration time of the subscription determined by the WLAN Access Information Service + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.3-1: Attributes of the StaDataRateSubscription */ - type record DmgCapabilities { - UInt64 dmgStaCapInfo, - UInt16 dmgApOrPcpCapInfo, - UInt16 dmgStaBeamTrackTimeLimit, - UInt8 extScMcsCap, - UInt8 maxNrBasicAmsduSubframes, - UInt8 maxNrShortAmsduSubframes + type record StaDataRateSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + StaIdentityList staId, + Json.UInt8 notificationPeriod optional, + NotificationEvent_StaDataRateSubscription notificationEvent optional, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; } + type set of StaDataRateSubscription StaDataRateSubscriptionList; /** - * @desc Information on EDMG Capabilities of an Access Point - * @member ampduParameters A-MPDU parameters - * @member trnParameters Training parameters - * @member supportedMcs Supported MCS - * @member reserved - * @see ETSI GS MEC 028 Clause 6.5.18 Type: EdmgCapabilities + * @desc Set for trigger-based event notification reporting + * @member trigger_ Trigger for the notification + * @member threshold Number of connected stations threshold for trigger-based event reporting + * @member downlinkRateThreshold Downlink data rate threshold for StaDataRate reporting + * @member uplinkRateThreshold Uplink data rate threshold for StaDataRate reporting + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.3-1: Attributes of the StaDataRateSubscription */ - type record EdmgCapabilities { - UInt8 ampduParameters, - UInt16 trnParameters, - UInt32 supportedMcs + type record NotificationEvent_StaDataRateSubscription { + Json.UInt8 trigger_, + Json.UInteger downlinkRateThreshold optional, + Json.UInteger uplinkRateThreshold + } with { + variant (trigger_) "name as 'trigger'"; + } + + /** + * @desc List of links related to currently existing subscriptions for the service consumer + * @member links List of hyperlinks related to the resource + * @member subscription + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.4-1: Attributes of the SubscriptionLinkList + */ + type record SubscriptionLinkList { + Links links, + Subscription subscription optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc + * @member href The URI referring to the subscription + * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.4-1: Attributes of the SubscriptionLinkLis + */ + type record Subscription_ { + Json.AnyURI href, + Json.String subscriptionType + } + type set of Subscription_ Subscription; + + /** + * @desc This type represents a subscription to get measurement reports (Channel Load, Beacon Request, STA Statistics, or Neighbor Report) from targeted client station(s) + * @member subscriptionType Shall be set to "MeasurementReportSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed WLAN information + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification on the callbackReference URI to determine if it is reachable by the WAIS for notifications + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the WAIS and the service consumer for notifications, either in place of the callbackReference URI or if it is not reachable via the test notification + * @member _links Hyperlink related to the resource + * @member staId Identifier(s) to uniquely specify the target client station(s) for the subscription + * @member measurementId Unique identifier allocated by the service consumer to identify measurement reports associated with this measurement subscription + * @member measurementInfo Information used to configure this measurement + * @member expiryDeadline The expiration time of the subscription determined by the WLAN Access Information Service + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.5-1: Attributes of the MeasurementReportSubscription + */ + type record MeasurementReportSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + StaIdentityList staId, + Json.String measurementId, + Json.String measurementInfo, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Notification from WLAN Access Information Service with regards to client stations associated to the targeted Access Point + * @member notificationType Shall be set to "AssocStaNotification" + * @member timeStamp Time stamp + * @member apId Identifier(s) to uniquely specify the Access Point to which the client stations are associated + * @member staId Identifier(s) to uniquely specify the client station(s) associated + * @see ETSI GS MEC 028 V2.3.1 Table 6.4.2-1: Attributes of the AssocStaNotification + */ + type record AssocStaNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + ApIdentity apId, + StaIdentityList staId optional + } + + /** + * @desc Notification from WLAN Information service with regards to Data Rates of the subscribed client stations + * @member notificationType Shall be set to "StaDataRateNotification" + * @member timeStamp Time stamp + * @member staDataRate Data rates of a client station + * @see ETSI GS MEC 028 V2.3.1 Table 6.4.3-1: Attributes of the StaDataRateNotification + */ + type record StaDataRateNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + StaDataRateList staDataRate optional + } + + /** + * @desc Notification from WLAN Access Information service with regards to expiry of an existing subscription + * @member notificationType Shall be set to "ExpiryNotification" + * @member links Hyperlink related to the resource + * @member expiryDeadlineTime stamp + * @see ETSI GS MEC 028 V2.3.1 Table 6.4.4-1: Attributes of the ExpiryNotification + */ + type record ExpiryNotification { + Json.String notificationType, + Links links, + TimeStamp expiryDeadline + } with { + variant (links) "name as '_links'"; } + /** + * @desc Hyperlink related to the resource + * @member subscription URI identifying the subscription which has expired + * @see ETSI GS MEC 028 V2.3.1 Table 6.4.4-1: Attributes of the ExpiryNotification + */ + type record Links_Notification { + LinkType subscription + } + + /** + * @desc This type represents a notification from WLAN Access Information service with regards to Measurement Reports of the subscribed client stations + * @member notificationType Shall be set to "MeasurementReportNotification" + * @member timeStamp Time stamp + * @member staStatistics STA Statistics Report as defined in IEEE 802.11-2016 [8] + * @member beaconReport Beacon Report as defined in IEEE 802.11-2016 [8] + * @member neighborReport Neighbor Report providing information about neighbor Access Points seen by the station as defined in IEEE 802.11-2016 [8] + * @member channelLoad Channel Load reports as seen by the station as defined in IEEE 802.11-2016 [8] + * @see ETSI GS MEC 028 V2.3.1 Table 6.4.5-1: Attributes of the MeasurementReportNotification + */ + type record MeasurementReportNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + StaStatistics staStatistics optional, + BeaconReport beaconReport optional, + NeighborReport neighborReport optional, + ChannelLoad channelLoad optional + } + + /** + * @desc This data type represents a notification from AMS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "TestNotification" + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 028 V2.3.1 V3.1.1 (2023-10) Table 6.4.6-1: Attributes of the TestNotification + */ + type record TestNotification { + Json.String notificationType, + Links_Notification links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Identifiers determining a specific Access Point + * @member bssid Basic Service Set Identifier (BSSID) is a unique Identifier assigned to an Access Point (as network interface controller) for communications at the data link layer of a network segment + * @member ssid Service Set Identifier to identify logical networks including Basic Service Set and Extended Service Set + * @member ipAddress IPv4 or IPv6 address allocated for the Access Point + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.3-1: Attributes of the ApIdentity + */ + type record ApIdentity { + Json.String bssid, + SsidList ssid optional, + IpAddressList ipAddress optional + } + type set of Json.String SsidList; + type set of Json.String IpAddressList; + /** * @desc WLAN capabilities of the Access Point * @member ht Information about Access Point HT capabilities @@ -136,13 +364,13 @@ module WlanInformationAPI_TypesAndValues { * @member he Information about Access Point HE capabilities * @member dmg Information about Access Point DMG capabilities * @member edmg Information about Access Point EDMG capabilities - * @see ETSI GS MEC 028 Clause 6.5.4 Type: WlanCapabilities + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.4-1: Attributes of the WlanCapabilities */ type record WlanCapabilities { - HtCapabilities ht optional, - VhtCapabilities vht optional, - HeCapabilities he optional, - DmgCapabilities dmg optional, + HtCapabilities ht optional, + VhtCapabilities vht optional, + HeCapabilities he optional, + DmgCapabilities dmg optional, EdmgCapabilities edmg optional } @@ -154,15 +382,15 @@ module WlanInformationAPI_TypesAndValues { * @member downlinkLoad 1-octet positive integer representing the current percentage loading of the downlink WAN connection * @member uplinkLoad 1-octet positive integer representing the current percentage loading of the uplink WAN connection * @member lmd The LMD (Load Measurement Duration) - * @see ETSI GS MEC 028 Clause 6.5.6 Type: WanMetrics + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.6-1: Attributes of the WanMetrics */ type record WanMetrics { - UInt8 wanInfo, - UInt32 downlinkSpeed, - UInt32 uplinkSpeed, - UInt8 downlinkLoad, - UInt8 uplinkLoad, - UInt16 lmd + Json.UInt8 wanInfo, + Json.UInteger downlinkSpeed, + Json.UInteger uplinkSpeed, + Json.UInt8 downlinkLoad, + Json.UInt8 uplinkLoad, + Json.UInt16 lmd } /** @@ -170,12 +398,12 @@ module WlanInformationAPI_TypesAndValues { * @member staCount Indicates the total number of STAs currently associated with this BSS * @member channelUtilization The percentage of time * @member availAdmCap Available Admission Capacity that specifies the remaining amount of medium time available via explicit admission control, in units of 32 μs/s - * @see ETSI GS MEC 028 Clause 6.5.7 Type: BssLoad + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.7-1: Attributes of the BssLoad */ type record BssLoad { - UInt16 staCount, - UInt8 channelUtilization, - UInt16 availAdmCap + Json.UInt16 staCount, + Json.UInt8 channelUtilization, + Json.UInt16 availAdmCap } /** @@ -185,140 +413,27 @@ module WlanInformationAPI_TypesAndValues { * @member obsSec20MhzUtil Observable loading on each of the secondary 20 MHz channel * @member obsSec40MhzUtil Observable loading on each of the secondary 40 MHz channel * @member obsSec80MhzUtil Observable loading on each of the secondary 80 MHz channel - * @see ETSI GS MEC 028 Clause 6.5.8 Type: ExtBssLoad + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.8-1: Attributes of the ExtBssLoad */ type record ExtBssLoad { - UInt16 muMimoStaCount, - UInt8 spatStreamUnderUtil, - UInt8 obsSec20MhzUtil, - UInt8 obsSec40MhzUtil, - UInt8 obsSec80MhzUtil - } - - /** - * @desc Information Geospatial Location of an Access Point - * @member latUncertainty The uncertainty for Latitude information - * @member The latitude value of location - * @member longUncertainty The uncertainty for Longitude information - * @member long The longitude value of location - * @member altitudeType The type description for altitude - * @member altitudeUncertainty The uncertainty for altitude information - * @member altitude The altitude value of location - * @member datum The datum value to express how coordinates are organized and related to real world - * @see ETSI GS MEC 028 Clause 6.5.19 Type: GeoLocation - */ - type record GeoLocation { - UInt8 latUncertainty, - UInt64 lat, - UInt8 longUncertainty, - UInt64 long, - UInt8 altitudeType optional, - UInt8 altitudeUncertainty optional, - UInt32 altitude optional, - UInt8 datum - } - - /** - * @desc Iinformation on Civic Location of an Access Point - * @member country The two-letter ISO 3166 [i.9] country code in capital ASCII letters, e.g. DE or US, as per ISO 3166 - * @member ca0 Language - * @member ca0 Language - * @member ca1 National subdivisions (state, canton, region,province, prefecture) - * @member ca2 County, parish, gun (JP), district (IN) - * @member ca3 City, township, shi (JP) - * @member ca4 City division, borough, city district, ward, chou (JP) - * @member ca5 Neighborhood, block - * @member ca6 Group of streets below the neighborhood level - * @member ca16 Leading street direction - * @member ca17 Trailing street suffix - * @member ca18 Street suffix or type - * @member ca19 House number - * @member ca20 House number suffix - * @member ca21 Landmark of vanity address - * @member ca22 Additional location information - * @member ca23 Name (residence and office occupant) - * @member ca24 Postal/zip code - * @member ca25 Building (structure) - * @member ca26 Unit (apartment/suite) - * @member ca27 Floor - * @member ca28 Room - * @member ca29 Type of place - * @member ca30 Postal community name - * @member ca31 Post office box - * @member ca32 Additional code - * @member ca33 Seat (desk.cubicle, workstation) - * @member ca34 Primary road name - * @member ca35 Road section - * @member ca36 Branch road name - * @member ca37 Sub-branch road name - * @member ca38 Street name pre-modifier - * @member ca39 Street name post-modifier - * @member ca128 Script - * @see ETSI GS MEC 028 Clause 6.5.20 Type: CivicLocation - */ - type record CivicLocation { - JSON.String country, - JSON.String ca0 optional, - JSON.String ca1 optional, - JSON.String ca2 optional, - JSON.String ca3 optional, - JSON.String ca4 optional, - JSON.String ca5 optional, - JSON.String ca6 optional, - JSON.String ca16 optional, - JSON.String ca17 optional, - JSON.String ca18 optional, - JSON.String ca19 optional, - JSON.String ca20 optional, - JSON.String ca21 optional, - JSON.String ca22 optional, - JSON.String ca23 optional, - JSON.String ca24 optional, - JSON.String ca25 optional, - JSON.String ca26 optional, - JSON.String ca27 optional, - JSON.String ca28 optional, - JSON.String ca29 optional, - JSON.String ca30 optional, - JSON.String ca31 optional, - JSON.String ca32 optional, - JSON.String ca33 optional, - JSON.String ca34 optional, - JSON.String ca35 optional, - JSON.String ca36 optional, - JSON.String ca37 optional, - JSON.String ca38 optional, - JSON.String ca39 optional, - JSON.String ca128 optional + Json.UInt16 muMimoStaCount, + Json.UInt8 spatStreamUnderUtil, + Json.UInt8 obsSec20MhzUtil, + Json.UInt8 obsSec40MhzUtil, + Json.UInt8 obsSec80MhzUtil } /** * @desc Location information of the Access Point * @member geolocation Geospatial Location of the AP * @member civicLocation Civic Location of the AP - * @see ETSI GS MEC 028 Clause 6.5.9 Type: ApLocation + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.9-1: Attributes of the ApLocation */ type record ApLocation { - GeoLocation geolocation optional, + GeoLocation geolocation optional, CivicLocation civicLocation optional } - /** - * @desc Identifiers determining a specific client station - * @member macId Unique identifier assigned to station (as network interface controller) for communications at the data link layer of a network segment - * @member ssid Service Set Identifier to identify logical networks - * @member aid Number which identifies a particular association between a station and an Access Point - * @member ipAddress IPv4 or IPv6 address allocated for the station - * @see ETSI GS MEC 028 Clause 6.5.11 Type: StaIdentity - */ - type record StaIdentity { - JSON.String macId, - JSON.String ssid optional, - JSON.String aid optional, - JSON.String ipAddress optional - } - type record of StaIdentity StaIdentities; - /** * @desc Information about neighbor Access Points * @member staId Identifier to uniquely specify the station whose information is exposed within this report @@ -329,19 +444,35 @@ module WlanInformationAPI_TypesAndValues { * @member channel The channel currently used by this Access Point * @member phyType PHY type of the AP indicated by this BSSID. It is an integer value coded according to the value of the dot11PHYType * @member bssTransitionCandidatePreference Relative value indicating the preferred ordering for this BSS as a transition candidate for roaming - * @see ETSI GS MEC 028 Clause 6.5.10 Type: NeighborReport + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.10-1: Attributes of the NeighborReport */ type record NeighborReportItem { - StaIdentity staId, - JSON.String measurementId, - JSON.String bssid, - UInt32 bssidInfo, - UInt8 operatingClass, - UInt8 channel, - UInt8 phyType, - UInt8 bssTransitionCandidatePreference optional + StaIdentity staId optional, + Json.String measurementId, + Json.String bssid, + Json.UInteger bssidInfo, + Json.UInt8 operatingClass, + Json.UInt8 channel, + Json.UInt8 phyType, + Json.UInt8 bssTransitionCandidatePreference optional + } + type set of NeighborReportItem NeighborReport; + + /** + * @desc Identifiers determining a specific client station + * @member macId Unique identifier assigned to station (as network interface controller) for communications at the data link layer of a network segment + * @member ssid Service Set Identifier to identify logical networks + * @member aid Number which identifies a particular association between a station and an Access Point + * @member ipAddress IPv4 or IPv6 address allocated for the station + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.11-1: Attributes of the StaIdentity + */ + type record StaIdentity { + Json.String macId, + SsidList ssid optional, + Json.String aid optional, + IpAddressList ipAddress optional } - type record of NeighborReportItem NeighborReport; + type set of StaIdentity StaIdentityList; /** * @desc Information for the Access Point that the client station is associated to @@ -349,233 +480,217 @@ module WlanInformationAPI_TypesAndValues { * @member ssid Service Set Identifier to identify logical networks * @member assocId Unique number which identifies a particular association between the station and Access Point * @member ipAddress IPv4 or IPv6 address allocated for the Access Point - * @see ETSI GS MEC 028 Clause 6.5.12 Type: ApAssociated + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.12-1: Attributes of the ApAssociated */ type record ApAssociated { - JSON.String bssid, - JSON.String ssid optional, - JSON.String assocId optional, - JSON.String ipAddress optional - } - - /** - * @desc Optionally reported reason for STA Statistics Group Identities 0 or 1 (STA Counters) in the STA Statistics Optional subelements - * @member failed dot11Failed - * @member fcsError dot11FCSError - * @member multipleRetry dot11MultipleRetry - * @member frameDuplicate dot11FrameDuplicate - * @member rtsFailure dot11RTSFailure - * @member ackFailure dot11AckFailure - * @member retry dot11Retry - * @see ETSI GS MEC 028 Clause 6.5.37 Type: ReportingReasonStaCounters - */ - type record ReportingReasonStaCounters { - JSON.Bool failed, - JSON.Bool fcsError, - JSON.Bool multipleRetry, - JSON.Bool frameDuplicate, - JSON.Bool rtsFailure, - JSON.Bool ackFailure, - JSON.Bool retry - } - - /** - * @desc Optionally reported reason for STA Statistics Group Identities 2 to 9 (QoS STA Counters) in the STA Statistics - * @member qosFailed dot11QoSFailed - * @member qosRetry dot11QoSRetry - * @member qosMultipleRetry dot11QoSMultipleRetry - * @member qosFrameDuplicate dot11QoSFrameDuplicate - * @member qosRtsFailure dot11QoSRTSFailure - * @member qosAckFailure dot11QoSAckFailure - * @member qosDiscarded dot11QoSDiscarded - * @see ETSI GS MEC 028 Clause 6.5.38 Type: ReportingReasonQoSCounters - */ - type record ReportingReasonQoSCounters { - JSON.Bool qosFailed, - JSON.Bool qosRetry, - JSON.Bool qosMultipleRetry, - JSON.Bool qosFrameDuplicate, - JSON.Bool qosRtsFailure, - JSON.Bool qosAckFailure, - JSON.Bool qosDiscarded + Json.String bssid, + SsidList ssid optional, + Json.String assocId optional, + IpAddressList ipAddress optional } /** - * @desc Channel Load report from a station + * @desc Information statistics of the client station * @member staId Identifier to uniquely specify the station whose information is exposed within this report - * @member measurementId Measurement ID of the Measurement configuration applied to this Channel Load Report - * @member operatingClass Operating Class field indicates an operating class value - * @member channel Channel number indicates the channel number for which the measurement report applies - * @member measurementDuration Duration over which the Channel Load report was measured, in units of TUs of 1024 µs - * @member channelLoad Proportion of measurement duration for which the measuring STA determined the channel to be busy, as a percentage of time, linearl scaled with 255 representing 100% - * @see ETSI GS MEC 028 Clause 6.5.39 Type: ChannelLoad - */ - type record ChannelLoadItem { - StaIdentity staId optional, - JSON.String measurementId, - UInt8 operatingClass, - UInt8 channel, - UInt8 measurementDuration, - UInt8 channelLoad - } - type record of ChannelLoadItem ChannelLoad; - - /** - * @desc The load of a Overlapping BSS - * @member allocatedTrafficSelfMean Mean of allocated traffic from this AP (BSS) in units of 32 µs per second - * @member allocatedTrafficSelfStdDev Standard deviation from the mean of allocation traffic from this BSS in units of 32 µs per second - * @member Mean of the sum of allocated traffic from other APs on the overlapping channel in unit of 32 µs per second - * @member Standard deviation from the mean of the sum of allocated traffic from other APs on the overlapping channel in unit of 32 µs per second - * @member overlap Indicates the number of other APs that are sharing the same channel as the reporting AP - * @see ETSI GS MEC 028 Clause 6.5.40 Type: OBssLoad + * @member measurementId Measurement ID of the Measurement configuration applied to this STA Statistics Report + * @member measurementDuration Duration over which the Statistics Group Data was measured in time units of 1024 µs + * @member groupIdentity Indicates the requested statistics group describing the Statistics Group Data + * @member groupZeroData STA Statistics Data for Group Identity = 0 + * @member groupOneData STA Statistics Data for Group Identity = 1 + * @member group2to9Data STA Statistics Data for Group Identity = 2 through 9 + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.13-1: Attributes of the StaStatistics */ - type record OBssLoad { - UInt16 allocatedTrafficSelfMean, - UInt16 allocatedTrafficSelfStdDev optional, - UInt16 allocatedTrafficShareMean, - UInt16 allocatedTrafficShareStdDev optional, - UInt8 overlap optional + type record StaStatistics { + StaIdentity staId optional, + Json.String measurementId, + Json.String measurementDuration, + Json.UInt8 groupIdentity, + StaStatisticsGroupZeroData groupZeroData optional, + StaStatisticsGroupOneData groupOneData optional, + StaStatisticsGroup2to9Data group2to9Data optional } /** - * @desc - * @member ssid Contains an SSID element - * @member bssid BSSID of the neighbor AP which information is intended to obtain - * @see ETSI GS MEC 028 Clause 6.5.32 Type: NeighborReportConfig + * @desc information on HT capabilities of an Access Point + * @member htCapabilityInfo HT Capability Information + * @member ampduParameters A-MPDU parameters + * @member supportedMcsSet Supported MCS set + * @member htExtendedCap Extended HT Capabilities + * @member txBeamFormCap Transmit Beamforming Capabilities + * @member aselCap ASEL capabilities + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.14-1: Attributes of the HtCapabilities */ - type record NeighborReportConfig { - JSON.String ssid optional, - JSON.String bssid optional + type record HtCapabilities { + Json.UInt16 htCapabilityInfo, + Json.UInt8 ampduParameters, + UInt128 supportedMcsSet, + Json.UInt16 htExtendedCap, + Json.UInteger txBeamFormCap, + Json.UInt8 aselCap } + type integer UInt128 with {variant "unsigned 128 bit"}; /** - * @desc The information required to define client station measurements available from the WLAN Access Information Service - * @member measurementDuration Duration of the measurement in time units (TUs) of 1024 µs - * @member randomInterval Random interval to be used for starting the measurement in TUs of 1024 µs - * @member channelLoadConf Configuration related to the Channel Load - * @member beaconRequestConf Configuration related to Beacon Request - * @member staStatisticsConf Configuration related to the statistics provided by STAs - * @member neighborReportConf Configuration related to Neighbor Reports - * @see ETSI GS MEC 028 Clause 6.5.41 Type: MeasurementInfo + * @desc Information on VHT Capabilities of an Access Point + * @member vhtCapInfo VHT capabilities Info + * @member vhtMcsNss Supported VHT-MCS and NSS Set + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.15-1: Attributes of the VhtCapabilities */ - type record MeasurementInfo { - UInt16 measurementDuration optional, - UInt16 randomInterval optional, - ChannelLoadConfig channelLoadConf optional, - BeaconRequestConfig beaconRequestConf optional, - StaStatisticsConfig staStatisticsConf optional, - NeighborReportConfig neighborReportConf optional + type record VhtCapabilities { + Json.UInteger vhtCapInfo, + Json.UInteger vhtMcsNss } /** - * @desc STA Statistics Group Data for Group Identity = 0 - * @member transmittedFragmentCount dot11TransmittedFragmentCount counter - * @member groupTransmittedFrameCount dot11GroupTransmittedFrameCount counter - * @member failedCount dot11FailedCount counter - * @member receivedFragmentCountdot11ReceivedFragmentCount counter - * @member groupReceivedFrameCountdot11GroupReceivedFrameCount counter - * @member fcsErrorCount dot11FCSErrorCount counter - * @member transmittedFrameCount dot11TransmittedFrameCount counter - * @member reportingReasonStaCounters Optionally reported reason for STA Statistics Group 0 - * @see ETSI GS MEC 028 Clause 6.5.34 Type: StaStatisticsGroupZeroData + * @desc Information on VHT Capabilities of an Access Point + * @member heMacCapInfo MAC capabilities of an Access Point + * @member hePhyCapinfo PHY capabilities of an Access Point + * @member supportedHeMcsNssSet Supported MCS and NSS Set + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.16-1: Attributes of the HeCapabilities */ - type record StaStatisticsGroupZeroData { - UInt32 transmittedFragmentCount, - UInt32 groupTransmittedFrameCount, - UInt32 failedCount, - UInt32 receivedFragmentCount, - UInt32 groupReceivedFrameCount, - UInt32 fcsErrorCount, - UInt32 transmittedFrameCount, - ReportingReasonStaCounters reportingReasonStaCounters optional + type record HeCapabilities { + Json.UInt8 heMacCapInfo, + Json.UInt8 hePhyCapinfo, + Json.UInt8 supportedHeMcsNssSet } /** - * @desc STA Statistics Group Data for Group Identity = 1 - * @member retryCount dot11RetryCount counter - * @member multipleRetryCount dot11MultipleRetryCount counter - * @member frameDuplicateCount dot11FrameDuplicateCount counter - * @member rtsSuccessCount dot11RTSSuccessCount counter - * @member rtsFailureCount dot11RTSFailureCount counter - * @member ackFailureCount dot11AckFailureCount counter - * @member reportingReasonStaCounters Optionally reported reason for STA Statistics Group 1 - * @see ETSI GS MEC 028 Clause 6.5.35-1: Attributes of the StaStatisticsGroupOneData + * @desc Information on DMG Capabilities of an Access Point + * @member dmgStaCapInfo DMG station capabilities information + * @member dmgApOrPcpCapInfo DMG AP or PCP capabilities information + * @member dmgStaBeamTrackTimeLimit DMG station beam tracking time limit + * @member extScMcsCap Extended SC MCS capabilities + * @member maxNrBasicAmsduSubframes Number of basic A-MSDU subframes in A-MSDU + * @member maxNrShortAmsduSubframes Number of short A-MSDU subframes in A-MSDU + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.17-1: Attributes of the DmgCapabilities */ - type record StaStatisticsGroupOneData { - UInt32 retryCount, - UInt32 multipleRetryCount, - UInt32 frameDuplicateCount, - UInt32 rtsSuccessCount, - UInt32 rtsFailureCount, - UInt32 ackFailureCount, - ReportingReasonStaCounters reportingReasonStaCounters optional + type record DmgCapabilities { + Json.UInteger dmgStaCapInfo, + Json.UInt16 dmgApOrPcpCapInfo, + Json.UInt16 dmgStaBeamTrackTimeLimit, + Json.UInt8 extScMcsCap, + Json.UInt8 maxNrBasicAmsduSubframes, + Json.UInt8 maxNrShortAmsduSubframes } - /** - * @desc STA Statistics Group Data for Group Identity = 2 through 9 - * @member qosTransmittedFragmentCount dot11QosTransmittedFragmentCount counter - * @member qosFailedCount dot11QosFailedCount counter - * @member qosRetryCount dot11QosRetryCount counter - * @member qosMultipleRetryCount dot11QosMultipleRetryCount counter - * @member qosFrameDuplicateCount dot11QosFrameDuplicateCount counter - * @member qosRTSSuccessCount dot11QosRTSSuccessCount counter - * @member qosRTSFailureCount dot11QosRTSFailureCount counter - * @member qosAckFailureCount dot11QosAckFailureCount counter - * @member qosReceivedFragmentCount dot11QosReceivedFragmentCount counter - * @member qosTransmittedFrameCount dot11QosTransmittedFrameCount counter - * @member qosDiscardedFrameCount dot11QosDiscardedFrameCount counter - * @member qosMPDUsReceivedCount dot11QosMPDUsReceivedCount counter - * @member qosRetriesReceivedCount dot11QosRetriesReceivedCount counter - * @member reportingReasonQoSCounters Optionally reported reason for STA Statistics Groups 2 to 9 - * @see ETSI GS MEC 028 Clause 6.5.36-1: Attributes of the StaStatisticsGroup2to9Data + * @desc Information on EDMG Capabilities of an Access Point + * @member ampduParameters A-MPDU parameters + * @member trnParameters Training parameters + * @member supportedMcs Supported MCS + * @member reserved + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.18-1: Attributes of the EdmgCapabilities */ - type record StaStatisticsGroup2to9Data { - UInt32 qosTransmittedFragmentCount, - UInt32 qosFailedCount, - UInt32 qosRetryCount, - UInt32 qosMultipleRetryCount, - UInt32 qosFrameDuplicateCount, - UInt32 qosRTSSuccessCount, - UInt32 qosRTSFailureCount, - UInt32 qosAckFailureCount, - UInt32 qosReceivedFragmentCount, - UInt32 qosTransmittedFrameCount, - UInt32 qosDiscardedFrameCount, - UInt32 qosMPDUsReceivedCount, - UInt32 qosRetriesReceivedCount, - ReportingReasonQoSCounters reportingReasonQoSCounters optional + type record EdmgCapabilities { + Json.UInt8 ampduParameters, + Json.UInt16 trnParameters, + Json.UInteger supportedMcs } /** - * @desc Information statistics of the client station - * @member staId Identifier to uniquely specify the station whose information is exposed within this report - * @member measurementId Measurement ID of the Measurement configuration applied to this STA Statistics Report - * @member measurementDuration Duration over which the Statistics Group Data was measured in time units of 1024 µs - * @member groupIdentity Indicates the requested statistics group describing the Statistics Group Data - * @member groupZeroData STA Statistics Data for Group Identity = 0 - * @member groupOneData STA Statistics Data for Group Identity = 1 - * @member group2to9Data STA Statistics Data for Group Identity = 2 through 9 - * @see ETSI GS MEC 028 Clause 6.5.13 Type: StaStatistics + * @desc Information Geospatial Location of an Access Point + * @member latUncertainty The uncertainty for Latitude information + * @member The latitude value of location + * @member longUncertainty The uncertainty for Longitude information + * @member long The longitude value of location + * @member altitudeType The type description for altitude + * @member altitudeUncertainty The uncertainty for altitude information + * @member altitude The altitude value of location + * @member datum The datum value to express how coordinates are organized and related to real world + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.19-1: Attributes of the GeoLocation */ - type record StaStatistics { - StaIdentity staId optional, - JSON.String measurementId, - JSON.String measurementDuration, - UInt8 groupIdentity, - StaStatisticsGroupZeroData groupZeroData optional, - StaStatisticsGroupOneData groupOneData optional, - StaStatisticsGroup2to9Data group2to9Data optional + type record GeoLocation { + Json.UInt8 latUncertainty, + Json.UInteger lat, + Json.UInt8 longUncertainty, + Json.UInteger long, + Json.UInt8 altitudeType optional, + Json.UInt8 altitudeUncertainty optional, + Json.UInteger altitude optional, + Json.UInt8 datum } - type UInt8 StatisticsGroupData; // Note defined, see ETSI GS MEC 028 Clause 6.5.13 Type: StaStatistics /** + * @desc Information on Civic Location of an Access Point + * @member country The two-letter ISO 3166 [i.9] country code in capital ASCII letters, e.g. DE or US, as per ISO 3166 + * @member ca0 Language + * @member ca0 Language + * @member ca1 National subdivisions (state, canton, region,province, prefecture) + * @member ca2 County, parish, gun (JP), district (IN) + * @member ca3 City, township, shi (JP) + * @member ca4 City division, borough, city district, ward, chou (JP) + * @member ca5 Neighborhood, block + * @member ca6 Group of streets below the neighborhood level + * @member ca16 Leading street direction + * @member ca17 Trailing street suffix + * @member ca18 Street suffix or type + * @member ca19 House number + * @member ca20 House number suffix + * @member ca21 Landmark of vanity address + * @member ca22 Additional location information + * @member ca23 Name (residence and office occupant) + * @member ca24 Postal/zip code + * @member ca25 Building (structure) + * @member ca26 Unit (apartment/suite) + * @member ca27 Floor + * @member ca28 Room + * @member ca29 Type of place + * @member ca30 Postal community name + * @member ca31 Post office box + * @member ca32 Additional code + * @member ca33 Seat (desk.cubicle, workstation) + * @member ca34 Primary road name + * @member ca35 Road section + * @member ca36 Branch road name + * @member ca37 Sub-branch road name + * @member ca38 Street name pre-modifier + * @member ca39 Street name post-modifier + * @member ca128 Script + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.20-1: Attributes of the CivicLocation + */ + type record CivicLocation { + Json.String country, + Json.String ca0 optional, + Json.String ca1 optional, + Json.String ca2 optional, + Json.String ca3 optional, + Json.String ca4 optional, + Json.String ca5 optional, + Json.String ca6 optional, + Json.String ca16 optional, + Json.String ca17 optional, + Json.String ca18 optional, + Json.String ca19 optional, + Json.String ca20 optional, + Json.String ca21 optional, + Json.String ca22 optional, + Json.String ca23 optional, + Json.String ca24 optional, + Json.String ca25 optional, + Json.String ca26 optional, + Json.String ca27 optional, + Json.String ca28 optional, + Json.String ca29 optional, + Json.String ca30 optional, + Json.String ca31 optional, + Json.String ca32 optional, + Json.String ca33 optional, + Json.String ca34 optional, + Json.String ca35 optional, + Json.String ca36 optional, + Json.String ca37 optional, + Json.String ca38 optional, + Json.String ca39 optional, + Json.String ca128 optional + } + + /** * @desc Information on the Received Signal Strength Indicator (RSSI) of a client station * @member rssi The Received Signal Strength Indicator from a station - * @see ETSI GS MEC 028 Clause 6.5.21 Type: Rssi + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.21-1: Attributes of the Rssi */ type record Rssi { - UInt8 rssi + Json.UInt8 rssi } /** @@ -583,336 +698,386 @@ module WlanInformationAPI_TypesAndValues { * @member staId Identifier(s) to uniquely specify the client station(s) associated * @member staLastDataDownlinkRate The data transmit rate in kbps that was most recently used for transmission of data PPDUs from the access point to the station * @member staLastDataUplinkRate The data transmit rate in Kbps that was most recently used for transmission of data PPDUs from the associated station to the access point - * @see ETSI GS MEC 028 Clause 6.5.22 Type: StaDataRate + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.22-1: Attributes of the StaDataRate */ type record StaDataRate { - StaIdentity staId optional, - UInt32 staLastDataDownlinkRate optional, - UInt32 staLastDataUplinkRate optional + StaIdentity staId optional, + Json.UInteger staLastDataDownlinkRate optional, + Json.UInteger staLastDataUplinkRate optional } - type record of StaDataRate StaDataRates; + type set of StaDataRate StaDataRateList; /** * @desc Type of link * @member href URI referring to a resource - * @see ETSI GS MEC 028 Clause 6.5.23 Type: LinkType + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.23-1: Attributes of the LinkType */ type record LinkType { - JSON.AnyURI href - } - - type record LinkTypes { - LinkType self_ - } with { - variant (self_) "name as 'self'"; + Json.AnyURI href } /** - * @desc This configuration applies to BssLoad measurement - * @member apId Identifier(s) to uniquely specify the target Access Point - * @member cChannelId Channel number which load is reported - * @member channelLoad Channel load as per IEEE 802.11-2012 - * @see ETSI GS MEC 028 Clause 6.5.24 Type: ChannelLoadConfig + * @desc This configuration applies to Channel Load measurement + * @member operatingClass Operating Class field indicates an operating class value + * @member channel Channel for which the channel load report is requested + * @member reportingCondition Reporting condition for the Beacon Report + * @member threshold Channel Load reference value for threshold reporting + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.24-1: Attributes of the ChannelLoadConfig */ type record ChannelLoadConfig { - ApIdentity apId, - UInt32 cChannelId, - UInt32 channelLoad + Json.UInt8 operatingClass, + Json.UInteger channel, + Json.UInt8 reportingCondition optional, + Json.UInt8 threshold optional } /** - * @desc - * @member staId Identifier to uniquely specify the station whose information is exposed within this data type + * @desc This configuration applies to the BeaconReport + * @member operatingClass Operating Class field indicates an operating class value * @member channelId Channel number to scan - * @member measurementMode - * @member bssId The BSSID field indicates the BSSID of the BSS(s) for which a beacon report is requested. When requesting beacon reports for all BSSs on the channel, the BSSID field contains the wildcard BSSID - * @member ssId The SSID subelement indicates the ESS(s) or IBSS(s) for which a beacon report is requested - * @member reportingCondition As in table T9-89 of IEEE 802.11-2012 - * @see ETSI GS MEC 028 Clause 6.5.25 Type: BeaconRequestConfig + * @member measurementMode + * @member bssid The BSSID field indicates the BSS for which a beacon report is requested + * @member ssid The SSID subelement indicates the ESS or IBSS for which a beacon report is requested + * @member beaconReportingConf Beacon reporting configuration data field + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.25-1: Attributes of the BeaconRequestConfig */ type record BeaconRequestConfig { - StaIdentity staId, - UInt32 channelId, - UInt32 measurementMode, - BssIds bssId, - SsIds ssId optional, - UInt32 reportingCondition + Json.UInt8 operatingClass, + Json.UInt8 channelId, + Json.UInt8 measurementMode, + Json.String bssid optional, + Json.String ssid optional, + BeaconReportingConfig beaconReportingConf } - type record of JSON.String BssIds; - type record of JSON.String SsIds; /** - * @desc - * @member staId Identifier to uniquely specify the station whose information is exposed within this data type + * @desc This configuration applies to the StaStatistics report * @member groupIdentity As per table T 9-114 of IEEE 802.11-2012 * @member triggeredReport Yes, use triggered report + * @member measurementCount Specifies the number of MAC service data units or protocol data units to determine if the trigger conditions are met * @member triggerTimeout The Trigger Timeout field contains a value in units of 100 TUs during which a measuring STA does not generate further triggered STA Statistics Reports after a trigger condition has been met - * @member triggerCondition As per Figure 9-161 of IEEE 802.11. This bitmap defines what are the metrics returned by the STA Statistics Report - * @see ETSI GS MEC 028 Clause 6.5.26 Type: StaStatisticsConfig + * @member triggerCondition Defines what are the metrics returned by the STA Statistics Report + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.26-1: Attributes of the StaStatisticsConfig */ type record StaStatisticsConfig { - StaIdentity staId, - UInt32 groupIdentity, - boolean triggeredReport, - UInt32 triggerTimeout, - UInt16 triggerCondition + Json.UInt8 groupIdentity, + Json.Bool triggeredReport, + Json.UInteger measurementCount optional, + Json.UInt16 triggerTimeout optional, + STACounterTriggerCondition triggerCondition optional } /** - * @desc + * @desc This type represents information in a STA Beacon report * @member staId Identifier to uniquely specify the station whose information is exposed within this data type + * @member operatingClass Operating Class field indicates an operating class value * @member measurementId Measurement ID of the Measurement configuration applied to this Beacon Report - * @member bssId The BSSID field indicates the BSSID of the BSS(s) for which a beacon report has been received - * @member ssId The SSID subelement indicates the ESS(s) or IBSS(s) for which a beacon report is received - * @see ETSI GS MEC 028 Clause 6.5.27 Type: BeaconReport + * @member channel Channel number where the beacon was received + * @member reportedFrameInfo Information about the reported beacon frame + * @member bssid Indicates the BSSID of the BSS(s) for which a beacon report has been received + * @member ssid Indicates the ESS(s) or IBSS(s) for which a beacon report is received + * @member rcpi Indicates the received channel power of the Beacon + * @member rsni Indicates the received signal-to-noise indication for the Beacon + * @member antennaId contains the identifying number for the antenna(s) used for this measurement + * @member parentTsf contains the lower 4 octets of the measuring STA's TSF timer value at the start of reception of the first octet of the timestamp field of the reported Beacon + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.27-1: Attributes of the BeaconReport */ - type record BeaconReportItem { - StaIdentity staId, - JSON.String measurementId, - UInt32 channelId, - BssIds bssId, - SsIds ssId optional + type record BeaconReport_ { + StaIdentity staId, + Json.String measurementId, + Json.UInt8 operatingClass, + Json.UInt8 channel, + ReportedBeaconFrameInfo reportedFrameInfo, + Json.String bssid, + Json.String ssid optional, + Json.UInt8 rcpi optional, + Json.UInt8 rsni optional, + Json.UInt8 antennaId optional, + Json.UInteger parentTsf optional } - type record of BeaconReportItem BeaconReport; + type set of BeaconReport_ BeaconReport; /** - * @desc Information on Access Points available from the WLAN Access Information Service - * @member timeStamp TimeStamp - * @member apId Identifier(s) to uniquely specify the Access Point whose information is exposed within this data type - * @member channel Channel configured for the Access Point - * @member wlanCap WLAN capabilities of Access Point - * @member wanMetrics WAN Metrics element provides information about the WAN link connecting an IEEE 802.11 Access Node and the Internet - * @member bssLoad BSS Load attribute contains information on the current STA population and traffic levels in the BSS - * @member extBssLoad Extended BSS Load attribute contains more detailed information on the current STA population and traffic levels in the BSS - * @member apLocation The location on the Access Point - * @see ETSI GS MEC 028 Clause 6.2.2 Type: ApInfo + * @desc This type represents the Beacon Reporting Condition configuration + * @member reportingCondition Reporting condition for the Beacon Report + * @member threshold Contains either the threshold value or the offset value to be used for conditional reporting + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.28-1: Attributes of the BeaconReportingConfig */ - type record ApInfo { - TimeStamp timeStamp optional, - ApIdentity apId, - UInt32 channel optional, - WlanCapabilities wlanCap optional, - WanMetrics wanMetrics optional, - BssLoad bssLoad optional, - ExtBssLoad extBssLoad optional, - OBssLoad oBssLoad optional, - ApLocation apLocation optional + type record BeaconReportingConfig { + Json.UInt8 reportingCondition, + Json.UInt8 threshold } - type record of ApInfo ApInfoList; /** - * @desc Information on wireless stations available from the WLAN Access Information Service - * @member timeStamp TimeStamp - * @member staId Identifier(s) to uniquely specify station whose information is exposed within this data type - * @member channel Channel configured for the Access Point - * @member apAssociated Information about the Access Point that this Client Station is associated to - * @member rssi Receive Signal Strength Indicator - * @member staDataRate Station Data Rate - * @member staStatistics Statistics as defined in IEEE 802.11-2016 for the client station collected over measurement duration - * @member beaconReport Beacon Report as defined in Wi-Fi Agile Multiband Specification - * @member neighborReport Information about neighbor Access Points seen by the station - * @member channelLoad Channel Load reports as seen by the station - * @see ETSI GS MEC 028 Clause 6.2.3 Type: StaInfo + * @desc This type represents the Beacon Reported Frame information + * @member phyType Value between 0 and 127 coded according to dot11PHYType + * @member frameType A value of 0 indicates a Beacon or Probe Response. A value of 1 indicates a Measurement Pilot frame + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.29-1: Attributes of the ReportedBeaconFrameInfo */ - type record StaInfo { - TimeStamp timeStamp optional, - StaIdentity staId, - UInt32 channel optional, - ApAssociated apAssociated optional, - Rssi rssi optional, - StaDataRate staDataRate optional, - StaStatistics staStatistics optional, - BeaconReport beaconReport optional, - NeighborReport neighborReport optional, - ChannelLoad channelLoad optional + type record ReportedBeaconFrameInfo { + Json.UInt8 phyType, + Json.UInt8 frameType + } + /** + * @desc This type represents BSSID Information field within the Neighbor Report + * @member apReachability The apReachability field indicates whether the AP identified by this BSSID is reachable by the STA that requested the neighbor report + * @member security True indicates the AP identified by this BSSID supports the same security provisioning as used by the STA in its current association + * @member capabilities Capability information for the AP indicated by this BSSID + * @member highThroughputTrue indicates that the AP represented by this BSSID is an HT AP including the HT Capabilities element in its Beacons, and that the contents of that HT Capabilities element are identical to the HT Capabilities element advertised by the AP sending the report + * @member veryHighThroughputTrue indicates that the AP represented by this BSSID is a VHT AP and that the VHT Capabilities element + * @member ftm True indicates the AP represented by this BSSID is an AP that has set the Fine Timing Measurement Responder field of the Extended Capabilities element to 1 + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.30-1: Attributes of the BssidInfo + */ + type record BssidInfo { + Json.UInt8 apReachability, + Json.Bool security, + BssCapabilities capabilities, + Json.Bool highThroughput, + Json.Bool veryHighThroughput, + Json.Bool ftm } - type record of StaInfo StaInfoList; + /** - * @desc Different measurements configuration available from the WLAN Access Information Service - * @member _links Hyperlink related to the resource - * @member staId Identifier(s) to uniquely specify the target client station(s) for the measurement configuration - * @member measurementId Identifier of this measurement configuration - * @member measurementInfo Information used to configure this measurement - * @see ETSI GS MEC 028 Clause 6.2.4 Type: MeasurementConfig + * @desc This type represents BSS Capabilities subfield within the Neighbor Report + * @member spectrumManagement Spectrum Management required + * @member qos QoS Option implemented + * @member apsd APSD Option implemented + * @member radioMeasurements Radio Measurement Activated + * @member delayedBACK Delayed Block Ack Option implemented + * @member immediateBACK Immediate Block Ack Option implemented + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.31-1: Attributes of the BssCapabilities */ - type record MeasurementConfig { - LinkTypes links optional, - StaIdentities staId, - JSON.String measurementId, - MeasurementInfo measurementInfo - } with { - variant (links) "name as '_links'"; + type record BssCapabilities { + Json.Bool spectrumManagement, + Json.Bool qos, + Json.Bool apsd, + Json.Bool radioMeasurements, + Json.Bool delayedBACK, + Json.Bool immediateBACK } - type record MeasurementConfig_MeasurementConfigLinkList { - JSON.AnyURI href, - JSON.String measurementId + /** + * @desc This configuration applies to the Neighbor Report + * @member ssid Contains an SSID element + * @member bssid BSSID of the neighbor AP which information is intended to obtain + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.32-1: Attributes of the NeighborReportConfig + */ + type record NeighborReportConfig { + Json.String ssid optional, + Json.String bssid optional } /** - * @desc The different measurement configurations available from the WLAN Access Information Service - * @member _links Hyperlink related to the resource - * @member measurementConfig - * @see ETSI GS MEC 028 Clause 6.2.5 Type: MeasurementConfigLinkList + * @desc This type represents the STA Counter Trigger Condition configuration + * @member failedCountThreshold Configure and set threshold for dot11FailedCount trigger + * @member fcsErrorCountThreshold Configure and set threshold for dot11FCSErrorCount trigger + * @member multipleRetryCountThreshold Configure and set threshold for dot11MultipleRetryCount trigger + * @member frameDuplicateCountThreshold Configure and set threshold for dot11FrameDuplicateCount trigger + * @member rtsFailureCountThreshold Configure and set threshold for dot11RTSFailureCount trigger + * @member ackFailureCountThreshold Configure and set threshold for dot11AckFailureCount trigger + * @member retryCountThreshold Configure and set threshold for dot11RetryCount trigger + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.33-1: Attributes of the STACounterTriggerCondition */ - type record MeasurementConfigLinkList { - LinkTypes links optional, - MeasurementConfig_MeasurementConfigLinkList measurementConfig - } with { - variant (links) "name as '_links'"; + type record STACounterTriggerCondition { + Json.UInteger failedCountThreshold optional, + Json.UInteger fcsErrorCountThreshold optional, + Json.UInteger multipleRetryCountThreshold optional, + Json.UInteger frameDuplicateCountThreshold optional, + Json.UInteger rtsFailureCountThreshold optional, + Json.UInteger ackFailureCountThreshold optional, + Json.UInteger retryCountThreshold optional } /** - * @desc Set for trigger-based event notification reporting - * @member trigger_ Trigger for the notification - * @member threshold Number of connected stations threshold for trigger-based event reporting - * @see ETSI GS MEC 028 Clause 6.3.3 Type: StaDataRateSubscription + * @desc STA Statistics Group Data for Group Identity = 0 + * @member transmittedFragmentCount dot11TransmittedFragmentCount counter + * @member groupTransmittedFrameCount dot11GroupTransmittedFrameCount counter + * @member failedCount dot11FailedCount counter + * @member receivedFragmentCountdot11ReceivedFragmentCount counter + * @member groupReceivedFrameCountdot11GroupReceivedFrameCount counter + * @member fcsErrorCount dot11FCSErrorCount counter + * @member transmittedFrameCount dot11TransmittedFrameCount counter + * @member reportingReasonStaCounters Optionally reported reason for STA Statistics Group 0 + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.34-1: Attributes of the StaStatisticsGroupZeroData */ - type record NotificationEvent { - UInt8 trigger_, - UInt8 threshold - } with { - variant (trigger_) "name as 'trigger'"; + type record StaStatisticsGroupZeroData { + Json.UInteger transmittedFragmentCount, + Json.UInteger groupTransmittedFrameCount, + Json.UInteger failedCount, + Json.UInteger receivedFragmentCount, + Json.UInteger groupReceivedFrameCount, + Json.UInteger fcsErrorCount, + Json.UInteger transmittedFrameCount, + ReportingReasonStaCounters reportingReasonStaCounters optional } /** - * @desc Subscription to get updates on client stations that are associated to an Access Point - * @member subscriptionType Shall be set to "AssocStaSubscription" - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed WLAN information - * @member requestTestNotification Set to TRUE by the service consumer to request a test notification on the callbackReference URI to determine if it is reachable by the WAIS for notifications - * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the WAIS and the service consumer for notifications, either in place of the callbackReference URI or if it is not reachable via the test notification - * @member _links Hyperlink related to the resource - * @member apId Identifier(s) to uniquely specify the target Access Point for the subscription - * @member notificationPeriod Set for periodic notification reporting - * @member notificationEvent Set for trigger-based event notification reporting - * @member expiryDeadline The expiration time of the subscription determined by the WLAN Access Information Service - * @see ETSI GS MEC 028 Clause 6.3.2 Type: AssocStaSubscription + * @desc STA Statistics Group Data for Group Identity = 1 + * @member retryCount dot11RetryCount counter + * @member multipleRetryCount dot11MultipleRetryCount counter + * @member frameDuplicateCount dot11FrameDuplicateCount counter + * @member rtsSuccessCount dot11RTSSuccessCount counter + * @member rtsFailureCount dot11RTSFailureCount counter + * @member ackFailureCount dot11AckFailureCount counter + * @member reportingReasonStaCounters Optionally reported reason for STA Statistics Group 1 + * @see ETSI GS MEC 028 V2.3.1 Clause 6.5.35-1: Attributes of the StaStatisticsGroupOneData */ - type record AssocStaSubscription { - JSON.String subscriptionType, - JSON.AnyURI callbackReference optional, - JSON.Bool requestTestNotification optional, - WebsockNotifConfig websockNotifConfig optional, - LinkTypes links optional, - ApIdentity apId, - UInt8 notificationPeriod optional, - NotificationEvent notificationEvent optional, - TimeStamp expiryDeadline optional - } with { - variant (links) "name as '_links'"; + type record StaStatisticsGroupOneData { + Json.UInteger retryCount, + Json.UInteger multipleRetryCount, + Json.UInteger frameDuplicateCount, + Json.UInteger rtsSuccessCount, + Json.UInteger rtsFailureCount, + Json.UInteger ackFailureCount, + ReportingReasonStaCounters reportingReasonStaCounters optional } - type record of AssocStaSubscription AssocStaSubscriptionList; /** - * @desc Subscription to get updates on the Data Rate of targeted client station(s) - * @member subscriptionType Shall be set to "AssocStaSubscription" - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed WLAN information - * @member requestTestNotification Set to TRUE by the service consumer to request a test notification on the callbackReference URI to determine if it is reachable by the WAIS for notifications - * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the WAIS and the service consumer for notifications, either in place of the callbackReference URI or if it is not reachable via the test notification - * @member _links Hyperlink related to the resource - * @member staId Identifier(s) to uniquely specify the target client station(s) for the subscription - * @member notificationPeriod Set for periodic notification reporting - * @member notificationEvent Set for trigger-based event notification reporting - * @member expiryDeadline The expiration time of the subscription determined by the WLAN Access Information Service - * @see ETSI GS MEC 028 Clause 6.3.3 Type: StaDataRateSubscription + * @desc STA Statistics Group Data for Group Identity = 2 through 9 + * @member qosTransmittedFragmentCount dot11QosTransmittedFragmentCount counter + * @member qosFailedCount dot11QosFailedCount counter + * @member qosRetryCount dot11QosRetryCount counter + * @member qosMultipleRetryCount dot11QosMultipleRetryCount counter + * @member qosFrameDuplicateCount dot11QosFrameDuplicateCount counter + * @member qosRTSSuccessCount dot11QosRTSSuccessCount counter + * @member qosRTSFailureCount dot11QosRTSFailureCount counter + * @member qosAckFailureCount dot11QosAckFailureCount counter + * @member qosReceivedFragmentCount dot11QosReceivedFragmentCount counter + * @member qosTransmittedFrameCount dot11QosTransmittedFrameCount counter + * @member qosDiscardedFrameCount dot11QosDiscardedFrameCount counter + * @member qosMPDUsReceivedCount dot11QosMPDUsReceivedCount counter + * @member qosRetriesReceivedCount dot11QosRetriesReceivedCount counter + * @member reportingReasonQoSCounters Optionally reported reason for STA Statistics Groups 2 to 9 + * @see ETSI GS MEC 028 V2.3.1 Clause 6.5.36-1: Attributes of the StaStatisticsGroup2to9Data */ - type record StaDataRateSubscription { - JSON.String subscriptionType, - JSON.AnyURI callbackReference, - JSON.Bool requestTestNotification optional, - WebsockNotifConfig websockNotifConfig optional, - LinkTypes links optional, - StaIdentities staId, - UInt8 notificationPeriod optional, - NotificationEvent notificationEvent optional, - TimeStamp expiryDeadline optional - } with { - variant (links) "name as '_links'"; + type record StaStatisticsGroup2to9Data { + Json.UInteger qosTransmittedFragmentCount, + Json.UInteger qosFailedCount, + Json.UInteger qosRetryCount, + Json.UInteger qosMultipleRetryCount, + Json.UInteger qosFrameDuplicateCount, + Json.UInteger qosRTSSuccessCount, + Json.UInteger qosRTSFailureCount, + Json.UInteger qosAckFailureCount, + Json.UInteger qosReceivedFragmentCount, + Json.UInteger qosTransmittedFrameCount, + Json.UInteger qosDiscardedFrameCount, + Json.UInteger qosMPDUsReceivedCount, + Json.UInteger qosRetriesReceivedCount, + ReportingReasonQoSCounters reportingReasonQoSCounters optional } - type record of StaDataRateSubscription StaDataRateSubscriptionList; /** - * @desc - * @member href The URI referring to the subscription - * @member subscriptionType Type of the subscription - * @see ETSI GS MEC 028 Clause 6.3.4 Type: SubscriptionLinkList + * @desc Optionally reported reason for STA Statistics Group Identities 0 or 1 (STA Counters) in the STA Statistics Optional subelements + * @member failed dot11Failed + * @member fcsError dot11FCSError + * @member multipleRetry dot11MultipleRetry + * @member frameDuplicate dot11FrameDuplicate + * @member rtsFailure dot11RTSFailure + * @member ackFailure dot11AckFailure + * @member retry dot11Retry + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.37-1: Attributes of the ReportingReasonStaCounters */ - type record SubscriptionItem { - JSON.AnyURI href, - JSON.String subscriptionType + type record ReportingReasonStaCounters { + Json.Bool failed, + Json.Bool fcsError, + Json.Bool multipleRetry, + Json.Bool frameDuplicate, + Json.Bool rtsFailure, + Json.Bool ackFailure, + Json.Bool retry } - type record of SubscriptionItem Subscription; /** - * @desc List of links related to currently existing subscriptions for the service consumer - * @member links List of hyperlinks related to the resource - * @member assocStaSubscription - * @see ETSI GS MEC 028 Clause 6.3.4 Type: SubscriptionLinkList + * @desc Optionally reported reason for STA Statistics Group Identities 2 to 9 (QoS STA Counters) in the STA Statistics + * @member qosFailed dot11QoSFailed + * @member qosRetry dot11QoSRetry + * @member qosMultipleRetry dot11QoSMultipleRetry + * @member qosFrameDuplicate dot11QoSFrameDuplicate + * @member qosRtsFailure dot11QoSRTSFailure + * @member qosAckFailure dot11QoSAckFailure + * @member qosDiscarded dot11QoSDiscarded + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.38-1: Attributes of the ReportingReasonQoSCounters */ - type record SubscriptionLinkList { - LinkTypes links, - Subscription subscription optional - } with { - variant (links) "name as '_links'"; + type record ReportingReasonQoSCounters { + Json.Bool qosFailed, + Json.Bool qosRetry, + Json.Bool qosMultipleRetry, + Json.Bool qosFrameDuplicate, + Json.Bool qosRtsFailure, + Json.Bool qosAckFailure, + Json.Bool qosDiscarded } /** - * @desc Configuration for the delivery of subscription notifications over Websockets - * @member websocketUri Set by WAIS to indicate to the service consumer the Websocket URI to be used for delivering notifications - * @member requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested - * @see ETSI GS MEC 028 Clause 6.3.6 Type: WebsockNotifConfig + * @desc Channel Load report from a station + * @member staId Identifier to uniquely specify the station whose information is exposed within this report + * @member measurementId Measurement ID of the Measurement configuration applied to this Channel Load Report + * @member operatingClass Operating Class field indicates an operating class value + * @member channel Channel number indicates the channel number for which the measurement report applies + * @member measurementDuration Duration over which the Channel Load report was measured, in units of TUs of 1024 µs + * @member channelLoad Proportion of measurement duration for which the measuring STA determined the channel to be busy, as a percentage of time, linearl scaled with 255 representing 100% + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.39-1: Attributes of the ChannelLoad */ - type record WebsockNotifConfig { - JSON.AnyURI websocketUri optional, - JSON.Bool requestWebsocketUri optional + type record ChannelLoad_ { + StaIdentity staId optional, + Json.String measurementId, + Json.UInt8 operatingClass, + Json.UInt8 channel, + Json.UInt8 measurementDuration, + Json.UInt8 channelLoad } + type set of ChannelLoad_ ChannelLoad; /** - * @desc Notification from WLAN Access Information Service with regards to client stations associated to the targeted Access Point - * @member notificationType Shall be set to "AssocStaNotification" - * @member timeStamp Time stamp - * @member apId Identifier(s) to uniquely specify the Access Point to which the client stations are associated - * @member staId Identifier(s) to uniquely specify the client station(s) associated - * @see ETSI GS MEC 028 Clause 6.4.2 Type: AssocStaNotification + * @desc The load of a Overlapping BSS + * @member allocatedTrafficSelfMean Mean of allocated traffic from this AP (BSS) in units of 32 µs per second + * @member allocatedTrafficSelfStdDev Standard deviation from the mean of allocation traffic from this BSS in units of 32 µs per second + * @member Mean of the sum of allocated traffic from other APs on the overlapping channel in unit of 32 µs per second + * @member Standard deviation from the mean of the sum of allocated traffic from other APs on the overlapping channel in unit of 32 µs per second + * @member overlap Indicates the number of other APs that are sharing the same channel as the reporting AP + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.40-1: Attributes of the OBssLoad */ - type record AssocStaNotification { - JSON.String notificationType, - TimeStamp timeStamp optional, - ApIdentity apId, - StaIdentities staId optional + type record OBssLoad { + Json.UInt16 allocatedTrafficSelfMean, + Json.UInt16 allocatedTrafficSelfStdDev optional, + Json.UInt16 allocatedTrafficShareMean, + Json.UInt16 allocatedTrafficShareStdDev optional, + Json.UInt8 overlap optional } /** - * @desc Notification from WLAN Information service with regards to Data Rates of the subscribed client stations - * @member notificationType Shall be set to "StaDataRateNotification" - * @member timeStamp Time stamp - * @member staDataRate Data rates of a client station - * @see ETSI GS MEC 028 Clause 6.4.3 Type: StaDataRateNotification + * @desc The information required to define client station measurements available from the WLAN Access Information Service + * @member measurementDuration Duration of the measurement in time units (TUs) of 1024 µs + * @member randomInterval Random interval to be used for starting the measurement in TUs of 1024 µs + * @member channelLoadConf Configuration related to the Channel Load + * @member beaconRequestConf Configuration related to Beacon Request + * @member staStatisticsConf Configuration related to the statistics provided by STAs + * @member neighborReportConf Configuration related to Neighbor Reports + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.41-1: Attributes for MeasurementInfo */ - type record StaDataRateNotification { - JSON.String notificationType, - TimeStamp timeStamp optional, - StaDataRates staDataRate optional + type record MeasurementInfo { + Json.UInt16 measurementDuration optional, + Json.UInt16 randomInterval optional, + ChannelLoadConfig channelLoadConf optional, + BeaconRequestConfig beaconRequestConf optional, + StaStatisticsConfig staStatisticsConf optional, + NeighborReportConfig neighborReportConf optional } /** - * @desc Notification from WLAN Access Information service with regards to expiry of an existing subscription - * @member notificationType Shall be set to "ExpiryNotification" - * @member links Hyperlink related to the resource - * @member expiryDeadlineTime stamp - * @see ETSI GS MEC 028 Clause 6.4.4 Type: ExpiryNotification + * @desc Configuration for the delivery of subscription notifications over Websockets + * @member websocketUri Set by WAIS to indicate to the service consumer the Websocket URI to be used for delivering notifications + * @member requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.42-1: Attributes of the WebsockNotifConfig */ - type record ExpiryNotification { - JSON.String notificationType, - LinkTypes links, - TimeStamp expiryDeadline - } with { - variant (links) "name as '_links'"; + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional } - } - with { +} with { encode "JSON" } // End of module WlanInformationAPI_TypesAndValues diff --git a/ttcn/LibMec/module.mk b/ttcn/LibMec/module.mk index 3d489bca94f5fb49efd030306d2d813101d63786..d76a5ac09378d4d20e8c712d19fe6a0320a3ec5e 100644 --- a/ttcn/LibMec/module.mk +++ b/ttcn/LibMec/module.mk @@ -1,9 +1,7 @@ sources := \ - ttcn/JSON.ttcn \ ttcn/LibMec_Functions.ttcn \ ttcn/LibMec_Pics.ttcn \ ttcn/LibMec_Pixits.ttcn \ ttcn/LibMec_Templates.ttcn \ ttcn/LibMec_TypesAndValues.ttcn \ - diff --git a/ttcn/LibMec/ttcn/JSON.ttcn b/ttcn/LibMec/ttcn/JSON.ttcn deleted file mode 100644 index 5867bd3ced6ddf8f960b6c4835e693de91c51e3e..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/ttcn/JSON.ttcn +++ /dev/null @@ -1,151 +0,0 @@ -module JSON { - - // These constants are used in the JSON date/time type definitions - const charstring - dash := "-", - cln := ":", - year := "[0-9]#4", - yearExpansion := "(-([1-9][0-9]#(0,))#(,1))#(,1)", - month := "(0[1-9]|1[0-2])", - dayOfMonth := "(0[1-9]|[12][0-9]|3[01])", - hour := "([01][0-9]|2[0-3])", - minute := "([0-5][0-9])", - second := "([0-5][0-9])", - sFraction := "(.[0-9]#(1,))#(,1)", - endOfDayExt := "24:00:00(.0#(1,))#(,1)", - nums := "[0-9]#(1,)", - ZorTimeZoneExt := "(Z|[+-]((0[0-9]|1[0-3]):[0-5][0-9]|14:00))#(,1)", - durTime := "(T[0-9]#(1,)"& - "(H([0-9]#(1,)(M([0-9]#(1,)(S|.[0-9]#(1,)S))#(,1)|.[0-9]#(1,)S|S))#(,1)|"& - "M([0-9]#(1,)(S|.[0-9]#(1,)S)|.[0-9]#(1,)M)#(,1)|"& - "S|"& - ".[0-9]#(1,)S))"; - type universal charstring utf8string; - type utf8string JSONCompatibleString - ( - char(0,0,0,9)..char(0,0,0,9), - char(0,0,0,10)..char(0,0,0,10), - char(0,0,0,13)..char(0,0,0,13), - char(0,0,0,32)..char(0,0,215,255), - char(0,0,224,0)..char(0,0,255,253), - char(0,1,0,0)..char(0,16,255,253) - ); - type utf8string JSONStringWithNoWhitespace - ( - char(0,0,0,33)..char(0,0,215,255), - char(0,0,224,0)..char(0,0,255,253), - char(0,1,0,0)..char(0,16,255,253) - ); - type utf8string JSONStringWithNoCRLFHT - ( - char(0,0,0,32)..char(0,0,215,255), - char(0,0,224,0)..char(0,0,255,253), - char(0,1,0,0)..char(0,16,255,253) - ); - - // JSON Number type (generic) - type float Number (!-infinity .. !infinity) /*with { - variant "JSON:number" - }*/; - // Integer type - type integer Integer (-infinity .. infinity) /*with { - variant "JSON:integer" - }*/; - // String type - type utf8string String /*with { - variant "JSON:string" - }*/; - type JSONStringWithNoCRLFHT NormalizedString /*with { - variant "JSON:normalizedString"; - }*/; - type JSONStringWithNoWhitespace Name /*with { - variant "JSON:Name"; - }*/; - type Name NCName /*with { - variant "JSON:NCName"; - }*/; - type NormalizedString Token /*with { - variant "JSON:token"; - }*/; - type JSONStringWithNoCRLFHT AnyURI /*with { - variant "JSON:anyURI"; - }*/; - type charstring Duration (pattern - "{dash}#(,1)P({nums}(Y({nums}(M({nums}D{durTime}#(,1)|{durTime}#(,1))|D{durTime}#(,1))|" & - "{durTime}#(,1))|M({nums}D{durTime}#(,1)|{durTime}#(,1))|D{durTime}#(,1))|{durTime})") - /*with { - variant "JSON:duration"; - }*/; - type charstring DateTime (pattern - "{yearExpansion}{year}{dash}{month}{dash}{dayOfMonth}T({hour}{cln}{minute}{cln}{second}" & - "{sFraction}|{endOfDayExt}){ZorTimeZoneExt}" ) - /*with { - variant "JSON:dateTime"; - }*/; - type charstring Time (pattern "({hour}{cln}{minute}{cln}{second}{sFraction}|{endOfDayExt}){ZorTimeZoneExt}" ) - /*with { - variant "JSON:time"; - }*/; - type charstring Date (pattern "{yearExpansion}{year}{dash}{month}{dash}{dayOfMonth}{ZorTimeZoneExt}" ) - /*with { - variant "JSON:date"; - }*/; - // Array type - /*type record of JSON.Values Array with { - variant "JSON:array" - }*/ - // Subsidiary array types - type record of JSON.String StrArray; /*with { - variant "JSON:array" - }*/ - type record of JSON.Number NumArray; /*with { - variant "JSON:array" - }*/ - type record of JSON.Integer IntArray; /*with { - variant "JSON:array" - } - type record of JSON.Bool BoolArray with { - variant "JSON:array" - } - type record of JSON.Object ObjArray with { - variant "JSON:array" - }*/ - // Object member - /*type record ObjectMember { - JSON.String name, - JSON.Values value_ - } with { - variant "JSON:objectMember" - }*/ - // Generic JSON object type - /*type record Object { - record length (1..infinity) of JSON.ObjectMember memberList optional - } with { - variant "JSON:object" - } - type union Values { - JSON.String str, - JSON.Number num, - JSON.Integer int, - JSON.Object object, - JSON.Array array, - JSON.StrArray strArray, - JSON.NumArray numArray, - JSON.IntArray intArray, - JSON.BoolArray boolArray, - JSON.ObjArray objArray, - JSON.Bool bool, - JSON.Null null_ - } with { - variant "asValue" - }*/ - - //JSON literals - //When only the true and false literals are allowed - type boolean Bool; /*with { variant "JSON:literal" }*/ - //When only the null literal is allowed - type enumerated Null { null_ }; /*with { variant "JSON:literal" }*/ - -} with { - encode "JSON" -} // End of module JSON diff --git a/ttcn/LibMec/ttcn/LibMec_Functions.ttcn b/ttcn/LibMec/ttcn/LibMec_Functions.ttcn index e45be26cba69a18e4cfc0ca4374ad0f512a05b19..fb0115cf23ef263da9fcaf78db4d2bfc857d310d 100644 --- a/ttcn/LibMec/ttcn/LibMec_Functions.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Functions.ttcn @@ -8,113 +8,14 @@ module LibMec_Functions { import from LibMec_Pixits all; import from LibMec_Pics all; - // LibMec_UEidentityAPI - import from UEidentityAPI_TypesAndValues all; - import from UEidentityAPI_Templates all; - import from UEidentityAPI_Pixits all; - // LibHttp - import from LibItsHttp_TypesAndValues all; - import from LibItsHttp_JsonMessageBodyTypes all; - import from LibItsHttp_Templates all; - import from LibItsHttp_TestSystem all; - import from LibItsHttp_Templates all; - import from LibItsHttp_JsonTemplates all; - import from LibItsHttp_Pics all; - - group preambles { - - /** - * @desc Setup HTTP pprotocol port - */ - function f_cf_01_http_up() runs on HttpComponent { - - // Map ports - map(self:httpPort, system:httpPort); - - // Connect - f_connect4SelfOrClientSync(); - - activate(a_cf_01_http_down()); - activate(a_default_requests()); - activate(a_default_responses()); - - } // End of function f_cf_01_http_up - - /** - * @desc Setup HTTP pprotocol port - */ - function f_cf_01_http_notif_up() runs on HttpComponent { - - // Map ports - map(self:httpPort, system:httpPort); - map(self:httpPort_notif, system:httpPort_notif); - - // Connect - f_connect4SelfOrClientSync(); - - activate(a_cf_01_http_notif_down()); - activate(a_default_requests()); - activate(a_default_responses()); - - } // End of function f_cf_01_http_notif_up - - } // End of group preambles - - group postambles { - - /** - * @desc Shutdown HTTP pprotocol port - */ - function f_cf_01_http_down() runs on HttpComponent { - - // Unmap ports - unmap(self:httpPort, system:httpPort); - - // Disconnect ports - f_disconnect4SelfOrClientSync(); - - deactivate; - } // End of function f_cf_01_http_down - - /** - * @desc Shutdown HTTP pprotocol port - */ - function f_cf_01_http_notif_down() runs on HttpComponent { - - // Unmap ports - unmap(self:httpPort, system:httpPort); - unmap(self:httpPort_notif, system:httpPort_notif); - - // Disconnect ports - f_disconnect4SelfOrClientSync(); - - deactivate; - } // End of function f_cf_01_http_notif_down - - /** - * @desc Default handling cf01 de-initialisation. - */ - altstep a_cf_01_http_down() runs on HttpComponent { - [] a_shutdown() { - f_cf_01_http_down(); - log("*** a_cf_01_http_down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); - stop; - } - } // End of altstep a_cf_01_http_down - - /** - * @desc Default handling cf01 de-initialisation. - */ - altstep a_cf_01_http_notif_down() runs on HttpComponent { - [] a_shutdown() { - f_cf_01_http_notif_down(); - log("*** a_cf_01_http_notif_down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); - stop; - } - } // End of altstep a_cf_01_http_notif_down - - } // End of group postambles + import from LibHttp_TypesAndValues all; + import from LibHttp_JsonMessageBodyTypes all; + import from LibHttp_Templates all; + import from LibHttp_TestSystem all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_Pics all; group external_functions { @@ -133,99 +34,15 @@ module LibMec_Functions { } // End of group external_functions group helpers { - - /** - * @desc Check HTTP response headers - * @param p_headers The HTTP headers - * @param p_value the expected va;ue - * @return true on success, false otherwise - */ - function f_check_headers( - in Headers p_headers, - in charstring p_header_name := "Location", - in template (present) charstring p_value := ? - ) return boolean { - // Local variables - var boolean v_header_matched := false; - - for (var integer v_idx := 0; v_idx < lengthof(p_headers); v_idx := v_idx + 1) { - if (p_headers[v_idx].header_name == p_header_name) { - if (match(p_headers[v_idx].header_value[0], p_value) == true) { - v_header_matched := true; - } // else, nothing to do - break; - } - } // End of 'for' statement - - return v_header_matched; - } - - /** - * @desc Check if the user is registered or not - * @param p_ue_identity_tag The UE identity tag - * @param p_headers The HTTP headers - * @return 0 if unregistered, 1 if registered, -1 otherwise - */ - function f_check_user_register_state( - in UeIdentityTag p_ue_identity_tag := PX_UE_IDENTITY_TAG, - in Headers p_headers - ) runs on HttpComponent return integer { - var HttpMessage v_response; - var integer v_result := -1; - - // Send request - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(p_ue_identity_tag, "UTF-8")), - p_headers - ) - ) - ); - // Await for the response - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_ue_identity_tag_info( - mw_ue_identity_tag_info( - { *, mw_ue_identity_tag_item(PX_UE_IDENTITY_TAG), * } - )))))) -> value v_response { - tc_ac.stop; - - for (var integer v_i := 0; v_i < lengthof(v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags); v_i := v_i + 1) { - if (v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].ueIdentityTag == p_ue_identity_tag) { - //log("Processing ", v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].ueIdentityTag); - //log("State ", v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].state); - if (v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].state == UNREGISTERED) { - v_result := 0; - } else if (v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].state == REGISTERED) { - v_result := 1; - } else if (v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].state == INVALID_STATE) { - v_result := 2; - } - break; - } - } - } - [] tc_ac.timeout { - } - } // End of 'alt' statement - - //log("<<< f_check_user_register_state: v_result: ", v_result); - return v_result; - } // End of function f_check_user_register_state - + function f_get_current_time_utc() return UInt64 { return fx_get_current_time_utc(); } // End of function f_get_current_time_utc - + function f_get_current_timestamp_utc() return UInt64 { return fx_get_current_time_utc(); } // End of function f_get_current_timestamp_utc - + } // End of group helpers group registration { @@ -259,7 +76,7 @@ module LibMec_Functions { p_notification := v_response.response.body.json_body; v_result := 0; - log("*** f_register_for_notification: INFO: Regustration for notification succeed ***"); + log("*** f_register_for_notification: INFO: Registration for notification succeed ***"); } [] tc_ac.timeout { log("*** f_register_for_notification: INCONC: Expected message not received ***"); @@ -294,7 +111,7 @@ module LibMec_Functions { tc_ac.stop; v_result := 0; - log("*** f_unregister_for_notification: INFO: Regustration for notification succeed ***"); + log("*** f_unregister_for_notification: INFO: De-registration for notification succeed ***"); } [] tc_ac.timeout { log("*** f_unregister_for_notification: INCONC: Expected message not received ***"); @@ -307,90 +124,4 @@ module LibMec_Functions { } // End of group registration - group altsteps { - - altstep a_default_requests() runs on HttpComponent { - [] httpPort.receive(mw_http_request) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Server error: Receive request instead of response on httpPort ***"); - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - } - [] httpPort_notif.receive(mw_http_request) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Server error: Receive unsollicited request on httpPort_notif ***"); - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - } - } // End of altstep a_default_requests - - altstep a_default_responses() runs on HttpComponent { - var HttpMessage v_response; - - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_xml - ))) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Unexpected XML response ***"); - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - } - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json - ))) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Unexpected JSON response ***"); - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - } - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_binary - ))) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Unexpected binary response ***"); - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - } - [PICS_USE_TOKEN_HEADER == false] httpPort.receive( - mw_http_response( - mw_http_response_401_unauthorized - )) -> value v_response { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Received HTTP error message in case of non authenticated HTTP request ***"); - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - } - [] httpPort.receive( - mw_http_response( - mw_http_response_ko - )) -> value v_response { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Server error: " & int2str(v_response.response.statuscode) & "/" & v_response.response.statustext & " ***"); - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - // Do not repeat! - } - [] httpPort.receive(mw_http_response) -> value v_response { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Server error: " & int2str(v_response.response.statuscode) & "/" & v_response.response.statustext & " ***"); - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - } - [] httpPort.receive { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Server error: Receive unsollicited message on httpPort ***"); - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - } - [] httpPort_notif.receive(mw_http_response) -> value v_response { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Server error: " & int2str(v_response.response.statuscode) & "/" & v_response.response.statustext & " on httpPort_notif ***"); - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - } - [] httpPort_notif.receive { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Server error: Receive unsollicited message on httpPort_notif ***"); - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - } - } // End of altstep a_default_responses - - } // end of group altsteps - } // End of module LibMec_Functions diff --git a/ttcn/LibMec/ttcn/LibMec_Pics.ttcn b/ttcn/LibMec/ttcn/LibMec_Pics.ttcn index 18ace6f78d0e651f4e1116ac151db1c905fe735e..f488964887181143388be3de7a7889be88fd2ab9 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pics.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pics.ttcn @@ -36,8 +36,10 @@ module LibMec_Pics { modulepar boolean PICS_APP_PACKAGE_NOTIFICATIONS := true; - modulepar charstring PICS_ROOT_API := "exampleAPI"; + modulepar boolean PIC_APP_LCM_MANAGEMENT := true; modulepar boolean PIC_APP_LCM_NOTIFICATIONS := true; + modulepar charstring PICS_ROOT_API := "/"; + } // End of module LibMec_Pics diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index 9c290095b15dfc6f70a2f6a61cc385a2e88dbb08..fee2d654347d9ae207f7681d1c2cdd6f0f0ca542 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -1,101 +1,113 @@ module LibMec_Pixits { - modulepar charstring PX_ME_APP_Q_ZONE_ID_URI := "/location/v2/queries/zones"; + modulepar charstring PX_ME_APP_Q_ZONE_ID_URI := "location/v3/queries/zones"; - modulepar charstring PX_ME_APP_Q_USERS_LIST_URI := "/location/v2/queries/users"; + modulepar charstring PX_ME_APP_Q_USERS_LIST_URI := "location/v3/queries/users"; - modulepar charstring PX_ME_APP_Q_DIST_URI := "/location/v2/subscriptions/distance"; - - modulepar charstring PX_ME_APP_Q_USERS_LOC_SUB_URI := "/location/v2/subscriptions/userTracking"; - - modulepar charstring PX_ME_APP_Q_USERS_TRACK_SUB_URI := "/location/v2/subscriptions/periodic"; + modulepar charstring PX_LOC_API_USERS_SUB_URI := "location/v3/subscriptions/users"; - modulepar charstring PX_ME_APP_Q_USERS_INF_SUB_URI := "/location/v2/subscriptions/zonalTraffic"; + modulepar charstring PX_LOC_API_ZONES_SUB_URI := "location/v3/subscriptions/zones"; - modulepar charstring PX_ME_APP_Q_AREA_SUB_URI := "/location/v2/subscriptions/area/circle"; + modulepar charstring PX_LOC_API_AREA_SUB_URI := "location/v3/subscriptions/area"; + + modulepar charstring PX_LOC_API_DISTANCE_SUB_URI := "location/v3/subscriptions/distance"; - modulepar charstring PX_ME_APP_Q_UE_IDENTITY_ID_URI := "/ui/v1/"; + modulepar charstring PX_ME_APP_Q_UE_IDENTITY_ID_URI := "ui/v1/"; - modulepar charstring PX_SVC_MGMT_TRANS_URI := "/mec_service_mgmt/v1/transports"; + modulepar charstring PX_SVC_MGMT_TRANS_URI := "mec_service_mgmt/v1/transports"; - modulepar charstring PX_SVC_MGMT_APP_URI := "/mec_service_mgmt/v1/application"; + modulepar charstring PX_SVC_MGMT_APP_URI := "mec_service_mgmt/v1/application"; - modulepar charstring PX_RNIS_SUBSCRITIONS_URI := "/rni/v2/subscriptions"; + modulepar charstring PX_RNIS_SUBSCRITIONS_URI := "rni/v2/subscriptions"; - modulepar charstring PX_RNIS_QUERIES_URI := "/rni/v2/queries"; + modulepar charstring PX_RNIS_QUERIES_URI := "rni/v2/queries"; - modulepar charstring PX_ME_BWM_URI := "/bwm/v1/bw_allocations"; + modulepar charstring PX_ME_BWM_URI := "bwm/v1/bw_allocations"; - modulepar charstring PX_ME_MTS_INFO_URI := "/mts/v1/mts_info"; + modulepar charstring PX_ME_MTS_INFO_URI := "mts/v1/mts_capability_info"; - modulepar charstring PX_ME_MTS_SESSIONS_URI := "/mts/v1/mts_sessions"; + modulepar charstring PX_ME_MTS_SESSIONS_URI := "mts/v1/mts_sessions"; - modulepar charstring PX_ME_WLAN_QUERIES_URI := "/wai/v2/queries"; + modulepar charstring PX_ME_WLAN_QUERIES_URI := "wai/v2/queries"; - modulepar charstring PX_ME_WLAN_URI := "/wai/v2"; + modulepar charstring PX_ME_WLAN_URI := "wai/v2"; - modulepar charstring PX_ME_V2X_URI := "/vis/v1"; + modulepar charstring PX_ME_WLAN_URI_SUB := "wai/v2/subscriptions"; - modulepar charstring PX_ME_V2X_QUERIES_URI := "/vis/v1/queries"; + modulepar charstring PX_ME_WLAN_URI_MEAS := "wai/v2/measurements"; - modulepar charstring PX_ME_DEVICE_APP_URI := "/dev_app/v1"; + modulepar charstring PX_ME_V2X_URI := "vis/v2"; - modulepar charstring PX_ME_APP_AMS_URI := "/amsi/v1/appMobilityServices" + modulepar charstring PX_ME_V2X_URI_SUB := "vis/v2/subscriptions"; - modulepar charstring PX_ME_APP_AMS_SUBS := "/amsi/v1/subscriptions"; + modulepar charstring PX_ME_V2X_QUERIES_URI := "vis/v2/queries"; - modulepar charstring PX_MEO_GRANT_URI := "/granting/v1/grants"; + modulepar charstring PX_ME_DEVICE_APP_URI := "dev_app/v1"; - modulepar charstring PX_MEO_PKGM_URI := "/app_pkgm/v1/app_packages" + modulepar charstring PX_ME_APP_AMS_URI := "amsi/v1/app_mobility_services" - modulepar charstring PX_MEO_PKGM_URI_ONBOARDED := "/app_pkgm/v1/onboarded_app_packages" + modulepar charstring PX_ME_APP_AMS_QUERIES_URI := "amsi/v1/queries/adjacent_app_instances" - modulepar charstring PX_MEO_PKGM_SUBS := "/app_pkgm/v1/subscriptions" - - modulepar charstring PX_MEPM_PKGM_URI := "/app_pkgm/v1/app_packages" - - modulepar charstring PX_MEPM_PKGM_SUBS := "/app_pkgm/v1/subscriptions" + modulepar charstring PX_ME_APP_AMS_SUBS := "amsi/v1/subscriptions"; - modulepar charstring PX_APP_LCM_URI := "/app_lcm/v1/app_instances" - - modulepar charstring PX_MEX_LCM_SUBS := "/alcmi/v1/subscriptions"; - - modulepar charstring PX_MEX_LCM_OP_OCC_URI := "/alcmi/v1/app_lcm_op_occs"; + modulepar charstring PX_MEO_GRANT_URI := "granting/v1/grants"; - modulepar charstring PX_UE_APP_CTX_URI := "/mx2/v1/app_contexts"; + modulepar charstring PX_MEO_PKGM_URI := "app_pkgm/v1/app_packages" - modulepar charstring PX_UE_APPS_URI := "/mx2/v1/app_list"; + modulepar charstring PX_MEO_PKGM_URI_ONBOARDED := "app_pkgm/v1/onboarded_app_packages" - modulepar charstring PX_MEC_SVC_MGMT_APPS_URI := "/mec_service_mgmt/v1/applications"; + modulepar charstring PX_MEO_PKGM_SUBS := "app_pkgm/v1/subscriptions" + + modulepar charstring PX_MEPM_PKGM_URI := "app_pkgm/v1/app_packages" + + modulepar charstring PX_MEPM_PKGM_SUBS := "app_pkgm/v1/subscriptions" - modulepar charstring PX_ME_APP_SUPPORT_TIMING_CURRENT_URI := "/mec_app_support/v1/timing/current_time"; + modulepar charstring PX_APP_LCM_URI := "app_lcm/v1/app_instances" + + modulepar charstring PX_MEX_LCM_SUBS := "app_lcm/v1/subscriptions"; - modulepar charstring PX_ME_APP_SUPPORT_URI := "/mec_app_support/v1/applications"; + modulepar charstring PX_MEX_LCM_OP_OCC_URI := "app_lcm/v1/app_lcm_op_occs"; - modulepar charstring PX_MEC_SVC_MGMT_SVC_URI := "/mec_service_mgmt/v1/services"; + modulepar charstring PX_UE_APP_CTX_URI := "mx2/v1/app_contexts"; - modulepar charstring PX_ME_APP_SUPPORT_TIMING_CAPS_URI := "/mec_app_support/v1/timing/timing_caps"; + modulepar charstring PX_UE_APPS_URI := "mx2/v1/app_list"; - modulepar charstring PX_FAI_FA_INFO_URI := "/fai/v1/fa_info"; + modulepar charstring PX_MEC_SVC_MGMT_APPS_URI := "mec_app_support/v2/registrations"; - modulepar charstring PX_FAI_DEVICE_INFO_URI:= "/fai/v1/device_info"; + modulepar charstring PX_ME_APP_SUPPORT_TIMING_CURRENT_URI := "mec_app_support/v2/timing/current_time"; - modulepar charstring PX_FAI_CABLE_LINE_INFO_URI := "/fai/v1/cable_line_info"; + modulepar charstring PX_ME_APP_SUPPORT_URI := "mec_app_support/v2/applications"; - modulepar charstring PX_FAI_OPTICAL_NW_INFO_URI := "/fai/v1/optical_network_info"; + modulepar charstring PX_ME_APP_REG_APPS_URI := "mec_service_mgmt/v1/applications"; - modulepar charstring PX_FAI_SUB_URI := "/fai/v1/optical_network_info"; + modulepar charstring PX_MEC_SVC_MGMT_SVC_URI := "mec_service_mgmt/v1/services"; - modulepar charstring PX_UE_ZONAL_TRAF_SUB_URI := "/fai/v1/optical_network_info"; + modulepar charstring PX_ME_APP_SUPPORT_TIMING_CAPS_URI := "mec_app_support/v2/timing/timing_caps"; - modulepar charstring PX_UE_LOC_QRY_URI := ""; + modulepar charstring PX_FAI_FA_INFO_URI := "fai/v1/queries/fa_info"; - modulepar charstring PX_UE_LOC_USERS_URI := ""; + modulepar charstring PX_FAI_DEVICE_INFO_URI:= "fai/v1/queries/device_info"; - modulepar charstring PX_UE_DIST_SUB_URI := ""; + modulepar charstring PX_FAI_CABLE_LINE_INFO_URI := "fai/v1/queries/cable_line_info"; - modulepar charstring PX_UE_PERIODIC_SUB_URI := ""; + modulepar charstring PX_FAI_OPTICAL_NW_INFO_URI := "fai/v1/queries/optical_network_info"; - modulepar charstring PX_UE_LOC_USERTRACK_SUB_URI := ""; + modulepar charstring PX_FAI_SUB_URI := "ai/v1/subscriptions"; + modulepar charstring PX_UE_ZONAL_TRAF_SUB_URI := "fai/v1/optical_network_info"; + + modulepar charstring PX_FED_API_LIST_SYSTEM_INFO := "fed_enablement/v1/fed_resources/system_info"; + + modulepar charstring PX_FED_API_SUB := "fed_enablement/v1/fed_resources/system_info"; + + modulepar charstring PX_FED_API_SUB_WRONG := "fed_enablement/v10/fed_resources/system_info"; // v10 instead of v1 + + modulepar charstring PX_IOT_API_LIST_DEVICE_INFO := "iots/v1/registered_devices"; + + modulepar charstring PX_IOT_API_SUB := "iots/v1/registered_devices"; + + modulepar charstring PX_IOT_API_LIST_PLTF_INFO := "iots/v1/registered_iot_platforms"; + + modulepar charstring PX_IOT_API_LIST_PLTF_SUB := "iots/v1/registered_iot_platforms"; + } // End of module LibMec_Pixits diff --git a/ttcn/LibMec/ttcn/LibMec_Templates.ttcn b/ttcn/LibMec/ttcn/LibMec_Templates.ttcn index 7e7fed5327668fb9dafbdf4ca25ec996fef83ed1..fafc89d9a5c12c252f2d3e3c0dce1798ab8b8f6c 100644 --- a/ttcn/LibMec/ttcn/LibMec_Templates.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Templates.ttcn @@ -1,7 +1,7 @@ module LibMec_Templates { // JSON - import from JSON all; + import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; @@ -10,11 +10,11 @@ module LibMec_Templates { import from LibMec_TypesAndValues all; template (omit) ProblemDetails m_problem_details( - in template (omit) JSON.String p_type := omit, - in template (omit) JSON.String p_title := omit, + in template (omit) Json.String p_type := omit, + in template (omit) Json.String p_title := omit, in template (omit) UInt32 p_status := omit, - in template (value) JSON.String p_detail, - in template (omit) JSON.String p_instance := omit + in template (value) Json.String p_detail, + in template (omit) Json.String p_instance := omit ) := { type_ := p_type, title := p_title, @@ -24,11 +24,11 @@ module LibMec_Templates { } // End of template m_problem_details template ProblemDetails mw_problem_details( - template JSON.String p_type := *, - template JSON.String p_title := *, + template Json.String p_type := *, + template Json.String p_title := *, template UInt32 p_status := *, - template JSON.String p_detail := *, - template JSON.String p_instance := * + template Json.String p_detail := *, + template Json.String p_instance := * ) := { type_ := p_type, title := p_title, @@ -37,4 +37,20 @@ module LibMec_Templates { instance := p_instance } // End of template mw_problem_details + template (value) TimeStamp m_time_stamp( + in Seconds p_seconds, + in NanoSeconds p_nanoSeconds := 0 + ) := { + seconds := p_seconds, + nanoSeconds := p_nanoSeconds + } // End of template m_time_stamp + + template (present) TimeStamp mw_time_stamp( + template (present) Seconds p_seconds := ?, + template (present) NanoSeconds p_nanoSeconds := ? + ) := { + seconds := p_seconds, + nanoSeconds := p_nanoSeconds + } // End of template mw_time_stamp + } // End of module LibMec_Templates diff --git a/ttcn/LibMec/ttcn/LibMec_TypesAndValues.ttcn b/ttcn/LibMec/ttcn/LibMec_TypesAndValues.ttcn index e233530894f89c61b3c3f6106c98cc16706ef243..b960094b4d7eb2d0f226d4f63fde6a3bf2fcdd24 100644 --- a/ttcn/LibMec/ttcn/LibMec_TypesAndValues.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_TypesAndValues.ttcn @@ -1,11 +1,31 @@ module LibMec_TypesAndValues { // JSON - import from JSON all; + import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; + /** + * @desc Time stamp description + * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + */ + type record TimeStamp { + Seconds seconds, + NanoSeconds nanoSeconds + } + + /** + * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + */ + type Json.UInteger Seconds; + + /** + * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + */ + type Json.UInteger NanoSeconds; + /** * @desc Problem Details for HTTP APIs * @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type @@ -16,11 +36,11 @@ module LibMec_TypesAndValues { * @see IETF RFC 7807 Clause 3. The Problem Details JSON Object */ type record ProblemDetails { - JSON.String type_ optional, - JSON.String title optional, + Json.String type_ optional, + Json.String title optional, UInt32 status optional, - JSON.String detail, - JSON.String instance optional + Json.String detail, + Json.String instance optional } with { variant (type_) "name as 'type'"; } diff --git a/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.cc b/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.cc index fcff30b43db4aa08cefb7d655fcab59d0fc309ec..38bc8f5b6331b12604ea1adb60293cfc670eb3be 100644 --- a/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.cc +++ b/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.cc @@ -43,7 +43,7 @@ #endif -#define AS_TCP_CHUNCK_SIZE 4096 +#define AS_TCP_CHUNCK_SIZE 4096 + 1024 #define AS_SSL_CHUNCK_SIZE 16384 // Used for the 'address already in use' bug workaround #define AS_DEADLOCK_COUNTER 16 diff --git a/ttcn/modules/titan.TestPorts.HTTPmsg/module/demo/HTTP_Test_no_ASPs.ttcn b/ttcn/modules/titan.TestPorts.HTTPmsg/module/demo/HTTP_Test_no_ASPs.ttcn index 3d69543f9bc991777c5fae144ea98844022e8319..dfe710ba4761488a9c5b05fd8a283dad299b6689 100644 --- a/ttcn/modules/titan.TestPorts.HTTPmsg/module/demo/HTTP_Test_no_ASPs.ttcn +++ b/ttcn/modules/titan.TestPorts.HTTPmsg/module/demo/HTTP_Test_no_ASPs.ttcn @@ -158,7 +158,7 @@ function f_singleEncDecCheck( in HTTPMessage p_msg) if(ischosen( p_msg.request ) ){ tr_expectedMsg.request.client_id := *; } - else if(ischosen( p_msg.response )){ + else if(ischosen( p_msg.response )) { tr_expectedMsg.response.client_id := *; } diff --git a/ttcn/patch_lib_common_titan/module.mk b/ttcn/patch_lib_common_titan/module.mk index 3b3b66029142802a399c0aa3a7b66eb989ddbe3b..905b4887a000439649532bbbb61e8e39df20d6dc 100644 --- a/ttcn/patch_lib_common_titan/module.mk +++ b/ttcn/patch_lib_common_titan/module.mk @@ -1,9 +1,9 @@ sources := \ ttcn/LibCommon_AbstractData.ttcn \ - ttcn/LibCommon_BasicTypesAndValues.ttcn \ - ttcn/LibCommon_DataStrings.ttcn \ - ttcn/LibCommon_Sync.ttcn \ ttcn/LibCommon_TextStrings.ttcn \ ttcn/LibCommon_Time.ttcn \ - ttcn/LibCommon_VerdictControl.ttcn + ttcn/LibCommon_VerdictControl.ttcn \ + ../patch_lib_common_titan/ttcn/LibCommon_BasicTypesAndValues.ttcn \ + ../patch_lib_common_titan/ttcn/LibCommon_DataStrings.ttcn \ + ../patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn \ diff --git a/ttcn/patch_lib_common_titan/LibCommon_BasicTypesAndValues.ttcn b/ttcn/patch_lib_common_titan/ttcn/LibCommon_BasicTypesAndValues.ttcn similarity index 92% rename from ttcn/patch_lib_common_titan/LibCommon_BasicTypesAndValues.ttcn rename to ttcn/patch_lib_common_titan/ttcn/LibCommon_BasicTypesAndValues.ttcn index 5758c7c1bf17a5520726718f0e66d24cd846af22..9b5477d98b422df6a9051cfd7b589269cf553be3 100644 --- a/ttcn/patch_lib_common_titan/LibCommon_BasicTypesAndValues.ttcn +++ b/ttcn/patch_lib_common_titan/ttcn/LibCommon_BasicTypesAndValues.ttcn @@ -172,38 +172,38 @@ const integer c_int32Max := 2147483647; type integer Int; - type integer Int1 (c_int1Min .. c_int1Max) with { variant "1 bit, COMP(2scompl)" }; - type integer Int2 (c_int2Min .. c_int2Max) with { variant "2 bit, COMP(2scompl)" }; - type integer Int3 (c_int3Min .. c_int3Max) with { variant "3 bit, COMP(2scompl)" }; - type integer Int4 (c_int4Min .. c_int4Max) with { variant "4 bit, COMP(2scompl)" }; - type integer Int5 (c_int5Min .. c_int5Max) with { variant "5 bit, COMP(2scompl)" }; - type integer Int6 (c_int6Min .. c_int6Max) with { variant "6 bit, COMP(2scompl)" }; - type integer Int7 (c_int7Min .. c_int7Max) with { variant "7 bit, COMP(2scompl)" }; - type integer Int8 (c_int8Min .. c_int8Max) with { variant "8 bit, COMP(2scompl)" }; - type integer Int9 (c_int9Min .. c_int9Max) with { variant "9 bit, COMP(2scompl)" }; - type integer Int10 (c_int10Min .. c_int10Max) with { variant "10 bit, COMP(2scompl)" }; - type integer Int11 (c_int11Min .. c_int11Max) with { variant "11 bit, COMP(2scompl)" }; - type integer Int12 (c_int12Min .. c_int12Max) with { variant "12 bit, COMP(2scompl)" }; - type integer Int13 (c_int13Min .. c_int13Max) with { variant "13 bit, COMP(2scompl)" }; - type integer Int14 (c_int14Min .. c_int14Max) with { variant "14 bit, COMP(2scompl)" }; - type integer Int15 (c_int15Min .. c_int15Max) with { variant "15 bit, COMP(2scompl)" }; - type integer Int16 (c_int16Min .. c_int16Max) with { variant "16 bit, COMP(2scompl)" }; - type integer Int17 (c_int17Min .. c_int17Max) with { variant "17 bit, COMP(2scompl)" }; - type integer Int18 (c_int18Min .. c_int18Max) with { variant "18 bit, COMP(2scompl)" }; - type integer Int19 (c_int19Min .. c_int19Max) with { variant "19 bit, COMP(2scompl)" }; - type integer Int20 (c_int20Min .. c_int20Max) with { variant "20 bit, COMP(2scompl)" }; - type integer Int21 (c_int21Min .. c_int21Max) with { variant "21 bit, COMP(2scompl)" }; - type integer Int22 (c_int22Min .. c_int22Max) with { variant "22 bit, COMP(2scompl)" }; - type integer Int23 (c_int23Min .. c_int23Max) with { variant "23 bit, COMP(2scompl)" }; - type integer Int24 (c_int24Min .. c_int24Max) with { variant "24 bit, COMP(2scompl)" }; - type integer Int25 (c_int25Min .. c_int25Max) with { variant "25 bit, COMP(2scompl)" }; - type integer Int26 (c_int26Min .. c_int26Max) with { variant "26 bit, COMP(2scompl)" }; - type integer Int27 (c_int27Min .. c_int27Max) with { variant "27 bit, COMP(2scompl)" }; - type integer Int28 (c_int28Min .. c_int28Max) with { variant "28 bit, COMP(2scompl)" }; - type integer Int29 (c_int29Min .. c_int29Max) with { variant "29 bit, COMP(2scompl)" }; - type integer Int30 (c_int30Min .. c_int30Max) with { variant "30 bit, COMP(2scompl)" }; - type integer Int31 (c_int31Min .. c_int31Max) with { variant "31 bit, COMP(2scompl)" }; - type integer Int32 (c_int32Min .. c_int32Max) with { variant "32 bit, COMP(2scompl)" }; + type integer Int1 (c_int1Min .. c_int1Max) with { variant "1 bit"}; + type integer Int2 (c_int2Min .. c_int2Max) with { variant "2 bit"}; + type integer Int3 (c_int3Min .. c_int3Max) with { variant "3 bit"}; + type integer Int4 (c_int4Min .. c_int4Max) with { variant "4 bit"}; + type integer Int5 (c_int5Min .. c_int5Max) with { variant "5 bit"}; + type integer Int6 (c_int6Min .. c_int6Max) with { variant "6 bit"}; + type integer Int7 (c_int7Min .. c_int7Max) with { variant "7 bit"}; + type integer Int8 (c_int8Min .. c_int8Max) with { variant "8 bit"}; + type integer Int9 (c_int9Min .. c_int9Max) with { variant "9 bit"}; + type integer Int10 (c_int10Min .. c_int10Max) with { variant "10 bit"}; + type integer Int11 (c_int11Min .. c_int11Max) with { variant "11 bit"}; + type integer Int12 (c_int12Min .. c_int12Max) with { variant "12 bit"}; + type integer Int13 (c_int13Min .. c_int13Max) with { variant "13 bit"}; + type integer Int14 (c_int14Min .. c_int14Max) with { variant "14 bit"}; + type integer Int15 (c_int15Min .. c_int15Max) with { variant "15 bit"}; + type integer Int16 (c_int16Min .. c_int16Max) with { variant "16 bit"}; + type integer Int17 (c_int17Min .. c_int17Max) with { variant "17 bit"}; + type integer Int18 (c_int18Min .. c_int18Max) with { variant "18 bit"}; + type integer Int19 (c_int19Min .. c_int19Max) with { variant "19 bit"}; + type integer Int20 (c_int20Min .. c_int20Max) with { variant "20 bit"}; + type integer Int21 (c_int21Min .. c_int21Max) with { variant "21 bit"}; + type integer Int22 (c_int22Min .. c_int22Max) with { variant "22 bit"}; + type integer Int23 (c_int23Min .. c_int23Max) with { variant "23 bit"}; + type integer Int24 (c_int24Min .. c_int24Max) with { variant "24 bit"}; + type integer Int25 (c_int25Min .. c_int25Max) with { variant "25 bit"}; + type integer Int26 (c_int26Min .. c_int26Max) with { variant "26 bit"}; + type integer Int27 (c_int27Min .. c_int27Max) with { variant "27 bit"}; + type integer Int28 (c_int28Min .. c_int28Max) with { variant "28 bit"}; + type integer Int29 (c_int29Min .. c_int29Max) with { variant "29 bit"}; + type integer Int30 (c_int30Min .. c_int30Max) with { variant "30 bit"}; + type integer Int31 (c_int31Min .. c_int31Max) with { variant "31 bit"}; + type integer Int32 (c_int32Min .. c_int32Max) with { variant "32 bit"}; } // end group signedIntegerDefintions diff --git a/ttcn/patch_lib_common_titan/ttcn/LibCommon_DataStrings.ttcn b/ttcn/patch_lib_common_titan/ttcn/LibCommon_DataStrings.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9bfbe61a78b4cb161929cae010cf34f510d97e00 --- /dev/null +++ b/ttcn/patch_lib_common_titan/ttcn/LibCommon_DataStrings.ttcn @@ -0,0 +1,168 @@ +/** + * + * @author ETSI + * @version $URL$ + * $Id$ + * @desc A collection of data string type and value definitions which + * may be useful in the implementation of any TTCN-3 test + * suite. "Data string" refers to TTCN-3 hexstring, octetstring + * and bitstring types. + * @remark End users should be aware that any changes made to the in + * definitions this module may be overwritten in future releases. + * End users are encouraged to contact the distributers of this + * module regarding their modifications or additions so that future + * updates will include your changes. + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * + */ + module LibCommon_DataStrings { + + /** + * @remark Number in name indicates string length in number of + * _bits_ + */ + group bitStringSubTypes { + + type bitstring Bit1 length(1) with {encode "length(1)"}; + type bitstring Bit2 length(2) with {encode "length(2)"}; + type bitstring Bit3 length(3) with {encode "length(3)"}; + type bitstring Bit4 length(4) with {encode "length(4)"}; + type bitstring Bit5 length(5) with {encode "length(5)"}; + type bitstring Bit6 length(6) with {encode "length(6)"}; + type bitstring Bit7 length(7) with {encode "length(7)"}; + type bitstring Bit8 length(8) with {encode "length(8)"}; + type bitstring Bit9 length(9) with {encode "length(9)"}; + type bitstring Bit10 length(10) with {encode "length(10)"}; + type bitstring Bit11 length(11) with {encode "length(11)"}; + type bitstring Bit12 length(12) with {encode "length(12)"}; + type bitstring Bit13 length(13) with {encode "length(13)"}; + type bitstring Bit14 length(14) with {encode "length(14)"}; + type bitstring Bit15 length(15) with {encode "length(15)"}; + type bitstring Bit16 length(16) with {encode "length(16)"}; + type bitstring Bit17 length(17) with {encode "length(17)"}; + type bitstring Bit18 length(18) with {encode "length(18)"}; + type bitstring Bit19 length(19) with {encode "length(19)"}; + type bitstring Bit20 length(20) with {encode "length(20)"}; + type bitstring Bit21 length(21) with {encode "length(21)"}; + type bitstring Bit22 length(22) with {encode "length(22)"}; + type bitstring Bit23 length(23) with {encode "length(23)"}; + type bitstring Bit24 length(24) with {encode "length(24)"}; + type bitstring Bit25 length(25) with {encode "length(25)"}; + type bitstring Bit26 length(26) with {encode "length(26)"}; + type bitstring Bit27 length(27) with {encode "length(27)"}; + type bitstring Bit28 length(28) with {encode "length(28)"}; + type bitstring Bit29 length(29) with {encode "length(29)"}; + type bitstring Bit30 length(30) with {encode "length(30)"}; + type bitstring Bit31 length(31) with {encode "length(31)"}; + type bitstring Bit32 length(32) with {encode "length(32)"}; + type bitstring Bit40 length(40) with {encode "length(40)"}; + + type bitstring Bit48 length(48) with {encode "length(48)"}; + type bitstring Bit64 length(64) with {encode "length(64)"}; + type bitstring Bit72 length(72) with {encode "length(72)"}; + type bitstring Bit128 length(128) with {encode "length(128)"}; + type bitstring Bit144 length(144) with {encode "length(144)"}; + type bitstring Bit256 length(256) with {encode "length(256)"}; + + } // end group bitStringSubTypes + + group zeroedBits { + + const Bit1 c_1ZeroBit := int2bit(0,1); + const Bit2 c_2ZeroBits := int2bit(0,2); + const Bit4 c_4ZeroBits := int2bit(0,4); + const Bit5 c_5ZeroBits := int2bit(0,5); + const Bit6 c_6ZeroBits := int2bit(0,6); + const Bit8 c_8ZeroBits := int2bit(0,8); + const Bit14 c_14ZeroBits := int2bit(0,14); + const Bit64 c_64ZeroBits := int2bit(0,64); + + }//end group zeroedBits + + /** + * @remark Number in name indicates string length in number of + * _octets_ + */ + group octetStringSubTypes { + + type octetstring Oct1 length(1) with {encode "length(1)"}; + type octetstring Oct2 length(2) with {encode "length(2)"}; + type octetstring Oct3 length(3) with {encode "length(3)"}; + type octetstring Oct4 length(4) with {encode "length(4)"}; + type octetstring Oct5 length(5) with {encode "length(5)"}; + type octetstring Oct6 length(6) with {encode "length(6)"}; + type octetstring Oct7 length(7) with {encode "length(7)"}; + type octetstring Oct8 length(8) with {encode "length(8)"}; + type octetstring Oct9 length(9) with {encode "length(9)"}; + type octetstring Oct10 length(10) with {encode "length(10)"}; + type octetstring Oct11 length(11) with {encode "length(11)"}; + type octetstring Oct12 length(12) with {encode "length(12)"}; + type octetstring Oct13 length(13) with {encode "length(13)"}; + type octetstring Oct14 length(14) with {encode "length(14)"}; + type octetstring Oct15 length(15) with {encode "length(15)"}; + type octetstring Oct16 length(16) with {encode "length(16)"}; + + type octetstring Oct20 length(20) with {encode "length(20)"}; + type octetstring Oct32 length(32) with {encode "length(32)"}; + type octetstring Oct48 length(48) with {encode "length(48)"}; + type octetstring Oct64 length(64) with {encode "length(64)"}; + type octetstring Oct80 length(80) with {encode "length(80)"}; + type octetstring Oct96 length(96) with {encode "length(96)"}; + type octetstring Oct128 length(128) with {encode "length(128)"}; + type octetstring Oct160 length(160) with {encode "length(160)"}; + type octetstring Oct320 length(320) with {encode "length(320)"}; + type octetstring Oct640 length(640) with {encode "length(640)"}; + type octetstring Oct1280 length(1280) with {encode "length(1280)"}; + type octetstring Oct1380 length(1380) with {encode "length(1380)"}; + + type octetstring Oct0to3 length(0..3) with {encode "length(0..3)"}; + type octetstring Oct0to8 length(0..16) with {encode "length(0..8)"}; + type octetstring Oct0to12 length(0..12) with {encode "length(0..12)"}; + type octetstring Oct0to16 length(0..16) with {encode "length(0..16)"}; + type octetstring Oct0to31 length(0..31) with {encode "length(0..31)"}; + type octetstring Oct0to20 length(0..20) with {encode "length(0..20)"}; + type octetstring Oct0to30 length(0..20) with {encode "length(0..30)"}; + type octetstring Oct0to127 length(0..127) with {encode "length(0..127)"}; + type octetstring Oct0to255 length(0..255) with {encode "length(0..255)"}; + + type octetstring Oct1to15 length(1..15) with {encode "length(1..15)"}; + type octetstring Oct1to31 length(1..31) with {encode "length(1..31)"}; + type octetstring Oct1to128 length(1..128) with {encode "length(1..128)"}; + type octetstring Oct1to254 length(1..254) with {encode "length(1..254)"}; + type octetstring Oct1to255 length(1..255) with {encode "length(1..255)"}; + + type octetstring Oct4to16 length(4..16) with {encode "length(4..16)"}; + type octetstring Oct6to15 length(6..15) with {encode "length(6..15)"}; + + } // end group octetStringSubTypes + + group zeroedBytes { + const Oct1 c_1ZeroByte := int2oct(0,1); + const Oct2 c_2ZeroBytes := int2oct(0,2); + const Oct4 c_4ZeroBytes := int2oct(0,4); + const Oct6 c_6ZeroBytes := int2oct(0,6); + const Oct8 c_8ZeroBytes := int2oct(0,8); + const Oct9 c_9ZeroBytes := int2oct(0,9); + const Oct12 c_12ZeroBytes := int2oct(0,12); + const Oct16 c_16ZeroBytes := int2oct(0,16); + const Oct20 c_20ZeroBytes := int2oct(0,20); + + const Oct80 c_80ZeroBytes := int2oct(0,80); + const Oct160 c_160ZeroBytes := int2oct(0,160); + const Oct320 c_320ZeroBytes := int2oct(0,320); + const Oct640 c_640ZeroBytes := int2oct(0,640); + const Oct1280 c_1280ZeroBytes := int2oct(0,1280); + const Oct1380 c_1380ZeroBytes := int2oct(0,1380); + const octetstring c_256ZeroBytes := int2oct(0,256); + const octetstring c_1KZeroBytes := int2oct(0,1024); + const octetstring c_4KZeroBytes := int2oct(0,4096); + const octetstring c_16KZeroBytes := int2oct(0,16384); + const octetstring c_64KZeroBytes := int2oct(0,65536); + const octetstring c_128KZeroBytes := int2oct(0,131072); + + }//end group zeroedBytes + +} // end module LibCommon_DataStrings diff --git a/ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn b/ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn similarity index 97% rename from ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn rename to ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn index 38e29df924fe40e808448a50008ad62ccc765d27..7c54ff1b2cdbe61019667089c462de3c05b26da3 100644 --- a/ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn +++ b/ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn @@ -1,7 +1,7 @@ /** * @author ETSI - * @version $URL: https://oldforge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_Sync.ttcn $ - * $Id: LibCommon_Sync.ttcn 66 2017-03-06 09:59:41Z filatov $ + * @version $URL$ + * $Id$ * @desc This module implements _one_ generic synchronization mechanism * for TTCN-3 test cases with one or more test components. * Key concept is here that one test component acts as a @@ -777,6 +777,7 @@ module LibCommon_Sync { // leave it to be ok to receive anything else // in case that the user has added any non-sync ports to // his/her server component type definition! + repeat; } [] tc_sync.timeout{ log("**** f_serverSyncClientsTimed: A client is not responding within specified time limit - sync server is sending stop to all clients! ****"); @@ -990,7 +991,7 @@ module LibCommon_Sync { syncPort.send(m_syncClientReady(p_syncId)); tc_sync.start; alt{ - [] syncPort.receive(m_syncServerReady(p_syncId)){ + [] syncPort.receive(m_syncServerReady(p_syncId)) { tc_sync.stop ; } [] tc_sync.timeout{ log("**** f_clientSync: Sync client did not receive message from sync server within the specified time limit - sync client will ask sync server to stop test case! ****") ; diff --git a/ttcn/patch_lib_http/LibItsHttp_BinaryMessageBodyTypes.ttcn b/ttcn/patch_lib_http/LibItsHttp_BinaryMessageBodyTypes.ttcn deleted file mode 100644 index 0e20b915cfda40cdfd68de6a61afa4bad7e6dd33..0000000000000000000000000000000000000000 --- a/ttcn/patch_lib_http/LibItsHttp_BinaryMessageBodyTypes.ttcn +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @author ETSI / STF545 - * @version $URL$ - * $ID:$ - * @desc This module provides the custom binary types for ITS HTTP based protocols. - * @copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - */ -module LibItsHttp_BinaryMessageBodyTypes { - - /** - * This file volontary contains a trivial declaration of the type BinaryBodu. - * In accordance with your TTCN-3 module LibItsHttp_XMLTypes, you have to change the BinaryBody typing. - */ - // TODO Add here your custom binary import - - type union BinaryBody { - // TODO Add here your custom variants - octetstring raw - } with { - variant "" - } - -} // End of LibItsHttp_BinaryMessageBodyTypes diff --git a/ttcn/patch_lib_http/LibItsHttp_BinaryTemplates.ttcn b/ttcn/patch_lib_http/LibItsHttp_BinaryTemplates.ttcn deleted file mode 100644 index a2170882090a579450d3106104c845bf4a5e53fa..0000000000000000000000000000000000000000 --- a/ttcn/patch_lib_http/LibItsHttp_BinaryTemplates.ttcn +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @author ETSI / STF545 - * @version $URL$ - * $ID:$ - * @desc This module provides the custom templates for ITS HTTP based protocols. - * @copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - */ -module LibItsHttp_BinaryTemplates { - - // LibItsHttp - import from LibItsHttp_BinaryMessageBodyTypes all; - - // TODO Add here your custom binary import - - template (value) BinaryBody m_binary_body_raw( - in template (value) octetstring p_raw - ) := { - raw := p_raw - } // End of template m_binary_body_raw - - template (present) BinaryBody mw_binary_body_raw( - template (present) octetstring p_raw := ? - ) := { - raw := p_raw - } // End of template mw_binary_body_raw - - // TODO Add here your custom binary template - -} // End of module LibItsHttp_BinaryTemplates diff --git a/ttcn/patch_lib_http/LibItsHttp_BinaryTypes.ttcn b/ttcn/patch_lib_http/LibItsHttp_BinaryTypes.ttcn deleted file mode 100644 index da6d0f6babdc25d96c30a30989b6345da59dc8fb..0000000000000000000000000000000000000000 --- a/ttcn/patch_lib_http/LibItsHttp_BinaryTypes.ttcn +++ /dev/null @@ -1,9 +0,0 @@ -module LibItsHttp_BinaryTypes { // FIXME To be removed - - /** - * This file is volontary empry. You have to declare all XSD files required by your project - * In addition, the TTCN-3 module LibItsHttp_XmlMessageBodyTypes have to be updated too. - */ - // TODO Add here your custom binary import - -} // End of module LibItsHttp_BinaryTypes diff --git a/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn deleted file mode 100644 index 08414357ec4cf81dc33ed78ed034dc0997408644..0000000000000000000000000000000000000000 --- a/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn +++ /dev/null @@ -1,159 +0,0 @@ -module LibItsHttp_JsonMessageBodyTypes { - - // LibMec - import from LibMec_TypesAndValues all; - // LibMec/LocationAPI - import from LocationAPI_TypesAndValues all; - // LibMec/UEidentityAPI - import from UEidentityAPI_TypesAndValues all; - // LibMec/RnisAPI - import from RnisAPI_TypesAndValues all; - // LibMec/TrafficManagementApi - import from TrafficManagementAPI_TypesAndValues all; - // LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI - import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; - // LibMec/EdgePlatformApplicationEnablementAPI - import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; - // LibMec/UEAppInterfaceAPI - import from UEAppInterfaceAPI_TypesAndValues all; - // LibMec/DeviceApplicationInterfaceAPI - import from DeviceApplicationInterfaceAPI_TypesAndValues all; - // LibMec/WlanInformationAPI - import from WlanInformationAPI_TypesAndValues all; - // LibMec/V2XInformationServiceAPI - import from V2XInformationServiceAPI_TypesAndValues all; - - /** - * This file volontary contains a trivial declaration of the type JsonBody. - * In accordance with your TTCN-3 module LibItsHttp_JSONTypes, you have to change the JsonBody typing. - */ - // TODO Add here your custom RFCs import - - type union JsonBody { - UserInfo userInfo, - UserList userList, - LocationAPI_TypesAndValues.ZoneInfo zoneInfo, - AccessPointList accessPointList, - UserTrackingSubscription userTrackingSubscription, - PeriodicTrackingSubscription periodicTrackingSubscription, - ZonalTrafficSubscription zonalTrafficSubscription, - CircleNotificationSubscription circleNotificationSubscription, - TerminalDistance terminalDistance, - DistanceNotificationSubscription distanceNotificationSubscription, - PeriodicNotificationSubscription periodicNotificationSubscription, - LibMec_TypesAndValues.ProblemDetails problemDetails, - UeIdentityTagInfo ueIdentityTagInfo, - RnisAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList, - CellChangeSubscription cellChangeSubscription, - RabInfo rabInfo, - PlmnInfos plmnInfos, - S1BearerInfo s1BearerInfo, - RabEstSubscription rabEstSubscription, - RabModSubscription rabModSubscription, - RabRelSubscription rabRelSubscription, - MeasRepUeSubscription measRepUeSubscription, - MeasTaSubscription measTaSubscription, - CaReConfSubscription caReConfSubscription, - S1BearerSubscription s1BearerSubscription, - L2Meas l2Meas, - BwInfoList bwInfoList, - BwInfo bwInfo, - BwInfoDeltas bwInfoDeltas, - MtsCapabilityInfo mtsCapabilityInfo, - MtsSessionInfo mtsSessionInfo, - MtsSessionInfos mtsSessionInfos, - TransportInfoList transportInfoList, - TrafficRuleList trafficRuleList, - TrafficRule trafficRule, - /*AppMobilityServiceInfo appMobilityServiceInfo,*/ - /* Ams_TypesAndValues.RegistrationRequest registrationRequest_ams, */ - /* Ams_TypesAndValues.MobilityProcedureSubscription subscriptionLinkList_ams, */ - /* Ams_TypesAndValues.AdjacentAppInfoSubscription adjacentAppInfoSubscription_ams, */ - /* Ams_TypesAndValues.ExpiryNotification expireNotification_ams, */ - /* Ams_TypesAndValues.RegistrationRequestWithError registrationRequestWithError_ams, */ - GrantRequest grantRequest, - Grant grantResponse, - CreateAppPkg createAppPkg, - AppPkgInfo appPkgInfo, - AppPkgInfoList appPkgInfoList, - AppPkgInfoModifications appPkgInfoModifications, - AppPkgSubscription appPkgSubscription, - AppPkgSubscriptionInfo appPkgSubscriptionInfo, - AppPkgSubscriptionLinkList appPkgSubscriptionLinkList, - AppPkgNotification appPkgNotification, - ConfigPlatformForAppRequest configPlatformForAppRequest, - /* MepmPkgm_TypesAndValues.AppPkg appMepmPackageManagement, */ - /* MepmPkgm_TypesAndValues.OnboardedAppPkgInfo onboardedMepmAppPkgInfo, */ - /* MepmPkgm_TypesAndValues.OnboardedAppPkgInfoList appOnboardMepmPackageInfoList, */ - /* MepmPkgm_TypesAndValues.AppPkgWithError appMepmPackageManagementWithError, */ - /* MepmPkgm_TypesAndValues.AppPkgSubscription appMepmPkgSubscription, */ - /* MepmPkgm_TypesAndValues.AppPkgSubscriptionInfo appMepmPkgSubscriptionInfo, */ - /* MepmPkgm_TypesAndValues.AppPkgSubscriptionInfoList appMepmPkgSubscriptionInfoList, */ - /* MepmPkgm_TypesAndValues.AppPkgSubscriptionWithError appMepmPkgSubscriptionWithError, */ - /* MepmPkgm_TypesAndValues.AppPkgNotification appMepmPkgNotification, */ - /* MepmPkgm_TypesAndValues.OnboardedAppPkgInfo appOnboardMepmPackageInfo, */ - CreateAppInstanceRequest createAppInstanceRequest, - AppInstanceInfo appInstanceInfo, - AppInstanceInfoList appInstanceInfoList, - /* AppLCM_TypesAndValues.CreateAppInstanceRequestWithError createAppInstanceRequestWithError, */ - /* AppLCM_TypesAndValues.InstantiateAppRequest appInstanceInstantiate, */ - /* AppLCM_TypesAndValues.InstantiateAppRequestWithError appInstanceInstantiateWithError, */ - /* AppLCM_TypesAndValues.TerminateAppRequest terminateType, */ - /* AppLCM_TypesAndValues.TerminateAppRequestWithError terminateTypeWithError, */ - /* AppLCM_TypesAndValues.OperateAppRequest changeStateTo, */ - /* AppLCM_TypesAndValues.OperateAppRequestWithError changeStateToWithError, */ - /* AppLCM_TypesAndValues.AppInstanceLcmOpOcc appInstanceLcmOpOcc, */ - /* AppLCM_TypesAndValues.AppInstanceLcmOpOccList appInstanceLcmOpOccList, */ - /* AppLCM_TypesAndValues.SubscriptionRequest subscriptionRequest, */ - /* AppLCM_TypesAndValues.SubscriptionRequestWithError subscriptionRequestWithError, */ - /* AppLCM_TypesAndValues.SubscriptionInfoList subscriptionInfoList, */ - /* AppLCM_TypesAndValues.SubscriptionInfo subscriptionInfo, */ - /* AppLCM_TypesAndValues.Notification lcmNotification, */ - UEAppInterfaceAPI_TypesAndValues.AppContext appContext, - AppInfo appInfo, - ServiceInfoList serviceInfoList, - ServiceInfo serviceInfo, - EdgePlatformApplicationEnablementAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_app_ens, - AppTerminationNotificationSubscription appTerminationNotificationSubscription, - AppTerminationConfirmation appTerminationConfirmation, - AppReadyConfirmation appReadyConfirmation, - ServiceLivenessInfo serviceLivenessInfo, - DnsRuleList dnsRuleList, - DnsRule dnsRule, - SerAvailabilityNotificationSubscription_ serAvailabilityNotificationSubscription, - TimingCaps timingCaps, - CurrentTime currentTime, - DeviceApplicationInterfaceAPI_TypesAndValues.ApplicationList applicationList, - DeviceApplicationInterfaceAPI_TypesAndValues.AppContext appContext_device_info, - ApplicationLocationAvailability applicationLocationAvailability, - ApInfoList apInfoList, - StaInfoList staInfoList, - AssocStaSubscription assocStaSubscription, - StaDataRateSubscription staDataRateSubscription, - AssocStaNotification assocStaNotification, - WlanInformationAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_wlan, - MeasurementConfigLinkList measurementConfigLinkList, - MeasurementConfig measurementConfig, - UuUnicastProvisioningInfo uuUnicastProvisioningInfo, - UuMbmsProvisioningInfo uuMbmsProvisioningInfo, - Pc5ProvisioningInfo pc5ProvisioningInfo, - PredictedQos predictedQos, - V2xMsgPublication v2xMsgPublication, - V2XInformationServiceAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_v2x, - ProvChgUuUniSubscription provChgUuUniSubscription, - ProvChgUuMbmsSubscription provChgUuMbmsSubscription, - ProvChgPc5Subscription provChgPc5Subscription, - V2xMsgSubscription v2xMsgSubscription, - ProvChgUuUniNotification provChgUuUniNotification, - ProvChgUuMbmsNotification provChgUuMbmsNotification, - ProvChgPc5Notification provChgPc5Notification, - // TODO Add here your custom variants - universal charstring raw - } with { - variant "" - } - -} with { - encode "JSON"; - variant "" -} // End of module LibItsHttp_JsonMessageBodyTypes diff --git a/ttcn/patch_lib_http/LibItsHttp_TestSystem.ttcn b/ttcn/patch_lib_http/LibItsHttp_TestSystem.ttcn deleted file mode 100644 index d6f5c524e60033abaad36da3699fb41884ba798f..0000000000000000000000000000000000000000 --- a/ttcn/patch_lib_http/LibItsHttp_TestSystem.ttcn +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @author ETSI / STF545 - * @version $URL$ - * $ID:$ - * @desc This module provides the test system used by ITS HTTP based protocols. - * @copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * @see ETSI TS 103 478 - */ -module LibItsHttp_TestSystem { - - // LibCommon - import from LibCommon_Sync all; - import from LibCommon_Time all; - - // LibItsHttp - import from LibItsHttp_TypesAndValues all; - - type port HttpPort message { - inout HttpMessage; - } - - type component HttpComponent extends SelfSyncComp { // FIXME To be rename into HttpTest - port HttpPort httpPort; - port HttpPort httpPort_notif; - timer tc_ac := PX_TAC; - timer tc_noac := PX_TNOAC; - timer tc_wait := PX_TWAIT; - - } // End of component HttpComponent - - type component HttpTestAdapter { // FIXME To be rename into HttpTestSystem - port HttpPort httpPort; - port HttpPort httpPort_notif; - } // End of component TestAdapter - -} // End of module LibItsHttp_TestSystem diff --git a/ttcn/patch_lib_http/module.mk b/ttcn/patch_lib_http/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..77b6b4c66b12aa879b9131649e2d2b273483a392 --- /dev/null +++ b/ttcn/patch_lib_http/module.mk @@ -0,0 +1,3 @@ +sources := \ + ttcn/LibHttp_JsonMessageBodyTypes.ttcn \ + ttcn/LibHttp_JsonTemplates.ttcn \ diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..332f676e4442dc12f2eadcdc46a7d506195a6c24 --- /dev/null +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -0,0 +1,189 @@ +module LibHttp_JsonMessageBodyTypes { + + // LibMec + import from LibMec_TypesAndValues all; + // LibMec/LocationAPI + import from LocationAPI_TypesAndValues all; + // LibMec/UEidentityAPI + import from UEidentityAPI_TypesAndValues all; + // LibMec/RnisAPI + import from RnisAPI_TypesAndValues all; + // LibMec/TrafficManagementApi + import from TrafficManagementAPI_TypesAndValues all; + // LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; + // LibMec/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + // LibMec/UEAppInterfaceAPI + import from UEAppInterfaceAPI_TypesAndValues all; + // LibMec/DeviceApplicationInterfaceAPI + import from DeviceApplicationInterfaceAPI_TypesAndValues all; + // LibMec/WlanInformationAPI + import from WlanInformationAPI_TypesAndValues all; + // LibMec/FixedAccessInformationServiceAPI + import from FixedAccessInformationServiceAPI_TypesAndValues all; + // LibMec/ApplicationMobilityServiceAPI_TypesAndValues + import from ApplicationMobilityServiceAPI_TypesAndValues all; + // LibMec/V2XInformationServiceAPI + import from V2XInformationServiceAPI_TypesAndValues all; + // LibMec/IoT + import from IoTAPI_TypesAndValues all; + // LibMec/FixedAccessInformationServiceAPI + import from FederationEnablementAPI_TypesAndValues all; + + /** + * This file volontary contains a trivial declaration of the type JsonBody. + * In accordance with your TTCN-3 module LibItsHttp_JSONTypes, you have to change the JsonBody typing. + */ + // TODO Add here your custom RFCs import + + type union JsonBody { + UserInfo userInfo, // ETSI GS MEC 013 V3.1.1 Clause 6.2.2 Type: UserInfo + UserList userList, // ETSI GS MEC 013 V3.1.1 Clause 6.2.5 Type: UserList + LocationAPI_TypesAndValues.ZoneInfo zoneInfo, // ETSI GS MEC 013 V3.1.1 Clause 6.2.1 Zonal presence data types + AccessPointList accessPointList, // ETSI GS MEC 013 V3.1.1 Clause 6.2.1 Zonal presence data types + AccessPointInfo accessPointInfo, // ETSI GS MEC 013 V3.1.1 Clause 6.2.1 Zonal presence data types + NotificationSubscriptionList notificationSubscriptionList, // ETSI GS MEC 013 V3.1.1 Clause 6.3.3 Type: NotificationSubscriptionList + UserLocationEventSubscription userLocationEventSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.4 Type: UserLocationEventSubscription + UserLocationPeriodicSubscription userLocationPeriodicSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.5 Type: UserLocationPeriodicSubscription + ZoneLocationEventSubscription zoneLocationEventSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.6 Type: ZoneLocationEventSubscription + ZoneStatusSubscription zoneStatusSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.7 Type: ZoneStatusSubscription + UserAreaSubscription userAreaSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.8 Type: UserAreaSubscription + UserDistanceSubscription userDistanceSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.9 Type: UserDistanceSubscription + UserAreaNotification userAreaNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.8 Type: UserAreaNotification + UserDistanceNotification userDistanceNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.9 Type: UserDistanceNotification + UserLocationEventNotification userLocationEventNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.4 Type: UserLocationEventNotification + UserLocationPeriodicNotification userLocationPeriodicNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.5 Type: UserLocationPeriodicNotification + ZoneLocationEventNotification zoneLocationEventNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.6 Type: ZoneLocationEventNotification + ZoneStatusNotification zoneStatusNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.7 Type: ZoneStatusNotification + LocationAPI_TypesAndValues.TestNotification testNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.3 Type: TestNotification + TerminalDistance terminalDistance, + LibMec_TypesAndValues.ProblemDetails problemDetails, + UeIdentityTagInfo ueIdentityTagInfo, + RnisAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList, + CellChangeSubscription cellChangeSubscription, + RabInfo rabInfo, + PlmnInfos plmnInfos, + S1BearerInfo s1BearerInfo, + RabEstSubscription rabEstSubscription, + RabModSubscription rabModSubscription, + RabRelSubscription rabRelSubscription, + MeasRepUeSubscription measRepUeSubscription, + MeasTaSubscription measTaSubscription, + CaReConfSubscription caReConfSubscription, + S1BearerSubscription s1BearerSubscription, + RnisAPI_TypesAndValues.ExpiryNotification expiryNotification_rnis, + L2Meas l2Meas, + BwInfoList bwInfoList, + BwInfo bwInfo, + BwInfoDeltas bwInfoDeltas, + MtsCapabilityInfo mtsCapabilityInfo, + MtsSessionInfo mtsSessionInfo, + MtsSessionInfos mtsSessionInfos, + EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList transportInfoList, + EdgePlatformApplicationEnablementAPI_TypesAndValues.AppInfo appInfo_regapps, + TrafficRuleList trafficRuleList, + TrafficRule trafficRule, + /*AppMobilityServiceInfo appMobilityServiceInfo,*/ + RegistrationInfos registrationInfos, + RegistrationInfo registrationInfo, + AdjacentAppInstanceInfos adjacentAppInstanceInfos, + AdjacentAppInstanceInfo adjacentAppInstanceInfo, + MobilityProcedureSubscription mobilityProcedureSubscription, + AdjacentAppInfoSubscription adjacentAppInfoSubscription, + MobilityProcedureNotification mobilityProcedureNotification, + AdjacentAppInfoNotification adjacentAppInfoNotification, + ApplicationMobilityServiceAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_ams, + ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification expireNotification_ams, + /* ApplicationMobilityServiceAPI_TypesAndValues.RegistrationRequestWithError registrationRequestWithError_ams, */ + GrantRequest grantRequest, + Grant grantResponse, + CreateAppPkg createAppPkg, + AppPkgInfo appPkgInfo, + AppPkgInfoList appPkgInfoList, + AppPkgInfoModifications appPkgInfoModifications, + AppPkgSubscription appPkgSubscription, + AppPkgSubscriptionInfo appPkgSubscriptionInfo, + AppPkgSubscriptionLinkList appPkgSubscriptionLinkList, + AppPkgNotification appPkgNotification, + ConfigPlatformForAppRequest configPlatformForAppRequest, + CreateAppInstanceRequest createAppInstanceRequest, + AppInstanceInfo appInstanceInfo, + AppInstanceInfoList appInstanceInfoList, + InstantiateAppRequest appInstanceInstantiate, + TerminateAppRequest terminateAppRequest, + OperateAppRequest changeStateTo, + AppLcmOpOccList appLcmOpOccList, + AppLcmOpOcc appLcmOpOcc, + AppInstSubscriptionRequest appInstSubscriptionRequest, + AppInstSubscriptionInfo appInstSubscriptionInfo, + AppInstanceSubscriptionLinkList appInstSubscriptionLinkList, + CancelMode cancelMode, + AppInstNotification appInstNotification, + UEAppInterfaceAPI_TypesAndValues.AppContext appContext, + UEAppInterfaceAPI_TypesAndValues.AppInfo appInfo, + ServiceInfoList serviceInfoList, + ServiceInfo serviceInfo, + EdgePlatformApplicationEnablementAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_app_ens, + AppTerminationNotificationSubscription appTerminationNotificationSubscription, + AppTerminationConfirmation appTerminationConfirmation, + AppReadyConfirmation appReadyConfirmation, + ServiceLivenessInfo serviceLivenessInfo, + ServiceLivenessUpdate serviceLivenessUpdate, + DnsRuleList dnsRuleList, + DnsRule dnsRule, + SerAvailabilityNotificationSubscription serAvailabilityNotificationSubscription, + TimingCaps timingCaps, + CurrentTime currentTime, + DeviceApplicationInterfaceAPI_TypesAndValues.ApplicationList applicationList, + DeviceApplicationInterfaceAPI_TypesAndValues.AppContext appContext_device_info, + ApplicationLocationAvailability applicationLocationAvailability, + ApInfoList apInfoList, + StaInfoList staInfoList, + AssocStaSubscription assocStaSubscription, + StaDataRateSubscription staDataRateSubscription, + AssocStaNotification assocStaNotification, + WlanInformationAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_wlan, + MeasurementConfigLinkList measurementConfigLinkList, + MeasurementConfig measurementConfig, + FaInfo faInfo, + FixedAccessInformationServiceAPI_TypesAndValues.DeviceInfo deviceInfo, + CableLineInfo cableLineInfo, + PonInfo ponInfo, + OnuAlarmSubscription onuAlarmSubscription, + DevInfoSubscription devInfoSubscription, + CmConnSubscription cmConnSubscription, + AniAlarmSubscription aniAlarmSubscription, + FixedAccessInformationServiceAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_fai, + UuUnicastProvisioningInfo uuUnicastProvisioningInfo, + UuMbmsProvisioningInfo uuMbmsProvisioningInfo, + Pc5ProvisioningInfo pc5ProvisioningInfo, + PredictedQos predictedQos, + V2xMsgPublication v2xMsgPublication, + V2XInformationServiceAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_v2x, + ProvChgUuUniSubscription provChgUuUniSubscription, + ProvChgUuMbmsSubscription provChgUuMbmsSubscription, + ProvChgPc5Subscription provChgPc5Subscription, + V2xMsgDistributionServerInfo v2xMsgDistributionServerInfo, // ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.5-1: Attributes of the V2xMsgDistributionServerInfo + V2xMsgSubscription v2xMsgSubscription, + PredQosSubscription predQosSubscription, // ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.6-1: Attributes of the PredQosSubscription + ProvChgUuUniNotification provChgUuUniNotification, + ProvChgUuMbmsNotification provChgUuMbmsNotification, + ProvChgPc5Notification provChgPc5Notification, + SystemInfo systemInfo, // ETSI GS MEC 040 V3.1.1 Clause 6.2.2 Type: SystemInfo + SystemInfoList systemInfoList, // ETSI GS MEC 040 V3.1.1 Clause 6.2.2 Type: SystemInfo + SystemInfoUpdate systemInfoUpdate, // ETSI GS MEC 040 V3.1.1 Clause 6.2.3 Type: SystemInfoUpdate + IoTAPI_TypesAndValues.DeviceInfo deviceInfo_iot, // ETSI GS MEC 033 V3.1.1 Clause 6.2.2 Type: DeviceInfo + IoTAPI_TypesAndValues.DeviceInfoList deviceInfoList_iot, // ETSI GS MEC 033 V3.1.1 Clause 6.2.2 Type: DeviceInfo + IotPlatformInfoList iotPlatformInfoList, // ETSI GS MEC 033 V3.1.1 Clause 6.2.3 Type: IotPlatformInfo + IotPlatformInfo iotPlatformInfo, // ETSI GS MEC 033 V3.1.1 Clause 6.2.3 Type: IotPlatformInfo + // TODO Add here your custom variants + universal charstring raw + } with { + variant "" + } + +} with { + encode "JSON"; + variant "" +} // End of module LibHttp_JsonMessageBodyTypes diff --git a/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn similarity index 59% rename from ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn rename to ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index 4a47edd708a6d01485864fc01a731771b1942ce1..fabd6e5abd4f6898597b6997fd5329ac1eaa0210 100644 --- a/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -1,14 +1,7 @@ -/** - * @author ETSI / STF569 - * @version $URL$ - * $ID:$ - * @desc This module provides the custom templates for ITS HTTP based protocols. - * @copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - */ -module LibItsHttp_JsonTemplates { +module LibHttp_JsonTemplates { + + // LibHttp + import from LibHttp_JsonMessageBodyTypes all; // LibMec import from LibMec_TypesAndValues all; @@ -40,9 +33,13 @@ module LibItsHttp_JsonTemplates { // LibMec/UEAppInterfaceAPI import from UEAppInterfaceAPI_TypesAndValues all; + // LibMec/module FixedAccessInformationServiceAPI import from FixedAccessInformationServiceAPI_TypesAndValues all; + // LibMec/module ApplicationMobilityServiceAPI + import from ApplicationMobilityServiceAPI_TypesAndValues all; + // LibMec/DeviceApplicationInterfaceAPI import from DeviceApplicationInterfaceAPI_TypesAndValues all; @@ -51,10 +48,13 @@ module LibItsHttp_JsonTemplates { // LibMec/V2XInformationServiceAPI import from V2XInformationServiceAPI_TypesAndValues all; - - // LibItsHttp - import from LibItsHttp_JsonMessageBodyTypes all; - + + // LibMec/IoT + import from IoTAPI_TypesAndValues all; + + // LibMec/FixedAccessInformationServiceAPI + import from FederationEnablementAPI_TypesAndValues all; + template (value) JsonBody m_json_body_raw( in template (value) charstring p_raw ) := { @@ -67,42 +67,48 @@ module LibItsHttp_JsonTemplates { raw := p_raw } // End of template mw_json_body_raw + template (value) JsonBody m_body_json_problem_details( + in template (value) LibMec_TypesAndValues.ProblemDetails p_problemDetails + ) := { + problemDetails := p_problemDetails + } // End of template m_body_json_problem_details + template (present) JsonBody mw_body_json_problem_details( - template (present) LibMec_TypesAndValues.ProblemDetails p_problemDetails := ? + template (present) LibMec_TypesAndValues.ProblemDetails p_problemDetails := ? ) := { problemDetails := p_problemDetails } // End of template mw_body_json_problem_details group granting_api { - + template (value) JsonBody m_body_json_grant_request( in template (value) GrantRequest p_grant_request ) := { grantRequest := p_grant_request } // End of template m_body_json_grant_request - + template (present) JsonBody mw_body_json_grant_response( template (present) Grant p_grant_response := ? ) := { grantResponse := p_grant_response } // End of template m_wbody_json_grant_request - + } // End of group granting_api group meo_pkg_mgmt_api { - + template (value) JsonBody m_body_json_create_package_management( in template (value) CreateAppPkg p_create_pkg ) := { createAppPkg := p_create_pkg } // End of template m_body_json_create_package_management - + template (present) JsonBody mw_body_json_create_package_management( template (present) CreateAppPkg p_create_pkg := ? ) := { createAppPkg := p_create_pkg } // End of template mw_body_json_create_package_management - + template (present) JsonBody mw_body_json_app_pkg_info( in template (present) AppPkgInfo p_app_pkg_info := ? ) := { @@ -120,13 +126,13 @@ module LibItsHttp_JsonTemplates { ) := { appPkgInfoModifications := p_app_pkg_info_modification } // End of template m_body_json_app_pkg_info_modification - + template (present) JsonBody mw_body_json_app_pkg_info_modification( template (present) AppPkgInfoModifications p_app_pkg_info_modification := ? ) := { appPkgInfoModifications := p_app_pkg_info_modification } // End of template mw_body_json_app_pkg_info_modification - + template (value) JsonBody m_body_json_pkgm_subscription( in template (value) AppPkgSubscription p_app_pkg_subscription ) := { @@ -144,23 +150,23 @@ module LibItsHttp_JsonTemplates { ) := { appPkgSubscriptionLinkList := p_app_pkg_subscription_link_list } // End of template mw_body_json_pkgm_subscription_link_list - + template (present) JsonBody mw_body_json_app_package_notification ( template (present) AppPkgNotification p_app_pkg_notification := ? ) := { appPkgNotification := p_app_pkg_notification } // End of template mw_body_json_app_package_notification - + } // End of group meo_pkg_mgmt_api group mepm_lifcyclemgt { - + template (value) JsonBody m_body_json_config_platform_for_app_request( in template (value) ConfigPlatformForAppRequest p_config_platform_for_app_request ) := { configPlatformForAppRequest := p_config_platform_for_app_request } // End of template m_body_json_config_platform_for_app_request - + template (present) JsonBody mw_body_json_config_platform_for_app_request( template (present) ConfigPlatformForAppRequest p_config_platform_for_app_request := ? ) := { @@ -168,336 +174,522 @@ module LibItsHttp_JsonTemplates { } // End of template mw_body_json_config_platform_for_app_request } // End of mepm_lifcyclemgt - + group mex_lifcyclemgt { - - template (value) JsonBody m_body_json_create_app_instance_request ( - in template (value) CreateAppInstanceRequest p_create_app_instance_request - ) := { + + template (value) JsonBody m_body_json_create_app_instance_request( + in template (value) CreateAppInstanceRequest p_create_app_instance_request + ) := { createAppInstanceRequest := p_create_app_instance_request } // End of template m_body_json_create_app_instance_request - - template (value) JsonBody m_body_json_app_instance_info ( - in template (value) AppInstanceInfo p_app_instance_info - ) := { + + template (value) JsonBody m_body_json_app_instance_info( + in template (value) AppInstanceInfo p_app_instance_info + ) := { appInstanceInfo := p_app_instance_info } // End of template m_body_json_app_instance_info - - template (present) JsonBody mw_body_json_app_instance_info ( - template (present) AppInstanceInfo p_app_instance_info := ? - ) := { + + template (present) JsonBody mw_body_json_app_instance_info( + template (present) AppInstanceInfo p_app_instance_info := ? + ) := { appInstanceInfo := p_app_instance_info } // End of template mw_body_json_app_instance_info - - template (present) JsonBody mw_body_json_app_instance_info_list ( - template (present) AppInstanceInfoList p_app_instance_info_list := ? - ) := { + + template (value) JsonBody m_body_json_app_instance_info_list( + in template (value) AppInstanceInfoList p_app_instance_info_list + ) := { + appInstanceInfoList := p_app_instance_info_list + } // End of template m_body_json_app_instance_info_list + + template (present) JsonBody mw_body_json_app_instance_info_list( + template (present) AppInstanceInfoList p_app_instance_info_list := ? + ) := { appInstanceInfoList := p_app_instance_info_list } // End of template mw_body_json_app_instance_info_list - - /*template (present) JsonBody mw_body_json_mex_lcm_instance_info_list ( - in template (present) AppInstanceInfoList p_app_instance_info_list - ) := { - appInstanceInfoList := p_app_instance_info_list - } - - - template (present) JsonBody m_body_json_lifecycle_management_instantiate ( - in template (present) InstantiateAppRequest p_app_instance_instantiate - ) := { - appInstanceInstantiate := p_app_instance_instantiate - } - - template (present) JsonBody m_body_json_lifecycle_management_instantiate_with_error ( - in template (present) InstantiateAppRequestWithError p_app_instance_instantiate_with_error - ) := { - appInstanceInstantiateWithError := p_app_instance_instantiate_with_error - } - - - - template (present) JsonBody m_body_json_lifecycle_management_terminate ( - in template (present) TerminateAppRequest p_app_instance_terminate - ) := { - terminateType := p_app_instance_terminate - } - - template (present) JsonBody m_body_json_lifecycle_management_terminate_with_error ( - in template (present) TerminateAppRequestWithError p_app_instance_terminate_with_error - ) := { - terminateTypeWithError := p_app_instance_terminate_with_error - } - - - - template (present) JsonBody m_body_json_lifecycle_management_operate ( - in template (present) OperateAppRequest p_app_instance_operate - ) := { - changeStateTo := p_app_instance_operate - } - - template (present) JsonBody m_body_json_lifecycle_management_operate_with_error ( - in template (present) OperateAppRequestWithError p_app_instance_operate_with_error - ) := { - changeStateToWithError := p_app_instance_operate_with_error - } - - - template (present) JsonBody mw_body_json_lifecycle_op_occ_list ( - in template (present) AppInstanceLcmOpOccList p_app_instance_op_occ_list - ) := { - appInstanceLcmOpOccList := p_app_instance_op_occ_list - } - - template (present) JsonBody mw_body_json_lifecycle_op_occ ( - in template (present) AppInstanceLcmOpOcc p_app_instance_op_occ - ) := { - appInstanceLcmOpOcc := p_app_instance_op_occ - } - template (present) JsonBody m_body_json_lcm_subscribe( - in template (present) SubscriptionRequest p_app_lcm_request - ) := { - subscriptionRequest := p_app_lcm_request - } + template (value) JsonBody m_body_json_instantiate_app_request( + in template (value) InstantiateAppRequest p_instantiate_app_request + ) := { + appInstanceInstantiate := p_instantiate_app_request + } // End of template m_body_json_instantiate_app_request - template (present) JsonBody m_body_json_lcm_subscribe_with_error( - in template (present) SubscriptionRequestWithError p_app_lcm_request_with_error - ) := { - subscriptionRequestWithError := p_app_lcm_request_with_error - } - - - template (present) JsonBody mw_body_json_lcm_subscription_list( - in template (present) SubscriptionInfoList p_app_lcm_subscription_list - ) := { - subscriptionInfoList := p_app_lcm_subscription_list - } + template (present) JsonBody mw_body_json_instantiate_app_request( + template (present) InstantiateAppRequest p_instantiate_app_request := ? + ) := { + appInstanceInstantiate := p_instantiate_app_request + } // End of template mw_body_json_instantiate_app_request + + template (value) JsonBody m_body_json_terminate_app_request( + in template (value) TerminateAppRequest p_terminate_app_request + ) := { + terminateAppRequest := p_terminate_app_request + } // End of template m_body_json_terminate_app_request + + template (present) JsonBody mw_body_json_terminate_app_request( + template (present) TerminateAppRequest p_terminate_app_request := ? + ) := { + terminateAppRequest := p_terminate_app_request + } // End of template mw_body_json_terminate_app_request + + template (value) JsonBody m_body_json_operate_app_request( + in template (value) OperateAppRequest p_operate_app_request + ) := { + changeStateTo := p_operate_app_request + } // End of template m_body_json_operate_app_request + + template (present) JsonBody mw_body_json_operate_app_request( + template (present) OperateAppRequest p_operate_app_request := ? + ) := { + changeStateTo := p_operate_app_request + } // End of template mw_body_json_operate_app_request + + template (value) JsonBody m_body_json_app_lcm_op_occ_list( + in template (value) AppLcmOpOccList p_app_op_occ_list + ) := { + appLcmOpOccList := p_app_op_occ_list + } // End of template m_body_json_app_lcm_op_occ_list + + template (present) JsonBody mw_body_json_app_lcm_op_occ_list( + template (present) AppLcmOpOccList p_app_op_occ_list := ? + ) := { + appLcmOpOccList := p_app_op_occ_list + } // End of template mw_body_json_app_lcm_op_occ_list + + template (value) JsonBody m_body_json_app_lcm_op_occ( + in template (value) AppLcmOpOcc p_app_op_occ + ) := { + appLcmOpOcc := p_app_op_occ + } // End of template m_body_json_lifecycle_op_occ + + template (present) JsonBody mw_body_json_app_lcm_op_occ( + template (present) AppLcmOpOcc p_app_op_occ := ? + ) := { + appLcmOpOcc := p_app_op_occ + } // End of template mw_body_json_lifecycle_op_occ + + template (value) JsonBody m_body_json_app_inst_subscription_request( + in template (value) AppInstSubscriptionRequest p_app_inst_subscription_request + ) := { + appInstSubscriptionRequest := p_app_inst_subscription_request + } // End of template m_body_json_app_inst_subscription_request + + template (present) JsonBody mw_body_json_app_inst_subscription_request( + template (present) AppInstSubscriptionRequest p_app_inst_subscription_request := ? + ) := { + appInstSubscriptionRequest := p_app_inst_subscription_request + } // End of template mw_body_json_app_inst_subscription_request + + template (value) JsonBody m_body_json_app_inst_subscription_info( + in template (value) AppInstSubscriptionInfo p_app_inst_subscription_info + ) := { + appInstSubscriptionInfo := p_app_inst_subscription_info + } // End of template m_body_json_app_inst_subscription_info + + template (present) JsonBody mw_body_json_app_inst_subscription_info( + template (present) AppInstSubscriptionInfo p_app_inst_subscription_info := ? + ) := { + appInstSubscriptionInfo := p_app_inst_subscription_info + } // End of template mw_body_json_app_inst_subscription_info + + template (value) JsonBody m_body_json_app_instance_subscription_link_list( + in template (value) AppInstanceSubscriptionLinkList p_app_instance_subscription_link_list + ) := { + appInstSubscriptionLinkList := p_app_instance_subscription_link_list + } // End of template m_body_json_app_instance_subscription_link_list + + template (present) JsonBody mw_body_json_app_instance_subscription_link_list( + template (present) AppInstanceSubscriptionLinkList p_app_instance_subscription_link_list := ? + ) := { + appInstSubscriptionLinkList := p_app_instance_subscription_link_list + } // End of template mw_body_json_app_instance_subscription_link_list + + template (value) JsonBody m_body_json_cancel_mode( + in template (value) CancelMode p_cancel_mode + ) := { + cancelMode := p_cancel_mode + } // End of template m_body_json_cancel_mode + + template (present) JsonBody mw_body_json_cancel_mode( + template (present) CancelMode p_cancel_mode := ? + ) := { + cancelMode := p_cancel_mode + } // End of template mw_body_json_cancel_mode + + template (value) JsonBody m_body_json_app_inst_notification( + in template (value) AppInstNotification p_app_inst_notification + ) := { + appInstNotification := p_app_inst_notification + } // End of template m_body_json_app_inst_notification + + template (present) JsonBody mw_body_json_app_inst_notification( + template (present) AppInstNotification p_app_inst_notification := ? + ) := { + appInstNotification := p_app_inst_notification + } // End of template mw_body_json_app_inst_notification - template (present) JsonBody mw_body_json_lcm_subscription( - in template (present) SubscriptionInfo p_app_lcm_subscription - ) := { - subscriptionInfo := p_app_lcm_subscription - } - - - template (present) JsonBody mw_body_json_lcm_notification ( - in template (present) Notification p_lcm_notification - ) := { - lcmNotification := p_lcm_notification - } - */ } // End of group mex_lifcyclemgt -group ams_api { - /* - template (value) JsonBody m_body_json_app_mobility_service_info( - in template (value) AppMobilityServiceInfo p_app_mobility_service_info - ) := { - appMobilityServiceInfo := p_app_mobility_service_info - } // End of template mw_body_json_app_mobility_service_info + group application_mobilty_service_api { - template (present) JsonBody mw_body_json_app_mobility_service_info( - template (present) AppMobilityServiceInfo p_app_mobility_service_info := ? - ) := { - appMobilityServiceInfo := p_app_mobility_service_info - } // End of template mw_body_json_app_mobility_service_info + template (value) JsonBody m_body_json_ams_registration_info_list( + in template (value) RegistrationInfos p_registrationInfos + ) := { + registrationInfos := p_registrationInfos + } // End of template m_body_json_ams_registration_info_list + template (present) JsonBody mw_body_json_ams_registration_info_list( + template (present) RegistrationInfos p_registrationInfos := ? + ) := { + registrationInfos := p_registrationInfos + } // End of template mw_body_json_ams_registration_info_list - template (value) JsonBody m_body_json_problem_details( - in template (value) LibMec_TypesAndValues.ProblemDetails p_problemDetails - ) := { - problemDetails := p_problemDetails - } // End of template m_body_json_problem_details + template (value) JsonBody m_body_json_ams_registration_info( + in template (value) RegistrationInfo p_registrationInfo + ) := { + registrationInfo := p_registrationInfo + } // End of template m_body_json_ams_registration_info + template (present) JsonBody mw_body_json_ams_registration_info( + template (present) RegistrationInfo p_registrationInfo := ? + ) := { + registrationInfo := p_registrationInfo + } // End of template mw_body_json_ams_registration_info + template (value) JsonBody m_body_json_ams_adjacent_app_instance_info_list( + in template (value) AdjacentAppInstanceInfos p_adjacentAppInstanceInfos + ) := { + adjacentAppInstanceInfos := p_adjacentAppInstanceInfos + } // End of template m_body_json_ams_adjacent_app_instance_info_list - template (present) JsonBody mw_body_json_ams_registration_request( - template (present) Ams_TypesAndValues.RegistrationRequest p_registrationRequest := ? - ) := { - registrationRequest_ams := p_registrationRequest - } // End of template mw_body_json_ue_identity_problem_details + template (present) JsonBody mw_body_json_ams_adjacent_app_instance_info_list( + template (present) AdjacentAppInstanceInfos p_adjacentAppInstanceInfos := ? + ) := { + adjacentAppInstanceInfos := p_adjacentAppInstanceInfos + } // End of template mw_body_json_ams_adjacent_app_instance_info_list - template (value) JsonBody m_body_json_ams_registration_request( - in template (value) Ams_TypesAndValues.RegistrationRequest p_registrationRequest - ) := { - registrationRequest_ams := p_registrationRequest - } // End of template m_body_json_ue_identity_problem_details + template (value) JsonBody m_body_json_ams_adjacent_app_instance_info( + in template (value) AdjacentAppInstanceInfo p_adjacentAppInstanceInfo + ) := { + adjacentAppInstanceInfo := p_adjacentAppInstanceInfo + } // End of template m_body_json_ams_adjacent_app_instance_info - template (value) JsonBody m_body_json_ams_registration_request_with_error( - in template (value) Ams_TypesAndValues.RegistrationRequestWithError p_registrationRequestWithError - ) := { - registrationRequestWithError_ams := p_registrationRequestWithError - } // End of template m_body_json_ue_identity_problem_details + template (present) JsonBody mw_body_json_ams_adjacent_app_instance_info( + template (present) AdjacentAppInstanceInfo p_adjacentAppInstanceInfo := ? + ) := { + adjacentAppInstanceInfo := p_adjacentAppInstanceInfo + } // End of template mw_body_json_ams_adjacent_app_instance_info - template (present) JsonBody mw_body_json_ams_subscriptions( - template (present) Ams_TypesAndValues.MobilityProcedureSubscription_ p_amsSubscriptionLinkList := ? - ) := { - subscriptionLinkList_ams := p_amsSubscriptionLinkList - } // End of template mw_body_json_ue_identity_problem_details + template (value) JsonBody m_body_json_ams_subscriptions( + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.SubscriptionLinkList p_amsSubscriptionLinkList + ) := { + subscriptionLinkList_ams := p_amsSubscriptionLinkList + } // End of template m_body_json_ams_subscriptions - template (present) JsonBody m_body_json_ams_subscriptions( - template (present) Ams_TypesAndValues.MobilityProcedureSubscription_ p_amsSubscriptionLinkList := ? - ) := { - subscriptionLinkList_ams := p_amsSubscriptionLinkList - } // End of template mw_body_json_ue_identity_problem_details - - - template (present) JsonBody mw_body_json_mobility_procedure_notification( - template (present) Ams_TypesAndValues.MobilityProcedureSubscription_ p_amsSubscriptionLinkList := ? - ) := { - subscriptionLinkList_ams := p_amsSubscriptionLinkList - } // End of template mw_body_json_mobility_procedure_notification + template (present) JsonBody mw_body_json_ams_subscriptions( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.SubscriptionLinkList p_amsSubscriptionLinkList := ? + ) := { + subscriptionLinkList_ams := p_amsSubscriptionLinkList + } // End of template mw_body_json_ams_subscriptions - template (present) JsonBody mw_body_json_adjacent_application_info_notification( - template (present) Ams_TypesAndValues.AdjacentAppInfoSubscription_ p_adjacentAppInfoSubscription := ? - ) := { - adjacentAppInfoSubscription_ams := p_adjacentAppInfoSubscription - } // End of template mw_body_json_mobility_procedure_notification + template (value) JsonBody m_body_json_ams_mobility_procedure_subscription( + in template (value) MobilityProcedureSubscription p_mobilityProcedureSubscription + ) := { + mobilityProcedureSubscription := p_mobilityProcedureSubscription + } // End of template m_body_json_ams_mobility_procedure_subscription + template (present) JsonBody mw_body_json_ams_mobility_procedure_subscription( + template (present) MobilityProcedureSubscription p_mobilityProcedureSubscription + ) := { + mobilityProcedureSubscription := p_mobilityProcedureSubscription + } // End of template mw_body_json_ams_mobility_procedure_subscription - template (present) JsonBody mw_body_json_expire_notification( - template (present) Ams_TypesAndValues.ExpiryNotification p_expire_notification := ? - ) := { - expireNotification_ams := p_expire_notification - } // End of template mw_body_json_mobility_procedure_notification - */ -} // end of group ams api + template (value) JsonBody m_body_json_ams_adjacent_appInfo_subscription( + in template (value) AdjacentAppInfoSubscription p_adjacentAppInfoSubscription + ) := { + adjacentAppInfoSubscription := p_adjacentAppInfoSubscription + } // End of template m_body_json_ams_adjacent_appInfo_subscription + + template (present) JsonBody mw_body_json_ams_adjacent_appInfo_subscription( + template (present) AdjacentAppInfoSubscription p_adjacentAppInfoSubscription + ) := { + adjacentAppInfoSubscription := p_adjacentAppInfoSubscription + } // End of template mw_body_json_ams_adjacent_appInfo_subscription + + template (value) JsonBody m_body_json_mobility_procedure_notification( + in template (value) MobilityProcedureNotification p_mobilityProcedureNotification + ) := { + mobilityProcedureNotification := p_mobilityProcedureNotification + } // End of template m_body_json_mobility_procedure_notification + + template (present) JsonBody mw_body_json_mobility_procedure_notification( + template (present) MobilityProcedureNotification p_mobilityProcedureNotification := ? + ) := { + mobilityProcedureNotification := p_mobilityProcedureNotification + } // End of template mw_body_json_mobility_procedure_notification + + + template (value) JsonBody m_body_json_adjacent_app_info_notification( + in template (value) AdjacentAppInfoNotification p_adjacentAppInfoNotification + ) := { + adjacentAppInfoNotification := p_adjacentAppInfoNotification + } // End of template m_body_json_adjacent_app_info_notification + + template (present) JsonBody mw_body_json_adjacent_app_info_notification( + template (present) AdjacentAppInfoNotification p_adjacentAppInfoNotification := ? + ) := { + adjacentAppInfoNotification := p_adjacentAppInfoNotification + } // End of template mw_body_json_adjacent_app_info_notification + + template (present) JsonBody mw_body_json_expire_notification( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification p_expire_notification := ? + ) := { + expireNotification_ams := p_expire_notification + } // End of template mw_body_json_mobility_procedure_notification + + } // end of group application_mobilty_service_api group location_api { - + template (value) JsonBody m_body_json_user_info( in template (value) UserInfo p_user_info ) := { userInfo := p_user_info } // End of template m_body_json_user_info - + template (present) JsonBody mw_body_json_user_info( template (present) UserInfo p_user_info := ? ) := { userInfo := p_user_info } // End of template mw_body_json_user_info - + template (value) JsonBody m_body_json_user_list( in template (value) UserList p_user_list ) := { userList := p_user_list } // End of template m_body_json_user_list - + template (present) JsonBody mw_body_json_user_list( template (present) UserList p_user_list := ? ) := { userList := p_user_list } // End of template mw_body_json_user_list - + template (value) JsonBody m_body_json_zone_info( in template (value) LocationAPI_TypesAndValues.ZoneInfo p_zone_info ) := { zoneInfo := p_zone_info } // End of template m_body_json_zone_info - + template (present) JsonBody mw_body_json_zone_info( template (present) LocationAPI_TypesAndValues.ZoneInfo p_zone_info := ? ) := { zoneInfo := p_zone_info } // End of template mw_body_json_zone_info - + template (value) JsonBody m_body_json_access_point_list( in template (value) AccessPointList p_access_point_list ) := { accessPointList := p_access_point_list } // End of template m_body_json_access_point_list - + template (present) JsonBody mw_body_json_access_point_list( template (present) AccessPointList p_access_point_list := ? ) := { accessPointList := p_access_point_list } // End of template mw_body_json_access_point_list - - template (value) JsonBody m_body_json_user_tracking_subscription( - in template (value) UserTrackingSubscription p_user_tracking_subscription - ) := { - userTrackingSubscription := p_user_tracking_subscription - } // End of template m_body_json_user_tracking_subscription - - template (present) JsonBody mw_body_json_user_tracking_subscription( - template (present) UserTrackingSubscription p_user_tracking_subscription := ? - ) := { - userTrackingSubscription := p_user_tracking_subscription - } // End of template mw_body_json_user_rtracking_subscription - - template (value) JsonBody m_body_json_periodic_tracking_subscription( - in template (value) PeriodicTrackingSubscription p_periodic_tracking_subscription - ) := { - periodicTrackingSubscription := p_periodic_tracking_subscription - } // End of template m_body_json_periodic_tracking_subscription - - template (present) JsonBody mw_body_json_periodic_tracking_subscription( - template (present) PeriodicTrackingSubscription p_periodic_tracking_subscription := ? - ) := { - periodicTrackingSubscription := p_periodic_tracking_subscription - } // End of template mw_body_json_periodic_rtracking_subscription - - template (value) JsonBody m_body_json_zonal_traffic_subscription( - in template (value) ZonalTrafficSubscription p_zonal_traffic_subscription + + template (value) JsonBody m_body_json_access_point_info( + in template (value) AccessPointInfo p_access_point_info + ) := { + accessPointInfo := p_access_point_info + } // End of template m_body_json_access_point_info + + template (present) JsonBody mw_body_json_access_point_info( + template (present) AccessPointInfo p_access_point_info := ? + ) := { + accessPointInfo := p_access_point_info + } // End of template mw_body_json_access_point_info + + template (value) JsonBody m_body_json_notification_subscription_list( + in template (value) NotificationSubscriptionList p_notification_subscription_list + ) := { + notificationSubscriptionList := p_notification_subscription_list + } // End of template m_body_json_notification_subscription_list + + template (present) JsonBody mw_body_json_notification_subscription_list( + template (present) NotificationSubscriptionList p_notification_subscription_list := ? + ) := { + notificationSubscriptionList := p_notification_subscription_list + } // End of template mw_body_json_notification_subscription_list + + template (value) JsonBody m_body_json_user_location_event_subscription( + in template (value) UserLocationEventSubscription p_user_location_event_subscription + ) := { + userLocationEventSubscription := p_user_location_event_subscription + } // End of template m_body_json_user_location_event_subscription + + template (present) JsonBody mw_body_json_user_location_event_subscription( + template (present) UserLocationEventSubscription p_user_location_event_subscription := ? + ) := { + userLocationEventSubscription := p_user_location_event_subscription + } // End of template mw_body_json_user_location_event_subscription + + template (value) JsonBody m_body_json_user_location_periodic_subscription( + in template (value) UserLocationPeriodicSubscription p_user_location_periodic_subscription + ) := { + userLocationPeriodicSubscription := p_user_location_periodic_subscription + } // End of template m_body_json_user_location_periodic_subscription + + template (present) JsonBody mw_body_json_user_location_periodic_subscription( + template (present) UserLocationPeriodicSubscription p_user_location_periodic_subscription := ? + ) := { + userLocationPeriodicSubscription := p_user_location_periodic_subscription + } // End of template mw_body_json_user_location_periodic_subscription + + template (value) JsonBody m_body_json_zone_location_event_subscription( + in template (value) ZoneLocationEventSubscription p_zone_location_event_subscription + ) := { + zoneLocationEventSubscription := p_zone_location_event_subscription + } // End of template m_body_json_zone_location_event_subscription + + template (present) JsonBody mw_body_json_zone_location_event_subscription( + template (present) ZoneLocationEventSubscription p_zone_location_event_subscription := ? + ) := { + zoneLocationEventSubscription := p_zone_location_event_subscription + } // End of template mw_body_json_zone_location_event_subscription + + template (value) JsonBody m_body_json_zone_status_subscription( + in template (value) ZoneStatusSubscription p_zone_status_subscription + ) := { + zoneStatusSubscription := p_zone_status_subscription + } // End of template m_body_json_zone_status_subscription + + template (present) JsonBody mw_body_json_zone_status_subscription( + template (present) ZoneStatusSubscription p_zone_status_subscription := ? + ) := { + zoneStatusSubscription := p_zone_status_subscription + } // End of template mw_body_json_zone_status_subscription + + template (value) JsonBody m_body_json_user_area_subscription( + in template (value) UserAreaSubscription p_user_area_subscription + ) := { + userAreaSubscription := p_user_area_subscription + } // End of template m_body_json_user_area_subscription + + template (present) JsonBody mw_body_json_user_area_subscription( + template (present) UserAreaSubscription p_user_area_subscription := ? + ) := { + userAreaSubscription := p_user_area_subscription + } // End of template mw_body_json_user_area_subscription + + template (value) JsonBody m_body_json_user_distance_subscription( + in template (value) UserDistanceSubscription p_user_distance_subscription ) := { - zonalTrafficSubscription := p_zonal_traffic_subscription - } // End of template m_body_json_zonal_traffic_subscription - - template (present) JsonBody mw_body_json_zonal_traffic_subscription( - template (present) ZonalTrafficSubscription p_zonal_traffic_subscription := ? + userDistanceSubscription := p_user_distance_subscription + } // End of template m_body_json_user_distance_subscription + + template (present) JsonBody mw_body_json_user_distance_subscription( + template (present) UserDistanceSubscription p_user_distance_subscription := ? ) := { - zonalTrafficSubscription := p_zonal_traffic_subscription - } // End of template mw_body_json_zonal_traffic_subscription - - template (value) JsonBody m_body_json_circle_notification_subscription( - in template (value) CircleNotificationSubscription p_circle_notification_subscription - ) := { - circleNotificationSubscription := p_circle_notification_subscription - } // End of template m_body_json_circle_notification_subscription - - template (present) JsonBody mw_body_json_circle_notification_subscription( - template (present) CircleNotificationSubscription p_circle_notification_subscription := ? - ) := { - circleNotificationSubscription := p_circle_notification_subscription - } // End of template mw_body_json_circle_notification_subscription - + userDistanceSubscription := p_user_distance_subscription + } // End of template mw_body_json_user_distance_subscription + template (value) JsonBody m_body_json_terminal_distance( in template (value) TerminalDistance p_terminal_distance ) := { terminalDistance := p_terminal_distance } // End of template m_body_json_terminal_distance - + template (present) JsonBody mw_body_json_terminal_distance( template (present) TerminalDistance p_terminal_distance := ? ) := { terminalDistance := p_terminal_distance } // End of template mw_body_json_terminal_distance - - template (value) JsonBody m_body_json_distance_notification_subscription( - in template (value) DistanceNotificationSubscription p_distance_notification_subscription + + template (value) JsonBody m_body_json_user_area_notification( + in template (value) UserAreaNotification p_userAreaNotification + ) := { + userAreaNotification := p_userAreaNotification + } // End of template m_body_json_user_area_notification + + template (present) JsonBody mw_body_json_user_area_notification( + template (present) UserAreaNotification p_userAreaNotification := ? + ) := { + userAreaNotification := p_userAreaNotification + } // End of template mw_body_json_user_area_notification + + template (value) JsonBody m_body_json_user_distance_notification( + in template (value) UserDistanceNotification p_userDistanceNotification + ) := { + userDistanceNotification := p_userDistanceNotification + } // End of template m_body_json_user_distance_notification + + template (present) JsonBody mw_body_json_user_distance_notification( + template (present) UserDistanceNotification p_userDistanceNotification := ? + ) := { + userDistanceNotification := p_userDistanceNotification + } // End of template mw_body_json_user_distance_notification + + template (value) JsonBody m_body_json_user_location_event_notification( + in template (value) UserLocationEventNotification p_userLocationEventNotification + ) := { + userLocationEventNotification := p_userLocationEventNotification + } // End of template m_body_json_user_location_event_notification + + template (present) JsonBody mw_body_json_user_location_event_notification( + template (present) UserLocationEventNotification p_userLocationEventNotification := ? ) := { - distanceNotificationSubscription := p_distance_notification_subscription - } // End of template m_body_json_distance_notification_subscription - - template (present) JsonBody mw_body_json_distance_notification_subscription( - template (present) DistanceNotificationSubscription p_distance_notification_subscription := ? - ) := { - distanceNotificationSubscription := p_distance_notification_subscription - } // End of template mw_body_json_distance_notification_subscription - - template (value) JsonBody m_body_json_periodic_notification_subscription( - in template (value) PeriodicNotificationSubscription p_periodic_notification_subscription - ) := { - periodicNotificationSubscription := p_periodic_notification_subscription - } // End of template m_body_json_periodic_notification_subscription - - template (present) JsonBody mw_body_json_periodic_notification_subscription( - template (present) PeriodicNotificationSubscription p_periodic_notification_subscription := ? - ) := { - periodicNotificationSubscription := p_periodic_notification_subscription - } // End of template mw_body_json_periodic_notification_subscription - + userLocationEventNotification := p_userLocationEventNotification + } // End of template mw_body_json_user_location_event_notification + + template (value) JsonBody m_body_json_user_location_periodic_notification( + in template (value) UserLocationPeriodicNotification p_userLocationPeriodicNotification + ) := { + userLocationPeriodicNotification := p_userLocationPeriodicNotification + } // End of template m_body_json_user_location_periodic_notification + + template (present) JsonBody mw_body_json_user_location_periodic_notification( + template (present) UserLocationPeriodicNotification p_userLocationPeriodicNotification := ? + ) := { + userLocationPeriodicNotification := p_userLocationPeriodicNotification + } // End of template mw_body_json_user_location_periodic_notification + + template (value) JsonBody m_body_json_zone_location_event_notification( + in template (value) ZoneLocationEventNotification p_zoneLocationEventNotification + ) := { + zoneLocationEventNotification := p_zoneLocationEventNotification + } // End of template m_body_json_zone_location_event_notification + + template (present) JsonBody mw_body_json_zone_location_event_notification( + template (present) ZoneLocationEventNotification p_zoneLocationEventNotification := ? + ) := { + zoneLocationEventNotification := p_zoneLocationEventNotification + } // End of template mw_body_json_zone_location_event_notification + + template (value) JsonBody m_body_json_zone_status_notification( + in template (value) ZoneStatusNotification p_zoneStatusNotification + ) := { + zoneStatusNotification := p_zoneStatusNotification + } // End of template m_body_json_zone_status_notification + + template (present) JsonBody mw_body_json_zone_status_notification( + template (present) ZoneStatusNotification p_zoneStatusNotification := ? + ) := { + zoneStatusNotification := p_zoneStatusNotification + } // End of template mw_body_json_zone_status_notification + + template (value) JsonBody m_body_json_test_notification( + in template (value) LocationAPI_TypesAndValues.TestNotification p_testNotification + ) := { + testNotification := p_testNotification + } // End of template m_body_json_test_notification + + template (present) JsonBody mw_body_json_test_notification( + template (present) LocationAPI_TypesAndValues.TestNotification p_testNotification := ? + ) := { + testNotification := p_testNotification + } // End of template mw_body_json_test_notification + } // End of group location_api group ue_identity_api { @@ -507,13 +699,13 @@ group ams_api { ) := { ueIdentityTagInfo := p_ueIdentityTagInfo } // End of template m_body_json_ue_identity_tag_info - + template (present) JsonBody mw_body_json_ue_identity_tag_info( template (present) UeIdentityTagInfo p_ueIdentityTagInfo := ? ) := { ueIdentityTagInfo := p_ueIdentityTagInfo } // End of template mw_body_json_ue_identity_tag_info - + } // End of group ue_identity_api group rnis_subscriptions { @@ -523,189 +715,201 @@ group ams_api { ) := { subscriptionLinkList := p_subscriptionLinkList } // End of template m_body_json_subscriptions_list - + template (present) JsonBody mw_body_json_subscriptions_list( template (present) RnisAPI_TypesAndValues.SubscriptionLinkList p_subscriptionLinkList := ? ) := { subscriptionLinkList := p_subscriptionLinkList } // End of template mw_body_json_subscriptions_list - + template (value) JsonBody m_body_json_cell_change_subscription( in template (value) CellChangeSubscription p_cellChangeSubscription ) := { cellChangeSubscription := p_cellChangeSubscription } // End of template m_body_json_cell_change_subscription - + template (present) JsonBody mw_body_json_cell_change_subscription( template (present) CellChangeSubscription p_cellChangeSubscription := ? ) := { cellChangeSubscription := p_cellChangeSubscription } // End of template mw_body_json_cell_change_subscription - + template (value) JsonBody m_body_json_rab_info( in template (value) RabInfo p_rabInfo ) := { rabInfo := p_rabInfo } // End of template m_body_json_rab_info - + template (present) JsonBody mw_body_json_rab_info( template (present) RabInfo p_rabInfo := ? ) := { rabInfo := p_rabInfo } // End of template mw_body_json_rab_info - + template (value) JsonBody m_body_json_plmn_infos( in template (value) PlmnInfos p_plmnInfos ) := { plmnInfos := p_plmnInfos } // End of template m_body_json_plmn_infos - + template (present) JsonBody mw_body_json_plmn_infos( template (present) PlmnInfos p_plmnInfos := ? ) := { plmnInfos := p_plmnInfos } // End of template mw_body_json_plmn_infos - + template (value) JsonBody m_body_json_s1_bearer_info( in template (value) S1BearerInfo p_s1BearerInfo ) := { s1BearerInfo := p_s1BearerInfo } // End of template m_body_json_s1_bearer_info - + template (present) JsonBody mw_body_json_s1_bearer_info( template (present) S1BearerInfo p_s1BearerInfo := ? ) := { s1BearerInfo := p_s1BearerInfo } // End of template mw_body_json_s1_bearer_info - + template (value) JsonBody m_body_json_rab_est_subscription( in template (value) RabEstSubscription p_rabEstSubscription ) := { rabEstSubscription := p_rabEstSubscription } // End of template m_body_json_rab_est_subscription - + template (present) JsonBody mw_body_json_rab_est_subscription( template (present) RabEstSubscription p_rabEstSubscription := ? ) := { rabEstSubscription := p_rabEstSubscription } // End of template mw_body_json_rab_est_subscription - + template (value) JsonBody m_body_json_rab_mod_subscription( in template (value) RabModSubscription p_rabModSubscription ) := { rabModSubscription := p_rabModSubscription } // End of template m_body_json_rab_mod_subscription - + template (present) JsonBody mw_body_json_rab_mod_subscription( template (present) RabModSubscription p_rabModSubscription := ? ) := { rabModSubscription := p_rabModSubscription } // End of template mw_body_json_rab_mod_subscription - + template (value) JsonBody m_body_json_rab_rel_subscription( in template (value) RabRelSubscription p_rabRelSubscription ) := { rabRelSubscription := p_rabRelSubscription } // End of template m_body_json_rab_rel_subscription - + template (present) JsonBody mw_body_json_rab_rel_subscription( template (present) RabRelSubscription p_rabRelSubscription := ? ) := { rabRelSubscription := p_rabRelSubscription } // End of template mw_body_json_rab_rel_subscription - + template (value) JsonBody m_body_json_meas_rep_ue_subscription( in template (value) MeasRepUeSubscription p_measRepUeSubscription ) := { measRepUeSubscription := p_measRepUeSubscription } // End of template m_body_json_meas_rep_ue_subscription - + template (present) JsonBody mw_body_json_meas_rep_ue_subscription( template (present) MeasRepUeSubscription p_measRepUeSubscription := ? ) := { measRepUeSubscription := p_measRepUeSubscription } // End of template mw_body_json_meas_rep_ue_subscription - + template (value) JsonBody m_body_json_meas_ta_subscription( in template (value) MeasTaSubscription p_measTaSubscription ) := { measTaSubscription := p_measTaSubscription } // End of template m_body_json_meas_ta_subscription - + template (present) JsonBody mw_body_json_meas_ta_subscription( template (present) MeasTaSubscription p_measTaSubscription := ? ) := { measTaSubscription := p_measTaSubscription } // End of template mw_body_json_meas_ta_subscription - + template (value) JsonBody m_body_json_ca_reconf_subscription( in template (value) CaReConfSubscription p_caReconfSubscription ) := { caReConfSubscription := p_caReconfSubscription } // End of template m_body_json_ca_reconf_subscription - + template (present) JsonBody mw_body_json_ca_reconf_subscription( template (present) CaReConfSubscription p_caReconfSubscription := ? ) := { caReConfSubscription := p_caReconfSubscription } // End of template mw_body_json_ca_reconf_subscription - + template (value) JsonBody m_body_json_s1_bearer_subscription( in template (value) S1BearerSubscription p_s1BearerSubscription ) := { s1BearerSubscription := p_s1BearerSubscription } // End of template m_body_json_s1_bearer_subscription - + template (present) JsonBody mw_body_json_s1_bearer_subscription( template (present) S1BearerSubscription p_s1BearerSubscription := ? ) := { s1BearerSubscription := p_s1BearerSubscription } // End of template mw_body_json_s1_bearer_subscription - + template (value) JsonBody m_body_json_l2_meas_subscription( in template (value) L2Meas p_l2Meas ) := { l2Meas := p_l2Meas } // End of template m_body_json_l2_meas_subscription - + template (present) JsonBody mw_body_json_l2_meas_subscription( template (present) L2Meas p_l2Meas := ? ) := { l2Meas := p_l2Meas } // End of template mw_body_json_l2_meas_subscription - + + template (value) JsonBody m_body_json_expiry_notification_rnis( + in template (value) RnisAPI_TypesAndValues.ExpiryNotification p_expiryNotification + ) := { + expiryNotification_rnis := p_expiryNotification + } // End of template m_body_json_expiry_notification_rnis + + template (present) JsonBody mw_body_json_expiry_notification_rnis( + template (present) RnisAPI_TypesAndValues.ExpiryNotification p_expiryNotification := ? + ) := { + expiryNotification_rnis := p_expiryNotification + } // End of template mw_body_json_expiry_notification_rnis + } // End of group rnis_subscriptions - + group rnis_notifications { - + } // End of group rnis_notifications - + group traffic_management_api { - + template (value) JsonBody m_body_json_bw_info( in template (value) BwInfo p_bwInfo ) := { bwInfo := p_bwInfo } // End of template m_body_json_bw_info - + template (present) JsonBody mw_body_json_bw_info( template (present) BwInfo p_bwInfo := ? ) := { bwInfo := p_bwInfo } // End of template mw_body_json_bw_info - + template (value) JsonBody m_body_json_bw_info_deltas( in template (value) BwInfoDeltas p_bwInfoDeltas ) := { bwInfoDeltas := p_bwInfoDeltas } // End of template m_body_json_bw_info_deltas - + template (present) JsonBody mw_body_json_bw_info_deltas( template (present) BwInfoDeltas p_bwInfoDeltas := ? ) := { bwInfoDeltas := p_bwInfoDeltas } // End of template mw_body_json_bw_info_deltas - + template (present) JsonBody mw_body_json_bw_info_list( template (present) BwInfoList p_bwInfoList := ? ) := { @@ -717,35 +921,35 @@ group ams_api { ) := { mtsCapabilityInfo := p_mtsCapabilityInfo } // End of template m_body_json_mts_capability_info - + template (present) JsonBody mw_body_json_mts_capability_info( template (present) MtsCapabilityInfo p_mtsCapabilityInfo := ? ) := { mtsCapabilityInfo := p_mtsCapabilityInfo } // End of template mw_body_json_mts_capability_info - + template (value) JsonBody m_body_json_mts_session_info( in template (value) MtsSessionInfo p_mtsSessionInfo ) := { mtsSessionInfo := p_mtsSessionInfo } // End of template m_body_json_mts_session_info - + template (present) JsonBody mw_body_json_mts_session_info( template (present) MtsSessionInfo p_mtsSessionInfo := ? ) := { mtsSessionInfo := p_mtsSessionInfo } // End of template mw_body_json_mts_session_info - + template (present) JsonBody mw_body_json_mts_session_info_list( template (present) MtsSessionInfos p_mtsSessionInfos := ? ) := { mtsSessionInfos := p_mtsSessionInfos } // End of template mw_body_json_mts_session_info_list - + } // End of group traffic_management_api group app_enablement_api { - + template (value) JsonBody m_body_json_service_info_list( in template (value) ServiceInfoList p_serviceInfoList ) := { @@ -769,7 +973,7 @@ group ams_api { ) := { serviceInfo := p_serviceInfo } // End of template mw_body_json_service_info - + template (value) JsonBody m_body_json_subscription_link_list( in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.SubscriptionLinkList p_subscription_link_list ) := { @@ -830,130 +1034,154 @@ group ams_api { serviceLivenessInfo := p_serviceLivenessInfo } // End of template mw_body_json_srv_liveness_info + template (value) JsonBody m_body_json_srv_liveness_update( + in template (value) ServiceLivenessUpdate p_serviceLivenessUpdate + ) := { + serviceLivenessUpdate := p_serviceLivenessUpdate + } // End of template m_body_json_srv_liveness_update + + template (present) JsonBody mw_body_json_srv_liveness_update( + template (present) ServiceLivenessUpdate p_serviceLivenessUpdate := ? + ) := { + serviceLivenessUpdate := p_serviceLivenessUpdate + } // End of template mw_body_json_srv_liveness_update + template (value) JsonBody m_body_json_transport_info_list( - in template (value) TransportInfoList p_transportInfoList + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList p_transportInfoList ) := { transportInfoList := p_transportInfoList } // End of template m_body_json_transport_info_list - + template (present) JsonBody mw_body_json_transport_info_list( - template (present) TransportInfoList p_transportInfoList := ? + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList p_transportInfoList := ? ) := { transportInfoList := p_transportInfoList } // End of template mw_body_json_transport_info_list - + template (value) JsonBody m_body_json_dns_rule( in template (value) DnsRule p_dnsRule ) := { dnsRule := p_dnsRule } // End of template m_body_json_dns_rule - + template (present) JsonBody mw_body_json_dns_rule( template (present) DnsRule p_dnsRule := ? ) := { dnsRule := p_dnsRule } // End of template mw_body_json_dns_rule - + template (value) JsonBody m_body_json_dns_rule_list( in template (value) DnsRuleList p_dnsRuleList ) := { dnsRuleList := p_dnsRuleList } // End of template m_body_json_dns_rule_list - + template (present) JsonBody mw_body_json_dns_rule_list( template (present) DnsRuleList p_dnsRuleList := ? ) := { dnsRuleList := p_dnsRuleList } // End of template mw_body_json_dns_rule_list - + template (value) JsonBody m_body_json_srv_avail_notif_subscription( - in template (value) SerAvailabilityNotificationSubscription_ p_serAvailabilityNotificationSubscription + in template (value) SerAvailabilityNotificationSubscription p_serAvailabilityNotificationSubscription ) := { serAvailabilityNotificationSubscription := p_serAvailabilityNotificationSubscription } // End of template m_body_json_srv_avail_notif_subscription - + template (present) JsonBody mw_body_json_srv_avail_notif_subscription( - template (present) SerAvailabilityNotificationSubscription_ p_serAvailabilityNotificationSubscription := ? + template (present) SerAvailabilityNotificationSubscription p_serAvailabilityNotificationSubscription := ? ) := { serAvailabilityNotificationSubscription := p_serAvailabilityNotificationSubscription } // End of template mw_body_json_srv_avail_notif_subscription - + template (value) JsonBody m_body_json_timing_caps( in template (value) TimingCaps p_timingCaps ) := { timingCaps := p_timingCaps } // End of template m_body_json_timing_caps - + template (present) JsonBody mw_body_json_timing_caps( template (present) TimingCaps p_timingCaps := ? ) := { timingCaps := p_timingCaps } // End of template mw_body_json_timing_caps - + template (value) JsonBody m_body_json_current_time( in template (value) CurrentTime p_currentTime ) := { currentTime := p_currentTime } // End of template m_body_json_current_time - + template (present) JsonBody mw_body_json_current_time( template (present) CurrentTime p_currentTime := ? ) := { currentTime := p_currentTime } // End of template mw_body_json_current_time - + template (value) JsonBody m_body_json_traffic_rule( in template (value) TrafficRule p_trafficRule ) := { trafficRule := p_trafficRule } // End of template m_body_json_traffic_rule - + template (present) JsonBody mw_body_json_traffic_rule( template (present) TrafficRule p_trafficRule := ? ) := { trafficRule := p_trafficRule } // End of template mw_body_json_traffic_rule - + template (value) JsonBody m_body_json_traffic_rule_list( in template (value) TrafficRuleList p_trafficRuleList ) := { trafficRuleList := p_trafficRuleList } // End of template m_body_json_traffic_rule_list - + template (present) JsonBody mw_body_json_traffic_rule_list( template (present) TrafficRuleList p_trafficRuleList := ? ) := { trafficRuleList := p_trafficRuleList } // End of template mw_body_json_traffic_rule_list - + + template (value) JsonBody m_body_json_app_info_regapps( + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.AppInfo p_appInfo_regapps + ) := { + appInfo_regapps := p_appInfo_regapps + } // End of template m_body_json_app_info_regapps + + template (present) JsonBody mw_body_json_app_info_regapps( + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.AppInfo p_appInfo_regapps := ? + ) := { + appInfo_regapps := p_appInfo_regapps + } // End of template mw_body_json_app_info_regapps + } // End of group app_enablement_api - + group ue_app_ctx { - + template (value) JsonBody m_body_json_app_context( in template (value) UEAppInterfaceAPI_TypesAndValues.AppContext p_appContext ) := { appContext := p_appContext } // End of template m_body_json_app_context - + template (present) JsonBody mw_body_json_app_context( template (present) UEAppInterfaceAPI_TypesAndValues.AppContext p_appContext := ? ) := { appContext := p_appContext } // End of template mw_body_json_app_context - + template (value) JsonBody m_body_json_app_info( - in template (value) AppInfo p_appInfo - ) := { + in template (value) UEAppInterfaceAPI_TypesAndValues.AppInfo p_appInfo + ) := { appInfo := p_appInfo } // End of template m_body_json_app_info - + template (present) JsonBody mw_body_json_app_info( - template (present) AppInfo p_appInfo := ? - ) := { + template (present) UEAppInterfaceAPI_TypesAndValues.AppInfo p_appInfo := ? + ) := { appInfo := p_appInfo } // End of template mw_body_json_app_info - + } // End of group ue_app_ctx group device_information { @@ -1040,6 +1268,18 @@ group ams_api { staDataRateSubscription := p_staDataRateSubscription } // End of template m_body_json_sta_data_rate_subscription + template (value) JsonBody m_body_json_assoc_sta_notification( + in template (value) AssocStaNotification p_assocStaNotification + ) := { + assocStaNotification := p_assocStaNotification + } // End of template m_body_json_assoc_sta_notification + + template (present) JsonBody mw_body_json_assoc_sta_notification( + template (present) AssocStaNotification p_assocStaNotification := ? + ) := { + assocStaNotification := p_assocStaNotification + } // End of template mw_body_json_assoc_sta_notification + template (present) JsonBody mw_body_json_sta_data_rate_subscription( template (present) StaDataRateSubscription p_staDataRateSubscription := ? ) := { @@ -1194,6 +1434,18 @@ group ams_api { provChgPc5Subscription := p_provChgPc5Subscription } // End of template mw_body_json_prov_pc5_subscription + template (value) JsonBody m_body_json_v2x_msg_distribution_server_info( + in template (value) V2xMsgDistributionServerInfo p_v2xMsgDistributionServerInfo + ) := { + v2xMsgDistributionServerInfo := p_v2xMsgDistributionServerInfo + } // End of template m_body_json_v2x_msg_distribution_server_info + + template (present) JsonBody mw_body_json_v2x_msg_distribution_server_info( + template (present) V2xMsgDistributionServerInfo p_v2xMsgDistributionServerInfo := ? + ) := { + v2xMsgDistributionServerInfo := p_v2xMsgDistributionServerInfo + } // End of template mw_body_json_v2x_msg_distribution_server_info + template (value) JsonBody m_body_json_v2x_msg_subscription( in template (value) V2xMsgSubscription p_v2xMsgSubscription ) := { @@ -1206,6 +1458,18 @@ group ams_api { v2xMsgSubscription := p_v2xMsgSubscription } // End of template mw_body_json_v2x_msg_subscription + template (value) JsonBody m_body_json_pred_qos_subscription( + in template (value) PredQosSubscription p_predQosSubscription + ) := { + predQosSubscription := p_predQosSubscription + } // End of template m_body_json_pred_qos_subscription + + template (present) JsonBody mw_body_json_pred_qos_subscription( + template (present) PredQosSubscription p_predQosSubscription := ? + ) := { + predQosSubscription := p_predQosSubscription + } // End of template mw_body_json_pred_qos_subscription + template (value) JsonBody m_body_json_prov_chg_uu_uni_notification( in template (value) ProvChgUuUniNotification p_provChgUuUniNotification ) := { @@ -1245,79 +1509,207 @@ group ams_api { } // End of group v2x_information_service group fai { - + template (value) JsonBody m_body_json_fai_fa_info( in template (value) FaInfo p_faInfo ) := { faInfo := p_faInfo } // End of template m_body_json_fai_fa_info - + template (present) JsonBody mw_body_json_fai_fa_info( template (present) FaInfo p_faInfo := ? ) := { faInfo := p_faInfo } // End of template mw_body_json_fai_fa_info - + template (value) JsonBody m_body_json_fai_device_info( - in template (value) DeviceInfo p_deviceInfo + in template (value) FixedAccessInformationServiceAPI_TypesAndValues.DeviceInfo p_deviceInfo ) := { deviceInfo := p_deviceInfo } // End of template m_body_json_fai_device_info - + template (present) JsonBody mw_body_json_fai_device_info( - template (present) DeviceInfo p_deviceInfo := ? + template (present) FixedAccessInformationServiceAPI_TypesAndValues.DeviceInfo p_deviceInfo := ? ) := { deviceInfo := p_deviceInfo } // End of template mw_body_json_fai_device_info - + template (value) JsonBody m_body_json_fai_cable_line_info( in template (value) CableLineInfo p_cableLineInfo ) := { cableLineInfo := p_cableLineInfo } // End of template m_body_json_fai_cable_line_info - + template (present) JsonBody mw_body_json_fai_cable_line_info( template (present) CableLineInfo p_cableLineInfo := ? ) := { cableLineInfo := p_cableLineInfo } // End of template mw_body_json_fai_cable_line_info - + template (value) JsonBody m_body_json_fai_pon_info( in template (value) PonInfo p_ponInfo ) := { ponInfo := p_ponInfo } // End of template m_body_json_fai_pon_info - + template (present) JsonBody mw_body_json_fai_pon_info( template (present) PonInfo p_ponInfo := ? ) := { ponInfo := p_ponInfo } // End of template mw_body_json_fai_pon_info - + template (value) JsonBody m_body_json_fai_subscription_link_list( in template (value) FixedAccessInformationServiceAPI_TypesAndValues.SubscriptionLinkList p_subscriptionLinkList ) := { subscriptionLinkList_fai := p_subscriptionLinkList } // End of template m_body_json_fai_subscription_link_list - + template (present) JsonBody mw_body_json_fai_subscription_link_list( template (present) FixedAccessInformationServiceAPI_TypesAndValues.SubscriptionLinkList p_subscriptionLinkList := ? ) := { subscriptionLinkList_fai := p_subscriptionLinkList } // End of template mw_body_json_fai_subscription_link_list - - template (value) JsonBody m_body_json_fai_onu_alarm_subscription_link_list( - in template (value) OnuAlarmSubscription p_onuAlarmSubscription + + template (value) JsonBody m_body_json_fai_onu_alarm_subscription( + in template (value) OnuAlarmSubscription p_onuAlarmSubscription ) := { onuAlarmSubscription := p_onuAlarmSubscription - } // End of template m_body_json_fai_onu_alarm_subscription_link_list - - template (present) JsonBody mw_body_json_fai_onu_alarm_subscription_link_list( - template (present) OnuAlarmSubscription p_onuAlarmSubscription := ? + } // End of template m_body_json_fai_onu_alarm_subscription + + template (present) JsonBody mw_body_json_fai_onu_alarm_subscription( + template (present) OnuAlarmSubscription p_onuAlarmSubscription := ? ) := { onuAlarmSubscription := p_onuAlarmSubscription - } // End of template mw_body_json_fai_onu_alarm_subscription_link_list - + } // End of template mw_body_json_fai_onu_alarm_subscription + + template (value) JsonBody m_body_json_fai_dev_info_subscription( + in template (value) DevInfoSubscription p_devInfoSubscription + ) := { + devInfoSubscription := p_devInfoSubscription + } // End of template m_body_json_fai_dev_info_subscription + + template (present) JsonBody mw_body_json_fai_dev_info_subscription( + template (present) DevInfoSubscription p_devInfoSubscription := ? + ) := { + devInfoSubscription := p_devInfoSubscription + } // End of template mw_body_json_fai_dev_info_subscription + + template (value) JsonBody m_body_json_fai_cm_conn_subscription( + in template (value) CmConnSubscription p_cmConnSubscription + ) := { + cmConnSubscription := p_cmConnSubscription + } // End of template m_body_json_fai_cm_conn_subscription + + template (present) JsonBody mw_body_json_fai_cm_conn_subscription( + template (present) CmConnSubscription p_cmConnSubscription := ? + ) := { + cmConnSubscription := p_cmConnSubscription + } // End of template mw_body_json_fai_cm_conn_subscription + + template (value) JsonBody m_body_json_fai_ani_alarm_subscription( + in template (value) AniAlarmSubscription p_aniAlarmSubscription + ) := { + aniAlarmSubscription := p_aniAlarmSubscription + } // End of template m_body_json_fai_ani_alarm_subscription + + template (present) JsonBody mw_body_json_fai_ani_alarm_subscription( + template (present) AniAlarmSubscription p_aniAlarmSubscription := ? + ) := { + aniAlarmSubscription := p_aniAlarmSubscription + } // End of template mw_body_json_fai_ani_alarm_subscription + } // End of group fai - -} // End of module LibItsHttp_JsonTemplates + + group iot { + + template (value) JsonBody m_body_json_iot_device_info( + in template (value) IoTAPI_TypesAndValues.DeviceInfo p_deviceInfo + ) := { + deviceInfo_iot := p_deviceInfo + } // End of template m_body_json_iot_device_info + + template (present) JsonBody mw_body_json_iot_device_info( + template (present) IoTAPI_TypesAndValues.DeviceInfo p_deviceInfo := ? + ) := { + deviceInfo_iot := p_deviceInfo + } // End of template mw_body_json_iot_device_info + + template (value) JsonBody m_body_json_fed_device_info_list( + in template (value) IoTAPI_TypesAndValues.DeviceInfoList p_deviceInfoList + ) := { + deviceInfoList_iot := p_deviceInfoList + } // End of template m_body_json_fed_device_info_list + + template (present) JsonBody mw_body_json_iot_device_info_list( + template (present) IoTAPI_TypesAndValues.DeviceInfoList p_deviceInfoList := ? + ) := { + deviceInfoList_iot := p_deviceInfoList + } // End of template mw_body_json_iot_device_info_list + + template (value) JsonBody m_body_json_iot_iot_platform_info( + in template (value) IotPlatformInfo p_iotPlatformInfo + ) := { + iotPlatformInfo := p_iotPlatformInfo + } // End of template m_body_json_iot_iot_platform_info + + template (present) JsonBody mw_body_json_iot_iot_platform_info( + template (present) IotPlatformInfo p_iotPlatformInfo := ? + ) := { + iotPlatformInfo := p_iotPlatformInfo + } // End of template mw_body_json_iot_iot_platform_info + + template (value) JsonBody m_body_json_iot_iot_platform_info_list( + in template (value) IotPlatformInfoList p_iotPlatformInfoList + ) := { + iotPlatformInfoList := p_iotPlatformInfoList + } // End of template m_body_json_iot_iot_platform_info_list + + template (present) JsonBody mw_body_json_iot_iot_platform_info_list( + template (present) IotPlatformInfoList p_iotPlatformInfoList := ? + ) := { + iotPlatformInfoList := p_iotPlatformInfoList + } // End of template mw_body_json_iot_iot_platform_info_list + + } // End of group iot + + group federation { + + template (value) JsonBody m_body_json_fed_system_info( + in template (value) SystemInfo p_systemInfo + ) := { + systemInfo := p_systemInfo + } // End of template m_body_json_fed_system_info + + template (present) JsonBody mw_body_json_fed_system_info( + template (present) SystemInfo p_systemInfo := ? + ) := { + systemInfo := p_systemInfo + } // End of template mw_body_json_fed_system_info + + template (value) JsonBody m_body_json_fed_system_info_list( + in template (value) SystemInfoList p_systemInfoList + ) := { + systemInfoList := p_systemInfoList + } // End of template m_body_json_fed_system_info_list + + template (present) JsonBody mw_body_json_fed_system_info_list( + template (present) SystemInfoList p_systemInfoList := ? + ) := { + systemInfoList := p_systemInfoList + } // End of template mw_body_json_fed_system_info_list + + template (value) JsonBody m_body_json_fed_system_info_update( + in template (value) SystemInfoUpdate p_systemInfoUpdate + ) := { + systemInfoUpdate := p_systemInfoUpdate + } // End of template m_body_json_fed_system_info_update + + template (present) JsonBody mw_body_json_fed_system_info_update( + template (present) SystemInfoUpdate p_systemInfoUpdate := ? + ) := { + systemInfoUpdate := p_systemInfoUpdate + } // End of template mw_body_json_fed_system_info_update + + } // End of group federation + +} // End of module LibHttp_JsonTemplates diff --git a/ttcn/patch_lib_its/module.mk b/ttcn/patch_lib_its/module.mk deleted file mode 100644 index 65c5047e2d3deb0df8369ee21613d3577cfa1257..0000000000000000000000000000000000000000 --- a/ttcn/patch_lib_its/module.mk +++ /dev/null @@ -1 +0,0 @@ -modules := ttcn/Http diff --git a/virtualization/docker-dev/Dockerfile b/virtualization/docker-dev/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..37c7b15a0f9598b19463ac901121f90626e2aff8 --- /dev/null +++ b/virtualization/docker-dev/Dockerfile @@ -0,0 +1,26 @@ +FROM stfubuntu:20.04 + +MAINTAINER ETSI TTF T027 + +LABEL description="TTF_T027_Mec Docker Image" + +ENV TERM=linux \ + HOME=/home/etsi \ + HOSTNAME=docker-titan-TTF_T027 + +COPY home /home/etsi + +RUN cd /home/etsi \ + && chown -R etsi:etsi . \ + && ls ./etc/init.d/*.sh | while read S; do chmod 0750 "$S" || exit 1; done + +USER etsi + +RUN cd ${HOME} \ + && export PATH=$HOME/bin:$PATH \ + && ls ${HOME}/etc/init.d/*.sh | while read S; do /bin/bash -c "$S" || exit 1; done \ + && rm -fr ${HOME}/etc + +CMD ["/bin/bash"] + +# That's all Floks diff --git a/virtualization/docker/Dockerfile.stfubuntu b/virtualization/docker-dev/Dockerfile.stfubuntu similarity index 73% rename from virtualization/docker/Dockerfile.stfubuntu rename to virtualization/docker-dev/Dockerfile.stfubuntu index 337f237f5ff1c3ea514cb93a2e2b01bae3b0a3a6..9fa6645dfc7b2239c01bf04ee2d81fad6416528c 100644 --- a/virtualization/docker/Dockerfile.stfubuntu +++ b/virtualization/docker-dev/Dockerfile.stfubuntu @@ -1,7 +1,6 @@ -FROM ubuntu:18.04 - -MAINTAINER ETSI STF +FROM ubuntu:20.04 +LABEL ETSI CTI LABEL description="STF Docker Ubuntu image" ENV TERM=linux \ @@ -10,11 +9,8 @@ ENV TERM=linux \ RUN echo "docker-STF-dev" > /etc/hostname \ && DEBIAN_FRONTEND=noninteractive apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y \ - && DEBIAN_FRONTEND=noninteractive apt-get install software-properties-common -y \ - && DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:linuxuprising/java -y \ && DEBIAN_FRONTEND=noninteractive apt-get update \ - && ( echo "oracle-java17-installer shared/accepted-oracle-license-v1-3 boolean true" | debconf-set-selections -v ) \ - && DEBIAN_FRONTEND=noninteractive apt-get --allow-unauthenticated install -y \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y \ autoconf \ bison \ build-essential \ @@ -25,10 +21,9 @@ RUN echo "docker-STF-dev" > /etc/hostname \ emacs \ expect \ flex \ - g++-8 \ - gcc-8 \ - gdb \ - git-core \ + g++-9 \ + gcc-9 \ + git \ gnutls-bin \ graphviz \ iputils-ping \ @@ -40,43 +35,27 @@ RUN echo "docker-STF-dev" > /etc/hostname \ libjsoncpp-dev \ libncurses5-dev \ libpcap-dev \ - libqt5svg5-dev \ - libreadline-dev \ libssl-dev \ libtool-bin \ libtool \ - libwireshark-dev \ libxml2-dev \ libxml2-utils \ libyaml-dev \ lsof \ - net-tools \ ntp \ - oracle-java17-installer \ - oracle-java17-set-default \ openssh-server \ pkg-config \ python3-dev \ python3-pip \ python3-setuptools \ - qt5-default \ - qtmultimedia5-dev \ - subversion \ sudo \ sshpass \ tcpdump \ texlive-font-utils \ - texlive-latex-base \ texlive-latex-extra \ - tshark \ tzdata \ valgrind \ - vim \ - vsftpd \ xutils-dev \ - tree \ - unzip \ - wget \ xsltproc \ && DEBIAN_FRONTEND=noninteractive apt-get autoremove --purge -y \ && DEBIAN_FRONTEND=noninteractive apt-get autoclean \ diff --git a/virtualization/docker-dev/README.md b/virtualization/docker-dev/README.md new file mode 100644 index 0000000000000000000000000000000000000000..bc197143cb1e16737f6f02685ea197907fd3802a --- /dev/null +++ b/virtualization/docker-dev/README.md @@ -0,0 +1,99 @@ +# HOWTO build docker images + +## General imformation + +Pre-requisites on your host machine: + +- Install [Docker](https://docs.docker.com/install/) + +#### From Windows host: + +- Install [Virtualbox](https://www.virtualbox.org/manual/ch01.html) +- Install any X Server. For example [VcXsrv](https://sourceforge.net/projects/vcxsrv/) + +#### From Mac host: + +- Install [Virtualbox](https://www.virtualbox.org/manual/ch01.html) +- Install [XQuartz](https://www.xquartz.org) + +#### From Linux host: + +- No other requirements + +## Build docker image + +For Windows host, rename ```build.cmd.a``` and ```run.cmd.a``` to ```build.cmd``` and ```run.cmd``` respectivelly. + +Special scrips ```build.sh``` (or ```build.cmd```) can be executed to automatically build all necessary images. + +There are several build stages: + +1. Build STF Ubuntu 18.04 image +2. Install Titan from Github +3. Install Eclipse and Titan Eclipse plugin into ~/frameworks/titan +4. Install asn1c into ~/frameworks/asn1c +5. Checkout STF569 sources from ETSI svn repository using default credentials +6. Build ASN.1 recoder library +7. Build certificate generation tool + +## Import and build MEC project + +### Run Docker image + +#### From Windows host: + +1. Authorize Docker container to interact with the XServer: +Go to the X Server installation directory and add the Docker container ip address to the file ```X0.hosts```: +``` +localhost +inet6:localhost +192.168.99.100 +``` + +Execute ```run.cmd``` or launch a command line window and run the command + +```docker run -it --net=host -e DISPLAY=192.168.99.1:0 mec_devel:latest``` + +NOTE: Modify the IP address in the command for the address of 'VirtualBox Hot-Only Network'. + +#### From Linux host: + +Execute ```run.sh``` or launch a command line window and run the command + +```sh +docker run -it --net=host -e DISPLAY=$DISPLAY \ +-v /tmp/.X11-unix:/tmp/.X11-unix mec_devel:latest +``` + +### Import eclipse project + +1. Whithin the docker container, on the linux command prompt type: + + ```eclipse -data ~/dev/Workspace``` + + Eclipse IDE shall be shown on the hosts Screen. + Possible problems: + - eclipse not found: check the PATH environment variable. It shall contain $HOME/bin path. Otherwise add it: + ```export PATH=$HOME/bin:$PATH``` + +2. Run "File -> Import" and import the ```~/dev/mec_devel/mec_devel.tpd``` file. + + This can take a time, be patient. + **Do not run build in eclipse**, we don't have enough time. + +### Build the project + +```cd ~/Workspace/mec_devel/bin``` + +```make``` + +Possible problems: + - Error in AbstractSocket build: Build it explicitly: + ```cd ~/Workspace/Abstract_Socket_CNL113384/bin_ssl && make``` + +### Execute tests +1. Launch eclipse: ```eclipse -data ~/dev/Workspace``` +2. Select configuration from the /etc/folder: + - AtsMec.cfg - Default MEC test suite. +3. Right-click on the configuration file and select **Run As -> TITAN Parallel launcher** + diff --git a/virtualization/docker/build.sh b/virtualization/docker-dev/build.sh similarity index 66% rename from virtualization/docker/build.sh rename to virtualization/docker-dev/build.sh index be9f6abadae4639f16c3dc2066a5435be0aa2b8f..2eb0390ee553abd32f6beb84dc17b278f6c66a30 100755 --- a/virtualization/docker/build.sh +++ b/virtualization/docker-dev/build.sh @@ -13,13 +13,13 @@ if [ "$1" == "--force-stfubuntu" ]; then fi # Check and build stfubuntu image if [ -z `docker images -q stfubuntu` ]; then - docker build --no-cache --tag stfubuntu:18.04 -f Dockerfile.stfubuntu --force-rm . || exit 1 + docker build --no-cache --tag stfubuntu:20.04 -f Dockerfile.stfubuntu --force-rm . || exit 1 fi -docker build --no-cache --tag ttf_t012_mec --force-rm . || ( echo "Docker build failed: $?"; exit 1 ) +docker build --no-cache --tag mec_devel --force-rm . || ( echo "Docker build failed: $?"; exit 1 ) docker images -docker inspect ttf_t012_mec:latest || ( echo "Docker inspect failed: $?"; exit 1 ) +docker inspect mec_devel:latest || ( echo "Docker inspect failed: $?"; exit 1 ) # That's all Floks exit 0 diff --git a/virtualization/docker/home/etc/init.d/10-titan.sh b/virtualization/docker-dev/home/etc/init.d/10-titan.sh similarity index 84% rename from virtualization/docker/home/etc/init.d/10-titan.sh rename to virtualization/docker-dev/home/etc/init.d/10-titan.sh index 840bf28c32e8bfb6e741c223399f6584912b822c..c7d2c4c6f367431d394fdf79c19a07913f68341b 100755 --- a/virtualization/docker/home/etc/init.d/10-titan.sh +++ b/virtualization/docker-dev/home/etc/init.d/10-titan.sh @@ -27,6 +27,9 @@ GEN_PDF=no JDKDIR=$JAVA_HOME EOF +# To prevent link error /usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command lineema +sed --in-place 's/LINUX_LIBS := -lxml2/LINUX_LIBS := -lxml2 -lpthread/g' ./core/Makefile + make && make install || exit 1 # To be compiant with build_ttcn3.bash diff --git a/virtualization/docker/home/etc/init.d/20-eclipse.sh b/virtualization/docker-dev/home/etc/init.d/20-eclipse.sh similarity index 80% rename from virtualization/docker/home/etc/init.d/20-eclipse.sh rename to virtualization/docker-dev/home/etc/init.d/20-eclipse.sh index e7e65cf4b9abaa121bc4f6fc276e4717b9835dd4..ab90df65f87ae0f911e08ded006c8f6c9dc6bf0d 100755 --- a/virtualization/docker/home/etc/init.d/20-eclipse.sh +++ b/virtualization/docker-dev/home/etc/init.d/20-eclipse.sh @@ -1,6 +1,6 @@ #!/bin/bash -ECLIPSE_URL='https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/2020-06/R/eclipse-jee-2020-06-R-linux-gtk-x86_64.tar.gz&r=1' +ECLIPSE_URL='https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/2024-03/R/eclipse-cpp-2024-03-R-linux-gtk-x86_64.tar.gz&r=1' TITAN_URL='https://www.eclipse.org/downloads/download.php?file=/titan/TITAN_Designer_and_Executor_Plugin_7.1.0.zip&r=1' #set -e @@ -10,10 +10,10 @@ echo -e "*****************************\n* Install eclipse\n********************* mkdir -p ${HOME}/frameworks cd ${HOME}/frameworks || exit 1 -wget --progress=dot:mega 'http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/technology/epp/downloads/release/2021-12/R/eclipse-cpp-2021-12-R-linux-gtk-x86_64.tar.gz' -Oeclipse-cpp-2021-12-R-linux-gtk-x86_64.tar.gz || exit 1 -tar -zxvf ./eclipse-cpp-2021-12-R-linux-gtk-x86_64.tar.gz || exit 1 +wget --progress=dot:mega 'http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/technology/epp/downloads/release/2024-03/R/eclipse-cpp-2024-03-R-linux-gtk-x86_64.tar.gz' -Oeclipse-cpp-2024-03-R-linux-gtk-x86_64.tar.gz || exit 1 +tar -zxvf ./eclipse-cpp-2024-03-R-linux-gtk-x86_64.tar.gz || exit 1 ln -sf ${HOME}/frameworks/eclipse/eclipse ${HOME}/bin/eclipse -rm -f ./eclipse-cpp-2021-12-R-linux-gtk-x86_64.tar.gz +rm -f ./eclipse-cpp-2024-03-R-linux-gtk-x86_64.tar.gz if wget --progress=dot:mega 'https://www.eclipse.org/downloads/download.php?file=/titan/TITAN_Designer_and_Executor_plugin-8.1.0.zip' -OTITAN_Designer_and_Executor_plugin.zip; then eclipse/eclipse -noSplash -application org.eclipse.equinox.p2.director \ diff --git a/virtualization/docker/home/etc/init.d/30-osip.sh b/virtualization/docker-dev/home/etc/init.d/30-osip.sh similarity index 100% rename from virtualization/docker/home/etc/init.d/30-osip.sh rename to virtualization/docker-dev/home/etc/init.d/30-osip.sh diff --git a/virtualization/docker-dev/home/etc/init.d/40-ttf_t027.sh b/virtualization/docker-dev/home/etc/init.d/40-ttf_t027.sh new file mode 100755 index 0000000000000000000000000000000000000000..7bedfabd205365d1a0806c4d3d8a6584db987adb --- /dev/null +++ b/virtualization/docker-dev/home/etc/init.d/40-ttf_t027.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +#set -e +set -vx + +echo -e "*****************************\n* Checkout mec_devel sources\n*****************************\n" +mkdir -p ${HOME}/dev && cd ${HOME}/dev || exit 1 + +git clone --recurse-submodules --branch TTF_T027 https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git mec_devel +cd ${HOME}/dev/mec_devel/titan-test-system-framework +git checkout devel +cd ${HOME}/dev/mec_devel/ttcn +git clone https://forge.etsi.org/gitlab/LIBS/LibCommon.git ./LibCommon + +echo -e "*****************************\n* Set up environment\n*****************************\n" +cd ${HOME}/dev/mec_devel/scripts +ln -sf ${HOME}/dev/mec_devel/scripts/devenv.bash.ubuntu ${HOME}/devenv.bash +. ${HOME}/devenv.bash + +echo -e "*****************************\n* Apply patched \n*****************************\n" +cd ${HOME}/dev/mec_devel + +cd ./ttcn/LibCommon +ln -sf ${HOME}/dev/mec_devel/ttcn/patch_lib_common_titan/module.mk module.mk +cd - +cd ./titan-test-system-framework/ttcn/LibHttp +ln -sf module_mec.mk module.mk +cd - + +echo -e "*****************************\n* Build Mec test suite\n*****************************\n" +cd ${HOME}/dev/mec_devel +export ATS_LIST="AtsMec_Location AtsMec_Rnis AtsMec_TrafficManagement AtsMec_UEidentity AtsMec_WlanInformation AtsMec_V2XInformationService" +for i in ${ATS_LIST} +do + export ATS=$i + make || exit 1 +done +rm -fr ./build || exit 1 + +cd ./etc/AtsMec_Location +ln -sf AtsMec_Sandbox.cf_ AtsMec_Location.cfg + +echo -e "*****************************\n* Change sudo in command line\n*****************************\n" +cd ${HOME}/dev/mec_devel/scripts +sed --in-place 's/sudo/echo "etsi" \| sudo -S/' ./run_mtc.bash +sed --in-place 's/sudo/echo "etsi" \| sudo -S/' ./run_ptcs.bash + +cd ${HOME}/dev/mec_devel diff --git a/virtualization/docker/home/etc/init.d/50-doxygen.sh b/virtualization/docker-dev/home/etc/init.d/50-doxygen.sh similarity index 73% rename from virtualization/docker/home/etc/init.d/50-doxygen.sh rename to virtualization/docker-dev/home/etc/init.d/50-doxygen.sh index 9772f211d65f2895cd874bd84ebb94ef2a1389ec..19c952241945924c2d386feb7e97e320db8b3ae8 100755 --- a/virtualization/docker/home/etc/init.d/50-doxygen.sh +++ b/virtualization/docker-dev/home/etc/init.d/50-doxygen.sh @@ -5,11 +5,11 @@ set -vx echo -e "*****************************\n* Build docs \n*****************************\n" . /home/etsi/devenv.bash -cd ${HOME}/dev/TTF_T012_Mec/docs || exit 1 +cd ${HOME}/dev/mec_devel/docs || exit 1 doxygen ./o2.cfg || exit 1 # Generate PDF file -cd ${HOME}/dev/TTF_T012_Mec/docs/AtsMecDocs/latex +cd ${HOME}/dev/mec_devel/docs/AtsMecDocs/latex make && mv refman.pdf ${HOME}/docs/etsi_mec_help.pdf cd ${HOME} diff --git a/virtualization/docker/home/etc/titan_repos.txt b/virtualization/docker-dev/home/etc/titan_repos.txt similarity index 100% rename from virtualization/docker/home/etc/titan_repos.txt rename to virtualization/docker-dev/home/etc/titan_repos.txt diff --git a/virtualization/docker/run.sh b/virtualization/docker-dev/run.sh similarity index 57% rename from virtualization/docker/run.sh rename to virtualization/docker-dev/run.sh index f3886eae977c76a7702ab653fa15c1062a952e51..096c67d03945f8d5a289264246e7952efe1e4e41 100755 --- a/virtualization/docker/run.sh +++ b/virtualization/docker-dev/run.sh @@ -5,8 +5,8 @@ #set -e set -vx -docker run --interactive --tty --rm --publish 2222:22 --env DISPLAY=$DISPLAY --volume /tmp/.X11-unix:/tmp/.X11-unix --cap-add=NET_RAW --cap-add=NET_ADMIN ttf_t012_mec:latest /bin/bash -c "export ATS=AtsMec && cd ~ && . ./devenv.bash && sed --in-place 's/sbxpl1eil4/sbxrsvoat/g' ~/dev/TTF_T012_Mec/etc/AtsMec/AtsMec.cfg && cd ~/dev/TTF_T012_Mec/scripts && ./run_all.bash" -#docker run --interactive --tty --rm --publish 2222:22 --env DISPLAY=$DISPLAY --volume /tmp/.X11-unix:/tmp/.X11-unix --cap-add=NET_RAW --cap-add=NET_ADMIN ttf_t012_mec:latest +docker run --interactive --tty --rm --publish 2222:22 --env DISPLAY=$DISPLAY --volume /tmp/.X11-unix:/tmp/.X11-unix --cap-add=NET_RAW --cap-add=NET_ADMIN mec_devel:latest /bin/bash -c "export ATS=AtsMec && cd ~ && . ./devenv.bash && sed --in-place 's/sbxpl1eil4/sbxrsvoat/g' ~/dev/mec_devel/etc/AtsMec/AtsMec.cfg && cd ~/dev/mec_devel/scripts && ./run_all.bash" +#docker run --interactive --tty --rm --publish 2222:22 --env DISPLAY=$DISPLAY --volume /tmp/.X11-unix:/tmp/.X11-unix --cap-add=NET_RAW --cap-add=NET_ADMIN mec_devel:latest # That's all Floks exit 0 diff --git a/virtualization/docker/Dockerfile b/virtualization/docker/Dockerfile index e18828995ddb3b2b3e5f0250543477ea410631a7..456149a5cec8a1aa5fd8d14a90acebb201f590d3 100644 --- a/virtualization/docker/Dockerfile +++ b/virtualization/docker/Dockerfile @@ -1,26 +1,49 @@ -FROM stfubuntu:18.04 +FROM alpine:latest + +# Install dependencies +RUN apk update && \ + apk add --no-cache sudo make git g++ diffutils expect openssl-dev libxml2-dev libxml2-utils libxslt-dev libtool ncurses-dev jsoncpp-dev readline-dev flex bison perl bash libedit libedit-dev lksctp-tools lksctp-tools-dev libpcap-dev + +# Create user and sudouser +RUN \ + addgroup -g 1000 etsi && \ + adduser -S -D -u 1000 -G etsi -h /home/etsi -s /bin/bash etsi && \ + echo "etsi:etsi" | chpasswd && \ + echo "etsi ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers || exit 1 +USER etsi -MAINTAINER ETSI TTF T012 +# Setup Hosts file at the boot time +RUN \ + echo 'sudo sh -c "cp /etc/hosts /etc/append && (echo \"127.0.1.1 $HOSTNAME\"; cat /etc/append) > /etc/hosts"' >> /home/etsi/.bashrc \ + echo 'sh' >> /home/etsi/.bashrc || exit 1 -LABEL description="TTF_T012_Mec Docker Image" +# Clone Titan +WORKDIR /home/etsi +RUN mkdir -p frameworks dev tmp && cd frameworks && git clone https://gitlab.eclipse.org/eclipse/titan/titan.core.git || exit 1 +WORKDIR /home/etsi/frameworks/titan.core/ -ENV TERM=linux \ - HOME=/home/etsi \ - HOSTNAME=docker-titan-TTF_T012 +# Setup ENV variables +ENV TTCN3_DIR=/home/etsi/frameworks/titan.core/Install +ENV PATH=$TTCN3_DIR/bin:$PATH \ + LD_LIBRARY_PATH=$TTCN3_DIR/lib:$LD_LIBRARY_PATH -COPY home /home/etsi +# Set flags +RUN \ + echo "ALPINE_LINUX=yes" > Makefile.personal && \ + echo "TTCN3_DIR=$TTCN3_DIR" >> Makefile.personal && \ + echo "JNI=no" >> Makefile.personal && \ + echo "GUI=no" >> Makefile.personal && \ + echo "DEBUG=no" >> Makefile.personal || exit 1 -RUN cd /home/etsi \ - && chown -R etsi:etsi . \ - && ls ./etc/init.d/*.sh | while read S; do chmod 0750 "$S" || exit 1; done +# Build Titan +RUN \ + sed --in-place 's/LINUX_LIBS := -lxml2/LINUX_LIBS := -lxml2 -lpthread/g' ./core/Makefile && \ + make install && make clean || exit 1 -USER etsi +WORKDIR /home/etsi/dev -RUN cd ${HOME} \ - && export PATH=$HOME/bin:$PATH \ - && ls ${HOME}/etc/init.d/*.sh | while read S; do /bin/bash -c "$S" || exit 1; done \ - && rm -fr ${HOME}/etc +ENV ATS=AtsMec_V2XInformationService -CMD ["/bin/bash"] +EXPOSE 80/tcp 443/tcp -# That's all Floks +ENTRYPOINT /home/yann/dev/cise/virtualization/docker/docker-entrypoint.sh diff --git a/virtualization/docker/README.md b/virtualization/docker/README.md index ad267e201d1dcf133dc53e80959dfaa4e285eae5..7a19f2984a137079cdd315d1c043230ce549ec17 100644 --- a/virtualization/docker/README.md +++ b/virtualization/docker/README.md @@ -22,78 +22,51 @@ Pre-requisites on your host machine: ## Build docker image -For Windows host, rename ```build.cmd.a``` and ```run.cmd.a``` to ```build.cmd``` and ```run.cmd``` respectivelly. +In this configuration, TITAN compiler is located on a Docker image and the sources and the outputs are located on the host. -Special scrips ```build.sh``` (or ```build.cmd```) can be executed to automatically build all necessary images. +Procedure on the host machine: +- Open a Terminal +- Clone the ETSI MEC Test System +- From the ETSI MEC Test System root directory, build the Docker image executing the following commands: -There are several build stages: - -1. Build STF Ubuntu 18.04 image -2. Install Titan from Github -3. Install Eclipse and Titan Eclipse plugin into ~/frameworks/titan -4. Install asn1c into ~/frameworks/asn1c -5. Checkout STF569 sources from ETSI svn repository using default credentials -6. Build ASN.1 recoder library -7. Build certificate generation tool - -## Import and build MEC project - -### Run Docker image - -#### From Windows host: - -1. Authorize Docker container to interact with the XServer: -Go to the X Server installation directory and add the Docker container ip address to the file ```X0.hosts```: -``` -localhost -inet6:localhost -192.168.99.100 +```sh +$ cd ./virtualization/docker +$ docker build --no-cache --tag alpine-mec -f Dockerfile --force-rm . +$ docker images ``` -Execute ```run.cmd``` or launch a command line window and run the command - -```docker run -it --net=host -e DISPLAY=192.168.99.1:0 ttf_t012_mec:latest``` - -NOTE: Modify the IP address in the command for the address of 'VirtualBox Hot-Only Network'. - -#### From Linux host: - -Execute ```run.sh``` or launch a command line window and run the command +To build the MEC Test Suite, execute the following command: ```sh -docker run -it --net=host -e DISPLAY=$DISPLAY \ --v /tmp/.X11-unix:/tmp/.X11-unix ttf_t012_mec:latest +$ ./docker-run.sh build ``` -### Import eclipse project - -1. Whithin the docker container, on the linux command prompt type: +Possble other options are 'clean' to remove all the build outputs or 'rebuild' to force a build of the Test Suite after a 'clean'. - ```eclipse -data ~/dev/Workspace``` +To retrieve the list of the available test cases, execute the following command: - Eclipse IDE shall be shown on the hosts Screen. - Possible problems: - - eclipse not found: check the PATH environment variable. It shall contain $HOME/bin path. Otherwise add it: - ```export PATH=$HOME/bin:$PATH``` - -2. Run "File -> Import" and import the ```~/dev/TTF_T012_Mec/TTF_T012_Mec.tpd``` file. +```sh +$ ./docker-run.sh list +``` - This can take a time, be patient. - **Do not run build in eclipse**, we don't have enough time. +Before to execute the MEC Test Suite, prepare, edit and update the configuration file: -### Build the project +```sh +$ ln -sf ../../etc/AtsXxx/AtsXxx_yyy.cf_ ../../etc/AtsXxx/AtsXxx.cfg +$ vi ../../etc/AtsXxx/AtsXxx.cfg # To update it +``` -```cd ~/Workspace/TTF_T012_Mec/bin``` +To execute the MEC Test Suite, execute the following command: -```make``` +```sh +$ ./docker-run.sh run +``` -Possible problems: - - Error in AbstractSocket build: Build it explicitly: - ```cd ~/Workspace/Abstract_Socket_CNL113384/bin_ssl && make``` +Notes: +- The MEC Test System is listening on port 30181 +- Updating the file etc/AtsXxx/AtsXxx.cfg is about (e.g. etc/AtsMec_Location/AtsMec_Location.cfg): +. Selecting the test(s) to be executed +. Updating value of PICs and PIXITs +. Updating HTTP port setting -### Execute tests -1. Launch eclipse: ```eclipse -data ~/dev/Workspace``` -2. Select configuration from the /etc/folder: - - AtsMec.cfg - Default MEC test suite. -3. Right-click on the configuration file and select **Run As -> TITAN Parallel launcher** diff --git a/virtualization/docker/docker-entrypoint.sh b/virtualization/docker/docker-entrypoint.sh new file mode 100755 index 0000000000000000000000000000000000000000..7da00166832248849790d051be9ae8da464bec7a --- /dev/null +++ b/virtualization/docker/docker-entrypoint.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +set -euo pipefail + +usage() { + echo "No command specified. Available commands:" + for i in $(echo $commands | sed "s/,/ /g") + do + echo " $i" + done +} + +commands="help,build Mec_location,clean Mec_location,list Mec_location,modulepar,rebuild Mec_location,run Mec_location,version" + +if [ $# == 0 ]; then + usage + exit 1 +fi + +if [ $# == 2 ]; then + if [ "$2" != "" ]; then + export ATS=Ats$2 + cli="${GEN_DIR}/bin/$ATS" + echo "cli: $cli" + fi +fi + + +case "$1" in + build) + cd ${GEN_DIR} && make + ;; + clean) + cd ${GEN_DIR} && make clean + ;; + list) + ${cli} -l + ;; + modulepar) + ${cli} -p + ;; + rebuild) + cd ${GEN_DIR} && rm -fr ./bin ./build ; make + ;; + run) + cd ${GEN_DIR}/scripts && ./run_all.bash + ;; + version) + compiler -v + ;; + *) + usage + exit 1 + ;; +esac + +unset ATS +exit 0 \ No newline at end of file diff --git a/virtualization/docker/docker-run.sh b/virtualization/docker/docker-run.sh new file mode 100755 index 0000000000000000000000000000000000000000..d1f51c5b25cd738ba2764661057687d229acfbb6 --- /dev/null +++ b/virtualization/docker/docker-run.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -exo pipefail + +cd "$(dirname ${BASH_SOURCE})" + +PWD=`pwd`/../.. +docker run --rm -it \ + -w $PWD \ + -e GEN_DIR=$PWD \ + -p 0.0.0.0:443:443 \ + -u "$(id -u):$(id -g)" \ + -v "${PWD}:$PWD" \ + --entrypoint $PWD/virtualization/docker/docker-entrypoint.sh \ + alpine-mec:latest "$@" diff --git a/virtualization/docker/home/etc/init.d/40-ttf_t012.sh b/virtualization/docker/home/etc/init.d/40-ttf_t012.sh deleted file mode 100755 index e8897860065f996f2b986820c44901e214d833d3..0000000000000000000000000000000000000000 --- a/virtualization/docker/home/etc/init.d/40-ttf_t012.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -#set -e -set -vx - -echo -e "*****************************\n* Checkout TTF T012 sources\n*****************************\n" -mkdir -p ${HOME}/dev && cd ${HOME}/dev || exit 1 - -git clone --recurse-submodules -b v2.2.1-dev --single-branch https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git TTF_T012_Mec -cd /home/etsi/dev/TTF_T012_Mec/ttcn -git clone https://forge.etsi.org/gitlab/LIBS/LibCommon.git ./LibCommon -git clone -bTTF011 https://forge.etsi.org/gitlab/LIBS/LibIts ./LibIts -cd /home/etsi/dev/TTF_T012_Mec/ttcn/LibIts -rm -fr t3q -cd ttcn && rm -fr Common - -echo -e "*****************************\n* Set up environment\n*****************************\n" -cd /home/etsi/dev/TTF_T012_Mec/scripts -ln -sf /home/etsi/dev/TTF_T012_Mec/scripts/devenv.bash.ubuntu /home/etsi/devenv.bash -. /home/etsi/devenv.bash - -echo -e "*****************************\n* Apply patched \n*****************************\n" -cd /home/etsi/dev/TTF_T012_Mec -cp ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/ -cp ./ttcn/patch_lib_common_titan/*.ttcn ./ttcn/LibCommon/ttcn -cp ./ttcn/patch_lib_http/*.ttcn ./ttcn/LibIts/ttcn/Http/ -cp ./ttcn/patch_lib_its/module.mk ./ttcn/LibIts/ - -echo -e "*****************************\n* Build Mec test suite\n*****************************\n" -export ATS=AtsMec -make - -cd ./etc/AtsMec -ln -sf AtsMec_Sandbox.cf_ AtsMec.cfg - -echo -e "*****************************\n* Change sudo in command line\n*****************************\n" -cd /home/etsi/dev/TTF_T012_Mec/scripts -sed --in-place 's/sudo/echo "etsi" \| sudo -S/' ./run_mtc.bash -sed --in-place 's/sudo/echo "etsi" \| sudo -S/' ./run_ptcs.bash - -cd /home/etsi/dev/TTF_T012_Mec diff --git a/virtualization/vagrant/provisioner.bash b/virtualization/vagrant/provisioner.bash index ee5f62b10dbdf516fa3fab30da38b95a27397fbc..82a7d07005dc1d256fe9816bd4847c7960ba5112 100755 --- a/virtualization/vagrant/provisioner.bash +++ b/virtualization/vagrant/provisioner.bash @@ -82,32 +82,30 @@ echo ". ~/devenv.bash" >> /home/vagrant/.bashrc # Clone project cd /home/vagrant/dev -git clone --recurse-submodules -b v2.2.1-dev --single-branch https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git ./TTF_T012_Mec -cd /home/vagrant/dev/TTF_T012_Mec/ttcn +git clone --recurse-submodules --branch devel https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git mec_devel +cd /home/vagrant/dev/mec_devel/titan-test-system-framework +git checkout devel +cd /home/vagrant/dev/mec_devel/ttcn git clone https://forge.etsi.org/gitlab/LIBS/LibCommon.git ./LibCommon -git clone -bTTF011 https://forge.etsi.org/gitlab/LIBS/LibIts ./LibIts -cd /home/vagrant/dev/TTF_T012_Mec/ttcn/LibIts -rm -fr t3q -cd ttcn && rm -fr Common -cd /home/vagrant/dev/TTF_T012_Mec/scripts + +# Set up environment +cd /home/vagrant/dev/mec_devel/scripts chmod 775 *.bash devenv.bash.* -cd /home/vagrant/dev/TTF_T012_Mec/virtualization/docker +cd /home/vagrant/dev/mec_devel/virtualization/docker chmod 775 *.sh -cd /home/vagrant/dev/TTF_T012_Mec +cd /home/vagrant/dev/mec_devel chmod 775 ./.jenkins.sh cd /home/vagrant -ln -sf /home/vagrant/dev/TTF_T012_Mec/scripts/devenv.bash.ubuntu /home/vagrant/devenv.bash +ln -sf /home/vagrant/dev/mec_devel/scripts/devenv.bash.ubuntu /home/vagrant/devenv.bash . /home/vagrant/devenv.bash # Apply patch -cd /home/vagrant/dev/TTF_T012_Mec +cd /home/vagrant/dev/mec_devel cp ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/ -cp ./ttcn/patch_lib_common_titan/*.ttcn ./ttcn/LibCommon/ttcn -cp ./ttcn/patch_lib_http/*.ttcn ./ttcn/LibIts/ttcn/Http/ -cp ./ttcn/patch_lib_its/module.mk ./ttcn/LibIts/ +cp ./ttcn/patch_lib_common_titan/ttcn/*.ttcn ./ttcn/LibCommon/ttcn # Change user in cfg files -cd ${HOME}/dev/TTF_T012_Mec/scripts || exit 1 +cd ${HOME}/dev/mec_devel/scripts || exit 1 ./update_user_name.sh || exit 1 # Install all frameworks @@ -160,26 +158,26 @@ rm -f ./eclipse-cpp-2021-12-R-linux-gtk-x86_64.tar.gz #fi # Build Titan -cd /home/vagrant/dev/TTF_T012_Mec/scripts +cd /home/vagrant/dev/mec_devel/scripts ./build_titan.bash . /home/vagrant/devenv.bash # Build ATSs -cd /home/vagrant/dev/TTF_T012_Mec -export ATS=AtsMec +cd /home/vagrant/dev/mec_devel +export ATS=AtsMec_Location make # Change user in cfg files -cd /home/vagrant/dev/TTF_T012_Mec/scripts -./update_user_name.sh TTF_T012_Mec +cd /home/vagrant/dev/mec_devel/scripts +./update_user_name.sh mec_devel # Update configuration file -cd /home/vagrant/dev/TTF_T012_Mec/etc/AtsMec -ln -sf AtsMec_Sandbox.cf_ AtsMec.cfg +cd /home/vagrant/dev/mec_devel/etc/AtsMec +ln -sf AtsMec_Sandbox.cf_ AtsMec_Location.cfg cd - # Change sudo in command line -cd /home/vagrant/dev/TTF_T012_Mec/scripts +cd /home/vagrant/dev/mec_devel/scripts #sed --in-place 's/sudo/echo "etsi" \| sudo -S/' ./run_mtc.bash #sed --in-place 's/sudo/echo "etsi" \| sudo -S/' ./run_ptcs.bash