@scaleway/sdk-baremetal 1.2.0 → 1.3.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/dist/v1/api.gen.cjs
CHANGED
|
@@ -117,10 +117,10 @@ class API extends sdkClient.API {
|
|
|
117
117
|
* @param request - The request {@link InstallServerRequest}
|
|
118
118
|
* @returns A Promise of Server
|
|
119
119
|
*/
|
|
120
|
-
installServer = (request) => this.client.fetch(
|
|
120
|
+
installServer = async (request) => this.client.fetch(
|
|
121
121
|
{
|
|
122
122
|
body: JSON.stringify(
|
|
123
|
-
marshalling_gen.marshalInstallServerRequest(request, this.client.settings)
|
|
123
|
+
await marshalling_gen.marshalInstallServerRequest(request, this.client.settings)
|
|
124
124
|
),
|
|
125
125
|
headers: jsonContentHeaders,
|
|
126
126
|
method: "POST",
|
package/dist/v1/api.gen.js
CHANGED
|
@@ -115,10 +115,10 @@ class API extends API$1 {
|
|
|
115
115
|
* @param request - The request {@link InstallServerRequest}
|
|
116
116
|
* @returns A Promise of Server
|
|
117
117
|
*/
|
|
118
|
-
installServer = (request) => this.client.fetch(
|
|
118
|
+
installServer = async (request) => this.client.fetch(
|
|
119
119
|
{
|
|
120
120
|
body: JSON.stringify(
|
|
121
|
-
marshalInstallServerRequest(request, this.client.settings)
|
|
121
|
+
await marshalInstallServerRequest(request, this.client.settings)
|
|
122
122
|
),
|
|
123
123
|
headers: jsonContentHeaders,
|
|
124
124
|
method: "POST",
|
|
@@ -226,6 +226,7 @@ const unmarshalServer = (data) => {
|
|
|
226
226
|
status: data.status,
|
|
227
227
|
tags: data.tags,
|
|
228
228
|
updatedAt: sdkClient.unmarshalDate(data.updated_at),
|
|
229
|
+
userData: data.user_data,
|
|
229
230
|
zone: data.zone
|
|
230
231
|
};
|
|
231
232
|
};
|
|
@@ -249,6 +250,8 @@ const unmarshalOS = (data) => {
|
|
|
249
250
|
}
|
|
250
251
|
return {
|
|
251
252
|
allowed: data.allowed,
|
|
253
|
+
cloudInitSupported: data.cloud_init_supported,
|
|
254
|
+
cloudInitVersion: data.cloud_init_version,
|
|
252
255
|
customPartitioningSupported: data.custom_partitioning_supported,
|
|
253
256
|
enabled: data.enabled,
|
|
254
257
|
id: data.id,
|
|
@@ -632,6 +635,7 @@ const marshalCreateServerRequest = (request, defaults) => ({
|
|
|
632
635
|
option_ids: request.optionIds,
|
|
633
636
|
protected: request.protected,
|
|
634
637
|
tags: request.tags,
|
|
638
|
+
user_data: request.userData,
|
|
635
639
|
...sdkClient.resolveOneOf([
|
|
636
640
|
{
|
|
637
641
|
default: defaults.defaultProjectId,
|
|
@@ -648,7 +652,7 @@ const marshalCreateServerRequest = (request, defaults) => ({
|
|
|
648
652
|
const marshalAddOptionServerRequest = (request, defaults) => ({
|
|
649
653
|
expires_at: request.expiresAt
|
|
650
654
|
});
|
|
651
|
-
const marshalInstallServerRequest = (request, defaults) => ({
|
|
655
|
+
const marshalInstallServerRequest = async (request, defaults) => ({
|
|
652
656
|
hostname: request.hostname,
|
|
653
657
|
os_id: request.osId,
|
|
654
658
|
partitioning_schema: request.partitioningSchema !== void 0 ? marshalSchema(request.partitioningSchema) : void 0,
|
|
@@ -656,7 +660,8 @@ const marshalInstallServerRequest = (request, defaults) => ({
|
|
|
656
660
|
service_password: request.servicePassword,
|
|
657
661
|
service_user: request.serviceUser,
|
|
658
662
|
ssh_key_ids: request.sshKeyIds,
|
|
659
|
-
user: request.user
|
|
663
|
+
user: request.user,
|
|
664
|
+
user_data: request.userData !== void 0 ? await sdkClient.marshalBlobToScwFile(request.userData) : void 0
|
|
660
665
|
});
|
|
661
666
|
const marshalPrivateNetworkApiAddServerPrivateNetworkRequest = (request, defaults) => ({
|
|
662
667
|
private_network_id: request.privateNetworkId
|
|
@@ -682,7 +687,8 @@ const marshalUpdateServerRequest = (request, defaults) => ({
|
|
|
682
687
|
description: request.description,
|
|
683
688
|
name: request.name,
|
|
684
689
|
protected: request.protected,
|
|
685
|
-
tags: request.tags
|
|
690
|
+
tags: request.tags,
|
|
691
|
+
user_data: request.userData
|
|
686
692
|
});
|
|
687
693
|
const marshalUpdateSettingRequest = (request, defaults) => ({
|
|
688
694
|
enabled: request.enabled
|
|
@@ -21,7 +21,7 @@ export declare const unmarshalSetServerPrivateNetworksResponse: (data: unknown)
|
|
|
21
21
|
export declare const marshalSchema: (request: Schema, defaults: DefaultValues) => Record<string, unknown>;
|
|
22
22
|
export declare const marshalCreateServerRequest: (request: CreateServerRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
23
23
|
export declare const marshalAddOptionServerRequest: (request: AddOptionServerRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
24
|
-
export declare const marshalInstallServerRequest: (request: InstallServerRequest, defaults: DefaultValues) => Record<string, unknown
|
|
24
|
+
export declare const marshalInstallServerRequest: (request: InstallServerRequest, defaults: DefaultValues) => Promise<Record<string, unknown>>;
|
|
25
25
|
export declare const marshalPrivateNetworkApiAddServerPrivateNetworkRequest: (request: PrivateNetworkApiAddServerPrivateNetworkRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
26
26
|
export declare const marshalPrivateNetworkApiSetServerPrivateNetworksRequest: (request: PrivateNetworkApiSetServerPrivateNetworksRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
27
27
|
export declare const marshalRebootServerRequest: (request: RebootServerRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveOneOf, isJSONObject, unmarshalArrayOfObject, unmarshalDate, unmarshalTimeSeries, unmarshalMoney } from "@scaleway/sdk-client";
|
|
1
|
+
import { resolveOneOf, marshalBlobToScwFile, isJSONObject, unmarshalArrayOfObject, unmarshalDate, unmarshalTimeSeries, unmarshalMoney } from "@scaleway/sdk-client";
|
|
2
2
|
const unmarshalSchemaPartition = (data) => {
|
|
3
3
|
if (!isJSONObject(data)) {
|
|
4
4
|
throw new TypeError(
|
|
@@ -224,6 +224,7 @@ const unmarshalServer = (data) => {
|
|
|
224
224
|
status: data.status,
|
|
225
225
|
tags: data.tags,
|
|
226
226
|
updatedAt: unmarshalDate(data.updated_at),
|
|
227
|
+
userData: data.user_data,
|
|
227
228
|
zone: data.zone
|
|
228
229
|
};
|
|
229
230
|
};
|
|
@@ -247,6 +248,8 @@ const unmarshalOS = (data) => {
|
|
|
247
248
|
}
|
|
248
249
|
return {
|
|
249
250
|
allowed: data.allowed,
|
|
251
|
+
cloudInitSupported: data.cloud_init_supported,
|
|
252
|
+
cloudInitVersion: data.cloud_init_version,
|
|
250
253
|
customPartitioningSupported: data.custom_partitioning_supported,
|
|
251
254
|
enabled: data.enabled,
|
|
252
255
|
id: data.id,
|
|
@@ -630,6 +633,7 @@ const marshalCreateServerRequest = (request, defaults) => ({
|
|
|
630
633
|
option_ids: request.optionIds,
|
|
631
634
|
protected: request.protected,
|
|
632
635
|
tags: request.tags,
|
|
636
|
+
user_data: request.userData,
|
|
633
637
|
...resolveOneOf([
|
|
634
638
|
{
|
|
635
639
|
default: defaults.defaultProjectId,
|
|
@@ -646,7 +650,7 @@ const marshalCreateServerRequest = (request, defaults) => ({
|
|
|
646
650
|
const marshalAddOptionServerRequest = (request, defaults) => ({
|
|
647
651
|
expires_at: request.expiresAt
|
|
648
652
|
});
|
|
649
|
-
const marshalInstallServerRequest = (request, defaults) => ({
|
|
653
|
+
const marshalInstallServerRequest = async (request, defaults) => ({
|
|
650
654
|
hostname: request.hostname,
|
|
651
655
|
os_id: request.osId,
|
|
652
656
|
partitioning_schema: request.partitioningSchema !== void 0 ? marshalSchema(request.partitioningSchema) : void 0,
|
|
@@ -654,7 +658,8 @@ const marshalInstallServerRequest = (request, defaults) => ({
|
|
|
654
658
|
service_password: request.servicePassword,
|
|
655
659
|
service_user: request.serviceUser,
|
|
656
660
|
ssh_key_ids: request.sshKeyIds,
|
|
657
|
-
user: request.user
|
|
661
|
+
user: request.user,
|
|
662
|
+
user_data: request.userData !== void 0 ? await marshalBlobToScwFile(request.userData) : void 0
|
|
658
663
|
});
|
|
659
664
|
const marshalPrivateNetworkApiAddServerPrivateNetworkRequest = (request, defaults) => ({
|
|
660
665
|
private_network_id: request.privateNetworkId
|
|
@@ -680,7 +685,8 @@ const marshalUpdateServerRequest = (request, defaults) => ({
|
|
|
680
685
|
description: request.description,
|
|
681
686
|
name: request.name,
|
|
682
687
|
protected: request.protected,
|
|
683
|
-
tags: request.tags
|
|
688
|
+
tags: request.tags,
|
|
689
|
+
user_data: request.userData
|
|
684
690
|
});
|
|
685
691
|
const marshalUpdateSettingRequest = (request, defaults) => ({
|
|
686
692
|
enabled: request.enabled
|
package/dist/v1/types.gen.d.ts
CHANGED
|
@@ -412,6 +412,10 @@ export type CreateServerRequest = {
|
|
|
412
412
|
* If enabled, the server can not be deleted.
|
|
413
413
|
*/
|
|
414
414
|
protected: boolean;
|
|
415
|
+
/**
|
|
416
|
+
* Configuration data to pass to cloud-init such as a YAML cloud config data or a user-data script.
|
|
417
|
+
*/
|
|
418
|
+
userData?: string;
|
|
415
419
|
};
|
|
416
420
|
export interface Server {
|
|
417
421
|
/**
|
|
@@ -494,6 +498,10 @@ export interface Server {
|
|
|
494
498
|
* If enabled, the server can not be deleted.
|
|
495
499
|
*/
|
|
496
500
|
protected: boolean;
|
|
501
|
+
/**
|
|
502
|
+
* Optional configuration data passed to cloud-init.
|
|
503
|
+
*/
|
|
504
|
+
userData?: string;
|
|
497
505
|
}
|
|
498
506
|
export interface OS {
|
|
499
507
|
/**
|
|
@@ -548,6 +556,14 @@ export interface OS {
|
|
|
548
556
|
* Defines if custom partitioning is supported by this OS.
|
|
549
557
|
*/
|
|
550
558
|
customPartitioningSupported: boolean;
|
|
559
|
+
/**
|
|
560
|
+
* Defines if cloud-init is supported by this OS.
|
|
561
|
+
*/
|
|
562
|
+
cloudInitSupported: boolean;
|
|
563
|
+
/**
|
|
564
|
+
* Defines the cloud-init API version used by this OS.
|
|
565
|
+
*/
|
|
566
|
+
cloudInitVersion?: string;
|
|
551
567
|
/**
|
|
552
568
|
* Zone in which is the OS is available.
|
|
553
569
|
*/
|
|
@@ -954,6 +970,10 @@ export type InstallServerRequest = {
|
|
|
954
970
|
* Partitioning schema.
|
|
955
971
|
*/
|
|
956
972
|
partitioningSchema?: Schema;
|
|
973
|
+
/**
|
|
974
|
+
* @deprecated Configuration data to pass to cloud-init such as a YAML cloud config data or a user-data script.
|
|
975
|
+
*/
|
|
976
|
+
userData?: Blob;
|
|
957
977
|
};
|
|
958
978
|
export type ListOSRequest = {
|
|
959
979
|
/**
|
|
@@ -1369,6 +1389,10 @@ export type UpdateServerRequest = {
|
|
|
1369
1389
|
* If enabled, the server can not be deleted.
|
|
1370
1390
|
*/
|
|
1371
1391
|
protected?: boolean;
|
|
1392
|
+
/**
|
|
1393
|
+
* Configuration data to pass to cloud-init such as a YAML cloud config data or a user-data script.
|
|
1394
|
+
*/
|
|
1395
|
+
userData?: string;
|
|
1372
1396
|
};
|
|
1373
1397
|
export type UpdateSettingRequest = {
|
|
1374
1398
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-baremetal",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Scaleway SDK baremetal",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@scaleway/random-name": "5.1.2",
|
|
33
|
-
"@scaleway/sdk-std": "1.
|
|
33
|
+
"@scaleway/sdk-std": "1.2.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^1.3.
|
|
36
|
+
"@scaleway/sdk-client": "^1.3.3"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@scaleway/sdk-client": "^1.3.
|
|
39
|
+
"@scaleway/sdk-client": "^1.3.3"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"package:check": "pnpm publint",
|