// Info implements Command.Info
353321
func (c *enableDestroyController) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "enable-destroy-controller",
		Purpose: "Enable destroy-controller by removing disabled commands in the controller.",
		Doc:     enableDestroyDoc,
	})
}
832593
func (c *dumpDBCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "dump-db",
		Purpose: "Displays the mongo documents for of the model.",
		Doc:     dumpDBHelpDoc,
	})
}
791983
func (a *machineAgentCmd) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "machine",
		Purpose: "run a juju machine agent",
	})
}
934967
func (c *restoreCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "restore-backup",
		Purpose: "Restore from a backup archive to the existing controller.",
		Args:    "",
		Doc:     strings.TrimSpace(restoreDoc),
	})
}
666975
func info(command interface{}) (*CommandInfo, error) {
	typeof := reflect.TypeOf(command)

	// Going up the pointer chain to find the underlying struct
	for typeof.Kind() == reflect.Ptr {
		typeof = typeof.Elem()
	}

	field, ok := typeof.FieldByName("_")
	if !ok {
		return nil, fmt.Errorf(`missing meta ("_") field in %#v`, command)
	}

	name, nameOk := field.Tag.Lookup("name")
	description, _ := field.Tag.Lookup("description")

	if !nameOk {
		return nil, fmt.Errorf(`missing "name" key in the tag string of %#v`, command)
	}

	info := &CommandInfo{
		Name:        name,
		Description: description,
	}

	return info, nil
}
1256730
func (c *listImagesCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "list-images",
		Purpose: "lists cloud image metadata used when choosing an image to start",
		Doc:     listCommandDoc,
	})
}
787877
func (c *uploadCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "upload-backup",
		Args:    "<filename>",
		Purpose: "Store a backup archive file remotely in Juju.",
		Doc:     uploadDoc,
	})
}
1094647
func (c *findCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "find-offers",
		Purpose: "Find offered application endpoints.",
		Doc:     findCommandDoc,
	})
}
1335066
func (c *collectMetricsCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "collect-metrics",
		Args:    "[application or unit]",
		Purpose: "Collect metrics on the given unit/application.",
		Doc:     collectMetricsDoc,
	})
}
16372
func (c *killCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "kill-controller",
		Args:    "<controller name>",
		Purpose: "Forcibly terminate all machines and other associated resources for a Juju controller.",
		Doc:     killDoc,
	})
}
1207728
func (c *createCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "create-backup",
		Args:    "[<notes>]",
		Purpose: "Create a backup.",
		Doc:     createDoc,
	})
}
632268
func (c *poolUpdateCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "update-storage-pool",
		Purpose: "Update storage pool attributes.",
		Doc:     poolUpdateCommandDoc,
		Args:    "<name> [<key>=<value> [<key>=<value>...]]",
	})
}
147144
func (c *listControllersCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "controllers",
		Purpose: helpControllersSummary,
		Doc:     helpControllersDetails,
		Aliases: []string{"list-controllers"},
	})
}
556323
func (c *listCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "storage",
		Args:    "<filesystem|volume> ...",
		Purpose: "Lists storage details.",
		Doc:     listCommandDoc,
		Aliases: []string{"list-storage"},
	})
}
1196291
func (c *loginCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "login",
		Args:    "[controller host name or alias]",
		Purpose: "Logs a user in to a controller.",
		Doc:     loginDoc,
	})
}
3462
func (c *AddCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "add-space",
		Args:    "<name> [<CIDR1> <CIDR2> ...]",
		Purpose: "Add a new network space.",
		Doc:     strings.TrimSpace(addCommandDoc),
	})
}
1274484
func (c *branchCommand) Info() *cmd.Info {
	info := &cmd.Info{
		Name:    "branch",
		Args:    "<branch name>",
		Purpose: branchSummary,
		Doc:     branchDoc,
	}
	return jujucmd.Info(info)
}