Loading manifests/contextservice.yaml +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ spec: kind: Deployment name: contextservice minReplicas: 1 maxReplicas: 20 maxReplicas: 1 metrics: - type: Resource resource: Loading manifests/opticalcontrollerservice.yaml +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ spec: # command: ["/bin/grpc_health_probe", "-addr=:10060"] resources: requests: cpu: 500m cpu: 250m memory: 128Mi limits: cpu: 1000m Loading src/tapi/service/topology/routes.py +10 −5 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ import base64, json, logging , os #, re import requests from flask import jsonify, redirect, render_template, Blueprint, flash, session, url_for, request from flask import jsonify, redirect, render_template, Blueprint, flash, session, url_for, request , make_response from common.proto.context_pb2 import (ContextList, Empty, TopologyId, TopologyList, Topology) from common.proto.tapi_pb2 import (ChildTopology) Loading Loading @@ -89,14 +89,14 @@ def add_children () : host = child.get('host',None) port = child.get('port',None) url = ('{}/8008/tapi/topology/get_topology/{}/{}').format(host,context_uuid,topo_uuid) url = ('http://{}:8008/topology/get_topology/{}/{}').format(host,context_uuid,topo_uuid) response = requests.get(url) if response.status_code == 200 : logging.info(f"get_child_topo_details {response}") logging.info(f"get_child_topo_details {response.json}") child_topo.topology_id.topology_uuid.uuid = topo_uuid child_topo.host = host child_topo.port = port for dev in response.devices : for en in dev.device_endpoints: endpoints.append({ Loading @@ -107,6 +107,11 @@ def add_children () : }) child_topo.endpoints.extend(endpoints) logging.info(f'child_topo {child_topo}') else : err_respones = make_response(response.text, 400) return err_respones else : return 400 No newline at end of file Loading
manifests/contextservice.yaml +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ spec: kind: Deployment name: contextservice minReplicas: 1 maxReplicas: 20 maxReplicas: 1 metrics: - type: Resource resource: Loading
manifests/opticalcontrollerservice.yaml +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ spec: # command: ["/bin/grpc_health_probe", "-addr=:10060"] resources: requests: cpu: 500m cpu: 250m memory: 128Mi limits: cpu: 1000m Loading
src/tapi/service/topology/routes.py +10 −5 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ import base64, json, logging , os #, re import requests from flask import jsonify, redirect, render_template, Blueprint, flash, session, url_for, request from flask import jsonify, redirect, render_template, Blueprint, flash, session, url_for, request , make_response from common.proto.context_pb2 import (ContextList, Empty, TopologyId, TopologyList, Topology) from common.proto.tapi_pb2 import (ChildTopology) Loading Loading @@ -89,14 +89,14 @@ def add_children () : host = child.get('host',None) port = child.get('port',None) url = ('{}/8008/tapi/topology/get_topology/{}/{}').format(host,context_uuid,topo_uuid) url = ('http://{}:8008/topology/get_topology/{}/{}').format(host,context_uuid,topo_uuid) response = requests.get(url) if response.status_code == 200 : logging.info(f"get_child_topo_details {response}") logging.info(f"get_child_topo_details {response.json}") child_topo.topology_id.topology_uuid.uuid = topo_uuid child_topo.host = host child_topo.port = port for dev in response.devices : for en in dev.device_endpoints: endpoints.append({ Loading @@ -107,6 +107,11 @@ def add_children () : }) child_topo.endpoints.extend(endpoints) logging.info(f'child_topo {child_topo}') else : err_respones = make_response(response.text, 400) return err_respones else : return 400 No newline at end of file