File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ type Driver struct {
3535 Organization string
3636 IPID string
3737 Token string
38- commercialType string
38+ CommercialType string
3939 name string
4040 image string
4141 stopping bool
@@ -47,7 +47,10 @@ type Driver struct {
4747
4848// DriverName returns the name of the driver
4949func (d * Driver ) DriverName () string {
50- return "scaleway"
50+ if d .CommercialType == "" {
51+ return "scaleway"
52+ }
53+ return fmt .Sprintf ("scaleway (%v)" , d .CommercialType )
5154}
5255
5356func (d * Driver ) getClient () (cl * api.ScalewayAPI , err error ) {
@@ -79,7 +82,7 @@ func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) (err error) {
7982 return fmt .Errorf ("You must provide organization and token" )
8083 }
8184 }
82- d .commercialType = flags .String ("scaleway-commercial-type" )
85+ d .CommercialType = flags .String ("scaleway-commercial-type" )
8386 d .name = flags .String ("scaleway-name" )
8487 d .image = flags .String ("scaleway-image" )
8588 return
@@ -167,7 +170,7 @@ func (d *Driver) Create() (err error) {
167170 d .IPID = ip .IP .ID
168171 d .ServerID , err = api .CreateServer (cl , & api.ConfigCreateServer {
169172 ImageName : d .image ,
170- CommercialType : d .commercialType ,
173+ CommercialType : d .CommercialType ,
171174 Name : d .name ,
172175 Bootscript : defaultBootscript ,
173176 IP : ip .IP .ID ,
You can’t perform that action at this time.
0 commit comments