Oz version in config file, bash completion flag for oz cli, small naming fixes

master
xSmurf 9 years ago
parent db133785d5
commit c9b661f46b

@ -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 {

@ -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
}

@ -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 {

@ -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"`

Loading…
Cancel
Save