summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/testBE/FakeBackendInterceptor.ts
diff options
context:
space:
mode:
authorphani.y <yellela.nagaphanindra@huawei.com>2020-03-25 15:42:53 +0530
committeryellela nagaphanindra <yellela.nagaphanindra@huawei.com>2020-03-25 11:01:03 +0000
commitdba6524875ebb7c0835d4eace5bc27c03763d4a1 (patch)
tree0974b6746f5f4fce7d06c5310373c178abd93974 /usecaseui-portal/testBE/FakeBackendInterceptor.ts
parent5d6c30fdbfa3d4f15b702652c48107b413a73fff (diff)
Service Topology Changes3.0.1
Issue-ID: USECASEUI-419 Signed-off-by: phani.y <yellela.nagaphanindra@huawei.com> Change-Id: I4f2d8a5a6309de92acd9384d499a285306036ebf
Diffstat (limited to 'usecaseui-portal/testBE/FakeBackendInterceptor.ts')
-rw-r--r--usecaseui-portal/testBE/FakeBackendInterceptor.ts304
1 files changed, 210 insertions, 94 deletions
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 = {