@longvansoftware/service-js-client 2.5.8 → 2.5.9
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.
|
@@ -24,3 +24,4 @@ export declare const UPDATE_CPU: DocumentNode;
|
|
|
24
24
|
export declare const UPDATE_RAM: DocumentNode;
|
|
25
25
|
export declare const CREATE_COMPUTING_FOR_EC: DocumentNode;
|
|
26
26
|
export declare const UPDATE_CLIENT_GROUP_ID_DYNAMIC: (fields?: string[]) => DocumentNode;
|
|
27
|
+
export declare const SHUTDOWN: DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UPDATE_CLIENT_GROUP_ID_DYNAMIC = exports.CREATE_COMPUTING_FOR_EC = exports.UPDATE_RAM = exports.UPDATE_CPU = exports.DELETE_COMPUTING = exports.RESTORE_COMPUTING_WAITING_REVOKE = exports.COMPUTING_WAITING_REVOKE = exports.UPDATE_NAME_COMPUTING = exports.CREATE_COMPUTING_FOR_DC = exports.UPDATE_DESCRIPTION_COMPUTING = exports.ADD_PORT_NAT = exports.STOP_USE_COMPUTING = exports.REMOVE_COMPUTING_IN_CLUSTER = exports.ADD_COMPUTING_IN_CLUSTER = exports.CREATE_CLUSTER = exports.DELETE_SNAPSHOT = exports.ROLLBACK_SNAPSHOT = exports.CREATE_SNAP_SHOT = exports.POWER_OFF = exports.POWER_ON = exports.REMOVE_PORT_NAT = exports.UPDATE_PORT_NAT = exports.CREATE_PORT_NAT = exports.UPDATE_DESCRIPTION_PORTNAT = exports.RESTARTVM = void 0;
|
|
3
|
+
exports.SHUTDOWN = exports.UPDATE_CLIENT_GROUP_ID_DYNAMIC = exports.CREATE_COMPUTING_FOR_EC = exports.UPDATE_RAM = exports.UPDATE_CPU = exports.DELETE_COMPUTING = exports.RESTORE_COMPUTING_WAITING_REVOKE = exports.COMPUTING_WAITING_REVOKE = exports.UPDATE_NAME_COMPUTING = exports.CREATE_COMPUTING_FOR_DC = exports.UPDATE_DESCRIPTION_COMPUTING = exports.ADD_PORT_NAT = exports.STOP_USE_COMPUTING = exports.REMOVE_COMPUTING_IN_CLUSTER = exports.ADD_COMPUTING_IN_CLUSTER = exports.CREATE_CLUSTER = exports.DELETE_SNAPSHOT = exports.ROLLBACK_SNAPSHOT = exports.CREATE_SNAP_SHOT = exports.POWER_OFF = exports.POWER_ON = exports.REMOVE_PORT_NAT = exports.UPDATE_PORT_NAT = exports.CREATE_PORT_NAT = exports.UPDATE_DESCRIPTION_PORTNAT = exports.RESTARTVM = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.RESTARTVM = (0, graphql_tag_1.gql) `
|
|
6
6
|
mutation Restart($computingId: String!, $actor: String!, $serviceId: String!) {
|
|
@@ -102,13 +102,13 @@ exports.ROLLBACK_SNAPSHOT = (0, graphql_tag_1.gql) `
|
|
|
102
102
|
exports.DELETE_SNAPSHOT = (0, graphql_tag_1.gql) `
|
|
103
103
|
mutation DeleteSnapshot(
|
|
104
104
|
$computingId: String!
|
|
105
|
-
$
|
|
105
|
+
$id: String!
|
|
106
106
|
$serviceId: String!
|
|
107
107
|
$updateBy: String
|
|
108
108
|
) {
|
|
109
109
|
deleteSnapshot(
|
|
110
110
|
computingId: $computingId
|
|
111
|
-
|
|
111
|
+
id: $id
|
|
112
112
|
serviceId: $serviceId
|
|
113
113
|
updateBy: $updateBy
|
|
114
114
|
)
|
|
@@ -376,3 +376,18 @@ const UPDATE_CLIENT_GROUP_ID_DYNAMIC = (fields = []) => {
|
|
|
376
376
|
`;
|
|
377
377
|
};
|
|
378
378
|
exports.UPDATE_CLIENT_GROUP_ID_DYNAMIC = UPDATE_CLIENT_GROUP_ID_DYNAMIC;
|
|
379
|
+
exports.SHUTDOWN = (0, graphql_tag_1.gql) `
|
|
380
|
+
mutation shutdown(
|
|
381
|
+
$computingId: String!
|
|
382
|
+
$isForceShutdown: Boolean!
|
|
383
|
+
$actor: String!
|
|
384
|
+
$serviceId: String!
|
|
385
|
+
) {
|
|
386
|
+
shutdown(
|
|
387
|
+
computingId: $computingId
|
|
388
|
+
isForceShutdown: $isForceShutdown
|
|
389
|
+
actor: $actor
|
|
390
|
+
serviceId: $serviceId
|
|
391
|
+
)
|
|
392
|
+
}
|
|
393
|
+
`;
|
|
@@ -64,4 +64,5 @@ export declare class ComputingService extends Service {
|
|
|
64
64
|
updateClientGroupIdDynamic(computingIds: [string] | null, groupId: string, updateBy: string, fields: string[]): Promise<any>;
|
|
65
65
|
createComputingForEC(createComputingInputForEC: any, createBy: string): Promise<any>;
|
|
66
66
|
computingDetailDynamic(computingId: string, serviceId: string, fields: string[]): Promise<any>;
|
|
67
|
+
shutdown(computingId: string, isForceShutdown: boolean, actor: string, serviceId: string): Promise<any>;
|
|
67
68
|
}
|
|
@@ -248,7 +248,7 @@ class ComputingService extends serviceSDK_1.Service {
|
|
|
248
248
|
const mutation = mutations_1.DELETE_SNAPSHOT;
|
|
249
249
|
const variables = {
|
|
250
250
|
computingId: payload.computingId,
|
|
251
|
-
|
|
251
|
+
id: payload.id,
|
|
252
252
|
serviceId: payload.serviceId,
|
|
253
253
|
updateBy,
|
|
254
254
|
};
|
|
@@ -975,5 +975,24 @@ class ComputingService extends serviceSDK_1.Service {
|
|
|
975
975
|
}
|
|
976
976
|
});
|
|
977
977
|
}
|
|
978
|
+
shutdown(computingId, isForceShutdown, actor, serviceId) {
|
|
979
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
980
|
+
const mutation = mutations_1.SHUTDOWN;
|
|
981
|
+
const variables = {
|
|
982
|
+
computingId,
|
|
983
|
+
isForceShutdown,
|
|
984
|
+
actor,
|
|
985
|
+
serviceId
|
|
986
|
+
};
|
|
987
|
+
try {
|
|
988
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
989
|
+
return response.shutdown;
|
|
990
|
+
}
|
|
991
|
+
catch (error) {
|
|
992
|
+
console.log(`Error fetching get shutdown method: ${error}`);
|
|
993
|
+
throw error;
|
|
994
|
+
}
|
|
995
|
+
});
|
|
996
|
+
}
|
|
978
997
|
}
|
|
979
998
|
exports.ComputingService = ComputingService;
|