diff --git a/src/tests/scenario2/deploy_all.sh b/src/tests/scenario2/deploy_all.sh index fe0651e0385752bcf777857f1bc57baad6a95904..b1563ad3b7cfa8a0d34e05dd3fb237396e6c692d 100755 --- a/src/tests/scenario2/deploy_all.sh +++ b/src/tests/scenario2/deploy_all.sh @@ -1,22 +1,22 @@ #!/bin/bash # Delete old namespaces -kubectl delete namespace tfs-dom1 #tfs-dom2 tfs-dom3 tfs-dom4 +kubectl delete namespace tfs-dom1 tfs-dom2 tfs-dom3 tfs-dom4 # Delete secondary ingress controllers kubectl delete -f nfvsdn22/nginx-ingress-controller-dom1.yaml -#kubectl delete -f nfvsdn22/nginx-ingress-controller-dom2.yaml -#kubectl delete -f nfvsdn22/nginx-ingress-controller-dom3.yaml -#kubectl delete -f nfvsdn22/nginx-ingress-controller-dom4.yaml +kubectl delete -f nfvsdn22/nginx-ingress-controller-dom2.yaml +kubectl delete -f nfvsdn22/nginx-ingress-controller-dom3.yaml +kubectl delete -f nfvsdn22/nginx-ingress-controller-dom4.yaml # Delete MockBlockchain kubectl delete namespace tfs-bchain # Create secondary ingress controllers kubectl apply -f nfvsdn22/nginx-ingress-controller-dom1.yaml -#kubectl apply -f nfvsdn22/nginx-ingress-controller-dom2.yaml -#kubectl apply -f nfvsdn22/nginx-ingress-controller-dom3.yaml -#kubectl apply -f nfvsdn22/nginx-ingress-controller-dom4.yaml +kubectl apply -f nfvsdn22/nginx-ingress-controller-dom2.yaml +kubectl apply -f nfvsdn22/nginx-ingress-controller-dom3.yaml +kubectl apply -f nfvsdn22/nginx-ingress-controller-dom4.yaml # Create MockBlockchain ./deploy_mock_blockchain.sh @@ -26,13 +26,13 @@ source nfvsdn22/deploy_specs_dom1.sh ./deploy.sh # Deploy TFS for Domain 2 -#source nfvsdn22/deploy_specs_dom2.sh -#./deploy.sh +source nfvsdn22/deploy_specs_dom2.sh +./deploy.sh # Deploy TFS for Domain 3 -#source nfvsdn22/deploy_specs_dom3.sh -#./deploy.sh +source nfvsdn22/deploy_specs_dom3.sh +./deploy.sh # Deploy TFS for Domain 4 -#source nfvsdn22/deploy_specs_dom4.sh -#./deploy.sh +source nfvsdn22/deploy_specs_dom4.sh +./deploy.sh diff --git a/src/tests/scenario2/deploy_specs_dom1.sh b/src/tests/scenario2/deploy_specs_dom1.sh index 7c9fb119fe0155a9acc5bf5dda718f645101d912..8dca60f9e0a7ea0b81617a4b7eb86a0e2bf93ccd 100644 --- a/src/tests/scenario2/deploy_specs_dom1.sh +++ b/src/tests/scenario2/deploy_specs_dom1.sh @@ -2,7 +2,8 @@ export TFS_REGISTRY_IMAGE="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. -export TFS_COMPONENTS="context device pathcomp service slice dlt interdomain webui" +#export TFS_COMPONENTS="context device pathcomp service slice dlt interdomain webui" +export TFS_COMPONENTS="context device dlt interdomain webui" # Set the tag you want to use for your images. export TFS_IMAGE_TAG="dev" @@ -15,3 +16,7 @@ export TFS_EXTRA_MANIFESTS="nfvsdn22/tfs-ingress-dom1.yaml" # Set the neew Grafana admin password export TFS_GRAFANA_PASSWORD="admin123+" + +# If not already set, disable skip-build flag. +# If TFS_SKIP_BUILD is "YES", the containers are not rebuilt-retagged-repushed and existing ones are used. +export TFS_SKIP_BUILD="NO" diff --git a/src/tests/scenario2/deploy_specs_dom2.sh b/src/tests/scenario2/deploy_specs_dom2.sh index 4972aaaf9fe217c136e94e40e46a671ff08905cc..7b81d104229a76e825bdf25296fecfe6e5b000b0 100644 --- a/src/tests/scenario2/deploy_specs_dom2.sh +++ b/src/tests/scenario2/deploy_specs_dom2.sh @@ -2,7 +2,8 @@ export TFS_REGISTRY_IMAGE="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. -export TFS_COMPONENTS="context device pathcomp service slice dlt interdomain webui" +#export TFS_COMPONENTS="context device pathcomp service slice dlt interdomain webui" +export TFS_COMPONENTS="context device dlt interdomain webui" # Set the tag you want to use for your images. export TFS_IMAGE_TAG="dev" @@ -15,3 +16,7 @@ export TFS_EXTRA_MANIFESTS="nfvsdn22/tfs-ingress-dom2.yaml" # Set the neew Grafana admin password export TFS_GRAFANA_PASSWORD="admin123+" + +# If not already set, disable skip-build flag. +# If TFS_SKIP_BUILD is "YES", the containers are not rebuilt-retagged-repushed and existing ones are used. +export TFS_SKIP_BUILD="YES" diff --git a/src/tests/scenario2/deploy_specs_dom3.sh b/src/tests/scenario2/deploy_specs_dom3.sh index 7a54f93a1152579c949839992beada0b9b80dadd..525e90316d0f737ce418c5859121387f4e39fe46 100644 --- a/src/tests/scenario2/deploy_specs_dom3.sh +++ b/src/tests/scenario2/deploy_specs_dom3.sh @@ -2,7 +2,8 @@ export TFS_REGISTRY_IMAGE="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. -export TFS_COMPONENTS="context device pathcomp service slice dlt interdomain webui" +#export TFS_COMPONENTS="context device pathcomp service slice dlt interdomain webui" +export TFS_COMPONENTS="context device dlt interdomain webui" # Set the tag you want to use for your images. export TFS_IMAGE_TAG="dev" @@ -15,3 +16,7 @@ export TFS_EXTRA_MANIFESTS="nfvsdn22/tfs-ingress-dom3.yaml" # Set the neew Grafana admin password export TFS_GRAFANA_PASSWORD="admin123+" + +# If not already set, disable skip-build flag. +# If TFS_SKIP_BUILD is "YES", the containers are not rebuilt-retagged-repushed and existing ones are used. +export TFS_SKIP_BUILD="YES" diff --git a/src/tests/scenario2/deploy_specs_dom4.sh b/src/tests/scenario2/deploy_specs_dom4.sh index 4fa7896113172d32550679d06eeb929be54dc4c3..4d20b75ebc029e2ab930ad6aa362b26cdc401c63 100644 --- a/src/tests/scenario2/deploy_specs_dom4.sh +++ b/src/tests/scenario2/deploy_specs_dom4.sh @@ -2,7 +2,8 @@ export TFS_REGISTRY_IMAGE="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. -export TFS_COMPONENTS="context device pathcomp service slice dlt interdomain webui" +#export TFS_COMPONENTS="context device pathcomp service slice dlt interdomain webui" +export TFS_COMPONENTS="context device dlt interdomain webui" # Set the tag you want to use for your images. export TFS_IMAGE_TAG="dev" @@ -15,3 +16,7 @@ export TFS_EXTRA_MANIFESTS="nfvsdn22/tfs-ingress-dom4.yaml" # Set the neew Grafana admin password export TFS_GRAFANA_PASSWORD="admin123+" + +# If not already set, disable skip-build flag. +# If TFS_SKIP_BUILD is "YES", the containers are not rebuilt-retagged-repushed and existing ones are used. +export TFS_SKIP_BUILD="YES" diff --git a/src/tests/scenario2/descriptors/domain1.json b/src/tests/scenario2/descriptors/domain1.json index dd6ee7b47b6b1895073484dd22ccff04ee7803a5..043b3955f017631203a437cf853c3617cddf93c8 100644 --- a/src/tests/scenario2/descriptors/domain1.json +++ b/src/tests/scenario2/descriptors/domain1.json @@ -1,24 +1,24 @@ { "contexts": [ { - "context_id": {"context_uuid": {"uuid": "D1"}}, + "context_id": {"context_uuid": {"uuid": "admin"}}, "topology_ids": [ - {"context_id": {"context_uuid": {"uuid": "D1"}}, "topology_uuid": {"uuid": "admin"}} + {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "D1"}} ], "service_ids": [] } ], "topologies": [ { - "topology_id": {"context_id": {"context_uuid": {"uuid": "D1"}}, "topology_uuid": {"uuid": "admin"}}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "D1"}}, "device_ids": [ - {"device_uuid": {"uuid": "DC1-GW@D1"}}, + {"device_uuid": {"uuid": "DC1"}}, {"device_uuid": {"uuid": "R1@D1"}}, {"device_uuid": {"uuid": "R2@D1"}}, {"device_uuid": {"uuid": "R3@D1"}}, {"device_uuid": {"uuid": "R4@D1"}}, {"device_uuid": {"uuid": "R5@D1"}} ], "link_ids": [ - {"link_uuid": {"uuid": "DC1-GW@D1/eth1==R1@D1/100"}}, + {"link_uuid": {"uuid": "DC1/D1==R1@D1/DC1"}}, {"link_uuid": {"uuid": "R1@D1/2==R2@D1/1"}}, {"link_uuid": {"uuid": "R2@D1/3==R3@D1/2"}}, {"link_uuid": {"uuid": "R2@D1/5==R5@D1/2"}}, @@ -30,31 +30,31 @@ ], "devices": [ { - "device_id": {"device_uuid": {"uuid": "DC1-GW@D1"}}, "device_type": "emu-datacenter", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_id": {"device_uuid": {"uuid": "DC1"}}, "device_type": "emu-datacenter", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ - {"sample_types": [], "type": "copper/border", "uuid": "eth1"}, + {"sample_types": [], "type": "copper/border", "uuid": "D1"}, {"sample_types": [], "type": "copper/internal", "uuid": "int"} ]}}} ]} }, { "device_id": {"device_uuid": {"uuid": "R1@D1"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ {"sample_types": [], "type": "copper/internal", "uuid": "2"}, {"sample_types": [], "type": "copper/internal", "uuid": "5"}, - {"sample_types": [], "type": "copper/border", "uuid": "100"} + {"sample_types": [], "type": "copper/border", "uuid": "DC1"} ]}}} ]} }, { "device_id": {"device_uuid": {"uuid": "R2@D1"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ @@ -66,7 +66,7 @@ }, { "device_id": {"device_uuid": {"uuid": "R3@D1"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ @@ -77,35 +77,35 @@ }, { "device_id": {"device_uuid": {"uuid": "R4@D1"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ {"sample_types": [], "type": "copper/internal", "uuid": "3"}, {"sample_types": [], "type": "copper/internal", "uuid": "5"}, - {"sample_types": [], "type": "copper/border", "uuid": "10"} + {"sample_types": [], "type": "copper/border", "uuid": "D2"} ]}}} ]} }, { "device_id": {"device_uuid": {"uuid": "R5@D1"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ {"sample_types": [], "type": "copper/internal", "uuid": "1"}, {"sample_types": [], "type": "copper/internal", "uuid": "2"}, {"sample_types": [], "type": "copper/internal", "uuid": "4"}, - {"sample_types": [], "type": "copper/border", "uuid": "10"} + {"sample_types": [], "type": "copper/border", "uuid": "D3"} ]}}} ]} } ], "links": [ { - "link_id": {"link_uuid": {"uuid": "DC1-GW@D1/eth1==R1@D1/100"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "DC1-GW@D1"}}, "endpoint_uuid": {"uuid": "eth1"}}, - {"device_id": {"device_uuid": {"uuid": "R1@D1"}}, "endpoint_uuid": {"uuid": "100"}} + "link_id": {"link_uuid": {"uuid": "DC1/D1==R1@D1/DC1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "D1"}}, + {"device_id": {"device_uuid": {"uuid": "R1@D1"}}, "endpoint_uuid": {"uuid": "DC1"}} ] }, { diff --git a/src/tests/scenario2/descriptors/domain2.json b/src/tests/scenario2/descriptors/domain2.json index 1c8c3b8464aeacfb7a4e5c644c110b990d8a1d56..81d397abfd3571b1177a06172188b00eed2f3afc 100644 --- a/src/tests/scenario2/descriptors/domain2.json +++ b/src/tests/scenario2/descriptors/domain2.json @@ -1,33 +1,52 @@ { "contexts": [ { - "context_id": {"context_uuid": {"uuid": "D2"}}, - "topology_ids": [], "service_ids": [] + "context_id": {"context_uuid": {"uuid": "admin"}}, + "topology_ids": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "D2"}} + ], "service_ids": [] } ], "topologies": [ { - "topology_id": {"context_id": {"context_uuid": {"uuid": "D2"}}, "topology_uuid": {"uuid": "admin"}}, - "device_ids": [], "link_ids": [] + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "D2"}}, + "device_ids": [ + {"device_uuid": {"uuid": "R1@D2"}}, + {"device_uuid": {"uuid": "R2@D2"}}, + {"device_uuid": {"uuid": "R3@D2"}}, + {"device_uuid": {"uuid": "R4@D2"}}, + {"device_uuid": {"uuid": "R5@D2"}}, + {"device_uuid": {"uuid": "R6@D2"}} + ], "link_ids": [ + {"link_uuid": {"uuid": "R1@D2/2==R2@D2/1"}}, + {"link_uuid": {"uuid": "R1@D2/6==R6@D2/1"}}, + {"link_uuid": {"uuid": "R1@D2/5==R5@D2/1"}}, + {"link_uuid": {"uuid": "R2@D2/3==R3@D2/2"}}, + {"link_uuid": {"uuid": "R2@D2/4==R4@D2/2"}}, + {"link_uuid": {"uuid": "R2@D2/5==R5@D2/2"}}, + {"link_uuid": {"uuid": "R2@D2/6==R6@D2/2"}}, + {"link_uuid": {"uuid": "R3@D2/6==R6@D2/3"}}, + {"link_uuid": {"uuid": "R4@D2/5==R5@D2/4"}} + ] } ], "devices": [ { "device_id": {"device_uuid": {"uuid": "R1@D2"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ {"sample_types": [], "type": "copper/internal", "uuid": "2"}, {"sample_types": [], "type": "copper/internal", "uuid": "5"}, {"sample_types": [], "type": "copper/internal", "uuid": "6"}, - {"sample_types": [], "type": "copper/border", "uuid": "10"} + {"sample_types": [], "type": "copper/border", "uuid": "D1"} ]}}} ]} }, { "device_id": {"device_uuid": {"uuid": "R2@D2"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ @@ -41,7 +60,7 @@ }, { "device_id": {"device_uuid": {"uuid": "R3@D2"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ @@ -52,32 +71,32 @@ }, { "device_id": {"device_uuid": {"uuid": "R4@D2"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ {"sample_types": [], "type": "copper/internal", "uuid": "2"}, {"sample_types": [], "type": "copper/internal", "uuid": "5"}, - {"sample_types": [], "type": "copper/border", "uuid": "10"} + {"sample_types": [], "type": "copper/border", "uuid": "D4"} ]}}} ]} }, { "device_id": {"device_uuid": {"uuid": "R5@D2"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ {"sample_types": [], "type": "copper/internal", "uuid": "1"}, {"sample_types": [], "type": "copper/internal", "uuid": "2"}, {"sample_types": [], "type": "copper/internal", "uuid": "4"}, - {"sample_types": [], "type": "copper/border", "uuid": "10"} + {"sample_types": [], "type": "copper/border", "uuid": "D3"} ]}}} ]} }, { "device_id": {"device_uuid": {"uuid": "R6@D2"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ diff --git a/src/tests/scenario2/descriptors/domain3.json b/src/tests/scenario2/descriptors/domain3.json index 410a71f54ab63af6314cab690edc97987113488c..3a8e47d30dcef471b388f46d4ba5df5df4716256 100644 --- a/src/tests/scenario2/descriptors/domain3.json +++ b/src/tests/scenario2/descriptors/domain3.json @@ -1,57 +1,70 @@ { "contexts": [ { - "context_id": {"context_uuid": {"uuid": "D3"}}, - "topology_ids": [], "service_ids": [] + "context_id": {"context_uuid": {"uuid": "admin"}}, + "topology_ids": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "D3"}} + ], "service_ids": [] } ], "topologies": [ { - "topology_id": {"context_id": {"context_uuid": {"uuid": "D3"}}, "topology_uuid": {"uuid": "admin"}}, - "device_ids": [], "link_ids": [] + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "D3"}}, + "device_ids": [ + {"device_uuid": {"uuid": "R1@D3"}}, + {"device_uuid": {"uuid": "R2@D3"}}, + {"device_uuid": {"uuid": "R3@D3"}}, + {"device_uuid": {"uuid": "R4@D3"}} + ], "link_ids": [ + {"link_uuid": {"uuid": "R1@D3/2==R2@D3/1"}}, + {"link_uuid": {"uuid": "R2@D3/3==R3@D3/2"}}, + {"link_uuid": {"uuid": "R3@D3/4==R4@D3/3"}}, + {"link_uuid": {"uuid": "R4@D3/1==R1@D3/4"}}, + {"link_uuid": {"uuid": "R2@D3/4==R4@D3/2"}} + ] } ], "devices": [ { "device_id": {"device_uuid": {"uuid": "R1@D3"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ {"sample_types": [], "type": "copper/internal", "uuid": "2"}, {"sample_types": [], "type": "copper/internal", "uuid": "4"}, - {"sample_types": [], "type": "copper/border", "uuid": "10"} + {"sample_types": [], "type": "copper/border", "uuid": "D1"} ]}}} ]} }, { "device_id": {"device_uuid": {"uuid": "R2@D3"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ {"sample_types": [], "type": "copper/internal", "uuid": "1"}, {"sample_types": [], "type": "copper/internal", "uuid": "3"}, {"sample_types": [], "type": "copper/internal", "uuid": "4"}, - {"sample_types": [], "type": "copper/border", "uuid": "10"} + {"sample_types": [], "type": "copper/border", "uuid": "D2"} ]}}} ]} }, { "device_id": {"device_uuid": {"uuid": "R3@D3"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ {"sample_types": [], "type": "copper/internal", "uuid": "2"}, {"sample_types": [], "type": "copper/internal", "uuid": "4"}, - {"sample_types": [], "type": "copper/border", "uuid": "10"} + {"sample_types": [], "type": "copper/border", "uuid": "D4"} ]}}} ]} }, { "device_id": {"device_uuid": {"uuid": "R4@D3"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ diff --git a/src/tests/scenario2/descriptors/domain4.json b/src/tests/scenario2/descriptors/domain4.json index 9c495105ae970b0d71c9b873b0b7ef8287afc8fd..d9e2d049ad2417beb96b8f3434ed9e94febb4808 100644 --- a/src/tests/scenario2/descriptors/domain4.json +++ b/src/tests/scenario2/descriptors/domain4.json @@ -1,70 +1,82 @@ { "contexts": [ { - "context_id": {"context_uuid": {"uuid": "D4"}}, - "topology_ids": [], "service_ids": [] + "context_id": {"context_uuid": {"uuid": "admin"}}, + "topology_ids": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "D4"}} + ], "service_ids": [] } ], "topologies": [ { - "topology_id": {"context_id": {"context_uuid": {"uuid": "D4"}}, "topology_uuid": {"uuid": "admin"}}, - "device_ids": [], "link_ids": [] + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "D4"}}, + "device_ids": [ + {"device_uuid": {"uuid": "DC2"}}, + {"device_uuid": {"uuid": "R1@D4"}}, + {"device_uuid": {"uuid": "R2@D4"}}, + {"device_uuid": {"uuid": "R3@D4"}} + ], "link_ids": [ + {"link_uuid": {"uuid": "R3@D4/DC2==DC2/D4"}}, + {"link_uuid": {"uuid": "R1@D4/2==R2@D4/1"}}, + {"link_uuid": {"uuid": "R1@D4/3==R3@D4/1"}}, + {"link_uuid": {"uuid": "R2@D4/3==R3@D4/2"}} + ] } ], "devices": [ { - "device_id": {"device_uuid": {"uuid": "DC2-GW@D4"}}, "device_type": "emu-datacenter", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_id": {"device_uuid": {"uuid": "DC2"}}, "device_type": "emu-datacenter", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ - {"sample_types": [], "type": "copper/border", "uuid": "eth1"}, + {"sample_types": [], "type": "copper/border", "uuid": "D4"}, {"sample_types": [], "type": "copper/internal", "uuid": "int"} ]}}} ]} }, { "device_id": {"device_uuid": {"uuid": "R1@D4"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ {"sample_types": [], "type": "copper/internal", "uuid": "2"}, {"sample_types": [], "type": "copper/internal", "uuid": "3"}, - {"sample_types": [], "type": "copper/border", "uuid": "10"} + {"sample_types": [], "type": "copper/border", "uuid": "D3"} ]}}} ]} }, { "device_id": {"device_uuid": {"uuid": "R2@D4"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ {"sample_types": [], "type": "copper/internal", "uuid": "1"}, {"sample_types": [], "type": "copper/internal", "uuid": "3"}, - {"sample_types": [], "type": "copper/border", "uuid": "10"} + {"sample_types": [], "type": "copper/border", "uuid": "D2"} ]}}} ]} }, { "device_id": {"device_uuid": {"uuid": "R3@D4"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + "device_endpoints": [], "device_operational_status": 2, "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ {"sample_types": [], "type": "copper/internal", "uuid": "1"}, {"sample_types": [], "type": "copper/internal", "uuid": "2"}, - {"sample_types": [], "type": "copper/border", "uuid": "100"} + {"sample_types": [], "type": "copper/border", "uuid": "DC2"} ]}}} ]} } ], "links": [ { - "link_id": {"link_uuid": {"uuid": "R3@D4/100==DC2-GW@D4/eth1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "DC2-GW@D4"}}, "endpoint_uuid": {"uuid": "eth1"}}, - {"device_id": {"device_uuid": {"uuid": "R3@D4"}}, "endpoint_uuid": {"uuid": "100"}} + "link_id": {"link_uuid": {"uuid": "R3@D4/DC2==DC2/D4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "D4"}}, + {"device_id": {"device_uuid": {"uuid": "R3@D4"}}, "endpoint_uuid": {"uuid": "DC2"}} ] }, { diff --git a/src/tests/scenario2/descriptors/idc-slice.json b/src/tests/scenario2/descriptors/idc-slice.json new file mode 100644 index 0000000000000000000000000000000000000000..634209284c00cc8602db2bf91e6088ca120710df --- /dev/null +++ b/src/tests/scenario2/descriptors/idc-slice.json @@ -0,0 +1,20 @@ +{ + "slices":[ + { + "slice_id":{"context_id":{"context_uuid":{"uuid":"admin"}},"slice_uuid":{"uuid":"idc-slice"}}, + "slice_endpoint_ids":[ + {"device_id":{"device_uuid":{"uuid":"DC1"}},"endpoint_uuid":{"uuid":"int"}}, + {"device_id":{"device_uuid":{"uuid":"DC2"}},"endpoint_uuid":{"uuid":"int"}} + ], + "slice_status":{"slice_status":1}, + "slice_service_ids":[], + "slice_subslice_ids":[], + "slice_constraints":[], + "slice_config":{"config_rules":[ + {"action":1,"custom":{"resource_key":"/settings","resource_value":"{}"}}, + {"action":1,"custom":{"resource_key":"/device[DC1]/endpoint[int]/settings","resource_value":"{}"}}, + {"action":1,"custom":{"resource_key":"/device[DC2]/endpoint[int]/settings","resource_value":"{}"}} + ]} + } + ] +} diff --git a/src/tests/scenario2/dump_logs.sh b/src/tests/scenario2/dump_logs.sh new file mode 100755 index 0000000000000000000000000000000000000000..1e861ecab81b713e0cc2e71bf244f2e53e05a3fa --- /dev/null +++ b/src/tests/scenario2/dump_logs.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +rm -rf tmp/exec + +mkdir -p tmp/exec/mbc +kubectl --namespace tfs-bchain logs deployments/mock-blockchain server > tmp/exec/mbc/mock-blockchain.log + +mkdir -p tmp/exec/dom1 +kubectl --namespace tfs-dom1 logs deployments/contextservice server > tmp/exec/dom1/context.log +kubectl --namespace tfs-dom1 logs deployments/deviceservice server > tmp/exec/dom1/device.log +kubectl --namespace tfs-dom1 logs deployments/interdomainservice server > tmp/exec/dom1/interdomain.log +kubectl --namespace tfs-dom1 logs deployments/dltservice connector > tmp/exec/dom1/dlt-connector.log + +mkdir -p tmp/exec/dom2 +kubectl --namespace tfs-dom2 logs deployments/contextservice server > tmp/exec/dom2/context.log +kubectl --namespace tfs-dom2 logs deployments/deviceservice server > tmp/exec/dom2/device.log +kubectl --namespace tfs-dom2 logs deployments/interdomainservice server > tmp/exec/dom2/interdomain.log +kubectl --namespace tfs-dom2 logs deployments/dltservice connector > tmp/exec/dom2/dlt-connector.log + +mkdir -p tmp/exec/dom3 +kubectl --namespace tfs-dom3 logs deployments/contextservice server > tmp/exec/dom3/context.log +kubectl --namespace tfs-dom3 logs deployments/deviceservice server > tmp/exec/dom3/device.log +kubectl --namespace tfs-dom3 logs deployments/interdomainservice server > tmp/exec/dom3/interdomain.log +kubectl --namespace tfs-dom3 logs deployments/dltservice connector > tmp/exec/dom3/dlt-connector.log + +mkdir -p tmp/exec/dom4 +kubectl --namespace tfs-dom4 logs deployments/contextservice server > tmp/exec/dom4/context.log +kubectl --namespace tfs-dom4 logs deployments/deviceservice server > tmp/exec/dom4/device.log +kubectl --namespace tfs-dom4 logs deployments/interdomainservice server > tmp/exec/dom4/interdomain.log +kubectl --namespace tfs-dom4 logs deployments/dltservice connector > tmp/exec/dom4/dlt-connector.log