Remove Solaris files

Solaris is no longer being worked on, so these files
are now just dead code.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2017-12-18 17:22:25 +01:00
parent 16fe5a1289
commit 1589cc0a85
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
17 changed files with 0 additions and 256 deletions

View File

@ -1,15 +0,0 @@
package main
import (
"github.com/docker/docker/daemon/config"
"github.com/spf13/pflag"
)
// installConfigFlags adds flags to the pflag.FlagSet to configure the daemon
func installConfigFlags(conf *config.Config, flags *pflag.FlagSet) {
// First handle install flags which are consistent cross-platform
installCommonConfigFlags(conf, flags)
// Then install flags common to unix platforms
installUnixConfigFlags(conf, flags)
}

View File

@ -1,7 +0,0 @@
package container
// setFromExitStatus is a platform specific helper function to set the state
// based on the ExitStatus structure.
func (s *State) setFromExitStatus(exitStatus *ExitStatus) {
s.ExitCodeValue = exitStatus.ExitCode
}

View File

@ -1,5 +1,3 @@
// +build linux
package cluster
import (

View File

@ -1,57 +0,0 @@
package cluster
import (
"bufio"
"fmt"
"net"
"os/exec"
"strings"
)
func (c *Cluster) resolveSystemAddr() (net.IP, error) {
defRouteCmd := "/usr/sbin/ipadm show-addr -p -o addr " +
"`/usr/sbin/route get default | /usr/bin/grep interface | " +
"/usr/bin/awk '{print $2}'`"
out, err := exec.Command("/usr/bin/bash", "-c", defRouteCmd).Output()
if err != nil {
return nil, fmt.Errorf("cannot get default route: %v", err)
}
defInterface := strings.SplitN(string(out), "/", 2)
defInterfaceIP := net.ParseIP(defInterface[0])
return defInterfaceIP, nil
}
func listSystemIPs() []net.IP {
var systemAddrs []net.IP
cmd := exec.Command("/usr/sbin/ipadm", "show-addr", "-p", "-o", "addr")
cmdReader, err := cmd.StdoutPipe()
if err != nil {
return nil
}
if err := cmd.Start(); err != nil {
return nil
}
scanner := bufio.NewScanner(cmdReader)
go func() {
for scanner.Scan() {
text := scanner.Text()
nameAddrPair := strings.SplitN(text, "/", 2)
// Let go of loopback interfaces and docker interfaces
systemAddrs = append(systemAddrs, net.ParseIP(nameAddrPair[0]))
}
}()
if err := scanner.Err(); err != nil {
fmt.Printf("scan underwent err: %+v\n", err)
}
if err := cmd.Wait(); err != nil {
fmt.Printf("run command wait: %+v\n", err)
}
return systemAddrs
}

View File

@ -1,30 +0,0 @@
package config
// Config defines the configuration of a docker daemon.
// These are the configuration settings that you pass
// to the docker daemon when you launch it with say: `docker -d -e lxc`
type Config struct {
CommonConfig
// These fields are common to all unix platforms.
CommonUnixConfig
}
// BridgeConfig stores all the bridge driver specific
// configuration.
type BridgeConfig struct {
commonBridgeConfig
// Fields below here are platform specific.
commonUnixBridgeConfig
}
// IsSwarmCompatible defines if swarm mode can be enabled in this config
func (conf *Config) IsSwarmCompatible() error {
return nil
}
// ValidatePlatformConfig checks if any platform-specific configuration settings are invalid.
func (conf *Config) ValidatePlatformConfig() error {
return nil
}

View File

@ -1,11 +0,0 @@
package daemon
import (
"github.com/docker/docker/container"
"github.com/docker/docker/daemon/exec"
specs "github.com/opencontainers/runtime-spec/specs-go"
)
func (daemon *Daemon) execSetPlatformOpt(_ *container.Container, _ *exec.Config, _ *specs.Process) error {
return nil
}

View File

@ -1,5 +1,3 @@
// +build !windows
package daemon
import (

View File

@ -1,27 +0,0 @@
package daemon
import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/backend"
"github.com/docker/docker/api/types/versions/v1p19"
"github.com/docker/docker/container"
"github.com/docker/docker/daemon/exec"
)
// This sets platform-specific fields
func setPlatformSpecificContainerFields(container *container.Container, contJSONBase *types.ContainerJSONBase) *types.ContainerJSONBase {
return contJSONBase
}
// containerInspectPre120 get containers for pre 1.20 APIs.
func (daemon *Daemon) containerInspectPre120(name string) (*v1p19.ContainerJSON, error) {
return &v1p19.ContainerJSON{}, nil
}
func inspectExecProcessConfig(e *exec.Config) *backend.ExecProcessConfig {
return &backend.ExecProcessConfig{
Tty: e.Tty,
Entrypoint: e.Entrypoint,
Arguments: e.Args,
}
}

View File

@ -1,5 +1,3 @@
// +build !windows
package listeners
import (

View File

@ -1,43 +0,0 @@
package listeners
import (
"crypto/tls"
"fmt"
"net"
"os"
"github.com/docker/go-connections/sockets"
"github.com/sirupsen/logrus"
)
// Init creates new listeners for the server.
func Init(proto, addr, socketGroup string, tlsConfig *tls.Config) (ls []net.Listener, err error) {
switch proto {
case "tcp":
l, err := sockets.NewTCPSocket(addr, tlsConfig)
if err != nil {
return nil, err
}
ls = append(ls, l)
case "unix":
gid, err := lookupGID(socketGroup)
if err != nil {
if socketGroup != "" {
if socketGroup != defaultSocketGroup {
return nil, err
}
logrus.Warnf("could not change group %s to %s: %v", addr, defaultSocketGroup, err)
}
gid = os.Getgid()
}
l, err := sockets.NewUnixSocket(addr, gid)
if err != nil {
return nil, fmt.Errorf("can't create unix socket %s: %v", addr, err)
}
ls = append(ls, l)
default:
return nil, fmt.Errorf("Invalid protocol format: %q", proto)
}
return
}

View File

@ -1,11 +0,0 @@
package daemon
import (
"github.com/docker/docker/container"
"github.com/docker/docker/libcontainerd"
)
// postRunProcessing perfoms any processing needed on the container after it has stopped.
func (daemon *Daemon) postRunProcessing(_ *container.Container, _ libcontainerd.EventInfo) error {
return nil
}

View File

@ -1,5 +1,3 @@
// +build linux
package daemon
import (

View File

@ -1,11 +0,0 @@
package daemon
import (
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/libcontainerd"
)
func toContainerdResources(resources container.Resources) libcontainerd.Resources {
var r libcontainerd.Resources
return r
}

View File

@ -1,5 +1,3 @@
// +build windows
package daemon
import (

View File

@ -1,5 +1,3 @@
// +build linux
package plugin
import (

View File

@ -1,30 +0,0 @@
package plugin
import (
"fmt"
"github.com/docker/docker/plugin/v2"
specs "github.com/opencontainers/runtime-spec/specs-go"
)
func (pm *Manager) enable(p *v2.Plugin, c *controller, force bool) error {
return fmt.Errorf("Not implemented")
}
func (pm *Manager) initSpec(p *v2.Plugin) (*specs.Spec, error) {
return nil, fmt.Errorf("Not implemented")
}
func (pm *Manager) disable(p *v2.Plugin, c *controller) error {
return fmt.Errorf("Not implemented")
}
func (pm *Manager) restore(p *v2.Plugin) error {
return fmt.Errorf("Not implemented")
}
// Shutdown plugins
func (pm *Manager) Shutdown() {
}
func setupRoot(root string) error { return nil }

View File

@ -1,5 +1,3 @@
// +build windows
package plugin
import (