Update to match upstream changes
This commit is contained in:
1 parent
4da998ab45
commit
847046a225
5 files changed
+26
-21
No files matched your search
@@ -231,7 +231,7 @@ func (c *Client) EnsureNetwork(networkName, driver, subnet string, options map[s
|
||||
Name: networkName,
|
||||
CheckDuplicate: true,
|
||||
Driver: driver,
|
||||
IPAM: docker.IPAMOptions{
|
||||
IPAM: &docker.IPAMOptions{
|
||||
Driver: driver,
|
||||
Config: []docker.IPAMConfig{{Subnet: subnet}},
|
||||
},
|
||||
|
||||
+1
-1
@@ -132,7 +132,7 @@ func TestBadHttp(t *testing.T) {
|
||||
// Verb that's not handled
|
||||
resp, err := doHTTP("HEAD", fmt.Sprintf("http://localhost:%d/ip/%s/%s", port, containerID, testAddr1))
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, http.StatusNotFound, resp.StatusCode, "http response")
|
||||
require.Equal(t, http.StatusMethodNotAllowed, resp.StatusCode, "http response")
|
||||
// Mis-spelled URL
|
||||
resp, err = doHTTP("POST", fmt.Sprintf("http://localhost:%d/xip/%s/", port, containerID))
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -110,6 +110,10 @@ func (i *Ipam) ReleaseAddress(poolID string, address net.IP) error {
|
||||
return i.weave.ReleaseIPsFor(address.String())
|
||||
}
|
||||
|
||||
func (i *Ipam) IsBuiltIn() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// Functions required by ipamapi "contract" but not actually used.
|
||||
|
||||
func (i *Ipam) DiscoverNew(discoverapi.DiscoveryType, interface{}) error {
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/docker/docker/api/types/filters"
|
||||
"github.com/docker/docker/client"
|
||||
docker "github.com/fsouza/go-dockerclient"
|
||||
)
|
||||
@@ -58,7 +59,7 @@ func isDockerPluginEnabled(args []string) error {
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
plugins, err := c.PluginList(ctx)
|
||||
plugins, err := c.PluginList(ctx, filters.Args{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+18
-18
@@ -41,15 +41,15 @@ func main() {
|
||||
log.Fatalf("The client key already exists. Please remove it or specify a different key/cert.")
|
||||
}
|
||||
|
||||
err = cert.GenerateCert(
|
||||
[]string{""},
|
||||
clientCertPath,
|
||||
clientKeyPath,
|
||||
caCertPath,
|
||||
caKeyPath,
|
||||
org,
|
||||
bits,
|
||||
)
|
||||
err = cert.GenerateCert(&cert.Options{
|
||||
Hosts: []string{""},
|
||||
CertFile: clientCertPath,
|
||||
KeyFile: clientKeyPath,
|
||||
CAFile: caCertPath,
|
||||
CAKeyFile: caKeyPath,
|
||||
Org: org,
|
||||
Bits: bits,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatalf("Error generating client certificate: %s", err)
|
||||
}
|
||||
@@ -64,15 +64,15 @@ func main() {
|
||||
|
||||
if _, err := os.Stat(serverCertPath); os.IsNotExist(err) {
|
||||
log.Printf("Creating server certificate: %s", serverCertPath)
|
||||
err = cert.GenerateCert(
|
||||
[]string{ip},
|
||||
serverCertPath,
|
||||
serverKeyPath,
|
||||
caCertPath,
|
||||
caKeyPath,
|
||||
org,
|
||||
bits,
|
||||
)
|
||||
err = cert.GenerateCert(&cert.Options{
|
||||
Hosts: []string{ip},
|
||||
CertFile: serverCertPath,
|
||||
KeyFile: serverKeyPath,
|
||||
CAFile: caCertPath,
|
||||
CAKeyFile: caKeyPath,
|
||||
Org: org,
|
||||
Bits: bits,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatalf("error generating server cert: %s", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user