Loading .gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ MANIFEST # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest .manifest/ *.spec # Installer logs Loading proto/context.proto +49 −29 Original line number Diff line number Diff line Loading @@ -79,11 +79,17 @@ service ContextService { // ------------------------------ Experimental ----------------------------- rpc GetOpticalConfig (Empty ) returns (OpticalConfigList) {} rpc SetOpticalConfig (OpticalConfig ) returns (OpticalConfigId ) {} rpc UpdateOpticalConfig (OpticalConfig ) returns (OpticalConfigId ) {} rpc SelectOpticalConfig (OpticalConfigId ) returns (OpticalConfig ) {} rpc DeleteOpticalConfig (OpticalConfigId ) returns (Empty ) {} rpc DeleteOpticalChannel (OpticalConfig ) returns (Empty ) {} rpc SetOpticalLink (OpticalLink ) returns (Empty ) {} rpc GetOpticalLink (OpticalLinkId ) returns (OpticalLink ) {} rpc GetFiber (FiberId ) returns (Fiber ) {} rpc GetOpticalLink (LinkId ) returns (OpticalLink ) {} rpc DeleteOpticalLink (LinkId ) returns (Empty ) {} rpc GetOpticalLinkList (Empty ) returns (OpticalLinkList ) {} rpc DeleteServiceConfigRule(ServiceConfigRule) returns (Empty ) {} } // ----- Generic ------------------------------------------------------------------------------------------------------- Loading Loading @@ -148,6 +154,7 @@ message Topology { string name = 2; repeated DeviceId device_ids = 3; repeated LinkId link_ids = 4; repeated LinkId optical_link_ids = 5; } message TopologyDetails { Loading @@ -155,6 +162,7 @@ message TopologyDetails { string name = 2; repeated Device devices = 3; repeated Link links = 4; repeated OpticalLink optical_links = 5; } message TopologyIdList { Loading Loading @@ -653,45 +661,57 @@ message OpticalConfigId { message OpticalConfig { OpticalConfigId opticalconfig_id = 1; string config = 2; DeviceId device_id = 3; } message OpticalConfigList { repeated OpticalConfig opticalconfigs = 1; } message OpticalConfigEvent { Event event = 1; OpticalConfigId opticalconfig_id = 2; } // ---- Optical Link ---- message OpticalLinkId { Uuid optical_link_uuid = 1; message OpticalEndPointId { DeviceId device_id = 2; Uuid endpoint_uuid = 3; } message FiberId { Uuid fiber_uuid = 1; message OpticalLinkList { repeated OpticalLink optical_links = 1; } message Fiber { string ID = 10; string src_port = 1; string dst_port = 2; string local_peer_port = 3; string remote_peer_port = 4; repeated int32 c_slots = 5; repeated int32 l_slots = 6; repeated int32 s_slots = 7; float length = 8; bool used = 9; FiberId fiber_uuid = 11; } message OpticalLinkDetails { float length = 1; string source = 2; string target = 3; repeated Fiber fibers = 4; string src_port = 2; string dst_port = 3; string local_peer_port = 4; string remote_peer_port = 5 ; bool used = 6 ; map<string, int32> c_slots = 7; map<string, int32> l_slots = 8; map<string, int32> s_slots = 9; } message OpticalLink { string name = 1; OpticalLinkDetails details = 2; OpticalLinkId optical_link_uuid = 3; OpticalLinkDetails optical_details = 2; LinkId link_id = 3; repeated EndPointId link_endpoint_ids=4; } ////////////////// Config Rule Delete //////////// message ServiceConfigRule { ServiceId service_id =1; ConfigRule_Custom configrule_custom =2; } proto/openconfig_device.proto→proto/optical_device.proto +3 −1 Original line number Diff line number Diff line Loading @@ -13,11 +13,13 @@ // limitations under the License. syntax = "proto3"; package openconfig_device; package optical_device; import "context.proto"; service OpenConfigService { rpc AddOpenConfigDevice (context.OpticalConfig ) returns (context.OpticalConfigId) {} rpc ConfigureOpticalDevice(context.OpticalConfig ) returns (context.Empty ) {} rpc DisableOpticalDevice (context.OpticalConfig ) returns (context.Empty ) {} rpc GetDeviceConfiguration(context.OpticalConfigList) returns (context.Empty ) {} } scripts/run_tests_locally-device-gnmi-openconfig.sh 0 → 100755 +25 −0 Original line number Diff line number Diff line #!/bin/bash # Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. PROJECTDIR=`pwd` cd $PROJECTDIR/src RCFILE=$PROJECTDIR/coverage/.coveragerc # Run unitary tests and analyze coverage of code at same time # helpful pytest flags: --log-level=INFO -o log_cli=true --verbose --maxfail=1 --durations=0 coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ device/tests/gnmi_openconfig/test_unitary_gnmi_openconfig.py scripts/run_tests_locally-device-openconfig-arista-l2vpn.sh 0 → 100755 +25 −0 Original line number Diff line number Diff line #!/bin/bash # Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. PROJECTDIR=`pwd` cd $PROJECTDIR/src RCFILE=$PROJECTDIR/coverage/.coveragerc # Run unitary tests and analyze coverage of code at same time # helpful pytest flags: --log-level=INFO -o log_cli=true --verbose --maxfail=1 --durations=0 coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO -o log_cli=true --verbose \ device/tests/test_unitary_openconfig_arista_l2vpn.py Loading
.gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ MANIFEST # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest .manifest/ *.spec # Installer logs Loading
proto/context.proto +49 −29 Original line number Diff line number Diff line Loading @@ -79,11 +79,17 @@ service ContextService { // ------------------------------ Experimental ----------------------------- rpc GetOpticalConfig (Empty ) returns (OpticalConfigList) {} rpc SetOpticalConfig (OpticalConfig ) returns (OpticalConfigId ) {} rpc UpdateOpticalConfig (OpticalConfig ) returns (OpticalConfigId ) {} rpc SelectOpticalConfig (OpticalConfigId ) returns (OpticalConfig ) {} rpc DeleteOpticalConfig (OpticalConfigId ) returns (Empty ) {} rpc DeleteOpticalChannel (OpticalConfig ) returns (Empty ) {} rpc SetOpticalLink (OpticalLink ) returns (Empty ) {} rpc GetOpticalLink (OpticalLinkId ) returns (OpticalLink ) {} rpc GetFiber (FiberId ) returns (Fiber ) {} rpc GetOpticalLink (LinkId ) returns (OpticalLink ) {} rpc DeleteOpticalLink (LinkId ) returns (Empty ) {} rpc GetOpticalLinkList (Empty ) returns (OpticalLinkList ) {} rpc DeleteServiceConfigRule(ServiceConfigRule) returns (Empty ) {} } // ----- Generic ------------------------------------------------------------------------------------------------------- Loading Loading @@ -148,6 +154,7 @@ message Topology { string name = 2; repeated DeviceId device_ids = 3; repeated LinkId link_ids = 4; repeated LinkId optical_link_ids = 5; } message TopologyDetails { Loading @@ -155,6 +162,7 @@ message TopologyDetails { string name = 2; repeated Device devices = 3; repeated Link links = 4; repeated OpticalLink optical_links = 5; } message TopologyIdList { Loading Loading @@ -653,45 +661,57 @@ message OpticalConfigId { message OpticalConfig { OpticalConfigId opticalconfig_id = 1; string config = 2; DeviceId device_id = 3; } message OpticalConfigList { repeated OpticalConfig opticalconfigs = 1; } message OpticalConfigEvent { Event event = 1; OpticalConfigId opticalconfig_id = 2; } // ---- Optical Link ---- message OpticalLinkId { Uuid optical_link_uuid = 1; message OpticalEndPointId { DeviceId device_id = 2; Uuid endpoint_uuid = 3; } message FiberId { Uuid fiber_uuid = 1; message OpticalLinkList { repeated OpticalLink optical_links = 1; } message Fiber { string ID = 10; string src_port = 1; string dst_port = 2; string local_peer_port = 3; string remote_peer_port = 4; repeated int32 c_slots = 5; repeated int32 l_slots = 6; repeated int32 s_slots = 7; float length = 8; bool used = 9; FiberId fiber_uuid = 11; } message OpticalLinkDetails { float length = 1; string source = 2; string target = 3; repeated Fiber fibers = 4; string src_port = 2; string dst_port = 3; string local_peer_port = 4; string remote_peer_port = 5 ; bool used = 6 ; map<string, int32> c_slots = 7; map<string, int32> l_slots = 8; map<string, int32> s_slots = 9; } message OpticalLink { string name = 1; OpticalLinkDetails details = 2; OpticalLinkId optical_link_uuid = 3; OpticalLinkDetails optical_details = 2; LinkId link_id = 3; repeated EndPointId link_endpoint_ids=4; } ////////////////// Config Rule Delete //////////// message ServiceConfigRule { ServiceId service_id =1; ConfigRule_Custom configrule_custom =2; }
proto/openconfig_device.proto→proto/optical_device.proto +3 −1 Original line number Diff line number Diff line Loading @@ -13,11 +13,13 @@ // limitations under the License. syntax = "proto3"; package openconfig_device; package optical_device; import "context.proto"; service OpenConfigService { rpc AddOpenConfigDevice (context.OpticalConfig ) returns (context.OpticalConfigId) {} rpc ConfigureOpticalDevice(context.OpticalConfig ) returns (context.Empty ) {} rpc DisableOpticalDevice (context.OpticalConfig ) returns (context.Empty ) {} rpc GetDeviceConfiguration(context.OpticalConfigList) returns (context.Empty ) {} }
scripts/run_tests_locally-device-gnmi-openconfig.sh 0 → 100755 +25 −0 Original line number Diff line number Diff line #!/bin/bash # Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. PROJECTDIR=`pwd` cd $PROJECTDIR/src RCFILE=$PROJECTDIR/coverage/.coveragerc # Run unitary tests and analyze coverage of code at same time # helpful pytest flags: --log-level=INFO -o log_cli=true --verbose --maxfail=1 --durations=0 coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ device/tests/gnmi_openconfig/test_unitary_gnmi_openconfig.py
scripts/run_tests_locally-device-openconfig-arista-l2vpn.sh 0 → 100755 +25 −0 Original line number Diff line number Diff line #!/bin/bash # Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. PROJECTDIR=`pwd` cd $PROJECTDIR/src RCFILE=$PROJECTDIR/coverage/.coveragerc # Run unitary tests and analyze coverage of code at same time # helpful pytest flags: --log-level=INFO -o log_cli=true --verbose --maxfail=1 --durations=0 coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO -o log_cli=true --verbose \ device/tests/test_unitary_openconfig_arista_l2vpn.py