Commit a1f2090d authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Pre-merge code cleanup

parent 88295932
Loading
Loading
Loading
Loading
+7 −7
Changes for src/tests/ecoc26_pluggables/test_SMO/README.md: 7 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -15,11 +15,11 @@ intent endpoints.

| Method | URL |
|---|---|
| `POST` | `https://hyper-orchestrator.eu/smo/api/intents/slice` |
| `GET` | `https://hyper-orchestrator.eu/smo/api/intents/slice` |
| `DELETE` | `https://hyper-orchestrator.eu/smo/api/intents/slice/<sliceId>` |
| `POST` | `https://<smo-url>/smo/api/intents/slice` |
| `GET` | `https://<smo-url>/smo/api/intents/slice` |
| `DELETE` | `https://<smo-url>/smo/api/intents/slice/<sliceId>` |

Authentication: **Basic Auth** — `smo_admin` / `smo_password`
Authentication: **Basic Auth** — `admin` / `admin`
Header: `Content-Type: application/json`

## Requirements
@@ -55,9 +55,9 @@ The defaults are baked into `test_SMO_connect.py`; override them with
environment variables if your endpoint or credentials differ:

```bash
export SMO_BASE_URL="https://hyper-orchestrator.eu"
export SMO_USERNAME="smo_admin"
export SMO_PASSWORD="smo_password"
export SMO_BASE_URL="https://<smo-url>"
export SMO_USERNAME="admin"
export SMO_PASSWORD="admin"
export PYTHON="python3"          # used by run_smo_test.sh

./run_smo_test.sh list
+17 −2
Changes for src/tests/ecoc26_pluggables/test_SMO/run_smo_test.sh: 17 added lines, 2 removed lines.
Original line number Diff line number Diff line
#!/usr/bin/env bash
# Copyright 2022-2026 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Small helper to run test_SMO_connect.py against the SMO controller.
#
# Usage:
@@ -21,8 +36,8 @@ PYTHON="${PYTHON:-python3}"

# Optional overrides (defaults live inside the Python script).
: "${SMO_BASE_URL:=http://192.168.5.132:8080}"
: "${SMO_USERNAME:=smo_admin}"
: "${SMO_PASSWORD:=smo_password}"
: "${SMO_USERNAME:=admin}"
: "${SMO_PASSWORD:=admin}"

export SMO_BASE_URL
export SMO_USERNAME
+17 −2
Changes for src/tests/ecoc26_pluggables/test_SMO/test_SMO_connect.py: 17 added lines, 2 removed lines.
Original line number Diff line number Diff line
# Copyright 2022-2026 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


"""Basic script to test the SMO (Service Management and Orchestration) slice endpoints.

Endpoints:
@@ -32,8 +47,8 @@ import requests
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

BASE_URL = os.environ.get("SMO_BASE_URL", "http://192.168.5.132:8080")
USERNAME = os.environ.get("SMO_USERNAME", "smo_admin")
PASSWORD = os.environ.get("SMO_PASSWORD", "smo_password")
USERNAME = os.environ.get("SMO_USERNAME", "admin")
PASSWORD = os.environ.get("SMO_PASSWORD", "admin")
SLICE_PATH = "/api/intents/slice"
REQUEST_TIMEOUT_SECONDS = 90
INTENT_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "test_SMO_intent.json")