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

Optical controller:

-Pre-merge cleanup
parent 48d4900a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -28,6 +28,9 @@ export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_gene
# Uncomment to activate BGP-LS Speaker
#export TFS_COMPONENTS="${TFS_COMPONENTS} bgpls_speaker"

# Uncomment to activate Optical Controller
#export TFS_COMPONENTS="${TFS_COMPONENTS} opticalcontroller"

# Uncomment to activate ZTP
#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp"

+64 −68
Original line number Diff line number Diff line
@@ -248,6 +248,7 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
        if len(service_with_uuids.service_endpoint_ids) >= num_expected_endpoints:
            pathcomp_request = PathCompRequest()
            pathcomp_request.services.append(service_with_uuids)    # pylint: disable=no-member

        if service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY:
            context_id_x = json_context_id(DEFAULT_CONTEXT_NAME)
            topology_id_x = json_topology_id(
@@ -276,7 +277,6 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
                elif "optical-band-width" in constraint.custom.constraint_type:
                    ob_band = int(constraint.custom.constraint_value)

                
            # to get the reply form the optical module
            reply_txt = add_lightpath(src, dst, bitrate, bidir, ob_band)
            
@@ -312,12 +312,10 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
            else:
                pathcomp_request.k_disjoint_path.num_disjoint = num_disjoint_paths  # pylint: disable=no-member

              
            pathcomp = PathCompClient()
            pathcomp_reply = pathcomp.Compute(pathcomp_request)
            pathcomp.close()


            # Feed TaskScheduler with this path computation reply. TaskScheduler identifies inter-dependencies among
            # the services and connections retrieved and produces a schedule of tasks (an ordered list of tasks to be
            # executed) to implement the requested create/update operation.
@@ -366,10 +364,8 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
                service.service_config.config_rules[0].custom.resource_value)
                if ("flow_id" in c_rules_dict):
                    flow_id = c_rules_dict["flow_id"]
                
                    reply = delete_lightpath(flow_id, src, dst, bitrate)


        # Normal service
        # Feed TaskScheduler with this service and the sub-services and sub-connections related to this service.
        # TaskScheduler identifies inter-dependencies among them and produces a schedule of tasks (an ordered list of
+2 −1
Original line number Diff line number Diff line
@@ -125,6 +125,7 @@ class TaskExecutor:
        opticalconfig = OpticalConfig()
        setting = settings.value if settings else ""
        new_config = {}

        try:
            result = self._context_client.SelectOpticalConfig(myid)
            new_config = json.loads(result.config)
+1 −1

File changed.

Contains only whitespace changes.