Documentation
¶
Index ¶
- func FormatModelBlockInfo(all []params.ModelBlockInfo) ([]modelBlockInfo, error)
- func FormatTabularBlockedModels(writer io.Writer, value interface{}) error
- func NewDisableCommand() cmd.Command
- func NewEnableCommand() cmd.Command
- func NewListCommand() cmd.Command
- func ProcessBlockedError(err error, block Block) error
- type Block
- type BlockInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatModelBlockInfo ¶
func FormatModelBlockInfo(all []params.ModelBlockInfo) ([]modelBlockInfo, error)
func FormatTabularBlockedModels ¶
FormatTabularBlockedModels writes out tabular format for blocked models. This method is exported as it is also used by destroy-model.
func NewDisableCommand ¶
NewDisableCommand returns a disable-command command instance that will use the default API.
func NewEnableCommand ¶
NewEnableCommand returns a new command that eanbles previously disabled command sets.
func NewListCommand ¶
NewListCommand returns the command that lists the disabled commands for the model.
func ProcessBlockedError ¶
ProcessBlockedError handles the error returned by the API server, which may indicate that the operation is blocked. Processing of blocked commands is done by the API server based on the user configuration via `disable-command` command. The user can `enable-command` the operation by enabling the block type. When an operation is blocked the API server returns a blocked error code that returns a user-friendly message to the client.