Beispiel #1
0
func init() {
	rootCommand.PersistentFlags().StringVarP(&dataDir, "data-dir", "", "torus-data", "Path to the data directory")
	rootCommand.PersistentFlags().BoolVarP(&debug, "debug", "", false, "Turn on debug output")
	rootCommand.PersistentFlags().BoolVarP(&debugInit, "debug-init", "", false, "Run a default init for the MDS if one doesn't exist")
	rootCommand.PersistentFlags().StringVarP(&host, "host", "", "", "Host to listen on for HTTP")
	rootCommand.PersistentFlags().IntVarP(&port, "port", "", 4321, "Port to listen on for HTTP")
	rootCommand.PersistentFlags().StringVarP(&peerAddress, "peer-address", "", "", "Address to listen on for intra-cluster data")
	rootCommand.PersistentFlags().StringVarP(&sizeStr, "size", "", "1GiB", "How much disk space to use for this storage node")
	rootCommand.PersistentFlags().StringVarP(&logpkg, "logpkg", "", "", "Specific package logging")
	rootCommand.PersistentFlags().BoolVarP(&autojoin, "auto-join", "", false, "Automatically join the storage pool")
	rootCommand.PersistentFlags().BoolVarP(&version, "version", "", false, "Print version info and exit")
	rootCommand.PersistentFlags().BoolVarP(&completion, "completion", "", false, "Output bash completion code")
	flagconfig.AddConfigFlags(rootCommand.PersistentFlags())
}
Beispiel #2
0
func init() {
	rootCommand.PersistentFlags().BoolVarP(&debug, "debug", "", false, "enable debug logging")
	rootCommand.AddCommand(initCommand)
	rootCommand.AddCommand(blockCommand)
	rootCommand.AddCommand(listPeersCommand)
	rootCommand.AddCommand(ringCommand)
	rootCommand.AddCommand(peerCommand)
	rootCommand.AddCommand(volumeCommand)
	rootCommand.AddCommand(versionCommand)
	rootCommand.AddCommand(wipeCommand)
	rootCommand.AddCommand(configCommand)
	rootCommand.AddCommand(completionCommand)
	flagconfig.AddConfigFlags(rootCommand.PersistentFlags())
}
func init() {
	rootCommand.AddCommand(aoeCommand)
	rootCommand.AddCommand(versionCommand)

	// Flexvolume commands
	rootCommand.AddCommand(initCommand)
	rootCommand.AddCommand(attachCommand)
	rootCommand.AddCommand(detachCommand)
	rootCommand.AddCommand(mountCommand)
	rootCommand.AddCommand(unmountCommand)
	rootCommand.AddCommand(flexprepvolCommand)

	rootCommand.PersistentFlags().StringVarP(&etcdAddress, "etcd", "C", "127.0.0.1:2379", "hostname:port to the etcd instance storing the metadata")
	rootCommand.PersistentFlags().StringVarP(&logpkg, "logpkg", "", "", "Specific package logging")
	rootCommand.PersistentFlags().StringVarP(&httpAddr, "http", "", "", "HTTP endpoint for debug and stats")
	flagconfig.AddConfigFlags(rootCommand.PersistentFlags())
}
Beispiel #4
0
func init() {
	rootCommand.AddCommand(aoeCommand)
	rootCommand.AddCommand(versionCommand)
	rootCommand.AddCommand(completionCommand)

	// Flexvolume commands
	rootCommand.AddCommand(initCommand)
	rootCommand.AddCommand(attachCommand)
	rootCommand.AddCommand(detachCommand)
	rootCommand.AddCommand(mountCommand)
	rootCommand.AddCommand(unmountCommand)
	rootCommand.AddCommand(flexprepvolCommand)

	rootCommand.PersistentFlags().StringVarP(&logpkg, "logpkg", "", "", "Specific package logging")
	rootCommand.PersistentFlags().StringVarP(&httpAddr, "http", "", "", "HTTP endpoint for debug and stats")
	rootCommand.PersistentFlags().BoolVarP(&debug, "debug", "", false, "Turn on debug output")
	flagconfig.AddConfigFlags(rootCommand.PersistentFlags())
}
func init() {
	blockCommand.AddCommand(blockCreateCommand)
	flagconfig.AddConfigFlags(blockCommand.PersistentFlags())
}