From dba6524875ebb7c0835d4eace5bc27c03763d4a1 Mon Sep 17 00:00:00 2001 From: "phani.y" Date: Wed, 25 Mar 2020 15:42:53 +0530 Subject: Service Topology Changes Issue-ID: USECASEUI-419 Signed-off-by: phani.y Change-Id: I4f2d8a5a6309de92acd9384d499a285306036ebf --- usecaseui-portal/testBE/FakeBackendInterceptor.ts | 304 +++++++++++++++------- 1 file changed, 210 insertions(+), 94 deletions(-) (limited to 'usecaseui-portal/testBE') diff --git a/usecaseui-portal/testBE/FakeBackendInterceptor.ts b/usecaseui-portal/testBE/FakeBackendInterceptor.ts index dd1c0d20..9fc0868c 100644 --- a/usecaseui-portal/testBE/FakeBackendInterceptor.ts +++ b/usecaseui-portal/testBE/FakeBackendInterceptor.ts @@ -90,102 +90,218 @@ export class FakeBackendInterceptor implements HttpInterceptor { return Observable.of(new HttpResponse({ status: 200, body: body })); } - // get monotor service data - if (request.url.endsWith('/uui-lcm/Sotnservices/resourceTopology/service/service-subscriptions/service-subscription/sotn/service-instances/service-instance/ISAAC-IS02') || request.url.endsWith('/uui-lcm/Sotnservices/resourceTopology/service/service-subscriptions/service-subscription/sotn/service-instances/service-instance/ISAAC-IS03') && request.method === 'GET') { - let body = { - "nodes": [ - { - "id": "1", - "shape": "circularImage", - "image": "./assets/images/tpoint.png", - "label": "Termination Point", - "color": "Green", - "dataNode": {} - }, - { - "id": "2", - "shape": "circularImage", - "image": "./assets/images/edge.png", - "label": "Node", - "color": "Green", - "dataNode": { - "ethtSvcName": "sotn-021-VS-monitored", - "colorAware": "true", - "cbs": "100", - "couplingFlag": "true", - "ebs": "evpl", - "cir": "200000", - "eir": "0" - } - }, - { - "id": "3", - "shape": "circularImage", - "image": "./assets/images/logicallink.png", - "label": "Logical Link", - "color": "Green", - "dataNode": { - "ethtSvcName": "sotn-021-VS-monitored", - "colorAware": "true", - "cbs": "100", - "couplingFlag": "true", - "ebs": "evpl", - "cir": "200000", - "eir": "0" - } - }, - { - "id": "4", - "shape": "circularImage", - "image": "./assets/images/edge.png", - "label": "Node", - "color": "Green", - "dataNode": { - "zipcode": "100095", - "siteName": "hubtravel", - "description": "desc", - "location": "laptop-5", - "cvlan": "100" - } - }, - { - "id": "5", - "shape": "circularImage", - "image": "./assets/images/tpoint.png", - "label": "Termination Point", - "color": "Green", - "dataNode": { - "accessltpid": "155", - "siteName": "hubtravel", - "description": "desc", - "accessnodeid": "10.10.10.10", - "cvlan": "100" - } - } - ], - "edges": [ - { - "from": "1", - "to": "2" - }, - { - "from": "2", - "to": "3" - }, - { - "from": "3", - "to": "4" - }, - { - "from": "4", - "to": "5" - } - ] - }; + // get monitor service data + // VPN binding + if (request.url.endsWith('/uui-lcm/Sotnservices/resourceTopology/service/service-subscriptions/service-subscription/sotn/service-instances/service-instance/ISAAC-IS02/vpn-informations/vpn-information/vpn-bind-1') && request.method === 'GET') { + + let body = { + "nodes":[ + { + "id":"vpn-bind-1", + "shape":"circularImage", + "image":"./assets/images/vpnbinding.png", + "label":"VPN Binding", + "color":"Green", + "dataNode":{ + "vpn-name":"sotn-l2-vpn", + "vpn-type":"l2-eth" + } + }, + { + "id":"10.10.10.10", + "shape":"circularImage", + "image":"./assets/images/tpoint.png", + "label":"P-interface", + "color":"Green", + "dataNode":{ + "interface-name":"10.10.10.10", + "speed-value":"example-speed-value-val-33014", + "speed-units":"example-speed-units-val-75695", + "port-description":"p-interafce-desc" + } + }, + { + "id":"22.22.22.22", + "shape":"circularImage", + "image":"./assets/images/tpoint.png", + "label":"P-interface", + "color":"Green", + "dataNode":{ + "interface-name":"22.22.22.22", + "speed-value":"example-speed-value-val-33014", + "speed-units":"example-speed-units-val-75695", + "port-description":"p-interafce-desc" + } + } + ], + "edges":[ + { + "from":"vpn-bind-1", + "to":"10.10.10.10" + }, + { + "from":"vpn-bind-1", + "to":"22.22.22.22" + } + ] + } - return Observable.of(new HttpResponse({ status: 200, body: body })); + return Observable.of(new HttpResponse({ status: 200, body: body })); + + } + + // resource topo + + if (request.url.endsWith('/uui-lcm/Sotnservices/resourceTopology/service/service-subscriptions/service-subscription/sotn/service-instances/service-instance/ISAAC-IS02')&& request.method === 'GET') { + + let body = { + "nodes":[ + { + "id":"NNI-001", + "shape":"circularImage", + "image":"./assets/images/service.png", + "label":"Service", + "color":"Green", + "dataNode":{ + "service-instance-id":"NNI-001", + "service-instance-name":"NNI-001", + "service-type":"example-service-type-val-52265", + "service-role":"example-service-role-val-24156" + } + }, + { + "id":"vnf-instance", + "shape":"circularImage", + "image":"./assets/images/VNF.png", + "label":"Vnf", + "color":"Green", + "dataNode":{ + "vnf-id":"nni-vnf-1", + "vnf-instance-id":"vnf-instance", + "vnf-name":"SOTN-NNI-Underlay", + "vnf-type":"some-vnf-type", + "is-closed-loop-disabled":false, + "closedLoopDisabled":false + } + }, + { + "id":"eth-conn-1", + "shape":"circularImage", + "image":"./assets/images/connectivity.png", + "label":"Connectivity", + "color":"Green", + "dataNode":{ + "connectivity-id":"eth-conn-1", + "operational-status":"Created", + "vpn-type":"L2-eth" + } + }, + { + "id":"uni-1", + "shape":"circularImage", + "image":"./assets/images/edge.png", + "label":"uni-1", + "color":"Green", + "dataNode":{ + "id":"uni-1", + "tpId":"p-interface-1", + "operational-status":"Created" + } + }, + { + "id":"10.10.10.10", + "shape":"circularImage", + "image":"./assets/images/tpoint.png", + "label":"P-interface", + "color":"Green", + "dataNode":{ + "interface-name":"10.10.10.10", + "speed-value":"example-speed-value-val-33014", + "speed-units":"example-speed-units-val-75695", + "port-description":"p-interafce-desc" + } + }, + { + "id":"uni-2", + "shape":"circularImage", + "image":"./assets/images/edge.png", + "label":"uni-2", + "color":"Green", + "dataNode":{ + "id":"uni-2", + "tpId":"p-interface-2", + "operational-status":"Created" + } + }, + { + "id":"22.22.22.22", + "shape":"circularImage", + "image":"./assets/images/tpoint.png", + "label":"P-interface", + "color":"Green", + "dataNode":{ + "interface-name":"22.22.22.22", + "speed-value":"example-speed-value-val-33014", + "speed-units":"example-speed-units-val-75695", + "port-description":"p-interafce-desc" + } + }, + { + "id":"vpn-bind-1", + "shape":"circularImage", + "image":"./assets/images/vpnbinding.png", + "label":"VPN Binding", + "color":"Green", + "dataNode":{ + "vpn-name":"sotn-l2-vpn", + "vpn-type":"l2-eth" + } + } + ], + "edges":[ + { + "from":"NNI-001", + "to":"vnf-instance" + }, + { + "from":"vnf-instance", + "to":"eth-conn-1" + }, + { + "from":"vnf-instance", + "to":"uni-1" + }, + { + "from":"uni-1", + "to":"10.10.10.10" + }, + { + "from":"vnf-instance", + "to":"uni-2" + }, + { + "from":"uni-2", + "to":"22.22.22.22" + }, + { + "from":"eth-conn-1", + "to":"vpn-bind-1" + }, + { + "from":"vpn-bind-1", + "to":"10.10.10.10" + }, + { + "from":"vpn-bind-1", + "to":"22.22.22.22" + } + ] + } + + return Observable.of(new HttpResponse({ status: 200, body: body })); + + } - } if (request.url.endsWith('/uui-lcm/customers/service-subscriptions') && request.method === 'GET') { let body = { -- cgit 1.2.3-korg