Loading src/nbi/service/tfs_api/Resources.py +8 −0 Original line number Diff line number Diff line Loading @@ -337,6 +337,14 @@ class Link(_Resource): else: return format_grpc_to_json(self.context_client.RemoveLink(link_id)) class OpticalLinks(_Resource): def get(self): return format_grpc_to_json(self.context_client.GetOpticalLinkList(Empty())) class OpticalLink(_Resource): def get(self, link_uuid : str): return format_grpc_to_json(self.context_client.GetOpticalLink(grpc_link_id(link_uuid))) class ConnectionIds(_Resource): def get(self, context_uuid : str, service_uuid : str): return format_grpc_to_json(self.context_client.ListConnectionIds(grpc_service_id(context_uuid, service_uuid))) Loading src/nbi/service/tfs_api/__init__.py +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ from .Resources import ( Device, DeviceIds, Devices, DummyContexts, Link, LinkIds, Links, OpticalLink, OpticalLinks, PolicyRule, PolicyRuleIds, PolicyRules, Service, ServiceIds, Services, Slice, SliceIds, Slices, Loading Loading @@ -56,6 +57,8 @@ _RESOURCES = [ ('api.link_ids', LinkIds, '/link_ids'), ('api.links', Links, '/links'), ('api.link', Link, '/link/<path:link_uuid>'), ('api.optical_links', OpticalLinks, '/optical_links'), ('api.optical_link', OpticalLink, '/optical_link/<path:link_uuid>'), ('api.connection_ids', ConnectionIds, '/context/<path:context_uuid>/service/<path:service_uuid>/connection_ids'), ('api.connections', Connections, '/context/<path:context_uuid>/service/<path:service_uuid>/connections'), Loading Loading
src/nbi/service/tfs_api/Resources.py +8 −0 Original line number Diff line number Diff line Loading @@ -337,6 +337,14 @@ class Link(_Resource): else: return format_grpc_to_json(self.context_client.RemoveLink(link_id)) class OpticalLinks(_Resource): def get(self): return format_grpc_to_json(self.context_client.GetOpticalLinkList(Empty())) class OpticalLink(_Resource): def get(self, link_uuid : str): return format_grpc_to_json(self.context_client.GetOpticalLink(grpc_link_id(link_uuid))) class ConnectionIds(_Resource): def get(self, context_uuid : str, service_uuid : str): return format_grpc_to_json(self.context_client.ListConnectionIds(grpc_service_id(context_uuid, service_uuid))) Loading
src/nbi/service/tfs_api/__init__.py +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ from .Resources import ( Device, DeviceIds, Devices, DummyContexts, Link, LinkIds, Links, OpticalLink, OpticalLinks, PolicyRule, PolicyRuleIds, PolicyRules, Service, ServiceIds, Services, Slice, SliceIds, Slices, Loading Loading @@ -56,6 +57,8 @@ _RESOURCES = [ ('api.link_ids', LinkIds, '/link_ids'), ('api.links', Links, '/links'), ('api.link', Link, '/link/<path:link_uuid>'), ('api.optical_links', OpticalLinks, '/optical_links'), ('api.optical_link', OpticalLink, '/optical_link/<path:link_uuid>'), ('api.connection_ids', ConnectionIds, '/context/<path:context_uuid>/service/<path:service_uuid>/connection_ids'), ('api.connections', Connections, '/context/<path:context_uuid>/service/<path:service_uuid>/connections'), Loading