Also remove unused machine SetConfigFromFlags
Setting the config directly instead in minikubepull/10099/head
parent
72a0fd6642
commit
1d6c86c8b5
|
@ -17,7 +17,6 @@ limitations under the License.
|
|||
package generic
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
|
@ -76,20 +75,6 @@ func (d *Driver) GetSSHKeyPath() string {
|
|||
return d.SSHKeyPath
|
||||
}
|
||||
|
||||
func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error {
|
||||
d.EnginePort = flags.Int("generic-engine-port")
|
||||
d.IPAddress = flags.String("generic-ip-address")
|
||||
d.SSHUser = flags.String("generic-ssh-user")
|
||||
d.SSHKey = flags.String("generic-ssh-key")
|
||||
d.SSHPort = flags.Int("generic-ssh-port")
|
||||
|
||||
if d.IPAddress == "" {
|
||||
return errors.New("generic driver requires the --generic-ip-address option")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *Driver) PreCreateCheck() error {
|
||||
if d.SSHKey != "" {
|
||||
if _, err := os.Stat(d.SSHKey); os.IsNotExist(err) {
|
||||
|
|
Loading…
Reference in New Issue