@scaleway/sdk-instance 2.3.2 → 2.4.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.
- package/README.md +1 -1
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/index.gen.js +2 -4
- package/dist/v1/api.gen.js +820 -1186
- package/dist/v1/api.utils.js +202 -274
- package/dist/v1/content.gen.js +39 -56
- package/dist/v1/index.js +17 -15
- package/dist/v1/marshalling.gen.js +1038 -1637
- package/dist/v1/types.gen.d.ts +12 -12
- package/dist/v1/types.private.gen.d.ts +2 -2
- package/package.json +4 -4
package/dist/v1/api.utils.js
CHANGED
|
@@ -1,277 +1,205 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { API } from "./api.gen.js";
|
|
1
|
+
import { API as API$1 } from "./api.gen.js";
|
|
3
2
|
import { IMAGE_TRANSIENT_STATUSES, PRIVATE_NIC_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { createExponentialBackoffStrategy, tryAtIntervals, validatePathParam } from "@scaleway/sdk-client";
|
|
4
|
+
var validateNotUndefined = (obj) => {
|
|
5
|
+
if (obj === void 0) throw new TypeError(`object was found undefined`);
|
|
6
|
+
return obj;
|
|
7
7
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
if (!found) {
|
|
205
|
-
throw new Error(`could not find key to attach volume ${request.volumeId}`);
|
|
206
|
-
}
|
|
207
|
-
return this.updateServer({
|
|
208
|
-
serverId: request.serverId,
|
|
209
|
-
volumes: newVolumes,
|
|
210
|
-
zone: request.zone
|
|
211
|
-
}).then((obj) => obj);
|
|
212
|
-
};
|
|
213
|
-
/**
|
|
214
|
-
* Detaches a volume from a server.
|
|
215
|
-
*
|
|
216
|
-
* @param request - The request {@link DetachVolumeRequest}
|
|
217
|
-
* @returns A Promise of DetachVolumeResponse
|
|
218
|
-
*/
|
|
219
|
-
detachVolume = async (request) => {
|
|
220
|
-
const server = await this.getVolume({
|
|
221
|
-
volumeId: request.volumeId,
|
|
222
|
-
zone: request.zone
|
|
223
|
-
}).then((res) => validateNotUndefined(res.volume?.server?.id)).then(
|
|
224
|
-
(serverId) => this.getServer({
|
|
225
|
-
serverId,
|
|
226
|
-
zone: request.zone
|
|
227
|
-
})
|
|
228
|
-
).then((res) => validateNotUndefined(res.server));
|
|
229
|
-
const newVolumes = {};
|
|
230
|
-
for (const [key, volume] of Object.entries(server.volumes)) {
|
|
231
|
-
if (volume.id !== request.volumeId) {
|
|
232
|
-
newVolumes[key] = { id: volume.id, name: volume.name };
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
return this.updateServer({
|
|
236
|
-
serverId: server.id,
|
|
237
|
-
volumes: newVolumes,
|
|
238
|
-
zone: request.zone
|
|
239
|
-
}).then((obj) => obj);
|
|
240
|
-
};
|
|
241
|
-
/**
|
|
242
|
-
* Get the content of a user data on a server for the given key.
|
|
243
|
-
*
|
|
244
|
-
* @param request - The request {@link GetServerUserDataRequest}
|
|
245
|
-
* @returns The content of the key
|
|
246
|
-
*/
|
|
247
|
-
getServerUserData = (request) => this.client.fetch({
|
|
248
|
-
method: "GET",
|
|
249
|
-
path: `/instance/v1/zones/${validatePathParam(
|
|
250
|
-
"zone",
|
|
251
|
-
request.zone ?? this.client.settings.defaultZone
|
|
252
|
-
)}/servers/${validatePathParam(
|
|
253
|
-
"serverId",
|
|
254
|
-
request.serverId
|
|
255
|
-
)}/user_data/${validatePathParam("key", request.key)}`
|
|
256
|
-
});
|
|
257
|
-
/**
|
|
258
|
-
* Sets the content of a user data on a server for the given key.
|
|
259
|
-
*
|
|
260
|
-
* @param request - The request {@link SetServerUserDataRequest}
|
|
261
|
-
*/
|
|
262
|
-
setServerUserData = (request) => this.client.fetch({
|
|
263
|
-
body: request.content,
|
|
264
|
-
headers: { "Content-Type": "text/plain" },
|
|
265
|
-
method: "PATCH",
|
|
266
|
-
path: `/instance/v1/zones/${validatePathParam(
|
|
267
|
-
"zone",
|
|
268
|
-
request.zone ?? this.client.settings.defaultZone
|
|
269
|
-
)}/servers/${validatePathParam(
|
|
270
|
-
"serverId",
|
|
271
|
-
request.serverId
|
|
272
|
-
)}/user_data/${validatePathParam("key", request.key)}`
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
export {
|
|
276
|
-
InstanceV1UtilsAPI
|
|
8
|
+
var InstanceV1UtilsAPI = class extends API$1 {
|
|
9
|
+
/**
|
|
10
|
+
* Waits for {@link Image} to be in a final state.
|
|
11
|
+
*
|
|
12
|
+
* @param request - The request {@link GetImageRequest}
|
|
13
|
+
* @param options - The waiting options
|
|
14
|
+
* @returns A Promise of Image
|
|
15
|
+
*/
|
|
16
|
+
waitForImage = (request, options) => tryAtIntervals(async () => {
|
|
17
|
+
const value = await this.getImage(request).then((res) => res.image);
|
|
18
|
+
return {
|
|
19
|
+
done: !IMAGE_TRANSIENT_STATUSES.includes(value.state),
|
|
20
|
+
value
|
|
21
|
+
};
|
|
22
|
+
}, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
|
|
23
|
+
/**
|
|
24
|
+
* Waits for {@link PrivateNIC} to be in a final state.
|
|
25
|
+
*
|
|
26
|
+
* @param request - The request {@link GetPrivateNICRequest}
|
|
27
|
+
* @param options - The waiting options
|
|
28
|
+
* @returns A Promise of PrivateNIC
|
|
29
|
+
*/
|
|
30
|
+
waitForPrivateNIC = (request, options) => tryAtIntervals(async () => {
|
|
31
|
+
const value = await this.getPrivateNIC(request).then((res) => res.privateNic);
|
|
32
|
+
return {
|
|
33
|
+
done: !PRIVATE_NIC_TRANSIENT_STATUSES.includes(value.state),
|
|
34
|
+
value
|
|
35
|
+
};
|
|
36
|
+
}, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
|
|
37
|
+
/**
|
|
38
|
+
* Waits for {@link Server} to be in a final state.
|
|
39
|
+
*
|
|
40
|
+
* @param request - The request {@link GetServerRequest}
|
|
41
|
+
* @param options - The waiting options
|
|
42
|
+
* @returns A Promise of Server
|
|
43
|
+
*/
|
|
44
|
+
waitForServer = (request, options) => tryAtIntervals(async () => {
|
|
45
|
+
const value = await this.getServer(request).then((res) => res.server);
|
|
46
|
+
return {
|
|
47
|
+
done: !SERVER_TRANSIENT_STATUSES.includes(value.state),
|
|
48
|
+
value
|
|
49
|
+
};
|
|
50
|
+
}, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
|
|
51
|
+
/**
|
|
52
|
+
* Waits for {@link Server} to be in a final state.
|
|
53
|
+
*
|
|
54
|
+
* @param request - The request {@link GetServerRequest}
|
|
55
|
+
* @param options - The waiting options
|
|
56
|
+
* @returns A Promise of Server
|
|
57
|
+
*/
|
|
58
|
+
waitForSnapshot = (request, options) => tryAtIntervals(async () => {
|
|
59
|
+
const value = await this.getSnapshot(request).then((res) => res.snapshot);
|
|
60
|
+
return {
|
|
61
|
+
done: !SNAPSHOT_TRANSIENT_STATUSES.includes(value.state),
|
|
62
|
+
value
|
|
63
|
+
};
|
|
64
|
+
}, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
|
|
65
|
+
/**
|
|
66
|
+
* Waits for {@link Volume} to be in a final state.
|
|
67
|
+
*
|
|
68
|
+
* @param request - The request {@link GetVolumeRequest}
|
|
69
|
+
* @param options - The waiting options
|
|
70
|
+
* @returns A Promise of Volume
|
|
71
|
+
*/
|
|
72
|
+
waitForVolume = (request, options) => tryAtIntervals(async () => {
|
|
73
|
+
const value = await this.getVolume(request).then((res) => res.volume);
|
|
74
|
+
return {
|
|
75
|
+
done: !VOLUME_TRANSIENT_STATUSES.includes(value.state),
|
|
76
|
+
value
|
|
77
|
+
};
|
|
78
|
+
}, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
|
|
79
|
+
/**
|
|
80
|
+
* Updates a server.
|
|
81
|
+
*
|
|
82
|
+
* @param request - The request {@link UpdateServerRequest}
|
|
83
|
+
* @returns A Promise of UpdateServerResponse
|
|
84
|
+
*/
|
|
85
|
+
updateServer = (request) => this._updateServer(request);
|
|
86
|
+
/**
|
|
87
|
+
* Creates a server.
|
|
88
|
+
*
|
|
89
|
+
* @param request - The request {@link CreateServerRequest}
|
|
90
|
+
* @returns A Promise of CreateServerResponse
|
|
91
|
+
*/
|
|
92
|
+
createServer = (request) => this._createServer(request);
|
|
93
|
+
/**
|
|
94
|
+
* Starts an action and wait for the server to be in the correct "terminal
|
|
95
|
+
* state" expected by this action.
|
|
96
|
+
*
|
|
97
|
+
* @param request - The request {@link ServerActionRequest}
|
|
98
|
+
* @returns A Promise of Server
|
|
99
|
+
*/
|
|
100
|
+
serverActionAndWait = async (request, options) => {
|
|
101
|
+
const finalServer = await this.serverAction(request).then(() => this.waitForServer({
|
|
102
|
+
serverId: request.serverId,
|
|
103
|
+
zone: request.zone
|
|
104
|
+
}, options));
|
|
105
|
+
let expectedState;
|
|
106
|
+
switch (request.action) {
|
|
107
|
+
case "poweron":
|
|
108
|
+
case "reboot":
|
|
109
|
+
expectedState = "running";
|
|
110
|
+
break;
|
|
111
|
+
case "poweroff":
|
|
112
|
+
expectedState = "stopped";
|
|
113
|
+
break;
|
|
114
|
+
case "stop_in_place":
|
|
115
|
+
expectedState = "stopped in place";
|
|
116
|
+
break;
|
|
117
|
+
default: break;
|
|
118
|
+
}
|
|
119
|
+
if (expectedState && finalServer.state !== expectedState) throw new Error(`expected state ${expectedState} but found ${finalServer.state}: ${finalServer.stateDetail}`);
|
|
120
|
+
return finalServer;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Attaches a volume to a server.
|
|
124
|
+
*
|
|
125
|
+
* @param request - The request {@link AttachVolumeRequest}
|
|
126
|
+
* @returns A Promise of AttachVolumeResponse
|
|
127
|
+
*/
|
|
128
|
+
attachVolume = async (request) => {
|
|
129
|
+
const volumes = await this.getServer({
|
|
130
|
+
serverId: request.serverId,
|
|
131
|
+
zone: request.zone
|
|
132
|
+
}).then((res) => validateNotUndefined(res.server?.volumes));
|
|
133
|
+
const newVolumes = {};
|
|
134
|
+
for (const [key, server] of Object.entries(volumes)) newVolumes[key] = {
|
|
135
|
+
id: server.id,
|
|
136
|
+
name: server.name
|
|
137
|
+
};
|
|
138
|
+
let found = false;
|
|
139
|
+
const volumesLength = Object.keys(volumes).length;
|
|
140
|
+
for (let index = 0; index <= volumesLength; index += 1) {
|
|
141
|
+
const key = index.toString();
|
|
142
|
+
if (!(key in newVolumes)) {
|
|
143
|
+
newVolumes[key] = {
|
|
144
|
+
id: request.volumeId,
|
|
145
|
+
name: request.volumeId
|
|
146
|
+
};
|
|
147
|
+
found = true;
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
if (!found) throw new Error(`could not find key to attach volume ${request.volumeId}`);
|
|
152
|
+
return this.updateServer({
|
|
153
|
+
serverId: request.serverId,
|
|
154
|
+
volumes: newVolumes,
|
|
155
|
+
zone: request.zone
|
|
156
|
+
}).then((obj) => obj);
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Detaches a volume from a server.
|
|
160
|
+
*
|
|
161
|
+
* @param request - The request {@link DetachVolumeRequest}
|
|
162
|
+
* @returns A Promise of DetachVolumeResponse
|
|
163
|
+
*/
|
|
164
|
+
detachVolume = async (request) => {
|
|
165
|
+
const server = await this.getVolume({
|
|
166
|
+
volumeId: request.volumeId,
|
|
167
|
+
zone: request.zone
|
|
168
|
+
}).then((res) => validateNotUndefined(res.volume?.server?.id)).then((serverId) => this.getServer({
|
|
169
|
+
serverId,
|
|
170
|
+
zone: request.zone
|
|
171
|
+
})).then((res) => validateNotUndefined(res.server));
|
|
172
|
+
const newVolumes = {};
|
|
173
|
+
for (const [key, volume] of Object.entries(server.volumes)) if (volume.id !== request.volumeId) newVolumes[key] = {
|
|
174
|
+
id: volume.id,
|
|
175
|
+
name: volume.name
|
|
176
|
+
};
|
|
177
|
+
return this.updateServer({
|
|
178
|
+
serverId: server.id,
|
|
179
|
+
volumes: newVolumes,
|
|
180
|
+
zone: request.zone
|
|
181
|
+
}).then((obj) => obj);
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* Get the content of a user data on a server for the given key.
|
|
185
|
+
*
|
|
186
|
+
* @param request - The request {@link GetServerUserDataRequest}
|
|
187
|
+
* @returns The content of the key
|
|
188
|
+
*/
|
|
189
|
+
getServerUserData = (request) => this.client.fetch({
|
|
190
|
+
method: "GET",
|
|
191
|
+
path: `/instance/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/user_data/${validatePathParam("key", request.key)}`
|
|
192
|
+
});
|
|
193
|
+
/**
|
|
194
|
+
* Sets the content of a user data on a server for the given key.
|
|
195
|
+
*
|
|
196
|
+
* @param request - The request {@link SetServerUserDataRequest}
|
|
197
|
+
*/
|
|
198
|
+
setServerUserData = (request) => this.client.fetch({
|
|
199
|
+
body: request.content,
|
|
200
|
+
headers: { "Content-Type": "text/plain" },
|
|
201
|
+
method: "PATCH",
|
|
202
|
+
path: `/instance/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/user_data/${validatePathParam("key", request.key)}`
|
|
203
|
+
});
|
|
277
204
|
};
|
|
205
|
+
export { InstanceV1UtilsAPI };
|
package/dist/v1/content.gen.js
CHANGED
|
@@ -1,62 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const IP_TRANSIENT_STATUSES = [
|
|
5
|
-
|
|
6
|
-
];
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
];
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
];
|
|
17
|
-
const SERVER_IP_TRANSIENT_STATUSES = [
|
|
18
|
-
"pending"
|
|
19
|
-
];
|
|
20
|
-
const SERVER_TRANSIENT_STATUSES = [
|
|
21
|
-
"starting",
|
|
22
|
-
"stopping"
|
|
23
|
-
];
|
|
1
|
+
/** Lists transient statutes of the enum {@link ImageState}. */
|
|
2
|
+
const IMAGE_TRANSIENT_STATUSES = ["creating"];
|
|
3
|
+
/** Lists transient statutes of the enum {@link IpState}. */
|
|
4
|
+
const IP_TRANSIENT_STATUSES = ["pending"];
|
|
5
|
+
/** Lists transient statutes of the enum {@link PrivateNICState}. */
|
|
6
|
+
const PRIVATE_NIC_TRANSIENT_STATUSES = ["syncing"];
|
|
7
|
+
/** Lists transient statutes of the enum {@link SecurityGroupState}. */
|
|
8
|
+
const SECURITY_GROUP_TRANSIENT_STATUSES = ["syncing"];
|
|
9
|
+
/** Lists transient statutes of the enum {@link ServerFilesystemState}. */
|
|
10
|
+
const SERVER_FILESYSTEM_TRANSIENT_STATUSES = ["attaching", "detaching"];
|
|
11
|
+
/** Lists transient statutes of the enum {@link ServerIpState}. */
|
|
12
|
+
const SERVER_IP_TRANSIENT_STATUSES = ["pending"];
|
|
13
|
+
/** Lists transient statutes of the enum {@link ServerState}. */
|
|
14
|
+
const SERVER_TRANSIENT_STATUSES = ["starting", "stopping"];
|
|
15
|
+
/** Lists transient statutes of the enum {@link SnapshotState}. */
|
|
24
16
|
const SNAPSHOT_TRANSIENT_STATUSES = [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
"snapshotting",
|
|
18
|
+
"importing",
|
|
19
|
+
"exporting"
|
|
28
20
|
];
|
|
21
|
+
/** Lists transient statutes of the enum {@link TaskStatus}. */
|
|
29
22
|
const TASK_TRANSIENT_STATUSES = [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
"pending",
|
|
24
|
+
"started",
|
|
25
|
+
"retry"
|
|
33
26
|
];
|
|
27
|
+
/** Lists transient statutes of the enum {@link VolumeServerState}. */
|
|
34
28
|
const VOLUME_SERVER_TRANSIENT_STATUSES = [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
];
|
|
29
|
+
"snapshotting",
|
|
30
|
+
"resizing",
|
|
31
|
+
"fetching",
|
|
32
|
+
"saving",
|
|
33
|
+
"hotsyncing",
|
|
34
|
+
"attaching"
|
|
35
|
+
];
|
|
36
|
+
/** Lists transient statutes of the enum {@link VolumeState}. */
|
|
42
37
|
const VOLUME_TRANSIENT_STATUSES = [
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
];
|
|
50
|
-
export {
|
|
51
|
-
IMAGE_TRANSIENT_STATUSES,
|
|
52
|
-
IP_TRANSIENT_STATUSES,
|
|
53
|
-
PRIVATE_NIC_TRANSIENT_STATUSES,
|
|
54
|
-
SECURITY_GROUP_TRANSIENT_STATUSES,
|
|
55
|
-
SERVER_FILESYSTEM_TRANSIENT_STATUSES,
|
|
56
|
-
SERVER_IP_TRANSIENT_STATUSES,
|
|
57
|
-
SERVER_TRANSIENT_STATUSES,
|
|
58
|
-
SNAPSHOT_TRANSIENT_STATUSES,
|
|
59
|
-
TASK_TRANSIENT_STATUSES,
|
|
60
|
-
VOLUME_SERVER_TRANSIENT_STATUSES,
|
|
61
|
-
VOLUME_TRANSIENT_STATUSES
|
|
62
|
-
};
|
|
38
|
+
"snapshotting",
|
|
39
|
+
"fetching",
|
|
40
|
+
"saving",
|
|
41
|
+
"attaching",
|
|
42
|
+
"resizing",
|
|
43
|
+
"hotsyncing"
|
|
44
|
+
];
|
|
45
|
+
export { IMAGE_TRANSIENT_STATUSES, IP_TRANSIENT_STATUSES, PRIVATE_NIC_TRANSIENT_STATUSES, SECURITY_GROUP_TRANSIENT_STATUSES, SERVER_FILESYSTEM_TRANSIENT_STATUSES, SERVER_IP_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, TASK_TRANSIENT_STATUSES, VOLUME_SERVER_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES };
|
package/dist/v1/index.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { IMAGE_TRANSIENT_STATUSES, IP_TRANSIENT_STATUSES, PRIVATE_NIC_TRANSIENT_STATUSES, SECURITY_GROUP_TRANSIENT_STATUSES, SERVER_FILESYSTEM_TRANSIENT_STATUSES, SERVER_IP_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, TASK_TRANSIENT_STATUSES, VOLUME_SERVER_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
import { InstanceV1UtilsAPI } from "./api.utils.js";
|
|
4
|
+
var v1_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
API: () => InstanceV1UtilsAPI,
|
|
6
|
+
IMAGE_TRANSIENT_STATUSES: () => IMAGE_TRANSIENT_STATUSES,
|
|
7
|
+
IP_TRANSIENT_STATUSES: () => IP_TRANSIENT_STATUSES,
|
|
8
|
+
PRIVATE_NIC_TRANSIENT_STATUSES: () => PRIVATE_NIC_TRANSIENT_STATUSES,
|
|
9
|
+
SECURITY_GROUP_TRANSIENT_STATUSES: () => SECURITY_GROUP_TRANSIENT_STATUSES,
|
|
10
|
+
SERVER_FILESYSTEM_TRANSIENT_STATUSES: () => SERVER_FILESYSTEM_TRANSIENT_STATUSES,
|
|
11
|
+
SERVER_IP_TRANSIENT_STATUSES: () => SERVER_IP_TRANSIENT_STATUSES,
|
|
12
|
+
SERVER_TRANSIENT_STATUSES: () => SERVER_TRANSIENT_STATUSES,
|
|
13
|
+
SNAPSHOT_TRANSIENT_STATUSES: () => SNAPSHOT_TRANSIENT_STATUSES,
|
|
14
|
+
TASK_TRANSIENT_STATUSES: () => TASK_TRANSIENT_STATUSES,
|
|
15
|
+
VOLUME_SERVER_TRANSIENT_STATUSES: () => VOLUME_SERVER_TRANSIENT_STATUSES,
|
|
16
|
+
VOLUME_TRANSIENT_STATUSES: () => VOLUME_TRANSIENT_STATUSES
|
|
17
|
+
});
|
|
18
|
+
export { v1_exports };
|