Loading src/tests/ofc25/README.md 0 → 100644 +99 −0 Original line number Diff line number Diff line # OFC25 Integration Test ## Objective This test validates a 3-controller TeraFlowSDN workflow deployed as three independent instances: - `opt` (optical controller) - `ip` (packet/IP controller) - `e2e` (end-to-end orchestrator) Main goal: - IP virtual links are created in `ip`. - `e2e` creates one optical-connectivity service per virtual link. - `opt` maintains a single grooming optical service that supports all virtual links. The test also validates the reverse behavior when virtual links are removed. ## Recommendation and Materialization Flow The control pattern validated by OFC25 is: 1. `ip` creates a virtual-link intent (`LINKTYPE_VIRTUAL`) in its own domain. 2. This intent is treated as a recommendation to increase end-to-end transport capacity. 3. `e2e` converts that recommendation into optical-connectivity requests. 4. `e2e` uses request-reply interactions with `opt` to materialize transport resources. 5. `opt` realizes/maintains the grooming optical service that supports all active IP virtual links. Deletion follows the reverse direction: - when virtual links are removed in `ip`, `e2e` reduces/removes associated requests to `opt`, - and `opt` de-materializes when no virtual-link demand remains. ## Runtime Inputs The test expects these runtime files (generated by `deploy/tfs.sh`) in `/var/teraflow`: - `tfs_runtime_env_vars_opt.sh` - `tfs_runtime_env_vars_ip.sh` - `tfs_runtime_env_vars_e2e.sh` These are parsed by fixtures in `tests/Fixtures.py` to build gRPC clients for all three TFS instances. ## Test Flow `run_test.sh all` runs: 1. Bootstrap `opt` (parameterized bootstrap test with `topology_opt.json`) 2. Bootstrap `ip` (parameterized bootstrap test with `topology_ip.json`) 3. Bootstrap `e2e` (parameterized bootstrap test with `topology_e2e.json`) 4. Create virtual links (`test_functional_create_vlinks.py`) 5. Delete virtual links (`test_functional_delete_vlinks.py`) 6. Cleanup in reverse order (`e2e` -> `ip` -> `opt`) using parameterized cleanup test Device enabled check: - Bootstrap includes a device-operational-status check. - It raises an exception if retries are exhausted. ## Virtual-Link Validation Creation test verifies: - Initially: no services in `ip`, `e2e`, `opt`; no virtual links in `ip`. - After each virtual link creation: - `ip`: expected virtual links exist, no services. - `e2e`: number of active optical services increases `1 -> 2 -> 3` (one per virtual link), each with one connection. - `opt`: one active optical service with one connection while any virtual link exists. Deletion test verifies reverse behavior: - Remove virtual links in reverse order (`03`, `02`, `01`). - `e2e` services decrease `3 -> 2 -> 1 -> 0`. - `opt` stays at one active service until last virtual link is removed, then `0`. - Final state: no services anywhere and no virtual links in `ip`. ## How To Run From repo root: ```bash cd /home/tfs/tfs-ctrl ``` Run full OFC25 suite: ```bash ./src/tests/ofc25/run_test.sh all ``` Run specific phases: ```bash ./src/tests/ofc25/run_test.sh init_opt ./src/tests/ofc25/run_test.sh init_ip ./src/tests/ofc25/run_test.sh init_e2e ./src/tests/ofc25/run_test.sh service ``` ## Direct Pytest (Parameterized Bootstrap/Cleanup) Examples: ```bash PYTHONPATH=src python -m pytest -v src/tests/ofc25/tests/test_functional_bootstrap.py \ --tfs-runtime-script=tfs_runtime_env_vars_opt.sh \ --tfs-profile=opt \ --tfs-topology-descriptor=topology_opt.json ``` ```bash PYTHONPATH=src python -m pytest -v src/tests/ofc25/tests/test_functional_cleanup.py \ --tfs-runtime-script=tfs_runtime_env_vars_e2e.sh \ --tfs-profile=e2e \ --tfs-topology-descriptor=topology_e2e.json ``` ## CI / Docker The OFC25 Docker test image (`src/tests/ofc25/Dockerfile`) executes the same sequence via `/var/teraflow/run_tests.sh`, writing JUnit reports under `/opt/results`. Loading
src/tests/ofc25/README.md 0 → 100644 +99 −0 Original line number Diff line number Diff line # OFC25 Integration Test ## Objective This test validates a 3-controller TeraFlowSDN workflow deployed as three independent instances: - `opt` (optical controller) - `ip` (packet/IP controller) - `e2e` (end-to-end orchestrator) Main goal: - IP virtual links are created in `ip`. - `e2e` creates one optical-connectivity service per virtual link. - `opt` maintains a single grooming optical service that supports all virtual links. The test also validates the reverse behavior when virtual links are removed. ## Recommendation and Materialization Flow The control pattern validated by OFC25 is: 1. `ip` creates a virtual-link intent (`LINKTYPE_VIRTUAL`) in its own domain. 2. This intent is treated as a recommendation to increase end-to-end transport capacity. 3. `e2e` converts that recommendation into optical-connectivity requests. 4. `e2e` uses request-reply interactions with `opt` to materialize transport resources. 5. `opt` realizes/maintains the grooming optical service that supports all active IP virtual links. Deletion follows the reverse direction: - when virtual links are removed in `ip`, `e2e` reduces/removes associated requests to `opt`, - and `opt` de-materializes when no virtual-link demand remains. ## Runtime Inputs The test expects these runtime files (generated by `deploy/tfs.sh`) in `/var/teraflow`: - `tfs_runtime_env_vars_opt.sh` - `tfs_runtime_env_vars_ip.sh` - `tfs_runtime_env_vars_e2e.sh` These are parsed by fixtures in `tests/Fixtures.py` to build gRPC clients for all three TFS instances. ## Test Flow `run_test.sh all` runs: 1. Bootstrap `opt` (parameterized bootstrap test with `topology_opt.json`) 2. Bootstrap `ip` (parameterized bootstrap test with `topology_ip.json`) 3. Bootstrap `e2e` (parameterized bootstrap test with `topology_e2e.json`) 4. Create virtual links (`test_functional_create_vlinks.py`) 5. Delete virtual links (`test_functional_delete_vlinks.py`) 6. Cleanup in reverse order (`e2e` -> `ip` -> `opt`) using parameterized cleanup test Device enabled check: - Bootstrap includes a device-operational-status check. - It raises an exception if retries are exhausted. ## Virtual-Link Validation Creation test verifies: - Initially: no services in `ip`, `e2e`, `opt`; no virtual links in `ip`. - After each virtual link creation: - `ip`: expected virtual links exist, no services. - `e2e`: number of active optical services increases `1 -> 2 -> 3` (one per virtual link), each with one connection. - `opt`: one active optical service with one connection while any virtual link exists. Deletion test verifies reverse behavior: - Remove virtual links in reverse order (`03`, `02`, `01`). - `e2e` services decrease `3 -> 2 -> 1 -> 0`. - `opt` stays at one active service until last virtual link is removed, then `0`. - Final state: no services anywhere and no virtual links in `ip`. ## How To Run From repo root: ```bash cd /home/tfs/tfs-ctrl ``` Run full OFC25 suite: ```bash ./src/tests/ofc25/run_test.sh all ``` Run specific phases: ```bash ./src/tests/ofc25/run_test.sh init_opt ./src/tests/ofc25/run_test.sh init_ip ./src/tests/ofc25/run_test.sh init_e2e ./src/tests/ofc25/run_test.sh service ``` ## Direct Pytest (Parameterized Bootstrap/Cleanup) Examples: ```bash PYTHONPATH=src python -m pytest -v src/tests/ofc25/tests/test_functional_bootstrap.py \ --tfs-runtime-script=tfs_runtime_env_vars_opt.sh \ --tfs-profile=opt \ --tfs-topology-descriptor=topology_opt.json ``` ```bash PYTHONPATH=src python -m pytest -v src/tests/ofc25/tests/test_functional_cleanup.py \ --tfs-runtime-script=tfs_runtime_env_vars_e2e.sh \ --tfs-profile=e2e \ --tfs-topology-descriptor=topology_e2e.json ``` ## CI / Docker The OFC25 Docker test image (`src/tests/ofc25/Dockerfile`) executes the same sequence via `/var/teraflow/run_tests.sh`, writing JUnit reports under `/opt/results`.