// Info implements cmd.Command.
161153
func (c *dumpLogsCommand) Info() *cmd.Info {
	doc := `
This tool can be used to access Juju's logs when the Juju controller
isn't functioning for some reason. It must be run on a Juju controller
server, connecting to the Juju database instance and generating a log
file for each model that exists in the controller.

Log files are written out to the current working directory by
default. Use -d / --output-directory option to specify an alternate
target directory.

In order to connect to the database, the local machine agent's
configuration is needed. In most circumstances the configuration will
be found automatically. The --data-dir and/or --machine-id options may
be required if the agent configuration can't be found automatically.
`[1:]
	return jujucmd.Info(&cmd.Info{
		Name:    corenames.JujuDumpLogs,
		Purpose: "output the logs that are stored in the local Juju database",
		Doc:     doc,
	})
}
276947
func (c *AddCAASCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "add-k8s",
		Args:    "<k8s name>",
		Purpose: usageAddCAASSummary,
		Doc:     usageAddCAASDetails,
	})
}
224661
func (c *addImageMetadataCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "add-image",
		Purpose: "adds image metadata to model",
		Doc:     addImageCommandDoc,
	})
}
1160635
func (c *destroyCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "destroy-model",
		Args:    "[<controller name>:]<model name>",
		Purpose: "Terminate all machines/containers and resources for a non-controller model.",
		Doc:     destroyDoc,
	})
}
126131
func (c *AddMetricCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "add-metric",
		Args:    "key1=value1 [key2=value2 ...]",
		Purpose: "add metrics",
	})
}
736851
func (c *guiCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "gui",
		Purpose: "Print the Juju GUI URL, or open the Juju GUI in the default browser.",
		Doc:     guiDoc,
	})
}
70417
func (c *listAgreementsCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "agreements",
		Purpose: "List user's agreements.",
		Doc:     listAgreementsDoc,
		Aliases: []string{"list-agreements"},
	})
}
940348
func (c *checkConnectionCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "check-connection",
		Args:    "<agent-name>",
		Purpose: "check connection to the API server for the specified agent",
	})
}
263382
func (c *configCommand) Info() *cmd.Info {
	info := &cmd.Info{
		Args:    "[<model-key>[=<value>] ...]",
		Name:    "model-config",
		Purpose: modelConfigSummary,
	}
	if details, err := c.modelConfigDetails(); err == nil {
		if output, err := formatGlobalModelConfigDetails(details); err == nil {
			info.Doc = fmt.Sprintf("%s%s\n%s%s",
				modelConfigHelpDocPartOne,
				modelConfigHelpDocKeys,
				output,
				modelConfigHelpDocPartTwo)
			return info
		}
	}
	info.Doc = fmt.Sprintf("%s%s",
		modelConfigHelpDocPartOne,
		modelConfigHelpDocPartTwo)
	return jujucmd.Info(info)
}
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,
	})
}
300538
func (c *UpdateCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "update-space",
		Args:    "<name> <CIDR1> [ <CIDR2> ...]",
		Purpose: "Update a network space's CIDRs",
		Doc:     strings.TrimSpace(updateCommandDoc),
	})
}
1097857
func (c *grantCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "grant",
		Args:    "<user name> <permission> [<model name> ... | <offer url> ...]",
		Purpose: usageGrantSummary,
		Doc:     usageGrantDetails,
	})
}
675794
func (c *addKeysCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "add-ssh-key",
		Args:    "<ssh key> ...",
		Purpose: usageAddSSHKeySummary,
		Doc:     usageAddSSHKeyDetails,
	})
}
918824
func (c *listWalletsCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "wallets",
		Purpose: "List wallets.",
		Doc:     listWalletsDoc,
		Aliases: []string{"list-wallets"},
	})
}
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
}
1267904
func (c *unregisterCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "unregister",
		Args:    "<controller name>",
		Purpose: "Unregisters a Juju controller.",
		Doc:     usageUnregisterDetails,
	})
}
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"},
	})
}