Skip to content

Commit 793289c

Browse files
authored
Merge pull request #85 from twk3/allow-set-bootscript
Allow the bootscript to be specified using it's unique id.
2 parents 800a601 + e5e8991 commit 793289c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Options:
7272
--scaleway-commercial-type "VC1S" Specifies the commercial type [$SCALEWAY_COMMERCIAL_TYPE]
7373
--scaleway-debug Enables Scaleway client debugging [$SCALEWAY_DEBUG]
7474
--scaleway-image "ubuntu-xenial" Specifies the image [$SCALEWAY_IMAGE]
75+
--scaleway-bootscript "docker" Specifies the bootscript [$SCALEWAY_BOOTSCRIPT]
7576
--scaleway-ip Specifies the IP address [$SCALEWAY_IP]
7677
--scaleway-ipv6 Enable ipv6 [$SCALEWAY_IPV6]
7778
--scaleway-name Assign a name [$SCALEWAY_NAME]

driver/scaleway.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ type Driver struct {
4141
Region string
4242
name string
4343
image string
44+
bootscript string
4445
ip string
4546
volumes string
4647
IPPersistant bool
@@ -94,6 +95,7 @@ func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) (err error) {
9495
d.Region = flags.String("scaleway-region")
9596
d.name = flags.String("scaleway-name")
9697
d.image = flags.String("scaleway-image")
98+
d.bootscript = flags.String("scaleway-bootscript")
9799
d.ip = flags.String("scaleway-ip")
98100
d.volumes = flags.String("scaleway-volumes")
99101
d.ipv6 = flags.Bool("scaleway-ipv6")
@@ -145,6 +147,12 @@ func (d *Driver) GetCreateFlags() []mcnflag.Flag {
145147
Usage: "Specifies the image",
146148
Value: defaultImage,
147149
},
150+
mcnflag.StringFlag{
151+
EnvVar: "SCALEWAY_BOOTSCRIPT",
152+
Name: "scaleway-bootscript",
153+
Usage: "Specifies the bootscript",
154+
Value: defaultBootscript,
155+
},
148156
mcnflag.StringFlag{
149157
EnvVar: "SCALEWAY_IP",
150158
Name: "scaleway-ip",
@@ -259,7 +267,7 @@ func (d *Driver) Create() (err error) {
259267
ImageName: d.image,
260268
CommercialType: d.CommercialType,
261269
Name: d.name,
262-
Bootscript: defaultBootscript,
270+
Bootscript: d.bootscript,
263271
AdditionalVolumes: d.volumes,
264272
IP: d.IPID,
265273
EnableIPV6: d.ipv6,

0 commit comments

Comments
 (0)