diff --git a/web/gui2-topo-lib/BUILD.bazel b/web/gui2-topo-lib/BUILD.bazel index 82052f6b7d..d104636270 100644 --- a/web/gui2-topo-lib/BUILD.bazel +++ b/web/gui2-topo-lib/BUILD.bazel @@ -45,7 +45,6 @@ ts_library( # TODO re-enable this test exclude = [ "lib/layer/backgroundsvg/backgroundsvg.component.spec.ts", - "lib/layer/forcesvg/forcesvg.component.spec.ts", "lib/layer/forcesvg/visuals/hostnodesvg/hostnodesvg.component.spec.ts", ], ), @@ -147,6 +146,9 @@ genrule( && echo '});' >> $@""", ) +# These tests are not run as part of CI because they require a browser to be installed +# Run them locally on your system if you are making a change to any of the TypeScript files +# bazel test //web/gui2-topo-lib:test-not-coverage karma_web_test( name = "test-not-coverage", # coverage is to avoid being picked up by 'ot' alias srcs = [ @@ -156,7 +158,7 @@ karma_web_test( "@npm//:node_modules/zone.js/dist/zone-testing-bundle.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], - config_file = "//web/gui2/src/main/webapp:karma.conf.js", + config_file = "//web/gui2/src/main/webapp:karma.conf.js", # Edit this file to set the Browsers needed tags = ["native"], runtime_deps = [ "//web/gui2/src/main/webapp:initialize_testbed", diff --git a/web/gui2-topo-lib/lib/layer/forcesvg/forcesvg.component.spec.ts b/web/gui2-topo-lib/lib/layer/forcesvg/forcesvg.component.spec.ts index ba9c996ab9..5ebc0d66f1 100644 --- a/web/gui2-topo-lib/lib/layer/forcesvg/forcesvg.component.spec.ts +++ b/web/gui2-topo-lib/lib/layer/forcesvg/forcesvg.component.spec.ts @@ -35,6 +35,1799 @@ import {ChangeDetectorRef, SimpleChange} from '@angular/core'; import {TopologyService} from '../../topology.service'; import {BadgeSvgComponent} from './visuals/badgesvg/badgesvg.component'; +export const test_module_topo2CurrentRegion = `{ + "event": "topo2CurrentRegion", + "payload": { + "id": "(root)", + "subregions": [], + "links": [ + { + "id": "00:AA:00:00:00:03/None~of:0000000000000205/6", + "epA": "00:AA:00:00:00:03/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "6", + "rollup": [ + { + "id": "00:AA:00:00:00:03/None~of:0000000000000205/6", + "epA": "00:AA:00:00:00:03/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "6" + } + ] + }, + { + "id": "of:0000000000000205/3~of:0000000000000227/5", + "epA": "of:0000000000000205/3", + "epB": "of:0000000000000227/5", + "type": "UiDeviceLink", + "portA": "3", + "portB": "5", + "rollup": [ + { + "id": "of:0000000000000205/3~of:0000000000000227/5", + "epA": "of:0000000000000205/3", + "epB": "of:0000000000000227/5", + "type": "UiDeviceLink", + "portA": "3", + "portB": "5" + } + ] + }, + { + "id": "of:0000000000000206/2~of:0000000000000226/8", + "epA": "of:0000000000000206/2", + "epB": "of:0000000000000226/8", + "type": "UiDeviceLink", + "portA": "2", + "portB": "8", + "rollup": [ + { + "id": "of:0000000000000206/2~of:0000000000000226/8", + "epA": "of:0000000000000206/2", + "epB": "of:0000000000000226/8", + "type": "UiDeviceLink", + "portA": "2", + "portB": "8" + } + ] + }, + { + "id": "00:BB:00:00:00:05/None~of:0000000000000203/7", + "epA": "00:BB:00:00:00:05/None", + "epB": "of:0000000000000203", + "type": "UiEdgeLink", + "portB": "7", + "rollup": [ + { + "id": "00:BB:00:00:00:05/None~of:0000000000000203/7", + "epA": "00:BB:00:00:00:05/None", + "epB": "of:0000000000000203", + "type": "UiEdgeLink", + "portB": "7" + } + ] + }, + { + "id": "00:DD:00:00:00:01/None~of:0000000000000207/3", + "epA": "00:DD:00:00:00:01/None", + "epB": "of:0000000000000207", + "type": "UiEdgeLink", + "portB": "3", + "rollup": [ + { + "id": "00:DD:00:00:00:01/None~of:0000000000000207/3", + "epA": "00:DD:00:00:00:01/None", + "epB": "of:0000000000000207", + "type": "UiEdgeLink", + "portB": "3" + } + ] + }, + { + "id": "of:0000000000000203/1~of:0000000000000226/1", + "epA": "of:0000000000000203/1", + "epB": "of:0000000000000226/1", + "type": "UiDeviceLink", + "portA": "1", + "portB": "1", + "rollup": [ + { + "id": "of:0000000000000203/1~of:0000000000000226/1", + "epA": "of:0000000000000203/1", + "epB": "of:0000000000000226/1", + "type": "UiDeviceLink", + "portA": "1", + "portB": "1" + } + ] + }, + { + "id": "of:0000000000000207/2~of:0000000000000247/1", + "epA": "of:0000000000000207/2", + "epB": "of:0000000000000247/1", + "type": "UiDeviceLink", + "portA": "2", + "portB": "1", + "rollup": [ + { + "id": "of:0000000000000207/2~of:0000000000000247/1", + "epA": "of:0000000000000207/2", + "epB": "of:0000000000000247/1", + "type": "UiDeviceLink", + "portA": "2", + "portB": "1" + } + ] + }, + { + "id": "00:99:66:00:00:01/None~of:0000000000000205/10", + "epA": "00:99:66:00:00:01/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "10", + "rollup": [ + { + "id": "00:99:66:00:00:01/None~of:0000000000000205/10", + "epA": "00:99:66:00:00:01/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "10" + } + ] + }, + { + "id": "of:0000000000000208/1~of:0000000000000246/2", + "epA": "of:0000000000000208/1", + "epB": "of:0000000000000246/2", + "type": "UiDeviceLink", + "portA": "1", + "portB": "2", + "rollup": [ + { + "id": "of:0000000000000208/1~of:0000000000000246/2", + "epA": "of:0000000000000208/1", + "epB": "of:0000000000000246/2", + "type": "UiDeviceLink", + "portA": "1", + "portB": "2" + } + ] + }, + { + "id": "of:0000000000000206/1~of:0000000000000226/7", + "epA": "of:0000000000000206/1", + "epB": "of:0000000000000226/7", + "type": "UiDeviceLink", + "portA": "1", + "portB": "7", + "rollup": [ + { + "id": "of:0000000000000206/1~of:0000000000000226/7", + "epA": "of:0000000000000206/1", + "epB": "of:0000000000000226/7", + "type": "UiDeviceLink", + "portA": "1", + "portB": "7" + } + ] + }, + { + "id": "of:0000000000000226/9~of:0000000000000246/3", + "epA": "of:0000000000000226/9", + "epB": "of:0000000000000246/3", + "type": "UiDeviceLink", + "portA": "9", + "portB": "3", + "rollup": [ + { + "id": "of:0000000000000226/9~of:0000000000000246/3", + "epA": "of:0000000000000226/9", + "epB": "of:0000000000000246/3", + "type": "UiDeviceLink", + "portA": "9", + "portB": "3" + } + ] + }, + { + "id": "00:AA:00:00:00:04/None~of:0000000000000205/7", + "epA": "00:AA:00:00:00:04/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "7", + "rollup": [ + { + "id": "00:AA:00:00:00:04/None~of:0000000000000205/7", + "epA": "00:AA:00:00:00:04/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "7" + } + ] + }, + { + "id": "00:88:00:00:00:03/110~of:0000000000000205/11", + "epA": "00:88:00:00:00:03/110", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "11", + "rollup": [ + { + "id": "00:88:00:00:00:03/110~of:0000000000000205/11", + "epA": "00:88:00:00:00:03/110", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "11" + } + ] + }, + { + "id": "of:0000000000000204/1~of:0000000000000226/3", + "epA": "of:0000000000000204/1", + "epB": "of:0000000000000226/3", + "type": "UiDeviceLink", + "portA": "1", + "portB": "3", + "rollup": [ + { + "id": "of:0000000000000204/1~of:0000000000000226/3", + "epA": "of:0000000000000204/1", + "epB": "of:0000000000000226/3", + "type": "UiDeviceLink", + "portA": "1", + "portB": "3" + } + ] + }, + { + "id": "of:0000000000000203/2~of:0000000000000226/2", + "epA": "of:0000000000000203/2", + "epB": "of:0000000000000226/2", + "type": "UiDeviceLink", + "portA": "2", + "portB": "2", + "rollup": [ + { + "id": "of:0000000000000203/2~of:0000000000000226/2", + "epA": "of:0000000000000203/2", + "epB": "of:0000000000000226/2", + "type": "UiDeviceLink", + "portA": "2", + "portB": "2" + } + ] + }, + { + "id": "00:88:00:00:00:01/None~of:0000000000000205/12", + "epA": "00:88:00:00:00:01/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "12", + "rollup": [ + { + "id": "00:88:00:00:00:01/None~of:0000000000000205/12", + "epA": "00:88:00:00:00:01/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "12" + } + ] + }, + { + "id": "00:88:00:00:00:04/160~of:0000000000000206/6", + "epA": "00:88:00:00:00:04/160", + "epB": "of:0000000000000206", + "type": "UiEdgeLink", + "portB": "6", + "rollup": [ + { + "id": "00:88:00:00:00:04/160~of:0000000000000206/6", + "epA": "00:88:00:00:00:04/160", + "epB": "of:0000000000000206", + "type": "UiEdgeLink", + "portB": "6" + } + ] + }, + { + "id": "00:DD:00:00:00:02/None~of:0000000000000208/3", + "epA": "00:DD:00:00:00:02/None", + "epB": "of:0000000000000208", + "type": "UiEdgeLink", + "portB": "3", + "rollup": [ + { + "id": "00:DD:00:00:00:02/None~of:0000000000000208/3", + "epA": "00:DD:00:00:00:02/None", + "epB": "of:0000000000000208", + "type": "UiEdgeLink", + "portB": "3" + } + ] + }, + { + "id": "of:0000000000000203/3~of:0000000000000227/1", + "epA": "of:0000000000000203/3", + "epB": "of:0000000000000227/1", + "type": "UiDeviceLink", + "portA": "3", + "portB": "1", + "rollup": [ + { + "id": "of:0000000000000203/3~of:0000000000000227/1", + "epA": "of:0000000000000203/3", + "epB": "of:0000000000000227/1", + "type": "UiDeviceLink", + "portA": "3", + "portB": "1" + } + ] + }, + { + "id": "of:0000000000000208/2~of:0000000000000247/2", + "epA": "of:0000000000000208/2", + "epB": "of:0000000000000247/2", + "type": "UiDeviceLink", + "portA": "2", + "portB": "2", + "rollup": [ + { + "id": "of:0000000000000208/2~of:0000000000000247/2", + "epA": "of:0000000000000208/2", + "epB": "of:0000000000000247/2", + "type": "UiDeviceLink", + "portA": "2", + "portB": "2" + } + ] + }, + { + "id": "of:0000000000000205/1~of:0000000000000226/5", + "epA": "of:0000000000000205/1", + "epB": "of:0000000000000226/5", + "type": "UiDeviceLink", + "portA": "1", + "portB": "5", + "rollup": [ + { + "id": "of:0000000000000205/1~of:0000000000000226/5", + "epA": "of:0000000000000205/1", + "epB": "of:0000000000000226/5", + "type": "UiDeviceLink", + "portA": "1", + "portB": "5" + } + ] + }, + { + "id": "of:0000000000000204/2~of:0000000000000226/4", + "epA": "of:0000000000000204/2", + "epB": "of:0000000000000226/4", + "type": "UiDeviceLink", + "portA": "2", + "portB": "4", + "rollup": [ + { + "id": "of:0000000000000204/2~of:0000000000000226/4", + "epA": "of:0000000000000204/2", + "epB": "of:0000000000000226/4", + "type": "UiDeviceLink", + "portA": "2", + "portB": "4" + } + ] + }, + { + "id": "00:AA:00:00:00:01/None~of:0000000000000204/6", + "epA": "00:AA:00:00:00:01/None", + "epB": "of:0000000000000204", + "type": "UiEdgeLink", + "portB": "6", + "rollup": [ + { + "id": "00:AA:00:00:00:01/None~of:0000000000000204/6", + "epA": "00:AA:00:00:00:01/None", + "epB": "of:0000000000000204", + "type": "UiEdgeLink", + "portB": "6" + } + ] + }, + { + "id": "00:BB:00:00:00:03/None~of:0000000000000205/8", + "epA": "00:BB:00:00:00:03/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "8", + "rollup": [ + { + "id": "00:BB:00:00:00:03/None~of:0000000000000205/8", + "epA": "00:BB:00:00:00:03/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "8" + } + ] + }, + { + "id": "of:0000000000000206/4~of:0000000000000227/8", + "epA": "of:0000000000000206/4", + "epB": "of:0000000000000227/8", + "type": "UiDeviceLink", + "portA": "4", + "portB": "8", + "rollup": [ + { + "id": "of:0000000000000206/4~of:0000000000000227/8", + "epA": "of:0000000000000206/4", + "epB": "of:0000000000000227/8", + "type": "UiDeviceLink", + "portA": "4", + "portB": "8" + } + ] + }, + { + "id": "00:AA:00:00:00:05/None~of:0000000000000203/6", + "epA": "00:AA:00:00:00:05/None", + "epB": "of:0000000000000203", + "type": "UiEdgeLink", + "portB": "6", + "rollup": [ + { + "id": "00:AA:00:00:00:05/None~of:0000000000000203/6", + "epA": "00:AA:00:00:00:05/None", + "epB": "of:0000000000000203", + "type": "UiEdgeLink", + "portB": "6" + } + ] + }, + { + "id": "of:0000000000000205/5~of:0000000000000206/5", + "epA": "of:0000000000000205/5", + "epB": "of:0000000000000206/5", + "type": "UiDeviceLink", + "portA": "5", + "portB": "5", + "rollup": [ + { + "id": "of:0000000000000205/5~of:0000000000000206/5", + "epA": "of:0000000000000205/5", + "epB": "of:0000000000000206/5", + "type": "UiDeviceLink", + "portA": "5", + "portB": "5" + } + ] + }, + { + "id": "00:BB:00:00:00:02/None~of:0000000000000204/9", + "epA": "00:BB:00:00:00:02/None", + "epB": "of:0000000000000204", + "type": "UiEdgeLink", + "portB": "9", + "rollup": [ + { + "id": "00:BB:00:00:00:02/None~of:0000000000000204/9", + "epA": "00:BB:00:00:00:02/None", + "epB": "of:0000000000000204", + "type": "UiEdgeLink", + "portB": "9" + } + ] + }, + { + "id": "of:0000000000000204/3~of:0000000000000227/3", + "epA": "of:0000000000000204/3", + "epB": "of:0000000000000227/3", + "type": "UiDeviceLink", + "portA": "3", + "portB": "3", + "rollup": [ + { + "id": "of:0000000000000204/3~of:0000000000000227/3", + "epA": "of:0000000000000204/3", + "epB": "of:0000000000000227/3", + "type": "UiDeviceLink", + "portA": "3", + "portB": "3" + } + ] + }, + { + "id": "00:EE:00:00:00:01/None~of:0000000000000207/4", + "epA": "00:EE:00:00:00:01/None", + "epB": "of:0000000000000207", + "type": "UiEdgeLink", + "portB": "4", + "rollup": [ + { + "id": "00:EE:00:00:00:01/None~of:0000000000000207/4", + "epA": "00:EE:00:00:00:01/None", + "epB": "of:0000000000000207", + "type": "UiEdgeLink", + "portB": "4" + } + ] + }, + { + "id": "of:0000000000000203/4~of:0000000000000227/2", + "epA": "of:0000000000000203/4", + "epB": "of:0000000000000227/2", + "type": "UiDeviceLink", + "portA": "4", + "portB": "2", + "rollup": [ + { + "id": "of:0000000000000203/4~of:0000000000000227/2", + "epA": "of:0000000000000203/4", + "epB": "of:0000000000000227/2", + "type": "UiDeviceLink", + "portA": "4", + "portB": "2" + } + ] + }, + { + "id": "of:0000000000000205/2~of:0000000000000226/6", + "epA": "of:0000000000000205/2", + "epB": "of:0000000000000226/6", + "type": "UiDeviceLink", + "portA": "2", + "portB": "6", + "rollup": [ + { + "id": "of:0000000000000205/2~of:0000000000000226/6", + "epA": "of:0000000000000205/2", + "epB": "of:0000000000000226/6", + "type": "UiDeviceLink", + "portA": "2", + "portB": "6" + } + ] + }, + { + "id": "00:99:00:00:00:01/None~of:0000000000000205/10", + "epA": "00:99:00:00:00:01/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "10", + "rollup": [ + { + "id": "00:99:00:00:00:01/None~of:0000000000000205/10", + "epA": "00:99:00:00:00:01/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "10" + } + ] + }, + { + "id": "of:0000000000000205/4~of:0000000000000227/6", + "epA": "of:0000000000000205/4", + "epB": "of:0000000000000227/6", + "type": "UiDeviceLink", + "portA": "4", + "portB": "6", + "rollup": [ + { + "id": "of:0000000000000205/4~of:0000000000000227/6", + "epA": "of:0000000000000205/4", + "epB": "of:0000000000000227/6", + "type": "UiDeviceLink", + "portA": "4", + "portB": "6" + } + ] + }, + { + "id": "of:0000000000000206/3~of:0000000000000227/7", + "epA": "of:0000000000000206/3", + "epB": "of:0000000000000227/7", + "type": "UiDeviceLink", + "portA": "3", + "portB": "7", + "rollup": [ + { + "id": "of:0000000000000206/3~of:0000000000000227/7", + "epA": "of:0000000000000206/3", + "epB": "of:0000000000000227/7", + "type": "UiDeviceLink", + "portA": "3", + "portB": "7" + } + ] + }, + { + "id": "00:BB:00:00:00:04/None~of:0000000000000205/9", + "epA": "00:BB:00:00:00:04/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "9", + "rollup": [ + { + "id": "00:BB:00:00:00:04/None~of:0000000000000205/9", + "epA": "00:BB:00:00:00:04/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "9" + } + ] + }, + { + "id": "00:AA:00:00:00:02/None~of:0000000000000204/7", + "epA": "00:AA:00:00:00:02/None", + "epB": "of:0000000000000204", + "type": "UiEdgeLink", + "portB": "7", + "rollup": [ + { + "id": "00:AA:00:00:00:02/None~of:0000000000000204/7", + "epA": "00:AA:00:00:00:02/None", + "epB": "of:0000000000000204", + "type": "UiEdgeLink", + "portB": "7" + } + ] + }, + { + "id": "00:BB:00:00:00:01/None~of:0000000000000204/8", + "epA": "00:BB:00:00:00:01/None", + "epB": "of:0000000000000204", + "type": "UiEdgeLink", + "portB": "8", + "rollup": [ + { + "id": "00:BB:00:00:00:01/None~of:0000000000000204/8", + "epA": "00:BB:00:00:00:01/None", + "epB": "of:0000000000000204", + "type": "UiEdgeLink", + "portB": "8" + } + ] + }, + { + "id": "of:0000000000000207/1~of:0000000000000246/1", + "epA": "of:0000000000000207/1", + "epB": "of:0000000000000246/1", + "type": "UiDeviceLink", + "portA": "1", + "portB": "1", + "rollup": [ + { + "id": "of:0000000000000207/1~of:0000000000000246/1", + "epA": "of:0000000000000207/1", + "epB": "of:0000000000000246/1", + "type": "UiDeviceLink", + "portA": "1", + "portB": "1" + } + ] + }, + { + "id": "00:88:00:00:00:02/None~of:0000000000000206/7", + "epA": "00:88:00:00:00:02/None", + "epB": "of:0000000000000206", + "type": "UiEdgeLink", + "portB": "7", + "rollup": [ + { + "id": "00:88:00:00:00:02/None~of:0000000000000206/7", + "epA": "00:88:00:00:00:02/None", + "epB": "of:0000000000000206", + "type": "UiEdgeLink", + "portB": "7" + } + ] + }, + { + "id": "00:EE:00:00:00:02/None~of:0000000000000208/4", + "epA": "00:EE:00:00:00:02/None", + "epB": "of:0000000000000208", + "type": "UiEdgeLink", + "portB": "4", + "rollup": [ + { + "id": "00:EE:00:00:00:02/None~of:0000000000000208/4", + "epA": "00:EE:00:00:00:02/None", + "epB": "of:0000000000000208", + "type": "UiEdgeLink", + "portB": "4" + } + ] + }, + { + "id": "of:0000000000000204/4~of:0000000000000227/4", + "epA": "of:0000000000000204/4", + "epB": "of:0000000000000227/4", + "type": "UiDeviceLink", + "portA": "4", + "portB": "4", + "rollup": [ + { + "id": "of:0000000000000204/4~of:0000000000000227/4", + "epA": "of:0000000000000204/4", + "epB": "of:0000000000000227/4", + "type": "UiDeviceLink", + "portA": "4", + "portB": "4" + } + ] + }, + { + "id": "of:0000000000000203/5~of:0000000000000204/5", + "epA": "of:0000000000000203/5", + "epB": "of:0000000000000204/5", + "type": "UiDeviceLink", + "portA": "5", + "portB": "5", + "rollup": [ + { + "id": "of:0000000000000203/5~of:0000000000000204/5", + "epA": "of:0000000000000203/5", + "epB": "of:0000000000000204/5", + "type": "UiDeviceLink", + "portA": "5", + "portB": "5" + } + ] + }, + { + "id": "of:0000000000000227/9~of:0000000000000247/3", + "epA": "of:0000000000000227/9", + "epB": "of:0000000000000247/3", + "type": "UiDeviceLink", + "portA": "9", + "portB": "3", + "rollup": [ + { + "id": "of:0000000000000227/9~of:0000000000000247/3", + "epA": "of:0000000000000227/9", + "epB": "of:0000000000000247/3", + "type": "UiDeviceLink", + "portA": "9", + "portB": "3" + } + ] + } + ], + "devices": [ + [], + [], + [ + { + "id": "of:0000000000000246", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "40.15", + "name": "s246", + "locType": "geo", + "channelId": "10.192.19.69:59980", + "longitude": "-121.679" + }, + "location": { + "locType": "geo", + "latOrY": 40.15, + "longOrX": -121.679 + } + }, + { + "id": "of:0000000000000206", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "36.766", + "name": "s206", + "locType": "geo", + "channelId": "10.192.19.69:59975", + "longitude": "-92.029" + }, + "location": { + "locType": "geo", + "latOrY": 36.766, + "longOrX": -92.029 + } + }, + { + "id": "of:0000000000000227", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "44.205", + "name": "s227", + "locType": "geo", + "channelId": "10.192.19.69:59979", + "longitude": "-96.359" + }, + "location": { + "locType": "geo", + "latOrY": 44.205, + "longOrX": -96.359 + } + }, + { + "id": "of:0000000000000208", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "36.766", + "name": "s208", + "locType": "geo", + "channelId": "10.192.19.69:59977", + "longitude": "-116.029" + }, + "location": { + "locType": "geo", + "latOrY": 36.766, + "longOrX": -116.029 + } + }, + { + "id": "of:0000000000000205", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "36.766", + "name": "s205", + "locType": "geo", + "channelId": "10.192.19.69:59974", + "longitude": "-96.89" + }, + "location": { + "locType": "geo", + "latOrY": 36.766, + "longOrX": -96.89 + } + }, + { + "id": "of:0000000000000247", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "40.205", + "name": "s247", + "locType": "geo", + "channelId": "10.192.19.69:59981", + "longitude": "-117.359" + }, + "location": { + "locType": "geo", + "latOrY": 40.205, + "longOrX": -117.359 + } + }, + { + "id": "of:0000000000000226", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "44.15", + "name": "s226", + "locType": "geo", + "channelId": "10.192.19.69:59978", + "longitude": "-107.679" + }, + "location": { + "locType": "geo", + "latOrY": 44.15, + "longOrX": -107.679 + } + }, + { + "id": "of:0000000000000203", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "36.766", + "name": "s203", + "locType": "geo", + "channelId": "10.192.19.69:59972", + "longitude": "-111.359" + }, + "location": { + "locType": "geo", + "latOrY": 36.766, + "longOrX": -111.359 + } + }, + { + "id": "of:0000000000000204", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "36.766", + "name": "s204", + "locType": "geo", + "channelId": "10.192.19.69:59973", + "longitude": "-106.359" + }, + "location": { + "locType": "geo", + "latOrY": 36.766, + "longOrX": -106.359 + } + }, + { + "id": "of:0000000000000207", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "36.766", + "name": "s207", + "locType": "geo", + "channelId": "10.192.19.69:59976", + "longitude": "-122.359" + }, + "location": { + "locType": "geo", + "latOrY": 36.766, + "longOrX": -122.359 + } + } + ] + ], + "hosts": [ + [], + [], + [ + { + "id": "00:88:00:00:00:03/110", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::288:ff:fe00:3", + "2000::102", + "10.0.1.2" + ], + "props": {}, + "configured": false + }, + { + "id": "00:DD:00:00:00:01/None", + "nodeType": "host", + "layer": "def", + "ips": [], + "props": {}, + "configured": false + }, + { + "id": "00:88:00:00:00:04/160", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::288:ff:fe00:4", + "10.0.6.2", + "2000::602" + ], + "props": {}, + "configured": false + }, + { + "id": "00:BB:00:00:00:02/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::2bb:ff:fe00:2" + ], + "props": {}, + "configured": false + }, + { + "id": "00:AA:00:00:00:05/None", + "nodeType": "host", + "layer": "def", + "ips": [], + "props": {}, + "configured": false + }, + { + "id": "00:88:00:00:00:01/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::288:ff:fe00:1", + "2000::101", + "10.0.1.1" + ], + "props": {}, + "configured": false + }, + { + "id": "00:AA:00:00:00:01/None", + "nodeType": "host", + "layer": "def", + "ips": [], + "props": {}, + "configured": false + }, + { + "id": "00:AA:00:00:00:03/None", + "nodeType": "host", + "layer": "def", + "ips": [], + "props": {}, + "configured": false + }, + { + "id": "00:BB:00:00:00:04/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::2bb:ff:fe00:4" + ], + "props": {}, + "configured": false + }, + { + "id": "00:EE:00:00:00:02/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::2ee:ff:fe00:2" + ], + "props": {}, + "configured": false + }, + { + "id": "00:99:00:00:00:01/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "10.0.3.253", + "fe80::299:ff:fe00:1" + ], + "props": {}, + "configured": false + }, + { + "id": "00:99:66:00:00:01/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::299:66ff:fe00:1", + "2000::3fd" + ], + "props": {}, + "configured": false + }, + { + "id": "00:EE:00:00:00:01/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::2ee:ff:fe00:1" + ], + "props": {}, + "configured": false + }, + { + "id": "00:BB:00:00:00:01/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::2bb:ff:fe00:1" + ], + "props": {}, + "configured": false + }, + { + "id": "00:BB:00:00:00:03/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::2bb:ff:fe00:3" + ], + "props": {}, + "configured": false + }, + { + "id": "00:AA:00:00:00:04/None", + "nodeType": "host", + "layer": "def", + "ips": [], + "props": {}, + "configured": false + }, + { + "id": "00:BB:00:00:00:05/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::2bb:ff:fe00:5" + ], + "props": {}, + "configured": false + }, + { + "id": "00:88:00:00:00:02/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::288:ff:fe00:2", + "2000::601", + "10.0.6.1" + ], + "props": {}, + "configured": false + }, + { + "id": "00:AA:00:00:00:02/None", + "nodeType": "host", + "layer": "def", + "ips": [], + "props": {}, + "configured": false + }, + { + "id": "00:DD:00:00:00:02/None", + "nodeType": "host", + "layer": "def", + "ips": [], + "props": {}, + "configured": false + } + ] + ], + "layerOrder": [ + "opt", + "pkt", + "def" + ] + } +}`; + +const test_OdtnConfig_topo2CurrentRegion = `{ + "event": "topo2CurrentRegion", + "payload": { + "id": "(root)", + "subregions": [], + "links": [ + { + "id": "netconf:127.0.0.1:11002/201~netconf:127.0.0.1:11003/201", + "epA": "netconf:127.0.0.1:11002/201", + "epB": "netconf:127.0.0.1:11003/201", + "type": "UiDeviceLink", + "portA": "201", + "portB": "201", + "rollup": [ + { + "id": "netconf:127.0.0.1:11002/201~netconf:127.0.0.1:11003/201", + "epA": "netconf:127.0.0.1:11002/201", + "epB": "netconf:127.0.0.1:11003/201", + "type": "UiDeviceLink", + "portA": "201", + "portB": "201" + } + ] + }, + { + "id": "netconf:127.0.0.1:11002/202~netconf:127.0.0.1:11003/202", + "epA": "netconf:127.0.0.1:11002/202", + "epB": "netconf:127.0.0.1:11003/202", + "type": "UiDeviceLink", + "portA": "202", + "portB": "202", + "rollup": [ + { + "id": "netconf:127.0.0.1:11002/202~netconf:127.0.0.1:11003/202", + "epA": "netconf:127.0.0.1:11002/202", + "epB": "netconf:127.0.0.1:11003/202", + "type": "UiDeviceLink", + "portA": "202", + "portB": "202" + } + ] + }, + { + "id": "netconf:127.0.0.1:11002/203~netconf:127.0.0.1:11003/203", + "epA": "netconf:127.0.0.1:11002/203", + "epB": "netconf:127.0.0.1:11003/203", + "type": "UiDeviceLink", + "portA": "203", + "portB": "203", + "rollup": [ + { + "id": "netconf:127.0.0.1:11002/203~netconf:127.0.0.1:11003/203", + "epA": "netconf:127.0.0.1:11002/203", + "epB": "netconf:127.0.0.1:11003/203", + "type": "UiDeviceLink", + "portA": "203", + "portB": "203" + } + ] + }, + { + "id": "netconf:127.0.0.1:11002/204~netconf:127.0.0.1:11003/204", + "epA": "netconf:127.0.0.1:11002/204", + "epB": "netconf:127.0.0.1:11003/204", + "type": "UiDeviceLink", + "portA": "204", + "portB": "204", + "rollup": [ + { + "id": "netconf:127.0.0.1:11002/204~netconf:127.0.0.1:11003/204", + "epA": "netconf:127.0.0.1:11002/204", + "epB": "netconf:127.0.0.1:11003/204", + "type": "UiDeviceLink", + "portA": "204", + "portB": "204" + } + ] + }, + { + "id": "netconf:127.0.0.1:11002/205~netconf:127.0.0.1:11003/205", + "epA": "netconf:127.0.0.1:11002/205", + "epB": "netconf:127.0.0.1:11003/205", + "type": "UiDeviceLink", + "portA": "205", + "portB": "205", + "rollup": [ + { + "id": "netconf:127.0.0.1:11002/205~netconf:127.0.0.1:11003/205", + "epA": "netconf:127.0.0.1:11002/205", + "epB": "netconf:127.0.0.1:11003/205", + "type": "UiDeviceLink", + "portA": "205", + "portB": "205" + } + ] + }, + { + "id": "netconf:127.0.0.1:11002/206~netconf:127.0.0.1:11003/206", + "epA": "netconf:127.0.0.1:11002/206", + "epB": "netconf:127.0.0.1:11003/206", + "type": "UiDeviceLink", + "portA": "206", + "portB": "206", + "rollup": [ + { + "id": "netconf:127.0.0.1:11002/206~netconf:127.0.0.1:11003/206", + "epA": "netconf:127.0.0.1:11002/206", + "epB": "netconf:127.0.0.1:11003/206", + "type": "UiDeviceLink", + "portA": "206", + "portB": "206" + } + ] + } + ], + "devices": [ + [], + [], + [ + { + "id": "netconf:127.0.0.1:11002", + "nodeType": "device", + "type": "terminal_device", + "online": true, + "master": "127.0.0.1", + "layer": "def", + "props": { + "ipaddress": "127.0.0.1", + "protocol": "NETCONF", + "driver": "cassini-ocnos", + "port": "11002", + "name": "cassini2", + "locType": "none" + } + }, + { + "id": "netconf:127.0.0.1:11003", + "nodeType": "device", + "type": "terminal_device", + "online": true, + "master": "127.0.0.1", + "layer": "def", + "props": { + "ipaddress": "127.0.0.1", + "protocol": "NETCONF", + "driver": "cassini-ocnos", + "port": "11003", + "name": "cassini1", + "locType": "none" + } + } + ] + ], + "hosts": [ + [], + [], + [] + ], + "layerOrder": [ + "opt", + "pkt", + "def" + ] + } +}`; + +const topo2Highlights_base_data = `{ + "event": "topo2CurrentRegion", + "payload": { + "id": "(root)", + "subregions": [], + "links": [ + { + "id": "device:leaf1/1~device:spine1/1", + "epA": "device:leaf1/1", + "epB": "device:spine1/1", + "type": "UiDeviceLink", + "portA": "1", + "portB": "1", + "rollup": [ + { + "id": "device:leaf1/1~device:spine1/1", + "epA": "device:leaf1/1", + "epB": "device:spine1/1", + "type": "UiDeviceLink", + "portA": "1", + "portB": "1" + } + ] + }, + { + "id": "device:leaf2/2~device:spine2/2", + "epA": "device:leaf2/2", + "epB": "device:spine2/2", + "type": "UiDeviceLink", + "portA": "2", + "portB": "2", + "rollup": [ + { + "id": "device:leaf2/2~device:spine2/2", + "epA": "device:leaf2/2", + "epB": "device:spine2/2", + "type": "UiDeviceLink", + "portA": "2", + "portB": "2" + } + ] + }, + { + "id": "00:00:00:00:00:1A/None~device:leaf1/3", + "epA": "00:00:00:00:00:1A/None", + "epB": "device:leaf1", + "type": "UiEdgeLink", + "portB": "3", + "rollup": [ + { + "id": "00:00:00:00:00:1A/None~device:leaf1/3", + "epA": "00:00:00:00:00:1A/None", + "epB": "device:leaf1", + "type": "UiEdgeLink", + "portB": "3" + } + ] + }, + { + "id": "00:00:00:00:00:30/None~device:leaf2/3", + "epA": "00:00:00:00:00:30/None", + "epB": "device:leaf2", + "type": "UiEdgeLink", + "portB": "3", + "rollup": [ + { + "id": "00:00:00:00:00:30/None~device:leaf2/3", + "epA": "00:00:00:00:00:30/None", + "epB": "device:leaf2", + "type": "UiEdgeLink", + "portB": "3" + } + ] + }, + { + "id": "device:leaf1/2~device:spine2/1", + "epA": "device:leaf1/2", + "epB": "device:spine2/1", + "type": "UiDeviceLink", + "portA": "2", + "portB": "1", + "rollup": [ + { + "id": "device:leaf1/2~device:spine2/1", + "epA": "device:leaf1/2", + "epB": "device:spine2/1", + "type": "UiDeviceLink", + "portA": "2", + "portB": "1" + } + ] + }, + { + "id": "device:leaf2/1~device:spine1/2", + "epA": "device:leaf2/1", + "epB": "device:spine1/2", + "type": "UiDeviceLink", + "portA": "1", + "portB": "2", + "rollup": [ + { + "id": "device:leaf2/1~device:spine1/2", + "epA": "device:leaf2/1", + "epB": "device:spine1/2", + "type": "UiDeviceLink", + "portA": "1", + "portB": "2" + } + ] + }, + { + "id": "00:00:00:00:00:20/None~device:leaf1/6", + "epA": "00:00:00:00:00:20/None", + "epB": "device:leaf1", + "type": "UiEdgeLink", + "portB": "6", + "rollup": [ + { + "id": "00:00:00:00:00:20/None~device:leaf1/6", + "epA": "00:00:00:00:00:20/None", + "epB": "device:leaf1", + "type": "UiEdgeLink", + "portB": "6" + } + ] + }, + { + "id": "00:00:00:00:00:1C/None~device:leaf1/5", + "epA": "00:00:00:00:00:1C/None", + "epB": "device:leaf1", + "type": "UiEdgeLink", + "portB": "5", + "rollup": [ + { + "id": "00:00:00:00:00:1C/None~device:leaf1/5", + "epA": "00:00:00:00:00:1C/None", + "epB": "device:leaf1", + "type": "UiEdgeLink", + "portB": "5" + } + ] + }, + { + "id": "00:00:00:00:00:1B/None~device:leaf1/4", + "epA": "00:00:00:00:00:1B/None", + "epB": "device:leaf1", + "type": "UiEdgeLink", + "portB": "4", + "rollup": [ + { + "id": "00:00:00:00:00:1B/None~device:leaf1/4", + "epA": "00:00:00:00:00:1B/None", + "epB": "device:leaf1", + "type": "UiEdgeLink", + "portB": "4" + } + ] + } + ], + "devices": [ + [], + [], + [ + { + "id": "device:spine1", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "172.24.0.3", + "layer": "def", + "props": { + "managementAddress": "grpc://mininet:50003?device_id=1", + "protocol": "P4Runtime, gNMI, gNOI", + "gridX": "400.0", + "gridY": "400.0", + "driver": "stratum-bmv2", + "name": "device:spine1", + "p4DeviceId": "1", + "locType": "grid" + }, + "location": { + "locType": "grid", + "latOrY": 400.0, + "longOrX": 400.0 + } + }, + { + "id": "device:spine2", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "172.24.0.3", + "layer": "def", + "props": { + "managementAddress": "grpc://mininet:50004?device_id=1", + "protocol": "P4Runtime, gNMI, gNOI", + "gridX": "600.0", + "gridY": "400.0", + "driver": "stratum-bmv2", + "name": "device:spine2", + "p4DeviceId": "1", + "locType": "grid" + }, + "location": { + "locType": "grid", + "latOrY": 400.0, + "longOrX": 600.0 + } + }, + { + "id": "device:leaf2", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "172.24.0.3", + "layer": "def", + "props": { + "managementAddress": "grpc://mininet:50002?device_id=1", + "protocol": "P4Runtime, gNMI, gNOI", + "gridX": "800.0", + "gridY": "600.0", + "driver": "stratum-bmv2", + "name": "device:leaf2", + "p4DeviceId": "1", + "locType": "grid" + }, + "location": { + "locType": "grid", + "latOrY": 600.0, + "longOrX": 800.0 + } + }, + { + "id": "device:leaf1", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "172.24.0.3", + "layer": "def", + "props": { + "managementAddress": "grpc://mininet:50001?device_id=1", + "protocol": "P4Runtime, gNMI, gNOI", + "gridX": "200.0", + "gridY": "600.0", + "driver": "stratum-bmv2", + "name": "device:leaf1", + "p4DeviceId": "1", + "locType": "grid" + }, + "location": { + "locType": "grid", + "latOrY": 600.0, + "longOrX": 200.0 + } + } + ] + ], + "hosts": [ + [], + [], + [ + { + "id": "00:00:00:00:00:30/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "2001:2:3::1" + ], + "props": { + "gridX": "750.0", + "gridY": "700.0", + "latitude": null, + "name": "h3", + "locType": "grid", + "longitude": null + }, + "location": { + "locType": "grid", + "latOrY": 700.0, + "longOrX": 750.0 + }, + "configured": false + }, + { + "id": "00:00:00:00:00:1A/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "2001:1:1::a" + ], + "props": { + "gridX": "100.0", + "gridY": "700.0", + "latitude": null, + "name": "h1a", + "locType": "grid", + "longitude": null + }, + "location": { + "locType": "grid", + "latOrY": 700.0, + "longOrX": 100.0 + }, + "configured": false + }, + { + "id": "00:00:00:00:00:1B/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "2001:1:1::b" + ], + "props": { + "gridX": "100.0", + "gridY": "800.0", + "latitude": null, + "name": "h1b", + "locType": "grid", + "longitude": null + }, + "location": { + "locType": "grid", + "latOrY": 800.0, + "longOrX": 100.0 + }, + "configured": false + }, + { + "id": "00:00:00:00:00:1C/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "2001:1:1::c" + ], + "props": { + "gridX": "250.0", + "gridY": "800.0", + "latitude": null, + "name": "h1c", + "locType": "grid", + "longitude": null + }, + "location": { + "locType": "grid", + "latOrY": 800.0, + "longOrX": 250.0 + }, + "configured": false + }, + { + "id": "00:00:00:00:00:20/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "2001:1:2::1" + ], + "props": { + "gridX": "400.0", + "gridY": "700.0", + "latitude": null, + "name": "h2", + "locType": "grid", + "longitude": null + }, + "location": { + "locType": "grid", + "latOrY": 700.0, + "longOrX": 400.0 + }, + "configured": false + } + ] + ], + "layerOrder": [ + "opt", + "pkt", + "def" + ] + } +}`; + +const topo2Highlights_sample = ` +{ + "event": "topo2Highlights", + "payload": { + "devices": [], + "hosts": [], + "links": [ + { + "id": "device:leaf2/2~device:spine2/2", + "label": "964.91 Kbps", + "css": "secondary port-traffic-green" + }, + { + "id": "device:leaf1/1~device:spine1/1", + "label": "3.92 Mbps", + "css": "secondary port-traffic-yellow" + }, + { + "id": "00:00:00:00:00:30/None~device:leaf2/3", + "label": "4.46 Mbps", + "css": "secondary port-traffic-yellow" + }, + { + "id": "device:leaf2/1~device:spine1/2", + "label": "3.53 Mbps", + "css": "secondary port-traffic-yellow" + }, + { + "id": "device:leaf1/2~device:spine2/1", + "label": "1.06 Mbps", + "css": "secondary port-traffic-yellow" + }, + { + "id": "00:00:00:00:00:20/None~device:leaf1/6", + "label": "4.98 Mbps", + "css": "secondary port-traffic-yellow" + } + ] + } +}`; + class MockActivatedRoute extends ActivatedRoute { constructor(params: Params) { super(); @@ -96,16 +1889,16 @@ describe('ForceSvgComponent', () => { let logServiceSpy: jasmine.SpyObj; let component: ForceSvgComponent; let fixture: ComponentFixture; - const openflowSampleData = require('./tests/test-module-topo2CurrentRegion.json'); + const openflowSampleData = JSON.parse(test_module_topo2CurrentRegion); const openflowRegionData: Region = (openflowSampleData.payload); - const odtnSampleData = require('./tests/test-OdtnConfig-topo2CurrentRegion.json'); + const odtnSampleData = JSON.parse(test_OdtnConfig_topo2CurrentRegion); const odtnRegionData: Region = (odtnSampleData.payload); - const topo2BaseData = require('./tests/topo2Highlights-base-data.json'); + const topo2BaseData = JSON.parse(topo2Highlights_base_data); const topo2BaseRegionData: Region = (topo2BaseData.payload); - const highlightSampleData = require('./tests/topo2Highlights-sample.json'); + const highlightSampleData = JSON.parse(topo2Highlights_sample); const linkHightlights: LinkHighlight[] = (highlightSampleData.payload.links); const emptyRegion: Region = {devices: [ [], [], [] ], hosts: [ [], [], [] ], links: []}; diff --git a/web/gui2-topo-lib/lib/layer/forcesvg/tests/test-OdtnConfig-topo2CurrentRegion.json b/web/gui2-topo-lib/lib/layer/forcesvg/tests/test-OdtnConfig-topo2CurrentRegion.json deleted file mode 100644 index 2087940f7d..0000000000 --- a/web/gui2-topo-lib/lib/layer/forcesvg/tests/test-OdtnConfig-topo2CurrentRegion.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "event": "topo2CurrentRegion", - "payload": { - "id": "(root)", - "subregions": [], - "links": [ - { - "id": "netconf:127.0.0.1:11002/201~netconf:127.0.0.1:11003/201", - "epA": "netconf:127.0.0.1:11002/201", - "epB": "netconf:127.0.0.1:11003/201", - "type": "UiDeviceLink", - "portA": "201", - "portB": "201", - "rollup": [ - { - "id": "netconf:127.0.0.1:11002/201~netconf:127.0.0.1:11003/201", - "epA": "netconf:127.0.0.1:11002/201", - "epB": "netconf:127.0.0.1:11003/201", - "type": "UiDeviceLink", - "portA": "201", - "portB": "201" - } - ] - }, - { - "id": "netconf:127.0.0.1:11002/202~netconf:127.0.0.1:11003/202", - "epA": "netconf:127.0.0.1:11002/202", - "epB": "netconf:127.0.0.1:11003/202", - "type": "UiDeviceLink", - "portA": "202", - "portB": "202", - "rollup": [ - { - "id": "netconf:127.0.0.1:11002/202~netconf:127.0.0.1:11003/202", - "epA": "netconf:127.0.0.1:11002/202", - "epB": "netconf:127.0.0.1:11003/202", - "type": "UiDeviceLink", - "portA": "202", - "portB": "202" - } - ] - }, - { - "id": "netconf:127.0.0.1:11002/203~netconf:127.0.0.1:11003/203", - "epA": "netconf:127.0.0.1:11002/203", - "epB": "netconf:127.0.0.1:11003/203", - "type": "UiDeviceLink", - "portA": "203", - "portB": "203", - "rollup": [ - { - "id": "netconf:127.0.0.1:11002/203~netconf:127.0.0.1:11003/203", - "epA": "netconf:127.0.0.1:11002/203", - "epB": "netconf:127.0.0.1:11003/203", - "type": "UiDeviceLink", - "portA": "203", - "portB": "203" - } - ] - }, - { - "id": "netconf:127.0.0.1:11002/204~netconf:127.0.0.1:11003/204", - "epA": "netconf:127.0.0.1:11002/204", - "epB": "netconf:127.0.0.1:11003/204", - "type": "UiDeviceLink", - "portA": "204", - "portB": "204", - "rollup": [ - { - "id": "netconf:127.0.0.1:11002/204~netconf:127.0.0.1:11003/204", - "epA": "netconf:127.0.0.1:11002/204", - "epB": "netconf:127.0.0.1:11003/204", - "type": "UiDeviceLink", - "portA": "204", - "portB": "204" - } - ] - }, - { - "id": "netconf:127.0.0.1:11002/205~netconf:127.0.0.1:11003/205", - "epA": "netconf:127.0.0.1:11002/205", - "epB": "netconf:127.0.0.1:11003/205", - "type": "UiDeviceLink", - "portA": "205", - "portB": "205", - "rollup": [ - { - "id": "netconf:127.0.0.1:11002/205~netconf:127.0.0.1:11003/205", - "epA": "netconf:127.0.0.1:11002/205", - "epB": "netconf:127.0.0.1:11003/205", - "type": "UiDeviceLink", - "portA": "205", - "portB": "205" - } - ] - }, - { - "id": "netconf:127.0.0.1:11002/206~netconf:127.0.0.1:11003/206", - "epA": "netconf:127.0.0.1:11002/206", - "epB": "netconf:127.0.0.1:11003/206", - "type": "UiDeviceLink", - "portA": "206", - "portB": "206", - "rollup": [ - { - "id": "netconf:127.0.0.1:11002/206~netconf:127.0.0.1:11003/206", - "epA": "netconf:127.0.0.1:11002/206", - "epB": "netconf:127.0.0.1:11003/206", - "type": "UiDeviceLink", - "portA": "206", - "portB": "206" - } - ] - } - ], - "devices": [ - [], - [], - [ - { - "id": "netconf:127.0.0.1:11002", - "nodeType": "device", - "type": "terminal_device", - "online": true, - "master": "127.0.0.1", - "layer": "def", - "props": { - "ipaddress": "127.0.0.1", - "protocol": "NETCONF", - "driver": "cassini-ocnos", - "port": "11002", - "name": "cassini2", - "locType": "none" - } - }, - { - "id": "netconf:127.0.0.1:11003", - "nodeType": "device", - "type": "terminal_device", - "online": true, - "master": "127.0.0.1", - "layer": "def", - "props": { - "ipaddress": "127.0.0.1", - "protocol": "NETCONF", - "driver": "cassini-ocnos", - "port": "11003", - "name": "cassini1", - "locType": "none" - } - } - ] - ], - "hosts": [ - [], - [], - [] - ], - "layerOrder": [ - "opt", - "pkt", - "def" - ] - } -} diff --git a/web/gui2-topo-lib/lib/layer/forcesvg/tests/test-module-topo2CurrentRegion.json b/web/gui2-topo-lib/lib/layer/forcesvg/tests/test-module-topo2CurrentRegion.json deleted file mode 100644 index e8af22fc78..0000000000 --- a/web/gui2-topo-lib/lib/layer/forcesvg/tests/test-module-topo2CurrentRegion.json +++ /dev/null @@ -1,1204 +0,0 @@ -{ - "event": "topo2CurrentRegion", - "payload": { - "id": "(root)", - "subregions": [], - "links": [ - { - "id": "00:AA:00:00:00:03/None~of:0000000000000205/6", - "epA": "00:AA:00:00:00:03/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "6", - "rollup": [ - { - "id": "00:AA:00:00:00:03/None~of:0000000000000205/6", - "epA": "00:AA:00:00:00:03/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "6" - } - ] - }, - { - "id": "of:0000000000000205/3~of:0000000000000227/5", - "epA": "of:0000000000000205/3", - "epB": "of:0000000000000227/5", - "type": "UiDeviceLink", - "portA": "3", - "portB": "5", - "rollup": [ - { - "id": "of:0000000000000205/3~of:0000000000000227/5", - "epA": "of:0000000000000205/3", - "epB": "of:0000000000000227/5", - "type": "UiDeviceLink", - "portA": "3", - "portB": "5" - } - ] - }, - { - "id": "of:0000000000000206/2~of:0000000000000226/8", - "epA": "of:0000000000000206/2", - "epB": "of:0000000000000226/8", - "type": "UiDeviceLink", - "portA": "2", - "portB": "8", - "rollup": [ - { - "id": "of:0000000000000206/2~of:0000000000000226/8", - "epA": "of:0000000000000206/2", - "epB": "of:0000000000000226/8", - "type": "UiDeviceLink", - "portA": "2", - "portB": "8" - } - ] - }, - { - "id": "00:BB:00:00:00:05/None~of:0000000000000203/7", - "epA": "00:BB:00:00:00:05/None", - "epB": "of:0000000000000203", - "type": "UiEdgeLink", - "portB": "7", - "rollup": [ - { - "id": "00:BB:00:00:00:05/None~of:0000000000000203/7", - "epA": "00:BB:00:00:00:05/None", - "epB": "of:0000000000000203", - "type": "UiEdgeLink", - "portB": "7" - } - ] - }, - { - "id": "00:DD:00:00:00:01/None~of:0000000000000207/3", - "epA": "00:DD:00:00:00:01/None", - "epB": "of:0000000000000207", - "type": "UiEdgeLink", - "portB": "3", - "rollup": [ - { - "id": "00:DD:00:00:00:01/None~of:0000000000000207/3", - "epA": "00:DD:00:00:00:01/None", - "epB": "of:0000000000000207", - "type": "UiEdgeLink", - "portB": "3" - } - ] - }, - { - "id": "of:0000000000000203/1~of:0000000000000226/1", - "epA": "of:0000000000000203/1", - "epB": "of:0000000000000226/1", - "type": "UiDeviceLink", - "portA": "1", - "portB": "1", - "rollup": [ - { - "id": "of:0000000000000203/1~of:0000000000000226/1", - "epA": "of:0000000000000203/1", - "epB": "of:0000000000000226/1", - "type": "UiDeviceLink", - "portA": "1", - "portB": "1" - } - ] - }, - { - "id": "of:0000000000000207/2~of:0000000000000247/1", - "epA": "of:0000000000000207/2", - "epB": "of:0000000000000247/1", - "type": "UiDeviceLink", - "portA": "2", - "portB": "1", - "rollup": [ - { - "id": "of:0000000000000207/2~of:0000000000000247/1", - "epA": "of:0000000000000207/2", - "epB": "of:0000000000000247/1", - "type": "UiDeviceLink", - "portA": "2", - "portB": "1" - } - ] - }, - { - "id": "00:99:66:00:00:01/None~of:0000000000000205/10", - "epA": "00:99:66:00:00:01/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "10", - "rollup": [ - { - "id": "00:99:66:00:00:01/None~of:0000000000000205/10", - "epA": "00:99:66:00:00:01/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "10" - } - ] - }, - { - "id": "of:0000000000000208/1~of:0000000000000246/2", - "epA": "of:0000000000000208/1", - "epB": "of:0000000000000246/2", - "type": "UiDeviceLink", - "portA": "1", - "portB": "2", - "rollup": [ - { - "id": "of:0000000000000208/1~of:0000000000000246/2", - "epA": "of:0000000000000208/1", - "epB": "of:0000000000000246/2", - "type": "UiDeviceLink", - "portA": "1", - "portB": "2" - } - ] - }, - { - "id": "of:0000000000000206/1~of:0000000000000226/7", - "epA": "of:0000000000000206/1", - "epB": "of:0000000000000226/7", - "type": "UiDeviceLink", - "portA": "1", - "portB": "7", - "rollup": [ - { - "id": "of:0000000000000206/1~of:0000000000000226/7", - "epA": "of:0000000000000206/1", - "epB": "of:0000000000000226/7", - "type": "UiDeviceLink", - "portA": "1", - "portB": "7" - } - ] - }, - { - "id": "of:0000000000000226/9~of:0000000000000246/3", - "epA": "of:0000000000000226/9", - "epB": "of:0000000000000246/3", - "type": "UiDeviceLink", - "portA": "9", - "portB": "3", - "rollup": [ - { - "id": "of:0000000000000226/9~of:0000000000000246/3", - "epA": "of:0000000000000226/9", - "epB": "of:0000000000000246/3", - "type": "UiDeviceLink", - "portA": "9", - "portB": "3" - } - ] - }, - { - "id": "00:AA:00:00:00:04/None~of:0000000000000205/7", - "epA": "00:AA:00:00:00:04/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "7", - "rollup": [ - { - "id": "00:AA:00:00:00:04/None~of:0000000000000205/7", - "epA": "00:AA:00:00:00:04/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "7" - } - ] - }, - { - "id": "00:88:00:00:00:03/110~of:0000000000000205/11", - "epA": "00:88:00:00:00:03/110", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "11", - "rollup": [ - { - "id": "00:88:00:00:00:03/110~of:0000000000000205/11", - "epA": "00:88:00:00:00:03/110", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "11" - } - ] - }, - { - "id": "of:0000000000000204/1~of:0000000000000226/3", - "epA": "of:0000000000000204/1", - "epB": "of:0000000000000226/3", - "type": "UiDeviceLink", - "portA": "1", - "portB": "3", - "rollup": [ - { - "id": "of:0000000000000204/1~of:0000000000000226/3", - "epA": "of:0000000000000204/1", - "epB": "of:0000000000000226/3", - "type": "UiDeviceLink", - "portA": "1", - "portB": "3" - } - ] - }, - { - "id": "of:0000000000000203/2~of:0000000000000226/2", - "epA": "of:0000000000000203/2", - "epB": "of:0000000000000226/2", - "type": "UiDeviceLink", - "portA": "2", - "portB": "2", - "rollup": [ - { - "id": "of:0000000000000203/2~of:0000000000000226/2", - "epA": "of:0000000000000203/2", - "epB": "of:0000000000000226/2", - "type": "UiDeviceLink", - "portA": "2", - "portB": "2" - } - ] - }, - { - "id": "00:88:00:00:00:01/None~of:0000000000000205/12", - "epA": "00:88:00:00:00:01/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "12", - "rollup": [ - { - "id": "00:88:00:00:00:01/None~of:0000000000000205/12", - "epA": "00:88:00:00:00:01/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "12" - } - ] - }, - { - "id": "00:88:00:00:00:04/160~of:0000000000000206/6", - "epA": "00:88:00:00:00:04/160", - "epB": "of:0000000000000206", - "type": "UiEdgeLink", - "portB": "6", - "rollup": [ - { - "id": "00:88:00:00:00:04/160~of:0000000000000206/6", - "epA": "00:88:00:00:00:04/160", - "epB": "of:0000000000000206", - "type": "UiEdgeLink", - "portB": "6" - } - ] - }, - { - "id": "00:DD:00:00:00:02/None~of:0000000000000208/3", - "epA": "00:DD:00:00:00:02/None", - "epB": "of:0000000000000208", - "type": "UiEdgeLink", - "portB": "3", - "rollup": [ - { - "id": "00:DD:00:00:00:02/None~of:0000000000000208/3", - "epA": "00:DD:00:00:00:02/None", - "epB": "of:0000000000000208", - "type": "UiEdgeLink", - "portB": "3" - } - ] - }, - { - "id": "of:0000000000000203/3~of:0000000000000227/1", - "epA": "of:0000000000000203/3", - "epB": "of:0000000000000227/1", - "type": "UiDeviceLink", - "portA": "3", - "portB": "1", - "rollup": [ - { - "id": "of:0000000000000203/3~of:0000000000000227/1", - "epA": "of:0000000000000203/3", - "epB": "of:0000000000000227/1", - "type": "UiDeviceLink", - "portA": "3", - "portB": "1" - } - ] - }, - { - "id": "of:0000000000000208/2~of:0000000000000247/2", - "epA": "of:0000000000000208/2", - "epB": "of:0000000000000247/2", - "type": "UiDeviceLink", - "portA": "2", - "portB": "2", - "rollup": [ - { - "id": "of:0000000000000208/2~of:0000000000000247/2", - "epA": "of:0000000000000208/2", - "epB": "of:0000000000000247/2", - "type": "UiDeviceLink", - "portA": "2", - "portB": "2" - } - ] - }, - { - "id": "of:0000000000000205/1~of:0000000000000226/5", - "epA": "of:0000000000000205/1", - "epB": "of:0000000000000226/5", - "type": "UiDeviceLink", - "portA": "1", - "portB": "5", - "rollup": [ - { - "id": "of:0000000000000205/1~of:0000000000000226/5", - "epA": "of:0000000000000205/1", - "epB": "of:0000000000000226/5", - "type": "UiDeviceLink", - "portA": "1", - "portB": "5" - } - ] - }, - { - "id": "of:0000000000000204/2~of:0000000000000226/4", - "epA": "of:0000000000000204/2", - "epB": "of:0000000000000226/4", - "type": "UiDeviceLink", - "portA": "2", - "portB": "4", - "rollup": [ - { - "id": "of:0000000000000204/2~of:0000000000000226/4", - "epA": "of:0000000000000204/2", - "epB": "of:0000000000000226/4", - "type": "UiDeviceLink", - "portA": "2", - "portB": "4" - } - ] - }, - { - "id": "00:AA:00:00:00:01/None~of:0000000000000204/6", - "epA": "00:AA:00:00:00:01/None", - "epB": "of:0000000000000204", - "type": "UiEdgeLink", - "portB": "6", - "rollup": [ - { - "id": "00:AA:00:00:00:01/None~of:0000000000000204/6", - "epA": "00:AA:00:00:00:01/None", - "epB": "of:0000000000000204", - "type": "UiEdgeLink", - "portB": "6" - } - ] - }, - { - "id": "00:BB:00:00:00:03/None~of:0000000000000205/8", - "epA": "00:BB:00:00:00:03/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "8", - "rollup": [ - { - "id": "00:BB:00:00:00:03/None~of:0000000000000205/8", - "epA": "00:BB:00:00:00:03/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "8" - } - ] - }, - { - "id": "of:0000000000000206/4~of:0000000000000227/8", - "epA": "of:0000000000000206/4", - "epB": "of:0000000000000227/8", - "type": "UiDeviceLink", - "portA": "4", - "portB": "8", - "rollup": [ - { - "id": "of:0000000000000206/4~of:0000000000000227/8", - "epA": "of:0000000000000206/4", - "epB": "of:0000000000000227/8", - "type": "UiDeviceLink", - "portA": "4", - "portB": "8" - } - ] - }, - { - "id": "00:AA:00:00:00:05/None~of:0000000000000203/6", - "epA": "00:AA:00:00:00:05/None", - "epB": "of:0000000000000203", - "type": "UiEdgeLink", - "portB": "6", - "rollup": [ - { - "id": "00:AA:00:00:00:05/None~of:0000000000000203/6", - "epA": "00:AA:00:00:00:05/None", - "epB": "of:0000000000000203", - "type": "UiEdgeLink", - "portB": "6" - } - ] - }, - { - "id": "of:0000000000000205/5~of:0000000000000206/5", - "epA": "of:0000000000000205/5", - "epB": "of:0000000000000206/5", - "type": "UiDeviceLink", - "portA": "5", - "portB": "5", - "rollup": [ - { - "id": "of:0000000000000205/5~of:0000000000000206/5", - "epA": "of:0000000000000205/5", - "epB": "of:0000000000000206/5", - "type": "UiDeviceLink", - "portA": "5", - "portB": "5" - } - ] - }, - { - "id": "00:BB:00:00:00:02/None~of:0000000000000204/9", - "epA": "00:BB:00:00:00:02/None", - "epB": "of:0000000000000204", - "type": "UiEdgeLink", - "portB": "9", - "rollup": [ - { - "id": "00:BB:00:00:00:02/None~of:0000000000000204/9", - "epA": "00:BB:00:00:00:02/None", - "epB": "of:0000000000000204", - "type": "UiEdgeLink", - "portB": "9" - } - ] - }, - { - "id": "of:0000000000000204/3~of:0000000000000227/3", - "epA": "of:0000000000000204/3", - "epB": "of:0000000000000227/3", - "type": "UiDeviceLink", - "portA": "3", - "portB": "3", - "rollup": [ - { - "id": "of:0000000000000204/3~of:0000000000000227/3", - "epA": "of:0000000000000204/3", - "epB": "of:0000000000000227/3", - "type": "UiDeviceLink", - "portA": "3", - "portB": "3" - } - ] - }, - { - "id": "00:EE:00:00:00:01/None~of:0000000000000207/4", - "epA": "00:EE:00:00:00:01/None", - "epB": "of:0000000000000207", - "type": "UiEdgeLink", - "portB": "4", - "rollup": [ - { - "id": "00:EE:00:00:00:01/None~of:0000000000000207/4", - "epA": "00:EE:00:00:00:01/None", - "epB": "of:0000000000000207", - "type": "UiEdgeLink", - "portB": "4" - } - ] - }, - { - "id": "of:0000000000000203/4~of:0000000000000227/2", - "epA": "of:0000000000000203/4", - "epB": "of:0000000000000227/2", - "type": "UiDeviceLink", - "portA": "4", - "portB": "2", - "rollup": [ - { - "id": "of:0000000000000203/4~of:0000000000000227/2", - "epA": "of:0000000000000203/4", - "epB": "of:0000000000000227/2", - "type": "UiDeviceLink", - "portA": "4", - "portB": "2" - } - ] - }, - { - "id": "of:0000000000000205/2~of:0000000000000226/6", - "epA": "of:0000000000000205/2", - "epB": "of:0000000000000226/6", - "type": "UiDeviceLink", - "portA": "2", - "portB": "6", - "rollup": [ - { - "id": "of:0000000000000205/2~of:0000000000000226/6", - "epA": "of:0000000000000205/2", - "epB": "of:0000000000000226/6", - "type": "UiDeviceLink", - "portA": "2", - "portB": "6" - } - ] - }, - { - "id": "00:99:00:00:00:01/None~of:0000000000000205/10", - "epA": "00:99:00:00:00:01/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "10", - "rollup": [ - { - "id": "00:99:00:00:00:01/None~of:0000000000000205/10", - "epA": "00:99:00:00:00:01/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "10" - } - ] - }, - { - "id": "of:0000000000000205/4~of:0000000000000227/6", - "epA": "of:0000000000000205/4", - "epB": "of:0000000000000227/6", - "type": "UiDeviceLink", - "portA": "4", - "portB": "6", - "rollup": [ - { - "id": "of:0000000000000205/4~of:0000000000000227/6", - "epA": "of:0000000000000205/4", - "epB": "of:0000000000000227/6", - "type": "UiDeviceLink", - "portA": "4", - "portB": "6" - } - ] - }, - { - "id": "of:0000000000000206/3~of:0000000000000227/7", - "epA": "of:0000000000000206/3", - "epB": "of:0000000000000227/7", - "type": "UiDeviceLink", - "portA": "3", - "portB": "7", - "rollup": [ - { - "id": "of:0000000000000206/3~of:0000000000000227/7", - "epA": "of:0000000000000206/3", - "epB": "of:0000000000000227/7", - "type": "UiDeviceLink", - "portA": "3", - "portB": "7" - } - ] - }, - { - "id": "00:BB:00:00:00:04/None~of:0000000000000205/9", - "epA": "00:BB:00:00:00:04/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "9", - "rollup": [ - { - "id": "00:BB:00:00:00:04/None~of:0000000000000205/9", - "epA": "00:BB:00:00:00:04/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "9" - } - ] - }, - { - "id": "00:AA:00:00:00:02/None~of:0000000000000204/7", - "epA": "00:AA:00:00:00:02/None", - "epB": "of:0000000000000204", - "type": "UiEdgeLink", - "portB": "7", - "rollup": [ - { - "id": "00:AA:00:00:00:02/None~of:0000000000000204/7", - "epA": "00:AA:00:00:00:02/None", - "epB": "of:0000000000000204", - "type": "UiEdgeLink", - "portB": "7" - } - ] - }, - { - "id": "00:BB:00:00:00:01/None~of:0000000000000204/8", - "epA": "00:BB:00:00:00:01/None", - "epB": "of:0000000000000204", - "type": "UiEdgeLink", - "portB": "8", - "rollup": [ - { - "id": "00:BB:00:00:00:01/None~of:0000000000000204/8", - "epA": "00:BB:00:00:00:01/None", - "epB": "of:0000000000000204", - "type": "UiEdgeLink", - "portB": "8" - } - ] - }, - { - "id": "of:0000000000000207/1~of:0000000000000246/1", - "epA": "of:0000000000000207/1", - "epB": "of:0000000000000246/1", - "type": "UiDeviceLink", - "portA": "1", - "portB": "1", - "rollup": [ - { - "id": "of:0000000000000207/1~of:0000000000000246/1", - "epA": "of:0000000000000207/1", - "epB": "of:0000000000000246/1", - "type": "UiDeviceLink", - "portA": "1", - "portB": "1" - } - ] - }, - { - "id": "00:88:00:00:00:02/None~of:0000000000000206/7", - "epA": "00:88:00:00:00:02/None", - "epB": "of:0000000000000206", - "type": "UiEdgeLink", - "portB": "7", - "rollup": [ - { - "id": "00:88:00:00:00:02/None~of:0000000000000206/7", - "epA": "00:88:00:00:00:02/None", - "epB": "of:0000000000000206", - "type": "UiEdgeLink", - "portB": "7" - } - ] - }, - { - "id": "00:EE:00:00:00:02/None~of:0000000000000208/4", - "epA": "00:EE:00:00:00:02/None", - "epB": "of:0000000000000208", - "type": "UiEdgeLink", - "portB": "4", - "rollup": [ - { - "id": "00:EE:00:00:00:02/None~of:0000000000000208/4", - "epA": "00:EE:00:00:00:02/None", - "epB": "of:0000000000000208", - "type": "UiEdgeLink", - "portB": "4" - } - ] - }, - { - "id": "of:0000000000000204/4~of:0000000000000227/4", - "epA": "of:0000000000000204/4", - "epB": "of:0000000000000227/4", - "type": "UiDeviceLink", - "portA": "4", - "portB": "4", - "rollup": [ - { - "id": "of:0000000000000204/4~of:0000000000000227/4", - "epA": "of:0000000000000204/4", - "epB": "of:0000000000000227/4", - "type": "UiDeviceLink", - "portA": "4", - "portB": "4" - } - ] - }, - { - "id": "of:0000000000000203/5~of:0000000000000204/5", - "epA": "of:0000000000000203/5", - "epB": "of:0000000000000204/5", - "type": "UiDeviceLink", - "portA": "5", - "portB": "5", - "rollup": [ - { - "id": "of:0000000000000203/5~of:0000000000000204/5", - "epA": "of:0000000000000203/5", - "epB": "of:0000000000000204/5", - "type": "UiDeviceLink", - "portA": "5", - "portB": "5" - } - ] - }, - { - "id": "of:0000000000000227/9~of:0000000000000247/3", - "epA": "of:0000000000000227/9", - "epB": "of:0000000000000247/3", - "type": "UiDeviceLink", - "portA": "9", - "portB": "3", - "rollup": [ - { - "id": "of:0000000000000227/9~of:0000000000000247/3", - "epA": "of:0000000000000227/9", - "epB": "of:0000000000000247/3", - "type": "UiDeviceLink", - "portA": "9", - "portB": "3" - } - ] - } - ], - "devices": [ - [], - [], - [ - { - "id": "of:0000000000000246", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "40.15", - "name": "s246", - "locType": "geo", - "channelId": "10.192.19.69:59980", - "longitude": "-121.679" - }, - "location": { - "locType": "geo", - "latOrY": 40.15, - "longOrX": -121.679 - } - }, - { - "id": "of:0000000000000206", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "36.766", - "name": "s206", - "locType": "geo", - "channelId": "10.192.19.69:59975", - "longitude": "-92.029" - }, - "location": { - "locType": "geo", - "latOrY": 36.766, - "longOrX": -92.029 - } - }, - { - "id": "of:0000000000000227", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "44.205", - "name": "s227", - "locType": "geo", - "channelId": "10.192.19.69:59979", - "longitude": "-96.359" - }, - "location": { - "locType": "geo", - "latOrY": 44.205, - "longOrX": -96.359 - } - }, - { - "id": "of:0000000000000208", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "36.766", - "name": "s208", - "locType": "geo", - "channelId": "10.192.19.69:59977", - "longitude": "-116.029" - }, - "location": { - "locType": "geo", - "latOrY": 36.766, - "longOrX": -116.029 - } - }, - { - "id": "of:0000000000000205", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "36.766", - "name": "s205", - "locType": "geo", - "channelId": "10.192.19.69:59974", - "longitude": "-96.89" - }, - "location": { - "locType": "geo", - "latOrY": 36.766, - "longOrX": -96.89 - } - }, - { - "id": "of:0000000000000247", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "40.205", - "name": "s247", - "locType": "geo", - "channelId": "10.192.19.69:59981", - "longitude": "-117.359" - }, - "location": { - "locType": "geo", - "latOrY": 40.205, - "longOrX": -117.359 - } - }, - { - "id": "of:0000000000000226", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "44.15", - "name": "s226", - "locType": "geo", - "channelId": "10.192.19.69:59978", - "longitude": "-107.679" - }, - "location": { - "locType": "geo", - "latOrY": 44.15, - "longOrX": -107.679 - } - }, - { - "id": "of:0000000000000203", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "36.766", - "name": "s203", - "locType": "geo", - "channelId": "10.192.19.69:59972", - "longitude": "-111.359" - }, - "location": { - "locType": "geo", - "latOrY": 36.766, - "longOrX": -111.359 - } - }, - { - "id": "of:0000000000000204", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "36.766", - "name": "s204", - "locType": "geo", - "channelId": "10.192.19.69:59973", - "longitude": "-106.359" - }, - "location": { - "locType": "geo", - "latOrY": 36.766, - "longOrX": -106.359 - } - }, - { - "id": "of:0000000000000207", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "36.766", - "name": "s207", - "locType": "geo", - "channelId": "10.192.19.69:59976", - "longitude": "-122.359" - }, - "location": { - "locType": "geo", - "latOrY": 36.766, - "longOrX": -122.359 - } - } - ] - ], - "hosts": [ - [], - [], - [ - { - "id": "00:88:00:00:00:03/110", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::288:ff:fe00:3", - "2000::102", - "10.0.1.2" - ], - "props": {}, - "configured": false - }, - { - "id": "00:DD:00:00:00:01/None", - "nodeType": "host", - "layer": "def", - "ips": [], - "props": {}, - "configured": false - }, - { - "id": "00:88:00:00:00:04/160", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::288:ff:fe00:4", - "10.0.6.2", - "2000::602" - ], - "props": {}, - "configured": false - }, - { - "id": "00:BB:00:00:00:02/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::2bb:ff:fe00:2" - ], - "props": {}, - "configured": false - }, - { - "id": "00:AA:00:00:00:05/None", - "nodeType": "host", - "layer": "def", - "ips": [], - "props": {}, - "configured": false - }, - { - "id": "00:88:00:00:00:01/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::288:ff:fe00:1", - "2000::101", - "10.0.1.1" - ], - "props": {}, - "configured": false - }, - { - "id": "00:AA:00:00:00:01/None", - "nodeType": "host", - "layer": "def", - "ips": [], - "props": {}, - "configured": false - }, - { - "id": "00:AA:00:00:00:03/None", - "nodeType": "host", - "layer": "def", - "ips": [], - "props": {}, - "configured": false - }, - { - "id": "00:BB:00:00:00:04/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::2bb:ff:fe00:4" - ], - "props": {}, - "configured": false - }, - { - "id": "00:EE:00:00:00:02/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::2ee:ff:fe00:2" - ], - "props": {}, - "configured": false - }, - { - "id": "00:99:00:00:00:01/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "10.0.3.253", - "fe80::299:ff:fe00:1" - ], - "props": {}, - "configured": false - }, - { - "id": "00:99:66:00:00:01/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::299:66ff:fe00:1", - "2000::3fd" - ], - "props": {}, - "configured": false - }, - { - "id": "00:EE:00:00:00:01/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::2ee:ff:fe00:1" - ], - "props": {}, - "configured": false - }, - { - "id": "00:BB:00:00:00:01/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::2bb:ff:fe00:1" - ], - "props": {}, - "configured": false - }, - { - "id": "00:BB:00:00:00:03/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::2bb:ff:fe00:3" - ], - "props": {}, - "configured": false - }, - { - "id": "00:AA:00:00:00:04/None", - "nodeType": "host", - "layer": "def", - "ips": [], - "props": {}, - "configured": false - }, - { - "id": "00:BB:00:00:00:05/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::2bb:ff:fe00:5" - ], - "props": {}, - "configured": false - }, - { - "id": "00:88:00:00:00:02/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::288:ff:fe00:2", - "2000::601", - "10.0.6.1" - ], - "props": {}, - "configured": false - }, - { - "id": "00:AA:00:00:00:02/None", - "nodeType": "host", - "layer": "def", - "ips": [], - "props": {}, - "configured": false - }, - { - "id": "00:DD:00:00:00:02/None", - "nodeType": "host", - "layer": "def", - "ips": [], - "props": {}, - "configured": false - } - ] - ], - "layerOrder": [ - "opt", - "pkt", - "def" - ] - } -} diff --git a/web/gui2-topo-lib/lib/layer/forcesvg/tests/topo2Highlights-base-data.json b/web/gui2-topo-lib/lib/layer/forcesvg/tests/topo2Highlights-base-data.json deleted file mode 100644 index ae1b9f257d..0000000000 --- a/web/gui2-topo-lib/lib/layer/forcesvg/tests/topo2Highlights-base-data.json +++ /dev/null @@ -1,380 +0,0 @@ -{ - "event": "topo2CurrentRegion", - "payload": { - "id": "(root)", - "subregions": [], - "links": [ - { - "id": "device:leaf1/1~device:spine1/1", - "epA": "device:leaf1/1", - "epB": "device:spine1/1", - "type": "UiDeviceLink", - "portA": "1", - "portB": "1", - "rollup": [ - { - "id": "device:leaf1/1~device:spine1/1", - "epA": "device:leaf1/1", - "epB": "device:spine1/1", - "type": "UiDeviceLink", - "portA": "1", - "portB": "1" - } - ] - }, - { - "id": "device:leaf2/2~device:spine2/2", - "epA": "device:leaf2/2", - "epB": "device:spine2/2", - "type": "UiDeviceLink", - "portA": "2", - "portB": "2", - "rollup": [ - { - "id": "device:leaf2/2~device:spine2/2", - "epA": "device:leaf2/2", - "epB": "device:spine2/2", - "type": "UiDeviceLink", - "portA": "2", - "portB": "2" - } - ] - }, - { - "id": "00:00:00:00:00:1A/None~device:leaf1/3", - "epA": "00:00:00:00:00:1A/None", - "epB": "device:leaf1", - "type": "UiEdgeLink", - "portB": "3", - "rollup": [ - { - "id": "00:00:00:00:00:1A/None~device:leaf1/3", - "epA": "00:00:00:00:00:1A/None", - "epB": "device:leaf1", - "type": "UiEdgeLink", - "portB": "3" - } - ] - }, - { - "id": "00:00:00:00:00:30/None~device:leaf2/3", - "epA": "00:00:00:00:00:30/None", - "epB": "device:leaf2", - "type": "UiEdgeLink", - "portB": "3", - "rollup": [ - { - "id": "00:00:00:00:00:30/None~device:leaf2/3", - "epA": "00:00:00:00:00:30/None", - "epB": "device:leaf2", - "type": "UiEdgeLink", - "portB": "3" - } - ] - }, - { - "id": "device:leaf1/2~device:spine2/1", - "epA": "device:leaf1/2", - "epB": "device:spine2/1", - "type": "UiDeviceLink", - "portA": "2", - "portB": "1", - "rollup": [ - { - "id": "device:leaf1/2~device:spine2/1", - "epA": "device:leaf1/2", - "epB": "device:spine2/1", - "type": "UiDeviceLink", - "portA": "2", - "portB": "1" - } - ] - }, - { - "id": "device:leaf2/1~device:spine1/2", - "epA": "device:leaf2/1", - "epB": "device:spine1/2", - "type": "UiDeviceLink", - "portA": "1", - "portB": "2", - "rollup": [ - { - "id": "device:leaf2/1~device:spine1/2", - "epA": "device:leaf2/1", - "epB": "device:spine1/2", - "type": "UiDeviceLink", - "portA": "1", - "portB": "2" - } - ] - }, - { - "id": "00:00:00:00:00:20/None~device:leaf1/6", - "epA": "00:00:00:00:00:20/None", - "epB": "device:leaf1", - "type": "UiEdgeLink", - "portB": "6", - "rollup": [ - { - "id": "00:00:00:00:00:20/None~device:leaf1/6", - "epA": "00:00:00:00:00:20/None", - "epB": "device:leaf1", - "type": "UiEdgeLink", - "portB": "6" - } - ] - }, - { - "id": "00:00:00:00:00:1C/None~device:leaf1/5", - "epA": "00:00:00:00:00:1C/None", - "epB": "device:leaf1", - "type": "UiEdgeLink", - "portB": "5", - "rollup": [ - { - "id": "00:00:00:00:00:1C/None~device:leaf1/5", - "epA": "00:00:00:00:00:1C/None", - "epB": "device:leaf1", - "type": "UiEdgeLink", - "portB": "5" - } - ] - }, - { - "id": "00:00:00:00:00:1B/None~device:leaf1/4", - "epA": "00:00:00:00:00:1B/None", - "epB": "device:leaf1", - "type": "UiEdgeLink", - "portB": "4", - "rollup": [ - { - "id": "00:00:00:00:00:1B/None~device:leaf1/4", - "epA": "00:00:00:00:00:1B/None", - "epB": "device:leaf1", - "type": "UiEdgeLink", - "portB": "4" - } - ] - } - ], - "devices": [ - [], - [], - [ - { - "id": "device:spine1", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "172.24.0.3", - "layer": "def", - "props": { - "managementAddress": "grpc://mininet:50003?device_id=1", - "protocol": "P4Runtime, gNMI, gNOI", - "gridX": "400.0", - "gridY": "400.0", - "driver": "stratum-bmv2", - "name": "device:spine1", - "p4DeviceId": "1", - "locType": "grid" - }, - "location": { - "locType": "grid", - "latOrY": 400.0, - "longOrX": 400.0 - } - }, - { - "id": "device:spine2", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "172.24.0.3", - "layer": "def", - "props": { - "managementAddress": "grpc://mininet:50004?device_id=1", - "protocol": "P4Runtime, gNMI, gNOI", - "gridX": "600.0", - "gridY": "400.0", - "driver": "stratum-bmv2", - "name": "device:spine2", - "p4DeviceId": "1", - "locType": "grid" - }, - "location": { - "locType": "grid", - "latOrY": 400.0, - "longOrX": 600.0 - } - }, - { - "id": "device:leaf2", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "172.24.0.3", - "layer": "def", - "props": { - "managementAddress": "grpc://mininet:50002?device_id=1", - "protocol": "P4Runtime, gNMI, gNOI", - "gridX": "800.0", - "gridY": "600.0", - "driver": "stratum-bmv2", - "name": "device:leaf2", - "p4DeviceId": "1", - "locType": "grid" - }, - "location": { - "locType": "grid", - "latOrY": 600.0, - "longOrX": 800.0 - } - }, - { - "id": "device:leaf1", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "172.24.0.3", - "layer": "def", - "props": { - "managementAddress": "grpc://mininet:50001?device_id=1", - "protocol": "P4Runtime, gNMI, gNOI", - "gridX": "200.0", - "gridY": "600.0", - "driver": "stratum-bmv2", - "name": "device:leaf1", - "p4DeviceId": "1", - "locType": "grid" - }, - "location": { - "locType": "grid", - "latOrY": 600.0, - "longOrX": 200.0 - } - } - ] - ], - "hosts": [ - [], - [], - [ - { - "id": "00:00:00:00:00:30/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "2001:2:3::1" - ], - "props": { - "gridX": "750.0", - "gridY": "700.0", - "latitude": null, - "name": "h3", - "locType": "grid", - "longitude": null - }, - "location": { - "locType": "grid", - "latOrY": 700.0, - "longOrX": 750.0 - }, - "configured": false - }, - { - "id": "00:00:00:00:00:1A/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "2001:1:1::a" - ], - "props": { - "gridX": "100.0", - "gridY": "700.0", - "latitude": null, - "name": "h1a", - "locType": "grid", - "longitude": null - }, - "location": { - "locType": "grid", - "latOrY": 700.0, - "longOrX": 100.0 - }, - "configured": false - }, - { - "id": "00:00:00:00:00:1B/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "2001:1:1::b" - ], - "props": { - "gridX": "100.0", - "gridY": "800.0", - "latitude": null, - "name": "h1b", - "locType": "grid", - "longitude": null - }, - "location": { - "locType": "grid", - "latOrY": 800.0, - "longOrX": 100.0 - }, - "configured": false - }, - { - "id": "00:00:00:00:00:1C/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "2001:1:1::c" - ], - "props": { - "gridX": "250.0", - "gridY": "800.0", - "latitude": null, - "name": "h1c", - "locType": "grid", - "longitude": null - }, - "location": { - "locType": "grid", - "latOrY": 800.0, - "longOrX": 250.0 - }, - "configured": false - }, - { - "id": "00:00:00:00:00:20/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "2001:1:2::1" - ], - "props": { - "gridX": "400.0", - "gridY": "700.0", - "latitude": null, - "name": "h2", - "locType": "grid", - "longitude": null - }, - "location": { - "locType": "grid", - "latOrY": 700.0, - "longOrX": 400.0 - }, - "configured": false - } - ] - ], - "layerOrder": [ - "opt", - "pkt", - "def" - ] - } -} diff --git a/web/gui2-topo-lib/lib/layer/forcesvg/tests/topo2Highlights-sample.json b/web/gui2-topo-lib/lib/layer/forcesvg/tests/topo2Highlights-sample.json deleted file mode 100644 index 50995c8f22..0000000000 --- a/web/gui2-topo-lib/lib/layer/forcesvg/tests/topo2Highlights-sample.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "event": "topo2Highlights", - "payload": { - "devices": [], - "hosts": [], - "links": [ - { - "id": "device:leaf2/2~device:spine2/2", - "label": "964.91 Kbps", - "css": "secondary port-traffic-green" - }, - { - "id": "device:leaf1/1~device:spine1/1", - "label": "3.92 Mbps", - "css": "secondary port-traffic-yellow" - }, - { - "id": "00:00:00:00:00:30/None~device:leaf2/3", - "label": "4.46 Mbps", - "css": "secondary port-traffic-yellow" - }, - { - "id": "device:leaf2/1~device:spine1/2", - "label": "3.53 Mbps", - "css": "secondary port-traffic-yellow" - }, - { - "id": "device:leaf1/2~device:spine2/1", - "label": "1.06 Mbps", - "css": "secondary port-traffic-yellow" - }, - { - "id": "00:00:00:00:00:20/None~device:leaf1/6", - "label": "4.98 Mbps", - "css": "secondary port-traffic-yellow" - } - ] - } -}