mirror of
https://github.com/rancher/os.git
synced 2025-08-01 15:08:47 +00:00
Imports are organized in groups, with blank lines between them
https://github.com/golang/go/wiki/CodeReviewComments#imports
This commit is contained in:
parent
ef663b4e70
commit
823ae28a52
@ -15,6 +15,7 @@ import (
|
||||
"github.com/rancher/os/pkg/docker"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
|
@ -24,8 +24,6 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
|
||||
"github.com/rancher/os/cmd/control"
|
||||
"github.com/rancher/os/cmd/network"
|
||||
rancherConfig "github.com/rancher/os/config"
|
||||
@ -46,6 +44,8 @@ import (
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/netconf"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -8,9 +8,10 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
func AutologinMain() {
|
||||
|
@ -4,10 +4,11 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/rancher/os/cmd/control/service"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
func Main() {
|
||||
|
@ -11,13 +11,13 @@ import (
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
)
|
||||
|
||||
func configSubcommands() []cli.Command {
|
||||
|
@ -2,11 +2,11 @@ package control
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"os"
|
||||
)
|
||||
|
||||
func TestGenTpl(t *testing.T) {
|
||||
|
@ -5,12 +5,6 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/docker/docker/reference"
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
"github.com/docker/libcompose/project/options"
|
||||
"github.com/rancher/os/cmd/control/service"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/compose"
|
||||
@ -18,6 +12,12 @@ import (
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
"github.com/rancher/os/pkg/util/network"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/docker/docker/reference"
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
"github.com/docker/libcompose/project/options"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
func consoleSubcommands() []cli.Command {
|
||||
|
@ -11,16 +11,16 @@ import (
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
"golang.org/x/sys/unix"
|
||||
|
||||
"github.com/rancher/os/cmd/cloudinitexecute"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/config/cmdline"
|
||||
"github.com/rancher/os/pkg/compose"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -3,8 +3,9 @@ package control
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
func devAction(c *cli.Context) error {
|
||||
|
@ -9,9 +9,10 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -10,7 +10,14 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
"github.com/rancher/os/cmd/control/service"
|
||||
"github.com/rancher/os/cmd/control/service/app"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/compose"
|
||||
"github.com/rancher/os/pkg/docker"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
"github.com/rancher/os/pkg/util/network"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
"github.com/codegangsta/cli"
|
||||
@ -21,14 +28,7 @@ import (
|
||||
"github.com/docker/libcompose/project/options"
|
||||
composeYaml "github.com/docker/libcompose/yaml"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rancher/os/cmd/control/service"
|
||||
"github.com/rancher/os/cmd/control/service/app"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/compose"
|
||||
"github.com/rancher/os/pkg/docker"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
"github.com/rancher/os/pkg/util/network"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -5,14 +5,14 @@ import (
|
||||
"os/exec"
|
||||
"syscall"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"github.com/rancher/os/cmd/cloudinitexecute"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/docker"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -6,9 +6,10 @@ import (
|
||||
"os/exec"
|
||||
"syscall"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
func envAction(c *cli.Context) error {
|
||||
|
@ -14,16 +14,16 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rancher/catalog-service/utils/version"
|
||||
"github.com/rancher/os/cmd/control/install"
|
||||
"github.com/rancher/os/cmd/power"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/dfs" // TODO: move CopyFile into util or something.
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
var installCommand = cli.Command{
|
||||
|
@ -8,21 +8,20 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
dockerClient "github.com/docker/engine-api/client"
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
"github.com/docker/libcompose/project/options"
|
||||
"github.com/rancher/os/cmd/power"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/compose"
|
||||
"github.com/rancher/os/pkg/docker"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
"github.com/rancher/os/pkg/util/network"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
"github.com/codegangsta/cli"
|
||||
dockerClient "github.com/docker/engine-api/client"
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
"github.com/docker/libcompose/project/options"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
type Images struct {
|
||||
|
@ -11,13 +11,13 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
|
||||
dockerClient "github.com/docker/engine-api/client"
|
||||
"github.com/docker/engine-api/types"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/docker"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
dockerClient "github.com/docker/engine-api/client"
|
||||
"github.com/docker/engine-api/types"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -5,8 +5,9 @@ import (
|
||||
"os/exec"
|
||||
"syscall"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
func recoveryInitAction(c *cli.Context) error {
|
||||
|
@ -4,8 +4,9 @@ import (
|
||||
"fmt"
|
||||
"syscall"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/rancher/os/config"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
func selinuxCommand() cli.Command {
|
||||
|
@ -8,11 +8,11 @@ import (
|
||||
"syscall"
|
||||
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/docker/libcompose/project"
|
||||
"github.com/docker/libcompose/project/options"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
func ProjectPs(p project.APIProject, c *cli.Context) error {
|
||||
|
@ -3,9 +3,10 @@ package command
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/rancher/os/cmd/control/service/app"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
composeApp "github.com/docker/libcompose/cli/app"
|
||||
"github.com/rancher/os/cmd/control/service/app"
|
||||
)
|
||||
|
||||
func verifyOneOrMoreServices(c *cli.Context) error {
|
||||
|
@ -4,15 +4,16 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
dockerApp "github.com/docker/libcompose/cli/docker/app"
|
||||
"github.com/docker/libcompose/project"
|
||||
"github.com/rancher/os/cmd/control/service/command"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/compose"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
"github.com/rancher/os/pkg/util/network"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
dockerApp "github.com/docker/libcompose/cli/docker/app"
|
||||
"github.com/docker/libcompose/project"
|
||||
)
|
||||
|
||||
type projectFactory struct {
|
||||
|
@ -3,11 +3,12 @@ package control
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/docker/libcompose/project/options"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/compose"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/docker/libcompose/project/options"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
|
@ -5,12 +5,12 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
machineUtil "github.com/docker/machine/utils"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -4,8 +4,9 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
func udevSettleAction(c *cli.Context) {
|
||||
|
@ -5,21 +5,20 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"path/filepath"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
composeClient "github.com/docker/libcompose/docker/client"
|
||||
"github.com/docker/libcompose/project"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/compose"
|
||||
rosDocker "github.com/rancher/os/pkg/docker"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
composeClient "github.com/docker/libcompose/docker/client"
|
||||
"github.com/docker/libcompose/project"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -5,23 +5,21 @@ package init
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/rancher/os/pkg/init/selinux"
|
||||
|
||||
"github.com/rancher/os/pkg/init/docker"
|
||||
"github.com/rancher/os/pkg/init/one"
|
||||
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/dfs"
|
||||
"github.com/rancher/os/pkg/init/b2d"
|
||||
"github.com/rancher/os/pkg/init/cloudinit"
|
||||
"github.com/rancher/os/pkg/init/configfiles"
|
||||
"github.com/rancher/os/pkg/init/debug"
|
||||
"github.com/rancher/os/pkg/init/docker"
|
||||
"github.com/rancher/os/pkg/init/env"
|
||||
"github.com/rancher/os/pkg/init/fsmount"
|
||||
"github.com/rancher/os/pkg/init/hypervisor"
|
||||
"github.com/rancher/os/pkg/init/modules"
|
||||
"github.com/rancher/os/pkg/init/one"
|
||||
"github.com/rancher/os/pkg/init/prepare"
|
||||
"github.com/rancher/os/pkg/init/recovery"
|
||||
"github.com/rancher/os/pkg/init/selinux"
|
||||
"github.com/rancher/os/pkg/init/sharedroot"
|
||||
"github.com/rancher/os/pkg/init/switchroot"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
@ -1,17 +1,16 @@
|
||||
package network
|
||||
|
||||
import (
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"github.com/rancher/os/pkg/docker"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/docker/libnetwork/resolvconf"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/docker"
|
||||
"github.com/rancher/os/pkg/hostname"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/netconf"
|
||||
|
||||
"github.com/docker/libnetwork/resolvconf"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
func Main() {
|
||||
|
@ -10,17 +10,16 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
"github.com/rancher/os/cmd/control/install"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/docker"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
"github.com/docker/engine-api/types"
|
||||
"github.com/docker/engine-api/types/container"
|
||||
"github.com/docker/engine-api/types/filters"
|
||||
"github.com/rancher/os/cmd/control/install"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
"github.com/rancher/os/pkg/docker"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
// You can't shutdown the system from a process in console because we want to stop the console container.
|
||||
|
@ -7,10 +7,11 @@ import (
|
||||
"path/filepath"
|
||||
"syscall"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/rancher/os/cmd/control/install"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -13,9 +13,10 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -22,11 +22,11 @@ import (
|
||||
"path"
|
||||
"syscall"
|
||||
|
||||
"github.com/rancher/os/config/cloudinit/datasource"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
"github.com/docker/docker/pkg/mount"
|
||||
"github.com/rancher/os/config/cloudinit/datasource"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -5,10 +5,9 @@ import (
|
||||
"log"
|
||||
"strings"
|
||||
|
||||
"github.com/rancher/os/pkg/netconf"
|
||||
|
||||
"github.com/rancher/os/config/cloudinit/datasource"
|
||||
"github.com/rancher/os/config/cloudinit/datasource/metadata"
|
||||
"github.com/rancher/os/pkg/netconf"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -19,12 +19,11 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/rancher/os/pkg/netconf"
|
||||
|
||||
"github.com/rancher/os/config/cloudinit/datasource"
|
||||
"github.com/rancher/os/config/cloudinit/datasource/metadata"
|
||||
"github.com/rancher/os/config/cloudinit/pkg"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/netconf"
|
||||
)
|
||||
|
||||
const (
|
||||
|
6
config/cloudinit/datasource/metadata/digitalocean/metadata.go
Executable file → Normal file
6
config/cloudinit/datasource/metadata/digitalocean/metadata.go
Executable file → Normal file
@ -17,14 +17,12 @@ package digitalocean
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"github.com/rancher/os/pkg/netconf"
|
||||
|
||||
"net"
|
||||
"strconv"
|
||||
|
||||
"github.com/rancher/os/config/cloudinit/datasource"
|
||||
"github.com/rancher/os/config/cloudinit/datasource/metadata"
|
||||
"github.com/rancher/os/pkg/netconf"
|
||||
)
|
||||
|
||||
const (
|
||||
|
3
config/cloudinit/datasource/metadata/digitalocean/metadata_test.go
Executable file → Normal file
3
config/cloudinit/datasource/metadata/digitalocean/metadata_test.go
Executable file → Normal file
@ -20,12 +20,11 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/rancher/os/pkg/netconf"
|
||||
|
||||
"github.com/rancher/os/config/cloudinit/datasource"
|
||||
"github.com/rancher/os/config/cloudinit/datasource/metadata"
|
||||
"github.com/rancher/os/config/cloudinit/datasource/metadata/test"
|
||||
"github.com/rancher/os/config/cloudinit/pkg"
|
||||
"github.com/rancher/os/pkg/netconf"
|
||||
)
|
||||
|
||||
func TestType(t *testing.T) {
|
||||
|
@ -20,11 +20,10 @@ import (
|
||||
"net"
|
||||
"strings"
|
||||
|
||||
"github.com/rancher/os/pkg/netconf"
|
||||
|
||||
"github.com/rancher/os/config/cloudinit/datasource"
|
||||
"github.com/rancher/os/config/cloudinit/datasource/metadata"
|
||||
"github.com/rancher/os/config/cloudinit/pkg"
|
||||
"github.com/rancher/os/pkg/netconf"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -21,8 +21,6 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
//"github.com/rancher/os/netconf"
|
||||
|
||||
"github.com/rancher/os/config/cloudinit/datasource"
|
||||
"github.com/rancher/os/config/cloudinit/datasource/metadata"
|
||||
)
|
||||
|
@ -20,8 +20,6 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
//"github.com/rancher/os/netconf"
|
||||
|
||||
"github.com/rancher/os/config/cloudinit/datasource"
|
||||
"github.com/rancher/os/config/cloudinit/datasource/metadata"
|
||||
"github.com/rancher/os/config/cloudinit/datasource/metadata/test"
|
||||
|
@ -20,10 +20,9 @@ import (
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
"github.com/rancher/os/config/cloudinit/datasource"
|
||||
"github.com/rancher/os/config/cloudinit/pkg"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -18,11 +18,10 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/rancher/os/config/cloudinit/pkg"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
"github.com/rancher/os/config/cloudinit/pkg"
|
||||
|
||||
"github.com/sigma/vmw-guestinfo/rpcvmx"
|
||||
"github.com/sigma/vmw-guestinfo/vmcheck"
|
||||
ovf "github.com/sigma/vmw-ovflib"
|
||||
|
@ -22,9 +22,8 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
"github.com/rancher/os/config/cloudinit/datasource"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
)
|
||||
|
||||
type Waagent struct {
|
||||
|
@ -4,8 +4,9 @@ import (
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
)
|
||||
|
||||
func Read(parseAll bool) (m map[interface{}]interface{}, err error) {
|
||||
|
@ -3,10 +3,10 @@ package config
|
||||
import (
|
||||
"testing"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
|
||||
"github.com/rancher/os/config/cmdline"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
@ -9,14 +9,15 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
"github.com/docker/engine-api/types"
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
"github.com/rancher/os/config/cloudinit/datasource"
|
||||
"github.com/rancher/os/config/cloudinit/initialize"
|
||||
"github.com/rancher/os/config/cmdline"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
"github.com/docker/engine-api/types"
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
)
|
||||
|
||||
func ReadConfig(bytes []byte, substituteMetadataVars bool, files ...string) (*CloudConfig, error) {
|
||||
|
@ -4,11 +4,12 @@ import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
|
||||
"github.com/docker/engine-api/types"
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
"github.com/rancher/os/config/cloudinit/config"
|
||||
"github.com/rancher/os/config/yaml"
|
||||
"github.com/rancher/os/pkg/netconf"
|
||||
|
||||
"github.com/docker/engine-api/types"
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -5,8 +5,9 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
)
|
||||
|
||||
func testValidate(t *testing.T, cfg []byte, contains string) {
|
||||
|
5
main.go
5
main.go
@ -4,8 +4,6 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/docker/docker/docker"
|
||||
"github.com/docker/docker/pkg/reexec"
|
||||
"github.com/rancher/os/cmd/cloudinitexecute"
|
||||
"github.com/rancher/os/cmd/cloudinitsave"
|
||||
"github.com/rancher/os/cmd/control"
|
||||
@ -16,6 +14,9 @@ import (
|
||||
"github.com/rancher/os/cmd/sysinit"
|
||||
"github.com/rancher/os/cmd/wait"
|
||||
"github.com/rancher/os/pkg/dfs"
|
||||
|
||||
"github.com/docker/docker/docker"
|
||||
"github.com/docker/docker/pkg/reexec"
|
||||
)
|
||||
|
||||
var entrypoints = map[string]func(){
|
||||
|
@ -5,7 +5,11 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
"github.com/rancher/os/config"
|
||||
rosDocker "github.com/rancher/os/pkg/docker"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
"github.com/rancher/os/pkg/util/network"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
dockerClient "github.com/docker/engine-api/client"
|
||||
@ -13,15 +17,10 @@ import (
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
"github.com/docker/libcompose/docker"
|
||||
composeClient "github.com/docker/libcompose/docker/client"
|
||||
|
||||
"github.com/docker/libcompose/project"
|
||||
"github.com/docker/libcompose/project/events"
|
||||
"github.com/docker/libcompose/project/options"
|
||||
"github.com/rancher/os/config"
|
||||
rosDocker "github.com/rancher/os/pkg/docker"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
"github.com/rancher/os/pkg/util/network"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
func CreateService(cfg *config.CloudConfig, name string, serviceConfig *composeConfig.ServiceConfigV1) (project.Service, error) {
|
||||
|
@ -3,13 +3,14 @@ package compose
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
"github.com/docker/libcompose/project"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/docker"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util/network"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
"github.com/docker/libcompose/project"
|
||||
)
|
||||
|
||||
func LoadService(p *project.Project, cfg *config.CloudConfig, useNetwork bool, service string) error {
|
||||
|
@ -12,12 +12,12 @@ import (
|
||||
"syscall"
|
||||
|
||||
"github.com/rancher/os/pkg/init/one"
|
||||
|
||||
"github.com/docker/libnetwork/resolvconf"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/netconf"
|
||||
"github.com/rancher/os/pkg/selinux"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
"github.com/docker/libnetwork/resolvconf"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -5,11 +5,12 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
"github.com/docker/docker/registry"
|
||||
"github.com/docker/engine-api/types"
|
||||
"github.com/docker/libcompose/docker"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
)
|
||||
|
||||
// ConfigAuthLookup will lookup registry auth info from cloud config
|
||||
|
@ -1,8 +1,9 @@
|
||||
package docker
|
||||
|
||||
import (
|
||||
dockerClient "github.com/docker/engine-api/client"
|
||||
"github.com/rancher/os/config"
|
||||
|
||||
dockerClient "github.com/docker/engine-api/client"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
|
@ -4,14 +4,14 @@ import (
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
dockerclient "github.com/docker/engine-api/client"
|
||||
composeClient "github.com/docker/libcompose/docker/client"
|
||||
"github.com/docker/libcompose/project"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
type ClientFactory struct {
|
||||
|
@ -4,9 +4,10 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
)
|
||||
|
||||
type ConfigEnvironment struct {
|
||||
|
@ -3,14 +3,15 @@ package docker
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
dockerclient "github.com/docker/engine-api/client"
|
||||
"github.com/docker/engine-api/types"
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
"github.com/docker/libcompose/docker"
|
||||
"github.com/docker/libcompose/project"
|
||||
"github.com/docker/libcompose/project/options"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
package docker
|
||||
|
||||
import (
|
||||
"github.com/rancher/os/pkg/util"
|
||||
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
"github.com/docker/libcompose/docker"
|
||||
"github.com/docker/libcompose/project"
|
||||
"github.com/rancher/os/pkg/util"
|
||||
)
|
||||
|
||||
type ServiceFactory struct {
|
||||
|
@ -1,8 +1,9 @@
|
||||
package docker
|
||||
|
||||
import (
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
"github.com/rancher/os/config"
|
||||
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
)
|
||||
|
||||
func IsSystemContainer(serviceConfig *composeConfig.ServiceConfig) bool {
|
||||
|
@ -1,14 +1,15 @@
|
||||
package recovery
|
||||
|
||||
import (
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
"github.com/docker/libcompose/yaml"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/compose"
|
||||
"github.com/rancher/os/pkg/init/docker"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
"github.com/rancher/os/pkg/netconf"
|
||||
"github.com/rancher/os/pkg/sysinit"
|
||||
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
"github.com/docker/libcompose/yaml"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -3,9 +3,10 @@ package sharedroot
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/docker/docker/pkg/mount"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/init/fsmount"
|
||||
|
||||
"github.com/docker/docker/pkg/mount"
|
||||
)
|
||||
|
||||
func Setup(c *config.CloudConfig) (*config.CloudConfig, error) {
|
||||
|
@ -8,11 +8,12 @@ import (
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/docker/docker/pkg/archive"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/dfs"
|
||||
"github.com/rancher/os/pkg/init/fsmount"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
"github.com/docker/docker/pkg/archive"
|
||||
)
|
||||
|
||||
func SwitchRoot(cfg *config.CloudConfig) (*config.CloudConfig, error) {
|
||||
|
@ -8,10 +8,10 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/rancher/os/config/cmdline"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
lsyslog "github.com/Sirupsen/logrus/hooks/syslog"
|
||||
|
||||
"github.com/rancher/os/config/cmdline"
|
||||
)
|
||||
|
||||
var logFile *os.File
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
"github.com/vishvananda/netlink"
|
||||
)
|
||||
|
||||
|
@ -11,9 +11,9 @@ import (
|
||||
"sync"
|
||||
"syscall"
|
||||
|
||||
shlex "github.com/flynn/go-shlex"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
shlex "github.com/flynn/go-shlex"
|
||||
glob "github.com/ryanuber/go-glob"
|
||||
"github.com/vishvananda/netlink"
|
||||
)
|
||||
|
@ -7,13 +7,14 @@ import (
|
||||
"path/filepath"
|
||||
"syscall"
|
||||
|
||||
"github.com/docker/engine-api/types"
|
||||
"github.com/docker/libcompose/project/options"
|
||||
"github.com/rancher/os/cmd/control"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/compose"
|
||||
"github.com/rancher/os/pkg/docker"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
"github.com/docker/engine-api/types"
|
||||
"github.com/docker/libcompose/project/options"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
|
@ -8,11 +8,11 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/pkg/log"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
composeConfig "github.com/docker/libcompose/config"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -12,8 +12,9 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
osYaml "github.com/rancher/os/config/yaml"
|
||||
|
||||
yaml "github.com/cloudfoundry-incubator/candiedyaml"
|
||||
)
|
||||
|
||||
const (
|
||||
|
Loading…
Reference in New Issue
Block a user