Skip to content
Snippets Groups Projects
Commit 91b6fbe1 authored by Andrea Sgambelluri's avatar Andrea Sgambelluri
Browse files

added terminal-device to enable the port and bug fix for connection delete

parent 016525ee
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!284Resolve: "(CNIT) Multi-Granular Optical Nodes and Optical Transpoders management"
...@@ -61,6 +61,13 @@ def create_optical_channel(resources): ...@@ -61,6 +61,13 @@ def create_optical_channel(resources):
with tag('config'): with tag('config'):
for resource in config: for resource in config:
with tag(resource['resource_key']):text(resource['value']) with tag(resource['resource_key']):text(resource['value'])
with tag('terminal-device', xmlns="http://openconfig.net/yang/terminal-device"):
with tag('logical-channels'):
with tag('channel'):
with tag('index'):text("{}".format(port_val))
with tag('config'):
with tag('index'):text("{}".format(port_val))
with tag('admin-state'):text("ENABLED")
result = indent( result = indent(
doc.getvalue(), doc.getvalue(),
indentation = ' '*2, indentation = ' '*2,
......
...@@ -113,7 +113,7 @@ class DelFLightpath(Resource): ...@@ -113,7 +113,7 @@ class DelFLightpath(Resource):
# rsa.optical_bands[rev_ob_id]["served_lightpaths"].remove(flow_id) # rsa.optical_bands[rev_ob_id]["served_lightpaths"].remove(flow_id)
if debug: if debug:
print(links_dict) print(rsa.links_dict)
return "flow {} deleted".format(flow_id), 200 return "flow {} deleted".format(flow_id), 200
else: else:
return "flow {} not matching".format(flow_id), 404 return "flow {} not matching".format(flow_id), 404
...@@ -147,7 +147,7 @@ class DelLightpath(Resource): ...@@ -147,7 +147,7 @@ class DelLightpath(Resource):
rsa.del_flow(flow) rsa.del_flow(flow)
rsa.db_flows[flow_id]["is_active"] = False rsa.db_flows[flow_id]["is_active"] = False
if debug: if debug:
print(links_dict) print(rsa.links_dict)
return "flow {} deleted".format(flow_id), 200 return "flow {} deleted".format(flow_id), 200
else: else:
return "flow {} not matching".format(flow_id), 404 return "flow {} not matching".format(flow_id), 404
......
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