Example #1
0
func help() {
	w := new(tabwriter.Writer)
	w.Init(os.Stderr, 4, 0, 2, ' ', 0)
	av0 := path.Base(os.Args[0])

	fmt.Fprintf(w, "Administrative utility for Tao Domain.\n")
	fmt.Fprintf(w, "Usage:\n")
	fmt.Fprintf(w, "  %s newsoft [options] <dir>\t Create a soft tao key set\n", av0)
	fmt.Fprintf(w, "  %s init [options]\t Initialize a new domain\n", av0)
	fmt.Fprintf(w, "  %s policy [options]\t Manage authorization policies\n", av0)
	fmt.Fprintf(w, "  %s user [options]\t Create user keys\n", av0)
	fmt.Fprintf(w, "  %s principal [options]\t Display principal names/hashes\n", av0)
	fmt.Fprintf(w, "\n")

	categories := []options.Category{
		{"all", "Basic options for most commands"},
		{"newsoft", "Options for 'newsoft' command"},
		{"init", "Options for 'init' command"},
		{"policy", "Options for 'policy' command"},
		{"user", "Options for 'user' command"},
		{"principal", "Options for 'principal' command"},
		{"logging", "Options to control log output"},
	}
	options.ShowRelevant(w, categories...)

	w.Flush()
}
Example #2
0
func help() {
	w := new(tabwriter.Writer)
	w.Init(os.Stderr, 4, 0, 2, ' ', 0)
	av0 := path.Base(os.Args[0])

	fmt.Fprintf(w, "Linux Tao Host\n")
	fmt.Fprintf(w, "Usage:\n")
	fmt.Fprintf(w, "  %s init [options]\t Initialize a new host\n", av0)
	fmt.Fprintf(w, "  %s show [options]\t Show host principal name\n", av0)
	fmt.Fprintf(w, "  %s start [options]\t Start the host\n", av0)
	fmt.Fprintf(w, "  %s stop [options]\t Request the host stop\n", av0)
	fmt.Fprintf(w, "\n")

	categories := []options.Category{
		{"all", "Basic options for most commands"},
		{"init", "Options for 'init' command"},
		{"start", "Options for 'start' command"},
		{"root", "Options for root hosts"},
		{"stacked", "Options for stacked hosts"},
		{"kvm", "Options for hosting QEMU/KVM CoreOS"},
		{"logging", "Options to control log output"},
	}
	options.ShowRelevant(w, categories...)

	w.Flush()
}
Example #3
0
func help() {
	w := new(tabwriter.Writer)
	w.Init(os.Stderr, 4, 0, 2, ' ', 0)
	av0 := path.Base(os.Args[0])

	switch av0 {
	case "tao_stop", "tao_kill":
		fmt.Fprintf(w, "Usage: %s [options] <subprin> [subprin...]\n", av0)
		categories := []options.Category{
			{"all", "Options"},
			{"logging", "Options to control log output"},
		}
		options.ShowRelevant(w, categories...)
	case "tao_list":
		fmt.Fprintf(w, "Usage: %s [options]\n", av0)
		categories := []options.Category{
			{"all", "Options"},
			{"logging", "Options to control log output"},
		}
		options.ShowRelevant(w, categories...)
	case "tao_run":
		fmt.Fprintf(w, "Usage: %s [options] <prog> [args...]\n", av0)
		categories := []options.Category{
			{"all,run", "Options"},
			{"logging", "Options to control log output"},
		}
		options.ShowRelevant(w, categories...)
	default:
		fmt.Fprintf(w, "Tao Hosted Program Utility\n")
		fmt.Fprintf(w, "Usage:\n")
		fmt.Fprintf(w, "  %s run [options] [process:]<prog> [args...]\t Run a new hosted process\n", av0)
		fmt.Fprintf(w, "  %s run [options] docker:<img> [dockerargs...] [-- [imgargs...]]\t Run a new hosted docker image\n", av0)
		fmt.Fprintf(w, "  %s run [options] kvm_coreos:<img> [kvmargs...] [-- [cmdargs...]]\t Run a new command on a QEMU/kvm CoreOS image\n", av0)
		fmt.Fprintf(w, "  %s run [options] kvm_coreos_linuxhost:<img> [kvmargs...] [-- [cmdargs...]]\t Run a new process under a new linuxhost on a QEMU/kvm CoreOS image\n", av0)
		fmt.Fprintf(w, "  %s list [options]\t List hosted programs\n", av0)
		fmt.Fprintf(w, "  %s stop [options] subprin [subprin...]\t Stop hosted programs\n", av0)
		fmt.Fprintf(w, "  %s stop [options] subprin [subprin...]\t Kill hosted programs\n", av0)
		categories := []options.Category{
			{"all", "Basic options for all commands"},
			{"run", "Options for 'run' command"},
			{"logging", "Options to control log output"},
		}
		options.ShowRelevant(w, categories...)
	}
	w.Flush()
}
Example #4
0
func help() {
	help := "Usage: %[1]s [-help] <command> <args>\n"
	help += "\n"
	help += "Options:\n"
	help += "  -help                 Show this help message\n"
	help += "  -help <command>       Show help on <command>\n"
	help += "\n"
	help += "Commands:\n"
	help += "   domain         Configure and manage Tao domains\n"
	help += "   host           Start and stop a Tao host\n"
	help += "   run            Start a new hosted program\n"
	help += "   list           List hosted programs\n"
	help += "   stop           Stop hosted programs\n"
	help += "   kill           Kill hosted programs\n"
	help += "\n"

	fmt.Fprintf(os.Stderr, help, os.Args[0])
	logging := options.Category{"logging", "Options to control log output"}
	options.ShowRelevant(os.Stderr, logging)
}