Commit 2dc50012 authored by Mohammad Ismaeel's avatar Mohammad Ismaeel
Browse files

Optical band expansion

parent db90bc84
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ spec:
            - name: MB_BACKEND
              value: "nats"
            - name: LOG_LEVEL
              value: "INFO"
              value: "DEBUG"
            - name: ALLOW_EXPLICIT_ADD_DEVICE_TO_TOPOLOGY
              value: "FALSE"
            - name: ALLOW_EXPLICIT_ADD_LINK_TO_TOPOLOGY
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ spec:
            - containerPort: 9192
          env:
            - name: LOG_LEVEL
              value: "INFO"
              value: "DEBUG"
          readinessProbe:
            exec:
              command: ["/bin/grpc_health_probe", "-addr=:3030"]
+1 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ spec:
    kind: Deployment
    name: webuiservice
  minReplicas: 1
  maxReplicas: 20
  maxReplicas: 1
  metrics:
    - type: Resource
      resource:
+11 −0
Original line number Diff line number Diff line
@@ -90,6 +90,10 @@ service ContextService {
  rpc DeleteOpticalLink      (LinkId           ) returns (Empty            ) {}
  rpc GetOpticalLinkList     (Empty            ) returns (OpticalLinkList  ) {}

  rpc GetOpticalBand         (Empty            ) returns (OpticalBandList)  {}
  rpc SelectOpticalBand      (OpticalBandId    ) returns (OpticalBand)  {}


  rpc DeleteServiceConfigRule(ServiceConfigRule) returns (Empty            ) {}
}

@@ -704,6 +708,7 @@ message OpticalLinkList {


message OpticalLinkDetails {

  float length = 1;
  string src_port = 2;
  string dst_port = 3;
@@ -713,6 +718,7 @@ message OpticalLinkDetails {
  map<string, int32> c_slots = 7;
  map<string, int32> l_slots = 8;
  map<string, int32> s_slots = 9;
  
}

message OpticalLink {
@@ -738,6 +744,11 @@ message OpticalBand {
   ConnectionId connection_id =2 ; 
    ChannelId channel_id = 3;
    ServiceId service_id =4;
    oneof field {
      Service service =5 ;
      Connection connection =6 ;
      string channel = 7;
    }

}

+4 −2
Original line number Diff line number Diff line
@@ -33,16 +33,18 @@ def get_device(
   
    try:
        ro_devices = context_client.SelectDevice(device_filter)
        
        if len(ro_devices.devices) == 0: return None
        assert len(ro_devices.devices) == 1
        ro_device = ro_devices.devices[0]
        if not rw_copy: return ro_device
        rw_device = Device()
        rw_device.CopyFrom(ro_device)
       
        return rw_device
    except grpc.RpcError as e:
        if e.code() != grpc.StatusCode.NOT_FOUND: raise # pylint: disable=no-member
        # LOGGER.exception('Unable to get Device({:s})'.format(str(device_uuid)))
        if e.code() != grpc.StatusCode.NOT_FOUND: raise # pylint: disable=no-member
        return None

def get_existing_device_uuids(context_client : ContextClient) -> Set[str]:
Loading