Commit 766f1427 authored by Pablo Armingol's avatar Pablo Armingol
Browse files

NBI: update functions names

parent de842e77
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -591,7 +591,7 @@ class PolicyRule(_Resource):
    def get(self, policy_rule_uuid : str):
        return format_grpc_to_json(self.context_client.GetPolicyRule(grpc_policy_rule_id(policy_rule_uuid)))

class E2epathcomp(Resource):
class E2EOpticalPathComputation(Resource):
    def __init__(self):
        super().__init__()
        self.e2e_client = E2EOrchestratorClient()
@@ -636,7 +636,7 @@ class E2epathcomp(Resource):
            LOGGER.error(f"Error calling E2E Orchestrator: {str(e)}", exc_info=True)
            return {"status": "error", "message": str(e)}, 500

class RecomputeOpticalPath(Resource):
class E2EOpticalPathRecomputation(Resource):
    def __init__(self):
        super().__init__()
        self.e2e_client = E2EOrchestratorClient()
+4 −3
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ from .Resources import (
    Service, ServiceIds, Services, OpticalServiceAllocation,
    Slice, SliceIds, Slices,
    Topologies, Topology, TopologyDetails, TopologyIds,
    E2epathcomp, RecomputeOpticalPath
    E2EOpticalPathComputation, E2EOpticalPathRecomputation
)
 

@@ -37,8 +37,6 @@ URL_PREFIX = '/tfs-api'
# Use 'path' type since some identifiers might contain char '/' and Flask is unable to recognize them in 'string' type.
_RESOURCES = [
    # (endpoint_name, resource_class, resource_url)
    ('api.e2e_path_computation', E2epathcomp, '/e2e_path_computation'),
    ('api.recompute_optical_path', RecomputeOpticalPath, '/recompute_optical_path'),
    ('api.context_ids',      ContextIds,      '/context_ids'),
    ('api.contexts',         Contexts,        '/contexts'),
    ('api.dummy_contexts',   DummyContexts,   '/dummy_contexts'),
@@ -86,6 +84,9 @@ _RESOURCES = [
    ('api.policyrule_ids',   PolicyRuleIds,   '/policyrule_ids'),
    ('api.policyrules',      PolicyRules,     '/policyrules'),
    ('api.policyrule',       PolicyRule,      '/policyrule/<path:policyrule_uuid>'),

    ('api.e2e_optical_path_computation',   E2EOpticalPathComputation, '/e2e_optical_path_computation'),
    ('api.e2e_optical_path_recomputation', E2EOpticalPathRecomputation,'/e2e_optical_path_recomputation'),
]
RESOURCES = [
    (ENDPOINT_PREFIX + endpoint_name, resource_class, URL_PREFIX + resource_url)