From c9b661f46b547259894377d595a0ac9844357174 Mon Sep 17 00:00:00 2001 From: xSmurf Date: Mon, 15 Jun 2015 07:03:56 +0000 Subject: [PATCH] Oz version in config file, bash completion flag for oz cli, small naming fixes --- config.go | 1 + network/proxy.go | 2 +- oz/main.go | 8 +++++--- profile.go | 8 ++++---- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/config.go b/config.go index 32af5f9..5505658 100644 --- a/config.go +++ b/config.go @@ -24,6 +24,7 @@ type Config struct { EnvironmentVars []string `json:"environment_vars"` } +const OzVersion = "0.0.1" const DefaultConfigPath = "/etc/oz/oz.conf" func NewDefaultConfig() *Config { diff --git a/network/proxy.go b/network/proxy.go index eeb32c6..6f3c845 100644 --- a/network/proxy.go +++ b/network/proxy.go @@ -31,7 +31,7 @@ type ProxyConfig struct { // Optional: Destination address // In client mode: the host side address to connect to - // In server mode: the container side address to bind to + // In server mode: the sandbox side address to bind to // If left empty, localhost is used Destination string } diff --git a/oz/main.go b/oz/main.go index 30cb8b4..2a04450 100644 --- a/oz/main.go +++ b/oz/main.go @@ -55,6 +55,8 @@ func runApplication() { app.Usage = "command line interface to Oz sandboxes" app.Author = "Subgraph" app.Email = "info@subgraph.com" + app.Version = OzVersion + app.EnableBashCompletion = true app.Commands = []cli.Command{ { Name: "profiles", @@ -78,7 +80,7 @@ func runApplication() { }, { Name: "shell", - Usage: "start a shell in a running container", + Usage: "start a shell in a running sandbox", Action: handleShell, }, { @@ -129,11 +131,11 @@ func handleLaunch(c *cli.Context) { func handleList(c *cli.Context) { sboxes, err := daemon.ListSandboxes() if err != nil { - fmt.Printf("Error listing running containers: %v\n", err) + fmt.Printf("Error listing running sandboxes: %v\n", err) os.Exit(1) } if len(sboxes) == 0 { - fmt.Println("No running containers") + fmt.Println("No running sandboxes") return } for _, sb := range sboxes { diff --git a/profile.go b/profile.go index aebecef..76999b8 100644 --- a/profile.go +++ b/profile.go @@ -18,15 +18,15 @@ type Profile struct { Watchdog string // Optional wrapper binary to use when launching command (ex: tsocks) Wrapper string - // If true launch one container per instance, otherwise run all instances in same container + // If true launch one sandbox per instance, otherwise run all instances in same sandbox Multi bool - // Disable mounting of sys and proc inside the container + // Disable mounting of sys and proc inside the sandbox NoSysProc bool // Disable bind mounting of default directories (etc,usr,bin,lib,lib64) // Also disables default blacklist items (/sbin, /usr/sbin, /usr/bin/sudo) // Normally not used NoDefaults bool - // Allow bind mounting of files passed as arguments inside the container + // Allow bind mounting of files passed as arguments inside the sandbox AllowFiles bool `json:"allow_files"` // List of paths to bind mount inside jail Whitelist []WhitelistItem @@ -65,7 +65,7 @@ type EnvVar struct { Value string } -// Container network definition +// Sandbox network definition type NetworkProfile struct { // One of empty, host, bridge Nettype string `json:"type"`