@longvansoftware/service-js-client 2.8.6 → 2.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -409,9 +409,13 @@ exports.ADD_DISK = (0, graphql_tag_1.gql) `
409
409
  exports.EXTEND_DISK = (0, graphql_tag_1.gql) `
410
410
  mutation extendDisk(
411
411
  $computingId: String!
412
+ $username: String!
413
+ $password: String!
412
414
  ) {
413
415
  extendDisk(
414
416
  computingId: $computingId
417
+ username: $username
418
+ password: $password
415
419
  )
416
420
  }
417
421
  `;
@@ -29,3 +29,4 @@ export declare const GET_STOREGE_MAPPING_FOR_DC: DocumentNode;
29
29
  export declare const GET_COMPUTINGS_DYNAMIC: (fields?: string[]) => DocumentNode;
30
30
  export declare const COMPUTING_DETAIL_DYNAMIC: (fields?: string[]) => DocumentNode;
31
31
  export declare const IS_TEMPLATE_SUPPORT_EXTEND_DISK_AUTO: DocumentNode;
32
+ export declare const GET_SCRIPT_EXTEND_DISK: DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IS_TEMPLATE_SUPPORT_EXTEND_DISK_AUTO = exports.COMPUTING_DETAIL_DYNAMIC = exports.GET_COMPUTINGS_DYNAMIC = exports.GET_STOREGE_MAPPING_FOR_DC = exports.GET_COMPUTING_WAIT_REVOKE = exports.GET_CONSOLE = exports.GET_RESOUCE_POOL_BY_SERVICE = exports.GET_AVAILABLE_STORAGES_FOR_DC = exports.GET_AVAILABLE_SUBNET_IPS_BY_RESOURCEPOLL_ID = exports.GET_TEMPLATE = exports.GET_PORT_NATS_BY_SERVICE_ID = exports.GET_EDGES = exports.GET_COMPUTING_BY_SERVICE = exports.GET_COMPUTING_BY_CLUSTER = exports.GET_CLUSTER = exports.GET_CLUSTERS = exports.GET_LAB_INSTANCE = exports.GET_COMPUTINGS = exports.BACKUP_POINT = exports.DISK_USAGE_DATE_RANGE = exports.NETWORK_USAGE_DATE_RANGE = exports.CPU_USAGE_DATE_RANGE = exports.RAM_USAGE_DATE_RANGE = exports.DISK_USAGE_START_TIME = exports.NETWORK_USAGE_START_TIME = exports.CPU_USAGE_START_TIME = exports.RAM_USAGE_START_TIME = exports.SNAP_SHOTS = exports.PORTNATS = exports.COMPUTING_DETAIL = void 0;
3
+ exports.GET_SCRIPT_EXTEND_DISK = exports.IS_TEMPLATE_SUPPORT_EXTEND_DISK_AUTO = exports.COMPUTING_DETAIL_DYNAMIC = exports.GET_COMPUTINGS_DYNAMIC = exports.GET_STOREGE_MAPPING_FOR_DC = exports.GET_COMPUTING_WAIT_REVOKE = exports.GET_CONSOLE = exports.GET_RESOUCE_POOL_BY_SERVICE = exports.GET_AVAILABLE_STORAGES_FOR_DC = exports.GET_AVAILABLE_SUBNET_IPS_BY_RESOURCEPOLL_ID = exports.GET_TEMPLATE = exports.GET_PORT_NATS_BY_SERVICE_ID = exports.GET_EDGES = exports.GET_COMPUTING_BY_SERVICE = exports.GET_COMPUTING_BY_CLUSTER = exports.GET_CLUSTER = exports.GET_CLUSTERS = exports.GET_LAB_INSTANCE = exports.GET_COMPUTINGS = exports.BACKUP_POINT = exports.DISK_USAGE_DATE_RANGE = exports.NETWORK_USAGE_DATE_RANGE = exports.CPU_USAGE_DATE_RANGE = exports.RAM_USAGE_DATE_RANGE = exports.DISK_USAGE_START_TIME = exports.NETWORK_USAGE_START_TIME = exports.CPU_USAGE_START_TIME = exports.RAM_USAGE_START_TIME = exports.SNAP_SHOTS = exports.PORTNATS = exports.COMPUTING_DETAIL = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.COMPUTING_DETAIL = (0, graphql_tag_1.gql) `
6
6
  query ComputingDetail($computingId: String!, $serviceId: String) {
@@ -607,3 +607,8 @@ exports.IS_TEMPLATE_SUPPORT_EXTEND_DISK_AUTO = (0, graphql_tag_1.gql) `
607
607
  isTemplateSupportExtendDiskAuto(computingId: $computingId, diskIndex: $diskIndex)
608
608
  }
609
609
  `;
610
+ exports.GET_SCRIPT_EXTEND_DISK = (0, graphql_tag_1.gql) `
611
+ query GetScriptExtendDisk($templateId: String!) {
612
+ getScriptExtendDisk(templateId: $templateId)
613
+ }
614
+ `;
@@ -66,7 +66,8 @@ export declare class ComputingService extends Service {
66
66
  computingDetailDynamic(computingId: string, serviceId: string, fields: string[]): Promise<any>;
67
67
  shutdown(computingId: string, isForceShutdown: boolean, actor: string, serviceId: string): Promise<any>;
68
68
  addDisk(computingId: string, size: number, unit: string, datastoreId: string): Promise<any>;
69
- extendDisk(computingId: string): Promise<any>;
69
+ extendDisk(computingId: string, username: string, password: string): Promise<any>;
70
70
  resizeDisk(computingId: string, diskIndex: number, size: number, unit: string): Promise<any>;
71
71
  isTemplateSupportExtendDiskAuto(computingId: string, diskIndex: number): Promise<any>;
72
+ getScriptExtendDisk(templateId: string): Promise<any>;
72
73
  }
@@ -1013,11 +1013,13 @@ class ComputingService extends serviceSDK_1.Service {
1013
1013
  }
1014
1014
  });
1015
1015
  }
1016
- extendDisk(computingId) {
1016
+ extendDisk(computingId, username, password) {
1017
1017
  return __awaiter(this, void 0, void 0, function* () {
1018
1018
  const mutation = mutations_1.EXTEND_DISK;
1019
1019
  const variables = {
1020
1020
  computingId,
1021
+ username,
1022
+ password
1021
1023
  };
1022
1024
  try {
1023
1025
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -1065,5 +1067,21 @@ class ComputingService extends serviceSDK_1.Service {
1065
1067
  }
1066
1068
  });
1067
1069
  }
1070
+ getScriptExtendDisk(templateId) {
1071
+ return __awaiter(this, void 0, void 0, function* () {
1072
+ const query = queries_1.GET_SCRIPT_EXTEND_DISK;
1073
+ const variables = {
1074
+ templateId
1075
+ };
1076
+ try {
1077
+ const response = yield this.graphqlQueryV2(query, variables);
1078
+ return response.getScriptExtendDisk;
1079
+ }
1080
+ catch (error) {
1081
+ console.log(`Error in getScriptExtendDisk: ${error}`);
1082
+ throw error;
1083
+ }
1084
+ });
1085
+ }
1068
1086
  }
1069
1087
  exports.ComputingService = ComputingService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/service-js-client",
3
- "version": "2.8.6",
3
+ "version": "2.8.7",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [