Commit 59dc67ba authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

pre-merge code cleanup

parent af017bac
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -39,7 +39,7 @@ spec:
            - containerPort: 9192
            - containerPort: 9192
          env:
          env:
            - name: LOG_LEVEL
            - name: LOG_LEVEL
              value: "DEBUG"
              value: "INFO"
          startupProbe:
          startupProbe:
            exec:
            exec:
              command: ["/bin/grpc_health_probe", "-addr=:2020"]
              command: ["/bin/grpc_health_probe", "-addr=:2020"]
+1 −2
Original line number Original line Diff line number Diff line
@@ -13,8 +13,7 @@
# limitations under the License.
# limitations under the License.


import grpc, logging
import grpc, logging
from typing import List, Optional
from typing import Optional
from common.Constants import DEFAULT_CONTEXT_NAME
from common.proto.context_pb2 import Connection, ConnectionId
from common.proto.context_pb2 import Connection, ConnectionId
from context.client.ContextClient import ContextClient
from context.client.ContextClient import ContextClient


+3 −3
Original line number Original line Diff line number Diff line
@@ -16,8 +16,8 @@
import enum
import enum
from typing import List, Optional, Set, Tuple, Union
from typing import List, Optional, Set, Tuple, Union
from common.proto.context_pb2 import (
from common.proto.context_pb2 import (
    EVENTTYPE_CREATE, EVENTTYPE_REMOVE, EVENTTYPE_UPDATE, Device, ConnectionId,
    EVENTTYPE_CREATE, EVENTTYPE_REMOVE, EVENTTYPE_UPDATE, Device, DeviceEvent,
    DeviceEvent, Link, LinkEvent, Service, ServiceEvent, SliceEvent, TopologyEvent, Empty
    Link, LinkEvent, Service, ServiceEvent, SliceEvent, TopologyEvent, Empty
)
)
from common.tools.grpc.Tools import grpc_message_to_json_string
from common.tools.grpc.Tools import grpc_message_to_json_string
from context.client.ContextClient import ContextClient
from context.client.ContextClient import ContextClient
+0 −185
Original line number Original line Diff line number Diff line
{
    "ietf-l3vpn-svc:l3vpn-svc": {
        "sites": {
            "site": [
                {
                    "devices": {
                        "device": [
                            {
                                "device-id": "P-PE1",
                                "location": "access"
                            }
                        ]
                    },
                    "locations": {
                        "location": [
                            {
                                "location-id": "access"
                            }
                        ]
                    },
                    "management": {
                        "type": "ietf-l3vpn-svc:provider-managed"
                    },
                    "routing-protocols": {
                        "routing-protocol": [
                            {
                                "static": {
                                    "cascaded-lan-prefixes": {
                                        "ipv4-lan-prefixes": [
                                            {
                                                "lan": "172.1.101.22/24",
                                                "lan-tag": "21",
                                                "next-hop": "128.32.44.254"
                                            }
                                        ]
                                    }
                                },
                                "type": "ietf-l3vpn-svc:static"
                            }
                        ]
                    },
                    "site-id": "site_access",
                    "site-network-accesses": {
                        "site-network-access": [
                            {
                                "device-reference": "P-PE1",
                                "ip-connection": {
                                    "ipv4": {
                                        "address-allocation-type": "ietf-l3vpn-svc:static-address",
                                        "addresses": {
                                            "customer-address": "128.32.44.254",
                                            "prefix-length": "24",
                                            "provider-address": "128.32.44.254"
                                        }
                                    }
                                },
                                "service": {
                                    "qos": {
                                        "qos-profile": {
                                            "classes": {
                                                "class": [
                                                    {
                                                        "bandwidth": {
                                                            "guaranteed-bw-percent": 100
                                                        },
                                                        "class-id": "qos-realtime",
                                                        "direction": "ietf-l3vpn-svc:both",
                                                        "latency": {
                                                            "latency-boundary": 20
                                                        }
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "svc-input-bandwidth": 1000000000,
                                    "svc-mtu": 1500,
                                    "svc-output-bandwidth": 5000000000
                                },
                                "site-network-access-id": "200",
                                "site-network-access-type": "ietf-l3vpn-svc:multipoint",
                                "vpn-attachment": {
                                    "site-role": "ietf-l3vpn-svc:hub-role",
                                    "vpn-id": "slice25"
                                }
                            }
                        ]
                    }
                },
                {
                    "devices": {
                        "device": [
                            {
                                "device-id": "P-PE2",
                                "location": "cloud"
                            }
                        ]
                    },
                    "locations": {
                        "location": [
                            {
                                "location-id": "cloud"
                            }
                        ]
                    },
                    "management": {
                        "type": "ietf-l3vpn-svc:provider-managed"
                    },
                    "routing-protocols": {
                        "routing-protocol": [
                            {
                                "static": {
                                    "cascaded-lan-prefixes": {
                                        "ipv4-lan-prefixes": [
                                            {
                                                "lan": "172.16.104.221/24",
                                                "lan-tag": "201",
                                                "next-hop": "172.10.44.254"
                                            }
                                        ]
                                    }
                                },
                                "type": "ietf-l3vpn-svc:static"
                            }
                        ]
                    },
                    "site-id": "site_cloud",
                    "site-network-accesses": {
                        "site-network-access": [
                            {
                                "device-reference": "P-PE2",
                                "ip-connection": {
                                    "ipv4": {
                                        "address-allocation-type": "ietf-l3vpn-svc:static-address",
                                        "addresses": {
                                            "customer-address": "172.10.44.254",
                                            "prefix-length": "24",
                                            "provider-address": "172.10.44.254"
                                        }
                                    }
                                },
                                "service": {
                                    "qos": {
                                        "qos-profile": {
                                            "classes": {
                                                "class": [
                                                    {
                                                        "bandwidth": {
                                                            "guaranteed-bw-percent": 100
                                                        },
                                                        "class-id": "qos-realtime",
                                                        "direction": "ietf-l3vpn-svc:both",
                                                        "latency": {
                                                            "latency-boundary": 10
                                                        }
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "svc-input-bandwidth": 5000000000,
                                    "svc-mtu": 1500,
                                    "svc-output-bandwidth": 1000000000
                                },
                                "site-network-access-id": "200",
                                "site-network-access-type": "ietf-l3vpn-svc:multipoint",
                                "vpn-attachment": {
                                    "site-role": "ietf-l3vpn-svc:spoke-role",
                                    "vpn-id": "slice25"
                                }
                            }
                        ]
                    }
                }
            ]
        },
        "vpn-services": {
            "vpn-service": [
                {
                    "vpn-id": "slice25"
                }
            ]
        }
    }
}
+2 −2
Original line number Original line Diff line number Diff line
@@ -2,7 +2,7 @@
    "slice-service": [
    "slice-service": [
        {
        {
            "id": "slice1",
            "id": "slice1",
            "description": "network slice 1, PC1-VM1 - using IP transport network",
            "description": "network slice 1, PC1-VM1",
            "sdps": {
            "sdps": {
                "sdp": [
                "sdp": [
                    {
                    {
Loading