summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-09-12 09:14:45 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-09-12 09:14:54 +0800
commit82ff35f629b05d57b9ec9f24f7189af4a10fceca (patch)
treee3c40929d496ba8bfd4a43e7b13a189367890a44 /usecaseui-portal
parentd56bca3670049515d8a69e56d9f692e0f70c276b (diff)
feat:optimize mock api & routes.js for customer page
Change-Id: I89990f82c176471b918c297e82eaec628a1c3fa7 Issue-ID: USECASEUI-307 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal')
-rw-r--r--usecaseui-portal/src/app/core/services/managemencs.service.ts7
-rw-r--r--usecaseui-portal/src/app/mock/json/getServiceInstanceById_customerId.json26
-rw-r--r--usecaseui-portal/src/app/mock/json/services_scaleServices.json4
-rw-r--r--usecaseui-portal/src/app/mock/json/uui-lcm_VnfInfo.json12
-rw-r--r--usecaseui-portal/src/app/mock/json/uui-lcm_healNetworkServiceInstance.json3
-rw-r--r--usecaseui-portal/src/app/mock/json/uui-lcm_jobs_getNsLcmJobStatus.json19
-rw-r--r--usecaseui-portal/src/app/mock/routes.js25
7 files changed, 85 insertions, 11 deletions
diff --git a/usecaseui-portal/src/app/core/services/managemencs.service.ts b/usecaseui-portal/src/app/core/services/managemencs.service.ts
index cd293d40..d7780e73 100644
--- a/usecaseui-portal/src/app/core/services/managemencs.service.ts
+++ b/usecaseui-portal/src/app/core/services/managemencs.service.ts
@@ -20,11 +20,10 @@ export class ManagemencsService {
//mock Currently unadjustable api interface
deleteCustomer: this.baseUrl + "/uui-lcm/customers", /* delete */
createCustomer: this.baseUrl + "/uui-lcm/customers/", /* put */
- getCustomerresourceVersion: this.baseUrl + "/uui-lcm/customers/*_*", /* get */
-
createServiceType: this.baseUrl + "/uui-lcm/customers/*_*/service-subscriptions/*+*", /* put */
- getServiceTypeResourceVersion: this.baseUrl + "/uui-lcm/customers/*_*/service-subscriptions/*+*", /* get */
- deleteServiceType: this.baseUrl + "/uui-lcm/customers/*_*/service-subscriptions/*+*", /* delete */
+ getCustomerresourceVersion: this.baseUrl + "/uui-lcm/customers/*_*", /* get */
+ getServiceTypeResourceVersion: this.baseUrl + "/uui-lcm/customers/*_*/service-subscriptions/*+*",
+ deleteServiceType: this.baseUrl + "/uui-lcm/customers/*_*/service-subscriptions/*+*",
};
//The following APIs are optimizable ----------------------------------
diff --git a/usecaseui-portal/src/app/mock/json/getServiceInstanceById_customerId.json b/usecaseui-portal/src/app/mock/json/getServiceInstanceById_customerId.json
new file mode 100644
index 00000000..a85e718a
--- /dev/null
+++ b/usecaseui-portal/src/app/mock/json/getServiceInstanceById_customerId.json
@@ -0,0 +1,26 @@
+[
+ {
+ "netWorkServiceName": "vepc_service_addmml_vepc_ete_mml1",
+ "netWorkServiceId": "e05ac9b7-8011-438a-888c-116fe57e55bb",
+ "scaleType": "",
+ "aspectId": "",
+ "numberOfSteps": "",
+ "scalingDirection": ""
+ },
+ {
+ "netWorkServiceName": "vepc_spgw_cmri_ns_vepc_service_test9",
+ "netWorkServiceId": "c1b43312-f97f-4af1-be2d-b2506cf2ea41",
+ "scaleType": "",
+ "aspectId": "",
+ "numberOfSteps": "",
+ "scalingDirection": ""
+ },
+ {
+ "netWorkServiceName": "vepc_spgw_cmri_ns_vepc_service_test7",
+ "netWorkServiceId": "d7dc1f6c-9da0-43b3-9c51-f983ddaad707",
+ "scaleType": "",
+ "aspectId": "",
+ "numberOfSteps": "",
+ "scalingDirection": ""
+ }
+] \ No newline at end of file
diff --git a/usecaseui-portal/src/app/mock/json/services_scaleServices.json b/usecaseui-portal/src/app/mock/json/services_scaleServices.json
new file mode 100644
index 00000000..605b36f7
--- /dev/null
+++ b/usecaseui-portal/src/app/mock/json/services_scaleServices.json
@@ -0,0 +1,4 @@
+
+{
+ "operationId":"1e606677-7864-4bec-b50c-adcd858e4cd8"
+} \ No newline at end of file
diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_VnfInfo.json b/usecaseui-portal/src/app/mock/json/uui-lcm_VnfInfo.json
new file mode 100644
index 00000000..950c1645
--- /dev/null
+++ b/usecaseui-portal/src/app/mock/json/uui-lcm_VnfInfo.json
@@ -0,0 +1,12 @@
+
+{
+ "vnfInstId":"xxxxxxx",
+ "vnfName":"vnf1",
+ "vnfStatus":"ACTIVE",
+ "vnfVms":[
+ {"vmId":"1","vmName":"vm1"},
+ {"vmId":"2","vmName":"vm2"},
+ {"vmId":"3","vmName":"vm3"},
+ {"vmId":"4","vmName":"vm4"}
+ ]
+}
diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_healNetworkServiceInstance.json b/usecaseui-portal/src/app/mock/json/uui-lcm_healNetworkServiceInstance.json
new file mode 100644
index 00000000..f1fcc0d5
--- /dev/null
+++ b/usecaseui-portal/src/app/mock/json/uui-lcm_healNetworkServiceInstance.json
@@ -0,0 +1,3 @@
+{
+ "jobId": "jobid_xxxxxxxxx"
+} \ No newline at end of file
diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_jobs_getNsLcmJobStatus.json b/usecaseui-portal/src/app/mock/json/uui-lcm_jobs_getNsLcmJobStatus.json
new file mode 100644
index 00000000..c08dcc36
--- /dev/null
+++ b/usecaseui-portal/src/app/mock/json/uui-lcm_jobs_getNsLcmJobStatus.json
@@ -0,0 +1,19 @@
+{
+ "jobId": "string",
+ "responseDescriptor": {
+ "status": "string",
+ "progress": 90,
+ "statusDescription": "string",
+ "errorCode": "string",
+ "responseId": "string",
+ "responseHistoryList": [
+ {
+ "status": "string",
+ "progress": "string",
+ "statusDescription": "string",
+ "errorCode": "string",
+ "responseId": "string"
+ }
+ ]
+ }
+}
diff --git a/usecaseui-portal/src/app/mock/routes.js b/usecaseui-portal/src/app/mock/routes.js
index cb3cc17e..07bbe3c8 100644
--- a/usecaseui-portal/src/app/mock/routes.js
+++ b/usecaseui-portal/src/app/mock/routes.js
@@ -35,17 +35,28 @@ module.exports =
/////////////////////////
///////<-------------managemence services--------->/////
- "/uui-lcm/customers/:customer": "/serviceType",
- "/PUT/uui-lcm/customers/:name/service-subscriptions/:id": "/PUT_uui-lcm_customers_service-subscriptions",
- "/PUT/uui-lcm/customers/:customer": "/PUT_uui-lcm_customers",
- "/uui-lcm/customers/:customer/service-subscriptions/:id": "/language",
"/uui-lcm/customers/:customer/service-subscriptions": "/serviceType",
- "/uui-lcm/serviceNumByServiceType/:customer": "/CustomersColumn",
-
+ "/uui-lcm/serviceNumByServiceType/:customer":"/CustomersColumn",
+ "/PUT/uui-lcm/customers/:customer": "/PUT_uui-lcm_customers",
+ "/PUT/uui-lcm/customers/:name/service-subscriptions/:id": "/PUT_uui-lcm_customers_service-subscriptions",
+ "/uui-lcm/customers/:customer":"/getCustomerresourceVersion",
+ "/DELETE/uui-lcm/customers":"/DELETE_uui-lcm_customers",
+ "/uui-lcm/customers/:customer/service-subscriptions/:id":"/getServiceTypeResourceVersion",
+ "/DELETE/uui-lcm/customers/:customer/service-subscriptions/:id": "/DELETE_uui-lcm_customers_service-subscriptions",
/////////////////////////
///////<-------------myhttp services--------->/////
-
+ "/uui-lcm/services/:serviceId/operations/:operations":"/uui-lcm_services_progress",
+ "/uui-lcm/fetchCCVPNTemplateData/:uuid":"/uui-lcm_fetchCCVPNTemplateData",
+ "/uui-lcm/service-templates/:uuid":"/uui-lcm_e2e_service-templates",
+ "/uui-lcm/services/:serviceInstanceId":"/uui-lcm_delete_services",
+ "/uui-lcm/VnfInfo/:id":"/uui-lcm_VnfInfo",
+ "/uui-lcm/jobs/getNsLcmJobStatus/:jobId":"/uui-lcm_jobs_getNsLcmJobStatus",
+ "/services/scaleServices/:id":"/services_scaleServices",
+ "/uui-lcm/services/updateService/:id":"/uui-lcm_services_updateService",
+ "/uui-sotn/getPnfInfo/:name":"/uui-sotn_getPnfInfo",
+ "/uui-sotn/getConnectivityInfo/:id":"/uui-sotn_getConnectivityInfo",
+ "/uui-sotn/getPinterfaceByVpnId/:id":"/uui-sotn_getPinterfaceByVpnId",
/////////////////////////
///////<-------------networkhttp services--------->/////