Skip to content

Commit

Permalink
Specify placement when creating SSH firewall rule.
Browse files Browse the repository at this point in the history
  • Loading branch information
tintoy committed Apr 10, 2017
1 parent d2821a0 commit b89caf1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
7 changes: 6 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changes

## v0.9.1

Bug fixes:

* Specify firewall rule placement when exposing deployed server.

## v0.9

New features:
Expand All @@ -13,7 +19,6 @@ New features:
* 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.
* The driver will now generate a new SSH keypair if one was not already configured via command-line arguments.


Breaking changes:

* The following command-line arguments have changed to be consistent with their corresponding environment variables:
Expand Down
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
VERSION = 0.9
VERSION = 0.9.1

default: fmt build test

fmt:
go fmt github.com/DimensionDataResearch/docker-machine-driver-ddcloud/...

clean:
rm -rf _bin

# Peform a development (current-platform-only) build.
dev: version fmt
go build -o _bin/docker-machine-driver-ddcloud
Expand All @@ -26,9 +29,9 @@ build-mac64:

# Produce archives for a GitHub release.
dist: build
zip -9 _bin/windows-amd64.zip _bin/windows-amd64/docker-machine-driver-ddcloud.exe
zip -9 _bin/linux-amd64.zip _bin/linux-amd64/docker-machine-driver-ddcloud
zip -9 _bin/darwin-amd64.zip _bin/darwin-amd64/docker-machine-driver-ddcloud
zip -9 _bin/docker-machine-driver-ddcloud-v$(VERSION)-windows-amd64.zip _bin/windows-amd64/docker-machine-driver-ddcloud.exe
zip -9 _bin/docker-machine-driver-ddcloud-v$(VERSION)-linux-amd64.zip _bin/linux-amd64/docker-machine-driver-ddcloud
zip -9 _bin/docker-machine-driver-ddcloud-v$(VERSION)-darwin-amd64.zip _bin/darwin-amd64/docker-machine-driver-ddcloud

test: fmt
go test -v github.com/DimensionDataResearch/docker-machine-driver-ddcloud/...
Expand Down
6 changes: 4 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ package main
import (
"errors"
"fmt"
"github.com/DimensionDataResearch/go-dd-cloud-compute/compute"
"github.com/docker/machine/libmachine/log"
"strings"
"time"

"github.com/DimensionDataResearch/go-dd-cloud-compute/compute"
"github.com/docker/machine/libmachine/log"
)

// CloudControl client retry
Expand Down Expand Up @@ -594,6 +595,7 @@ func (driver *Driver) createSSHFirewallRule() error {
ruleConfiguration.MatchSourceAddress(driver.ClientPublicIPAddress)
ruleConfiguration.MatchDestinationAddress(driver.IPAddress)
ruleConfiguration.MatchDestinationPort(driver.SSHPort)
ruleConfiguration.PlaceFirst()

client, err := driver.getCloudControlClient()
if err != nil {
Expand Down

0 comments on commit b89caf1

Please sign in to comment.