mirror of https://github.com/docker/docs.git
commit
cd4f7321c9
|
@ -1,8 +1,8 @@
|
||||||
package docker
|
package docker
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net"
|
|
||||||
"github.com/dotcloud/docker/engine"
|
"github.com/dotcloud/docker/engine"
|
||||||
|
"net"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FIXME: separate runtime configuration from http api configuration
|
// FIXME: separate runtime configuration from http api configuration
|
||||||
|
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/dotcloud/docker"
|
"github.com/dotcloud/docker"
|
||||||
|
"github.com/dotcloud/docker/engine"
|
||||||
"github.com/dotcloud/docker/sysinit"
|
"github.com/dotcloud/docker/sysinit"
|
||||||
"github.com/dotcloud/docker/utils"
|
"github.com/dotcloud/docker/utils"
|
||||||
"github.com/dotcloud/docker/engine"
|
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
|
@ -2,13 +2,12 @@ package engine
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
|
||||||
"log"
|
|
||||||
"runtime"
|
|
||||||
"github.com/dotcloud/docker/utils"
|
"github.com/dotcloud/docker/utils"
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
|
"runtime"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
type Handler func(*Job) string
|
type Handler func(*Job) string
|
||||||
|
|
||||||
var globalHandlers map[string]Handler
|
var globalHandlers map[string]Handler
|
||||||
|
@ -79,4 +78,3 @@ func (eng *Engine) Job(name string, args ...string) *Job {
|
||||||
}
|
}
|
||||||
return job
|
return job
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
package engine
|
package engine
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"fmt"
|
||||||
|
"github.com/dotcloud/docker/utils"
|
||||||
|
"io/ioutil"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"fmt"
|
"testing"
|
||||||
"io/ioutil"
|
|
||||||
"github.com/dotcloud/docker/utils"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var globalTestID string
|
var globalTestID string
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
Register("dummy", func(job *Job) string { return ""; })
|
Register("dummy", func(job *Job) string { return "" })
|
||||||
}
|
}
|
||||||
|
|
||||||
func mkEngine(t *testing.T) *Engine {
|
func mkEngine(t *testing.T) *Engine {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package engine
|
package engine
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"github.com/dotcloud/docker/utils"
|
||||||
"io"
|
"io"
|
||||||
"strings"
|
"strings"
|
||||||
"fmt"
|
|
||||||
"encoding/json"
|
|
||||||
"github.com/dotcloud/docker/utils"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// A job is the fundamental unit of work in the docker engine.
|
// A job is the fundamental unit of work in the docker engine.
|
||||||
|
|
|
@ -9,7 +9,6 @@ func NetworkGetRoutes() ([]*net.IPNet, error) {
|
||||||
return nil, fmt.Errorf("Not implemented")
|
return nil, fmt.Errorf("Not implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func NetworkLinkAdd(name string, linkType string) error {
|
func NetworkLinkAdd(name string, linkType string) error {
|
||||||
return fmt.Errorf("Not implemented")
|
return fmt.Errorf("Not implemented")
|
||||||
}
|
}
|
||||||
|
@ -18,7 +17,6 @@ func NetworkLinkUp(iface *net.Interface) error {
|
||||||
return fmt.Errorf("Not implemented")
|
return fmt.Errorf("Not implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func NetworkLinkAddIp(iface *net.Interface, ip net.IP, ipNet *net.IPNet) error {
|
func NetworkLinkAddIp(iface *net.Interface, ip net.IP, ipNet *net.IPNet) error {
|
||||||
return fmt.Errorf("Not implemented")
|
return fmt.Errorf("Not implemented")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package utils
|
package utils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package utils
|
package utils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
|
"io"
|
||||||
)
|
)
|
||||||
|
|
||||||
func RandomString() string {
|
func RandomString() string {
|
||||||
|
|
|
@ -15,8 +15,8 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
|
||||||
"regexp"
|
"regexp"
|
||||||
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
|
@ -453,14 +453,14 @@ search example.com`: {"1.2.3.4/32", "4.3.2.1/32"},
|
||||||
`search example.com`: {},
|
`search example.com`: {},
|
||||||
`nameserver 1.2.3.4
|
`nameserver 1.2.3.4
|
||||||
search example.com
|
search example.com
|
||||||
nameserver 4.3.2.1`: []string{"1.2.3.4/32", "4.3.2.1/32"},
|
nameserver 4.3.2.1`: {"1.2.3.4/32", "4.3.2.1/32"},
|
||||||
``: []string{},
|
``: {},
|
||||||
` nameserver 1.2.3.4 `: []string{"1.2.3.4/32"},
|
` nameserver 1.2.3.4 `: {"1.2.3.4/32"},
|
||||||
`search example.com
|
`search example.com
|
||||||
nameserver 1.2.3.4
|
nameserver 1.2.3.4
|
||||||
#nameserver 4.3.2.1`: []string{"1.2.3.4/32"},
|
#nameserver 4.3.2.1`: {"1.2.3.4/32"},
|
||||||
`search example.com
|
`search example.com
|
||||||
nameserver 1.2.3.4 # not 4.3.2.1`: []string{"1.2.3.4/32"},
|
nameserver 1.2.3.4 # not 4.3.2.1`: {"1.2.3.4/32"},
|
||||||
} {
|
} {
|
||||||
test := GetNameserversAsCIDR([]byte(resolv))
|
test := GetNameserversAsCIDR([]byte(resolv))
|
||||||
if !StrSlicesEqual(test, result) {
|
if !StrSlicesEqual(test, result) {
|
||||||
|
|
Loading…
Reference in New Issue