File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ func (self *Driver) GetCreateFlags() []mcnflag.Flag {
90
90
EnvVar : "LW_CONFIG_ID" ,
91
91
Name : "lw-config-id" ,
92
92
Usage : "config-id to deploy the node as" ,
93
+ Value : - 1 ,
93
94
},
94
95
95
96
mcnflag.IntFlag {
@@ -123,17 +124,21 @@ func (self *Driver) SetConfigFromFlags(opts drivers.DriverOptions) error {
123
124
self .LwApiDomain = opts .String ("lw-api-domain" )
124
125
125
126
self .LwComputeConfigId = opts .Int ("lw-config-id" )
126
- if self .LwComputeConfigId == 0 {
127
- // TODO private parent child support
128
- return errors .New ("must give a lw-config-id" )
129
- }
130
127
self .LwComputeZoneId = opts .Int ("lw-zone-id" )
131
128
self .LwComputeNodeHostname = opts .String ("lw-node-hostname" )
132
129
self .LwComputeNodeRootPassword = opts .String ("lw-node-root-password" )
133
130
self .LwComputeTemplate = opts .String ("lw-template" )
134
131
135
132
self .DockerPort = opts .Int ("lw-docker-port" )
136
133
134
+ if self .LwComputeConfigId == - 1 {
135
+ return errors .New ("must give a lw-config-id" )
136
+ }
137
+
138
+ if self .LwComputeZoneId == - 1 {
139
+ return errors .New ("must give a lw-zone-id" )
140
+ }
141
+
137
142
if self .DockerPort <= 0 {
138
143
return errors .New ("docker port must be greater than zero" )
139
144
}
You can’t perform that action at this time.
0 commit comments