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
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -61,6 +61,13 @@ def create_optical_channel(resources):
                    with tag('config'):
                        for resource in config:
                            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(
        doc.getvalue(),
        indentation = ' '*2,
+2 −2
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ class DelFLightpath(Resource):
                    #    rsa.optical_bands[rev_ob_id]["served_lightpaths"].remove(flow_id)

                    if debug:
                        print(links_dict)
                        print(rsa.links_dict)
                    return "flow {} deleted".format(flow_id), 200
                else:
                    return "flow {} not matching".format(flow_id), 404
@@ -147,7 +147,7 @@ class DelLightpath(Resource):
                rsa.del_flow(flow)
                rsa.db_flows[flow_id]["is_active"] = False
                if debug:
                    print(links_dict)
                    print(rsa.links_dict)
                return "flow {} deleted".format(flow_id), 200
            else:
                return "flow {} not matching".format(flow_id), 404