Commit 8e4fe4ca authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Pre-merge code cleanup

parent 77a6ef72
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -76,9 +76,6 @@ class ServiceNameEnum(Enum):
    QOSPROFILE             = 'qos-profile'
    OSMCLIENT              = 'osm-client'

    # Experiment 
    TAPI = "tapi"

    # Used for test and debugging only
    DLT_GATEWAY    = 'dltgateway'
    LOAD_GENERATOR = 'load-generator'
+7 −13
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ def correct_slot(dic: dict) -> dict:
## To be deleted , needed now for development purpose ## 

def order_list (lst:list[tuple])->list:

    if (len(lst)<=1):
        return lst
    else :
@@ -58,7 +57,6 @@ def order_list (lst:list[tuple])->list:
                lst_greater.append(element)
        return order_list(lst_smaller) + [(pivot,bit_val)] + order_list(lst_greater)

  
def list_to_dict (lst:list[tuple[int,int]])->dict:
    dct = dict()
    for ele in lst :
@@ -66,9 +64,7 @@ def list_to_dict (lst:list[tuple[int,int]])->dict:
        dct[str(key)]=value
    return dct

         
def order_dict (dct:dict)->dict:
   
    lst = list()
    for key,value in sorted(dct.items()):
        lst.append((int(key),value))
@@ -77,11 +73,9 @@ def order_dict (dct:dict)->dict:
        return list_to_dict (ordered_lst)

def order_dict_v1 (dct:dict)->dict:
   
    lst = list()
    for key,value in dct.items():
        lst.append((int(key),value))
    ordered_lst= order_list(lst)
    if (len(ordered_lst)>0):
        return list_to_dict (ordered_lst)
     
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
@@ -27,8 +27,8 @@ from common.proto.context_pb2 import (
    OpticalConfig, OpticalConfigId, OpticalConfigList , OpticalLink, OpticalLinkList,
    Service, ServiceConfigRule, ServiceEvent, ServiceFilter, ServiceId, ServiceIdList, ServiceList,
    Slice, SliceEvent, SliceFilter, SliceId, SliceIdList, SliceList,
    Topology, TopologyDetails, TopologyEvent, TopologyId, TopologyIdList, TopologyList,OpticalBand ,OpticalBandId,
    OpticalBandList
    Topology, TopologyDetails, TopologyEvent, TopologyId, TopologyIdList, TopologyList,
    OpticalBand, OpticalBandId, OpticalBandList
)
from common.proto.context_pb2_grpc import ContextServiceStub
from common.proto.context_policy_pb2_grpc import ContextPolicyServiceStub
+1 −1

File changed.

Contains only whitespace changes.