5
"launchpad.net/gnuflag"
8
// MachineAgent is a cmd.Command responsible for running a machine agent.
9
type MachineAgent struct {
14
func NewMachineAgent() *MachineAgent {
15
return &MachineAgent{agentConf: agentConf{name: "machine"}}
18
// InitFlagSet prepares a FlagSet.
19
func (a *MachineAgent) InitFlagSet(f *gnuflag.FlagSet) {
20
f.IntVar(&a.MachineId, "machine-id", -1, "id of the machine to run")
21
a.agentConf.InitFlagSet(f)
24
// ParsePositional checks that there are no unwanted arguments, and that all
25
// required flags have been set.
26
func (a *MachineAgent) ParsePositional(args []string) error {
28
return fmt.Errorf("--machine-id option must be set, and expects a non-negative integer")
30
return a.agentConf.ParsePositional(args)
33
// Run runs a machine agent.
34
func (a *MachineAgent) Run() error {
35
return fmt.Errorf("MachineAgent.Run not implemented")