Skip to content

Commit d2821a0

Browse files
committed
More useful help / documentation for auto-generated SSH keys.
1 parent eefdecf commit d2821a0

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
# Changes
22

3+
## v0.9
4+
5+
New features:
6+
7+
* More useful help / documentation for auto-generated SSH keys.
8+
39
## v0.8
410

511
New features:
612

713
* The driver can now use the new `--ddcloud-mcp-endpoint` command-line argument (environment: `MCP_ENDPOINT`) to designate a custom end-point URI for the CloudControl API.
814
* The driver will now generate a new SSH keypair if one was not already configured via command-line arguments.
915

16+
1017
Breaking changes:
1118

1219
* The following command-line arguments have changed to be consistent with their corresponding environment variables:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = 0.7
1+
VERSION = 0.9
22

33
default: fmt build test
44

client_public_ip.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ package main
44
* Detect the client machine's external IPv4 address
55
* -------------------------------------------------
66
*
7-
* Uses http://ifconfig.co/json
7+
* Uses https://v4.ifconfig.co/json
88
*/
99

1010
import (
1111
"encoding/json"
1212
"fmt"
13-
"github.com/docker/machine/libmachine/log"
1413
"io/ioutil"
1514
"net/http"
15+
16+
"github.com/docker/machine/libmachine/log"
1617
)
1718

1819
// A subset of the IP address information returned by ifconfig.co.
@@ -24,7 +25,7 @@ type ipInfo struct {
2425
func getClientPublicIPv4Address() (string, error) {
2526
log.Infof("Auto-detecting client's public (external) IP address...")
2627

27-
response, err := http.Get("https://ifconfig.co/json")
28+
response, err := http.Get("https://v4.ifconfig.co/json")
2829
if err != nil {
2930
return "", fmt.Errorf("Unable to connect to ifconfig.co to determine your IP address: %s", err.Error())
3031
}

driver.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ package main
88
import (
99
"errors"
1010
"fmt"
11+
"net"
12+
"os"
13+
1114
"github.com/DimensionDataResearch/go-dd-cloud-compute/compute"
1215
"github.com/docker/machine/libmachine/drivers"
1316
"github.com/docker/machine/libmachine/log"
1417
"github.com/docker/machine/libmachine/mcnflag"
1518
"github.com/docker/machine/libmachine/state"
16-
"net"
17-
"os"
1819
)
1920

2021
// DefaultImageName is the name of the default OS image used to create machines.
@@ -150,7 +151,7 @@ func (driver *Driver) GetCreateFlags() []mcnflag.Flag {
150151
mcnflag.StringFlag{
151152
EnvVar: "MCP_SSH_KEY",
152153
Name: "ddcloud-ssh-key",
153-
Usage: "The SSH key file to use",
154+
Usage: "The SSH key file to use (if not specified, then a new key will be generated)",
154155
Value: "",
155156
},
156157
mcnflag.IntFlag{

0 commit comments

Comments
 (0)