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