Loading src/tests/tools/mock_sdn_ctrl/MockMWSdnCtrl.py→src/tests/tools/mock_mw_sdn_ctrl/MockMWSdnCtrl.py +16 −12 Original line number Diff line number Diff line Loading @@ -37,30 +37,30 @@ LOG_LEVEL = logging.DEBUG NETWORK_NODES = [ {'node-id': '172.18.0.1', 'ietf-network-topology:termination-point': [ {'tp-id': '172.18.0.1:1', 'ietf-te-topology:te': {'name': 'ethernet'}}, {'tp-id': '172.18.0.1:2', 'ietf-te-topology:te': {'name': 'antena' }}, {'tp-id': '1', 'ietf-te-topology:te': {'name': 'ethernet'}}, {'tp-id': '2', 'ietf-te-topology:te': {'name': 'antena' }}, ]}, {'node-id': '172.18.0.2', 'ietf-network-topology:termination-point': [ {'tp-id': '172.18.0.2:1', 'ietf-te-topology:te': {'name': 'ethernet'}}, {'tp-id': '172.18.0.2:2', 'ietf-te-topology:te': {'name': 'antena' }}, {'tp-id': '1', 'ietf-te-topology:te': {'name': 'ethernet'}}, {'tp-id': '2', 'ietf-te-topology:te': {'name': 'antena' }}, ]}, {'node-id': '172.18.0.3', 'ietf-network-topology:termination-point': [ {'tp-id': '172.18.0.3:1', 'ietf-te-topology:te': {'name': 'ethernet'}}, {'tp-id': '172.18.0.3:2', 'ietf-te-topology:te': {'name': 'antena' }}, {'tp-id': '1', 'ietf-te-topology:te': {'name': 'ethernet'}}, {'tp-id': '2', 'ietf-te-topology:te': {'name': 'antena' }}, ]}, {'node-id': '172.18.0.4', 'ietf-network-topology:termination-point': [ {'tp-id': '172.18.0.4:1', 'ietf-te-topology:te': {'name': 'ethernet'}}, {'tp-id': '172.18.0.4:2', 'ietf-te-topology:te': {'name': 'antena' }}, {'tp-id': '1', 'ietf-te-topology:te': {'name': 'ethernet'}}, {'tp-id': '2', 'ietf-te-topology:te': {'name': 'antena' }}, ]} ] NETWORK_LINKS = [ { 'source' : {'source-node': '172.18.0.1', 'source-tp': '172.18.0.1:2'}, 'destination': {'dest-node' : '172.18.0.2', 'dest-tp' : '172.18.0.2:2'}, 'source' : {'source-node': '172.18.0.1', 'source-tp': '2'}, 'destination': {'dest-node' : '172.18.0.2', 'dest-tp' : '2'}, }, { 'source' : {'source-node': '172.18.0.3', 'source-tp': '172.18.0.3:2'}, 'destination': {'dest-node' : '172.18.0.4', 'dest-tp' : '172.18.0.4:2'}, 'source' : {'source-node': '172.18.0.3', 'source-tp': '2'}, 'destination': {'dest-node' : '172.18.0.4', 'dest-tp' : '2'}, } ] NETWORK_SERVICES = {} Loading Loading @@ -91,6 +91,7 @@ class Services(Resource): return jsonify({'ietf-eth-tran-service:etht-svc': {'etht-svc-instances': services}}) def post(self): try: json_request = request.json if not json_request: abort(400) if not isinstance(json_request, dict): abort(400) Loading @@ -102,6 +103,9 @@ class Services(Resource): etht_svc_name = svc_data['etht-svc-name'] NETWORK_SERVICES[etht_svc_name] = svc_data return jsonify({}), 201 except: LOGGER.exception('Exception in POST') class DelServices(Resource): def delete(self, service_uuid : str): Loading src/tests/tools/mock_sdn_ctrl/README.md→src/tests/tools/mock_mw_sdn_ctrl/README.md +3 −3 Original line number Diff line number Diff line Loading @@ -12,8 +12,8 @@ Follow the steps below to perform the test: ## 1. Deploy TeraFlowSDN controller and the scenario Deploy the test scenario "microwave_deploy.sh": ```bash source src/tests/tools/microwave_deploy.sh ./deploy.sh source src/tests/tools/mock_mw_sdn_ctrl/scenario/microwave_deploy.sh ./deploy/all.sh ``` ## 2. Install requirements and run the Mock MicroWave SDN controller Loading @@ -27,7 +27,7 @@ pip install Flask==2.1.3 Flask-RESTful==0.3.9 Run the Mock MicroWave SDN Controller as follows: ```bash python src/tests/tools/mock_sdn_ctrl/MockMWSdnCtrl.py python src/tests/tools/mock_mw_sdn_ctrl/MockMWSdnCtrl.py ``` ## 3. Deploy the test descriptors Loading src/tests/tools/mock_sdn_ctrl/microwave_deploy.sh→src/tests/tools/mock_mw_sdn_ctrl/scenario/microwave_deploy.sh +0 −0 File moved. View file src/tests/tools/mock_sdn_ctrl/network_descriptors.json→src/tests/tools/mock_mw_sdn_ctrl/scenario/network_descriptors.json +0 −0 File moved. View file src/tests/tools/mock_sdn_ctrl/service_descriptor.json→src/tests/tools/mock_mw_sdn_ctrl/scenario/service_descriptor.json +0 −0 File moved. View file Loading
src/tests/tools/mock_sdn_ctrl/MockMWSdnCtrl.py→src/tests/tools/mock_mw_sdn_ctrl/MockMWSdnCtrl.py +16 −12 Original line number Diff line number Diff line Loading @@ -37,30 +37,30 @@ LOG_LEVEL = logging.DEBUG NETWORK_NODES = [ {'node-id': '172.18.0.1', 'ietf-network-topology:termination-point': [ {'tp-id': '172.18.0.1:1', 'ietf-te-topology:te': {'name': 'ethernet'}}, {'tp-id': '172.18.0.1:2', 'ietf-te-topology:te': {'name': 'antena' }}, {'tp-id': '1', 'ietf-te-topology:te': {'name': 'ethernet'}}, {'tp-id': '2', 'ietf-te-topology:te': {'name': 'antena' }}, ]}, {'node-id': '172.18.0.2', 'ietf-network-topology:termination-point': [ {'tp-id': '172.18.0.2:1', 'ietf-te-topology:te': {'name': 'ethernet'}}, {'tp-id': '172.18.0.2:2', 'ietf-te-topology:te': {'name': 'antena' }}, {'tp-id': '1', 'ietf-te-topology:te': {'name': 'ethernet'}}, {'tp-id': '2', 'ietf-te-topology:te': {'name': 'antena' }}, ]}, {'node-id': '172.18.0.3', 'ietf-network-topology:termination-point': [ {'tp-id': '172.18.0.3:1', 'ietf-te-topology:te': {'name': 'ethernet'}}, {'tp-id': '172.18.0.3:2', 'ietf-te-topology:te': {'name': 'antena' }}, {'tp-id': '1', 'ietf-te-topology:te': {'name': 'ethernet'}}, {'tp-id': '2', 'ietf-te-topology:te': {'name': 'antena' }}, ]}, {'node-id': '172.18.0.4', 'ietf-network-topology:termination-point': [ {'tp-id': '172.18.0.4:1', 'ietf-te-topology:te': {'name': 'ethernet'}}, {'tp-id': '172.18.0.4:2', 'ietf-te-topology:te': {'name': 'antena' }}, {'tp-id': '1', 'ietf-te-topology:te': {'name': 'ethernet'}}, {'tp-id': '2', 'ietf-te-topology:te': {'name': 'antena' }}, ]} ] NETWORK_LINKS = [ { 'source' : {'source-node': '172.18.0.1', 'source-tp': '172.18.0.1:2'}, 'destination': {'dest-node' : '172.18.0.2', 'dest-tp' : '172.18.0.2:2'}, 'source' : {'source-node': '172.18.0.1', 'source-tp': '2'}, 'destination': {'dest-node' : '172.18.0.2', 'dest-tp' : '2'}, }, { 'source' : {'source-node': '172.18.0.3', 'source-tp': '172.18.0.3:2'}, 'destination': {'dest-node' : '172.18.0.4', 'dest-tp' : '172.18.0.4:2'}, 'source' : {'source-node': '172.18.0.3', 'source-tp': '2'}, 'destination': {'dest-node' : '172.18.0.4', 'dest-tp' : '2'}, } ] NETWORK_SERVICES = {} Loading Loading @@ -91,6 +91,7 @@ class Services(Resource): return jsonify({'ietf-eth-tran-service:etht-svc': {'etht-svc-instances': services}}) def post(self): try: json_request = request.json if not json_request: abort(400) if not isinstance(json_request, dict): abort(400) Loading @@ -102,6 +103,9 @@ class Services(Resource): etht_svc_name = svc_data['etht-svc-name'] NETWORK_SERVICES[etht_svc_name] = svc_data return jsonify({}), 201 except: LOGGER.exception('Exception in POST') class DelServices(Resource): def delete(self, service_uuid : str): Loading
src/tests/tools/mock_sdn_ctrl/README.md→src/tests/tools/mock_mw_sdn_ctrl/README.md +3 −3 Original line number Diff line number Diff line Loading @@ -12,8 +12,8 @@ Follow the steps below to perform the test: ## 1. Deploy TeraFlowSDN controller and the scenario Deploy the test scenario "microwave_deploy.sh": ```bash source src/tests/tools/microwave_deploy.sh ./deploy.sh source src/tests/tools/mock_mw_sdn_ctrl/scenario/microwave_deploy.sh ./deploy/all.sh ``` ## 2. Install requirements and run the Mock MicroWave SDN controller Loading @@ -27,7 +27,7 @@ pip install Flask==2.1.3 Flask-RESTful==0.3.9 Run the Mock MicroWave SDN Controller as follows: ```bash python src/tests/tools/mock_sdn_ctrl/MockMWSdnCtrl.py python src/tests/tools/mock_mw_sdn_ctrl/MockMWSdnCtrl.py ``` ## 3. Deploy the test descriptors Loading
src/tests/tools/mock_sdn_ctrl/microwave_deploy.sh→src/tests/tools/mock_mw_sdn_ctrl/scenario/microwave_deploy.sh +0 −0 File moved. View file
src/tests/tools/mock_sdn_ctrl/network_descriptors.json→src/tests/tools/mock_mw_sdn_ctrl/scenario/network_descriptors.json +0 −0 File moved. View file
src/tests/tools/mock_sdn_ctrl/service_descriptor.json→src/tests/tools/mock_mw_sdn_ctrl/scenario/service_descriptor.json +0 −0 File moved. View file