diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/README.md b/src/tests/tools/mock_ietf_actn_sdn_ctrl/README.md index a12ae907e792f98413903b6637738c392506be4a..52aa2922d0699b1d286319e11cc25f8707fda686 100644 --- a/src/tests/tools/mock_ietf_actn_sdn_ctrl/README.md +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/README.md @@ -7,22 +7,17 @@ This REST server implements very basic support for the following YANG data model - Ref: https://datatracker.ietf.org/doc/draft-ietf-teas-yang-te/ The aim of this server is to enable testing the IetfActnDeviceDriver and the IetfActnServiceHandler. -Follow the steps below to perform the test: -## 1. Deploy TeraFlowSDN controller and the scenario -Deploy the test scenario "ietf_actn_deploy.sh": -```bash -source src/tests/tools/mock_ietf_actn_sdn_ctrl/scenario/ietf_actn_deploy.sh -./deploy/all.sh -``` -## 2. Install requirements and run the Mock IETF ACTN SDN controller -__NOTE__: if you run the Mock IETF ACTN SDN controller from the PyEnv used for developping on the TeraFlowSDN framework, +## 1. Install requirements for the Mock IETF ACTN SDN controller +__NOTE__: if you run the Mock IETF ACTN SDN controller from the PyEnv used for developing on the TeraFlowSDN +framework and you followed the official steps in +[Development Guide > Configure Environment > Python](https://labs.etsi.org/rep/tfs/controller/-/wikis/2.-Development-Guide/2.1.-Configure-Environment/2.1.1.-Python), all the requirements are already in place. Install them only if you execute it in a separate/standalone environment. Install the required dependencies as follows: ```bash -pip install Flask==2.1.3 Flask-RESTful==0.3.9 +pip install -r src/tests/tools/mock_ietf_actn_sdn_ctrl/requirements.in ``` Run the Mock IETF ACTN SDN Controller as follows: @@ -30,24 +25,9 @@ Run the Mock IETF ACTN SDN Controller as follows: python src/tests/tools/mock_ietf_actn_sdn_ctrl/MockIetfActnSdnCtrl.py ``` -## 3. Deploy the test descriptors -Edit the descriptors to meet your environment specifications. -Edit "network_descriptors.json" and change IP address and port of the IETF ACTN SDN controller of the "ACTN" device. -- Set value of config rule "_connect/address" to the address of the host where the Mock IETF ACTN SDN controller is - running (default="192.168.1.1"). -- Set value of config rule "_connect/port" to the port where your Mock IETF ACTN SDN controller is listening on - (default="8443"). - -Upload the "network_descriptors.json" through the TeraFlowSDN WebUI. -- If not already selected, select Context(admin)/Topology(admin). -- Check that a network topology with 4 routers + 1 IETF ACTN radio system are loaded. They should form 2 rings. - -Upload the "service_descriptor.json" through the TeraFlowSDN WebUI. -- Check that 2 services have been created. -- The "actn-svc" should have a connection and be supported by a sub-service. -- The sub-service should also have a connection. -- The R1, R3, and MW devices should have configuration rules established. - -# 4. Delete the IETF ACTN service -Find the "mw-svc" on the WebUI, navigate to its details, and delete the service pressing the "Delete Service" button. -The service, sub-service, and device configuration rules should be removed. + +## 2. Run the Mock IETF ACTN SDN controller +Run the Mock IETF ACTN SDN Controller as follows: +```bash +python src/tests/tools/mock_ietf_actn_sdn_ctrl/MockIetfActnSdnCtrl.py +``` diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/build.sh b/src/tests/tools/mock_ietf_actn_sdn_ctrl/build.sh index d9db334cbf1d361cc9cbce42f95fb10bafc609ed..fe958995ac303ca003aee9557b7fc07905933fce 100755 --- a/src/tests/tools/mock_ietf_actn_sdn_ctrl/build.sh +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/build.sh @@ -13,6 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Make folder containing the script the root folder for its execution +cd $(dirname $0) + docker build -t mock-ietf-actn-sdn-ctrl:test -f Dockerfile . docker tag mock-ietf-actn-sdn-ctrl:test localhost:32000/tfs/mock-ietf-actn-sdn-ctrl:test docker push localhost:32000/tfs/mock-ietf-actn-sdn-ctrl:test diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/run.sh b/src/tests/tools/mock_ietf_actn_sdn_ctrl/run.sh index 2697e538ec69a99da4c0fae898748ff496b5d28f..48a23f2e41d6d30d244ef01c72ac9700b588b140 100755 --- a/src/tests/tools/mock_ietf_actn_sdn_ctrl/run.sh +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/run.sh @@ -13,4 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Make folder containing the script the root folder for its execution +cd $(dirname $0) + python MockIetfActnSdnCtrl.py