@longvansoftware/service-js-client 1.4.9 → 1.5.0
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.
@@ -11,3 +11,4 @@ export declare const DELETE_SNAPSHOT: import("graphql").DocumentNode;
|
|
11
11
|
export declare const CREATE_CLUSTER: import("graphql").DocumentNode;
|
12
12
|
export declare const ADD_COMPUTING_IN_CLUSTER: import("graphql").DocumentNode;
|
13
13
|
export declare const REMOVE_COMPUTING_IN_CLUSTER: import("graphql").DocumentNode;
|
14
|
+
export declare const STOP_USE_COMPUTING: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
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.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!) {
|
@@ -143,3 +143,41 @@ exports.REMOVE_COMPUTING_IN_CLUSTER = (0, graphql_tag_1.gql) `
|
|
143
143
|
)
|
144
144
|
}
|
145
145
|
`;
|
146
|
+
exports.STOP_USE_COMPUTING = (0, graphql_tag_1.gql) `
|
147
|
+
mutation StopUseComputing($computingId: String!, $userId: String!) {
|
148
|
+
stopUseComputing(computingId: "string", userId: "string") {
|
149
|
+
id
|
150
|
+
name
|
151
|
+
username
|
152
|
+
password
|
153
|
+
state
|
154
|
+
os
|
155
|
+
ips
|
156
|
+
province
|
157
|
+
console
|
158
|
+
consoleCookieName
|
159
|
+
consoleCookieValue
|
160
|
+
existPortNat
|
161
|
+
ipConnect
|
162
|
+
portConnect
|
163
|
+
protocolConnect
|
164
|
+
lastBackup
|
165
|
+
backupSequence
|
166
|
+
serviceId
|
167
|
+
status
|
168
|
+
statusDetail
|
169
|
+
groupType
|
170
|
+
colocationId
|
171
|
+
ip
|
172
|
+
region
|
173
|
+
site
|
174
|
+
rack
|
175
|
+
location
|
176
|
+
position
|
177
|
+
deviceType
|
178
|
+
url
|
179
|
+
baremetalId
|
180
|
+
platform
|
181
|
+
}
|
182
|
+
}
|
183
|
+
`;
|
@@ -41,4 +41,5 @@ export declare class ComputingService extends Service {
|
|
41
41
|
getCluster(clusterId: string): Promise<any>;
|
42
42
|
getComputingByCluster(clusterId: string): Promise<any>;
|
43
43
|
getComputingByService(serviceId: string): Promise<any>;
|
44
|
+
stopUseComputing(computingId: string, userId: string): Promise<any>;
|
44
45
|
}
|
@@ -566,5 +566,22 @@ class ComputingService extends serviceSDK_1.Service {
|
|
566
566
|
}
|
567
567
|
});
|
568
568
|
}
|
569
|
+
stopUseComputing(computingId, userId) {
|
570
|
+
return __awaiter(this, void 0, void 0, function* () {
|
571
|
+
const mutation = mutations_1.STOP_USE_COMPUTING;
|
572
|
+
const variables = {
|
573
|
+
computingId,
|
574
|
+
userId
|
575
|
+
};
|
576
|
+
try {
|
577
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
578
|
+
return response.stopUseComputing;
|
579
|
+
}
|
580
|
+
catch (error) {
|
581
|
+
console.log(`Error fetching get stopUseComputing method: ${error}`);
|
582
|
+
throw error;
|
583
|
+
}
|
584
|
+
});
|
585
|
+
}
|
569
586
|
}
|
570
587
|
exports.ComputingService = ComputingService;
|