Skip to content
Snippets Groups Projects
Commit abe59ebf authored by Pablo Armingol's avatar Pablo Armingol
Browse files

code cleanup

parent 4061762f
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!252Resolve "(TID) Add support to NBI to export the L3 inventory"
...@@ -323,7 +323,3 @@ class PolicyRules(_Resource): ...@@ -323,7 +323,3 @@ class PolicyRules(_Resource):
class PolicyRule(_Resource): class PolicyRule(_Resource):
def get(self, policy_rule_uuid : str): def get(self, policy_rule_uuid : str):
return format_grpc_to_json(self.context_client.GetPolicyRule(grpc_policy_rule_id(policy_rule_uuid))) return format_grpc_to_json(self.context_client.GetPolicyRule(grpc_policy_rule_id(policy_rule_uuid)))
class Networks(_Resource):
def get(self, context_uuid : str):
return format_grpc_to_json(self.context_client.ListTopologies(grpc_context_id(context_uuid)))
...@@ -22,8 +22,7 @@ from .Resources import ( ...@@ -22,8 +22,7 @@ from .Resources import (
PolicyRule, PolicyRuleIds, PolicyRules, PolicyRule, PolicyRuleIds, PolicyRules,
Service, ServiceIds, Services, Service, ServiceIds, Services,
Slice, SliceIds, Slices, Slice, SliceIds, Slices,
Topologies, Topology, TopologyIds, Topologies, Topology, TopologyIds
Networks
) )
URL_PREFIX = '/tfs-api' URL_PREFIX = '/tfs-api'
...@@ -63,8 +62,6 @@ RESOURCES = [ ...@@ -63,8 +62,6 @@ RESOURCES = [
('api.policyrule_ids', PolicyRuleIds, '/policyrule_ids'), ('api.policyrule_ids', PolicyRuleIds, '/policyrule_ids'),
('api.policyrules', PolicyRules, '/policyrules'), ('api.policyrules', PolicyRules, '/policyrules'),
('api.policyrule', PolicyRule, '/policyrule/<path:policyrule_uuid>'), ('api.policyrule', PolicyRule, '/policyrule/<path:policyrule_uuid>'),
('api.networksl3' , Networks, '/networks')
] ]
def register_tfs_api(rest_server : RestServer): def register_tfs_api(rest_server : RestServer):
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
<li><a class="nav-link" href="/tfs-api/dummy_contexts" id="dummy_contexts_link" target="dummy_contexts">Dummy Contexts</a></li> <li><a class="nav-link" href="/tfs-api/dummy_contexts" id="dummy_contexts_link" target="dummy_contexts">Dummy Contexts</a></li>
<li><a class="nav-link" href="/tfs-api/devices" id="devices_link" target="devices">Devices</a></li> <li><a class="nav-link" href="/tfs-api/devices" id="devices_link" target="devices">Devices</a></li>
<li><a class="nav-link" href="/tfs-api/links" id="links_link" target="links">Links</a></li> <li><a class="nav-link" href="/tfs-api/links" id="links_link" target="links">Links</a></li>
<li><a class="nav-link" href="/tfs-api/networks" id="networks_link" target="networks">Networks</a></li>
</ul> </ul>
{% endblock %} {% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment