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

Added SNS4SNS end-to-end test scenario (not automated)

parent 7a70472f
Loading
Loading
Loading
Loading
+102 −0
Original line number Diff line number Diff line
{
    "contexts": [
        {"context_id": {"context_uuid": {"uuid": "admin"}}}
    ],
    "topologies": [
        {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}
    ],
    "devices": [
        {
            "device_id": {"device_uuid": {"uuid": "core-net"}}, "device_type": "network",
            "device_drivers": ["DEVICEDRIVER_UNDEFINED"],
            "device_config": {"config_rules": [
                {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}},
                {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}},
                {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [
                    {"uuid": "int", "type": "copper"},
                    {"uuid": "eth1", "type": "copper"}
                ]}}}
            ]}
        },
        {
            "device_id": {"device_uuid": {"uuid": "edge-net"}}, "device_type": "network",
            "device_drivers": ["DEVICEDRIVER_UNDEFINED"],
            "device_config": {"config_rules": [
                {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}},
                {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}},
                {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [
                    {"uuid": "int", "type": "copper"},
                    {"uuid": "eth1", "type": "copper"}
                ]}}}
            ]}
        },
        {
            "device_id": {"device_uuid": {"uuid": "r1"}}, "device_type": "packet-router",
            "device_drivers": ["DEVICEDRIVER_GNMI_OPENCONFIG"],
            "device_config": {"config_rules": [
                {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.101"}},
                {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "6030"}},
                {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {
                    "username": "admin", "password": "admin", "use_tls": false
                }}}
            ]}
        },
        {
            "device_id": {"device_uuid": {"uuid": "r2"}}, "device_type": "packet-router",
            "device_drivers": ["DEVICEDRIVER_GNMI_OPENCONFIG"],
            "device_config": {"config_rules": [
                {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.102"}},
                {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "6030"}},
                {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {
                    "username": "admin", "password": "admin", "use_tls": false
                }}}
            ]}
        }
    ],
    "links": [
        {
            "link_id": {"link_uuid": {"uuid": "r1/Ethernet2==r2/Ethernet1"}},
            "link_endpoint_ids": [
                {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet2"}},
                {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet1"}}
            ]
        },
        {
            "link_id": {"link_uuid": {"uuid": "r2/Ethernet1==r1/Ethernet2"}},
            "link_endpoint_ids": [
                {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet1"}},
                {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet2"}}
            ]
        },

        {
            "link_id": {"link_uuid": {"uuid": "r1/Ethernet10==core-net/eth1"}},
            "link_endpoint_ids": [
                {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet10"}},
                {"device_id": {"device_uuid": {"uuid": "core-net"}}, "endpoint_uuid": {"uuid": "eth1"}}
            ]
        },
        {
            "link_id": {"link_uuid": {"uuid": "core-net/eth1==r1/Ethernet10"}},
            "link_endpoint_ids": [
                {"device_id": {"device_uuid": {"uuid": "core-net"}}, "endpoint_uuid": {"uuid": "eth1"}},
                {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet10"}}
            ]
        },

        {
            "link_id": {"link_uuid": {"uuid": "r2/Ethernet10==edge-net/eth1"}},
            "link_endpoint_ids": [
                {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet10"}},
                {"device_id": {"device_uuid": {"uuid": "edge-net"}}, "endpoint_uuid": {"uuid": "eth1"}}
            ]
        },
        {
            "link_id": {"link_uuid": {"uuid": "edge-net/eth1==r2/Ethernet10"}},
            "link_endpoint_ids": [
                {"device_id": {"device_uuid": {"uuid": "edge-net"}}, "endpoint_uuid": {"uuid": "eth1"}},
                {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet10"}}
            ]
        }
    ]
}
+83 −0
Original line number Diff line number Diff line
{
    "ietf-l3vpn-svc:l3vpn-svc": {
        "vpn-services": {"vpn-service": [{"vpn-id": "ietf-l3vpn-edge-core"}]},
        "sites": {
            "site": [
                {
                    "site-id": "site_core-net",
                    "management": {"type": "ietf-l3vpn-svc:provider-managed"},
                    "locations": {"location": [{"location-id": "core-net"}]},
                    "devices": {"device": [{"device-id": "core-net", "location": "core-net"}]},
                    "site-network-accesses": {
                        "site-network-access": [
                            {
                                "site-network-access-id": "int",
                                "site-network-access-type": "ietf-l3vpn-svc:multipoint",
                                "device-reference": "core-net",
                                "vpn-attachment": {"vpn-id": "ietf-l3vpn-edge-core", "site-role": "ietf-l3vpn-svc:spoke-role"},
                                "ip-connection": {
                                    "ipv4": {
                                        "address-allocation-type": "ietf-l3vpn-svc:static-address",
                                        "addresses": {
                                            "provider-address": "10.10.10.229",
                                            "customer-address": "10.10.10.0",
                                            "prefix-length": 24
                                        }
                                    }
                                },
                                "service": {
                                    "svc-mtu": 1500,
                                    "svc-input-bandwidth": 1000000000,
                                    "svc-output-bandwidth": 1000000000,
                                    "qos": {"qos-profile": {"classes": {"class": [{
                                        "class-id": "qos-realtime",
                                        "direction": "ietf-l3vpn-svc:both",
                                        "latency": {"latency-boundary": 10},
                                        "bandwidth": {"guaranteed-bw-percent": 100}
                                    }]}}}
                                }
                            }
                        ]
                    }
                },
                {
                    "site-id": "site_edge-net",
                    "management": {"type": "ietf-l3vpn-svc:provider-managed"},
                    "locations": {"location": [{"location-id": "edge-net"}]},
                    "devices": {"device": [{"device-id": "edge-net", "location": "edge-net"}]},
                    "site-network-accesses": {
                        "site-network-access": [
                            {
                                "site-network-access-id": "int",
                                "site-network-access-type": "ietf-l3vpn-svc:multipoint",
                                "device-reference": "edge-net",
                                "vpn-attachment": {"vpn-id": "ietf-l3vpn-edge-core", "site-role": "ietf-l3vpn-svc:hub-role"},
                                "ip-connection": {
                                    "ipv4": {
                                        "address-allocation-type": "ietf-l3vpn-svc:static-address",
                                        "addresses": {
                                            "provider-address": "10.158.72.229",
                                            "customer-address": "10.158.72.0",
                                            "prefix-length": 24
                                        }
                                    }
                                },
                                "service": {
                                    "svc-mtu": 1500,
                                    "svc-input-bandwidth": 1000000000,
                                    "svc-output-bandwidth": 1000000000,
                                    "qos": {"qos-profile": {"classes": {"class": [{
                                        "class-id": "qos-realtime",
                                        "direction": "ietf-l3vpn-svc:both",
                                        "latency": {"latency-boundary": 10},
                                        "bandwidth": {"guaranteed-bw-percent": 100}
                                    }]}}}
                                }
                            }
                        ]
                    }
                }
            ]
        }
    }
}
+34 −0
Original line number Diff line number Diff line
{
    "services": [
        {
            "service_id": {
                "context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "core-to-edge-l2svc"}
            },
            "service_type": "SERVICETYPE_L3NM",
            "service_status": {"service_status": "SERVICESTATUS_PLANNED"},
            "service_endpoint_ids": [
                {"device_id": {"device_uuid": {"uuid": "core-net"}}, "endpoint_uuid": {"uuid": "int"}},
                {"device_id": {"device_uuid": {"uuid": "edge-net"}}, "endpoint_uuid": {"uuid": "int"}}
            ],
            "service_constraints": [],
            "service_config": {"config_rules": [
                {"action": "CONFIGACTION_SET", "custom": {
                    "resource_key": "/device[core-net]/endpoint[eth1]/settings",
                    "resource_value": {"address_ip": "10.10.10.0", "address_prefix": 24, "index": 0}
                }},
                {"action": "CONFIGACTION_SET", "custom": {
                    "resource_key": "/device[r1]/endpoint[Ethernet10]/settings",
                    "resource_value": {"address_ip": "10.10.10.229", "address_prefix": 24, "index": 0}
                }},
                {"action": "CONFIGACTION_SET", "custom": {
                    "resource_key": "/device[r2]/endpoint[Ethernet10]/settings",
                    "resource_value": {"address_ip": "10.158.72.229", "address_prefix": 24, "index": 0}
                }},
                {"action": "CONFIGACTION_SET", "custom": {
                    "resource_key": "/device[edge-net]/endpoint[eth1]/settings",
                    "resource_value": {"address_ip": "10.158.72.0", "address_prefix": 24, "index": 0}
                }}
            ]}
        }
    ]
}
+16 −0
Original line number Diff line number Diff line
#!/bin/bash
# Copyright 2022-2024 ETSI OSG/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.

docker exec -it clab-sns4sns-r1 Cli
+16 −0
Original line number Diff line number Diff line
#!/bin/bash
# Copyright 2022-2024 ETSI OSG/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.

docker exec -it clab-sns4sns-r2 Cli
Loading