Skip to content

Commit 020f6f0

Browse files
authored
Merge pull request #2648 from jamesottinger/diskimagizeandmore
add disk imagize, linode create, rebuild changes
2 parents 5728c43 + 77c6734 commit 020f6f0

File tree

2 files changed

+61
-16
lines changed

2 files changed

+61
-16
lines changed

docs/src/data/endpoints/linodes.yaml

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ endpoints:
4949
distribution:
5050
optional: true
5151
description: >
52-
The Distribution to deploy this Linode with. May not be included if 'backup' is sent.
52+
The Distribution to deploy this Linode with. May not be included
53+
if 'backup_id' or 'image' is sent.
5354
type: string
5455
root_pass:
5556
optional: unless source == "distro"
@@ -79,12 +80,19 @@ endpoints:
7980
optional: true
8081
description: >
8182
The Backup to restore to the newly created
82-
Linode. May not be included if 'distribution' is sent.
83+
Linode. May not be included if 'distribution' or 'image' is sent.
84+
type: Integer
85+
image:
86+
optional: true
87+
description: >
88+
The gold-master image to use for the newly created Linode. May
89+
not be included if 'distribution' or 'backup_id' is sent.
8390
type: Integer
8491
backups_enabled:
8592
optional: true
8693
description: >
87-
Subscribes this Linode with the Backup service. (Additional charges apply.) Defaults to "false".
94+
Subscribes this Linode with the Backup service. (Additional
95+
charges apply.) Defaults to "false".
8896
type: Boolean
8997
examples:
9098
curl: |
@@ -334,6 +342,34 @@ endpoints:
334342
https://$api_root/$version/linode/instances/$linode_id/disks/$disk_id/password
335343
python: |
336344
disk.reset_root_password('hunter2')
345+
/linode/instances/$id/disks/$id/imagize:
346+
group: Disks
347+
type: Strange
348+
authenticated: true
349+
description: Creates a gold-master image for future deployments.
350+
methods:
351+
POST:
352+
oauth: linodes:modify
353+
response: image
354+
params:
355+
label:
356+
optional: true
357+
description: >
358+
Sets the name of the image shown in the base image list, defaults
359+
to the source disk label.
360+
type: String
361+
description:
362+
optional: true
363+
description: An optional description of the created image
364+
type: String
365+
examples:
366+
curl: |
367+
curl -H "Content-Type: application/json" \
368+
-H "Authorization: Bearer $TOKEN" \
369+
-X POST -d '{
370+
"label": "My gold master image"
371+
}' \
372+
https://$api_root/$version/linode/instances/$linode_id/disks/$disk_id/imagize
337373
/linode/instances/$id/configs:
338374
group: Configs
339375
authenticated: true
@@ -362,13 +398,13 @@ endpoints:
362398
description: >
363399
A kernel ID to boot this Linode with.
364400
Defaults to "linode/latest-64bit".
365-
type: string
401+
type: String
366402
value: linode/latest-64bit
367403
label:
368404
description: >
369405
The user-friendly label to name this config.
370406
limit: 1-48 characters
371-
type: string
407+
type: String
372408
value: My config
373409
devices:
374410
description: >
@@ -941,8 +977,9 @@ endpoints:
941977
type: Action
942978
authenticated: true
943979
description: >
944-
Deletes all Disks and Configs on this Linode, then deploys a new Distribution to this Linode with the given attributes.
945-
Returns information about this Linode.
980+
Deletes all Disks and Configs on this Linode, then deploys a new
981+
Distribution or Image to this Linode with the given attributes. Returns
982+
information about this Linode.
946983
methods:
947984
POST:
948985
oauth: linodes:modify
@@ -952,6 +989,12 @@ endpoints:
952989
description: >
953990
An Distribution to deploy to this Linode.
954991
type: Distribution
992+
image:
993+
optional: true
994+
description: >
995+
The gold-master image to use for this Linode. May
996+
not be included if 'distribution' is sent.
997+
type: Integer
955998
root_pass:
956999
description: >
9571000
The root password for the new deployment.

docs/src/data/objects/image.yaml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ schema:
1010
type: String
1111
value: ubuntu_17.4_with_rails_5
1212
description: |
13-
A short description of the image with a max of 200 characters. Labels
14-
cannot contain special characters.
13+
A short description of the image. Labels cannot
14+
contain special characters.
15+
limit: 0-50 characters
1516
filterable: true
1617
editable: true
1718
description:
1819
type: String
1920
value: Ubuntu 17.4 with Ruby on Rails 5
2021
description: |
21-
A detailed description of this image with a max of 65000 characters.
22+
A detailed description of this image.
23+
limit: 0-65000 characters
2224
editable: true
2325
status:
2426
type: Enum
@@ -30,24 +32,24 @@ schema:
3032
value: ext4
3133
description: The filesystem type of the image.
3234
created:
33-
type: string
35+
type: String
3436
value: "2015-09-29T11:21:01"
3537
description: When the image was created.
3638
updated:
37-
type: string
39+
type: String
3840
value: "2015-09-29T11:21:01"
3941
description: The last time the image was modified.
4042
type:
4143
type: Enum
4244
subtype: Type
43-
value: automatic
45+
value: manual
4446
description: How the image was created.
4547
is_public:
4648
type: Boolean
47-
value: true
49+
value: false
4850
filterable: true
4951
description: True if the image is public.
5052
last_used:
51-
type: string
52-
value: "2015-09-29T11:21:01"
53+
type: String
54+
value: "2017-10-19T11:21:01"
5355
description: The last time this image was used.

0 commit comments

Comments
 (0)