environment

package
v0.0.0-...-a002913 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2015 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const ListCommandDoc = `List all users with access to the current environment`

Variables

This section is empty.

Functions

func NewSuperCommand

func NewSuperCommand() cmd.Command

NewSuperCommand creates the environment supercommand and registers the subcommands that it supports.

Types

type DestroyCommand

type DestroyCommand struct {
	envcmd.EnvCommandBase
	// contains filtered or unexported fields
}

DestroyCommand destroys the specified environment.

func (*DestroyCommand) Info

func (c *DestroyCommand) Info() *cmd.Info

Info implements Command.Info.

func (*DestroyCommand) Init

func (c *DestroyCommand) Init(args []string) error

Init implements Command.Init.

func (*DestroyCommand) Run

func (c *DestroyCommand) Run(ctx *cmd.Context) error

Run implements Command.Run

func (*DestroyCommand) SetFlags

func (c *DestroyCommand) SetFlags(f *gnuflag.FlagSet)

SetFlags implements Command.SetFlags.

type DestroyEnvironmentAPI

type DestroyEnvironmentAPI interface {
	Close() error
	DestroyEnvironment() error
}

DestroyEnvironmentAPI defines the methods on the environmentmanager API that the destroy command calls. It is exported for mocking in tests.

type EnvGetConstraintsCommand

type EnvGetConstraintsCommand struct {
	common.GetConstraintsCommand
}

EnvGetConstraintsCommand shows the constraints for an environment. It is just a wrapper for the common GetConstraintsCommand and enforces that no service arguments are passed in.

func (*EnvGetConstraintsCommand) Info

func (c *EnvGetConstraintsCommand) Info() *cmd.Info

func (*EnvGetConstraintsCommand) Init

func (c *EnvGetConstraintsCommand) Init(args []string) error

type EnvSetConstraintsCommand

type EnvSetConstraintsCommand struct {
	common.SetConstraintsCommand
}

EnvSetConstraintsCommand sets the constraints for an environment. It is just a wrapper for the common SetConstraintsCommand and enforces that no service arguments are passed in.

func (*EnvSetConstraintsCommand) Info

func (c *EnvSetConstraintsCommand) Info() *cmd.Info

func (*EnvSetConstraintsCommand) Init

func (c *EnvSetConstraintsCommand) Init(args []string) (err error)

func (*EnvSetConstraintsCommand) SetFlags

func (c *EnvSetConstraintsCommand) SetFlags(f *gnuflag.FlagSet)

SetFlags overrides SetFlags for SetConstraintsCommand since that will register a flag to specify the service.

type GetCommand

type GetCommand struct {
	envcmd.EnvCommandBase
	// contains filtered or unexported fields
}

GetCommand is able to output either the entire environment or the requested value in a format of the user's choosing.

func (*GetCommand) Info

func (c *GetCommand) Info() *cmd.Info

func (*GetCommand) Init

func (c *GetCommand) Init(args []string) (err error)

func (*GetCommand) Run

func (c *GetCommand) Run(ctx *cmd.Context) error

func (*GetCommand) SetFlags

func (c *GetCommand) SetFlags(f *gnuflag.FlagSet)

type GetEnvironmentAPI

type GetEnvironmentAPI interface {
	Close() error
	EnvironmentGet() (map[string]interface{}, error)
}

type JenvCommand

type JenvCommand struct {
	cmd.CommandBase
	// contains filtered or unexported fields
}

JenvCommand imports the given Juju generated jenv file into the local JUJU_HOME environments directory.

func (*JenvCommand) Info

func (c *JenvCommand) Info() *cmd.Info

func (*JenvCommand) Init

func (c *JenvCommand) Init(args []string) error

func (*JenvCommand) Run

func (c *JenvCommand) Run(ctx *cmd.Context) error

type RetryProvisioningAPI

type RetryProvisioningAPI interface {
	Close() error
	RetryProvisioning(machines ...names.MachineTag) ([]params.ErrorResult, error)
}

RetryProvisioningAPI defines methods on the client API that the retry-provisioning command calls.

type RetryProvisioningCommand

type RetryProvisioningCommand struct {
	envcmd.EnvCommandBase
	Machines []names.MachineTag
	// contains filtered or unexported fields
}

RetryProvisioningCommand updates machines' error status to tell the provisoner that it should try to re-provision the machine.

func (*RetryProvisioningCommand) Info

func (c *RetryProvisioningCommand) Info() *cmd.Info

func (*RetryProvisioningCommand) Init

func (c *RetryProvisioningCommand) Init(args []string) error

func (*RetryProvisioningCommand) Run

func (c *RetryProvisioningCommand) Run(context *cmd.Context) error

type SetCommand

type SetCommand struct {
	envcmd.EnvCommandBase
	// contains filtered or unexported fields
}

func (*SetCommand) Info

func (c *SetCommand) Info() *cmd.Info

func (*SetCommand) Init

func (c *SetCommand) Init(args []string) (err error)

func (*SetCommand) Run

func (c *SetCommand) Run(ctx *cmd.Context) error

type SetEnvironmentAPI

type SetEnvironmentAPI interface {
	Close() error
	EnvironmentGet() (map[string]interface{}, error)
	EnvironmentSet(config map[string]interface{}) error
}

type ShareCommand

type ShareCommand struct {
	envcmd.EnvCommandBase

	// Users to share the environment with.
	Users []names.UserTag
	// contains filtered or unexported fields
}

ShareCommand represents the command to share an environment with a user(s).

func (*ShareCommand) Info

func (c *ShareCommand) Info() *cmd.Info

Info implements Command.Info.

func (*ShareCommand) Init

func (c *ShareCommand) Init(args []string) (err error)

func (*ShareCommand) Run

func (c *ShareCommand) Run(ctx *cmd.Context) error

type ShareEnvironmentAPI

type ShareEnvironmentAPI interface {
	Close() error
	ShareEnvironment(...names.UserTag) error
}

ShareEnvironmentAPI defines the API functions used by the environment share command.

type UnsetCommand

type UnsetCommand struct {
	envcmd.EnvCommandBase
	// contains filtered or unexported fields
}

func (*UnsetCommand) Info

func (c *UnsetCommand) Info() *cmd.Info

func (*UnsetCommand) Init

func (c *UnsetCommand) Init(args []string) (err error)

func (*UnsetCommand) Run

func (c *UnsetCommand) Run(ctx *cmd.Context) error

type UnsetEnvironmentAPI

type UnsetEnvironmentAPI interface {
	Close() error
	EnvironmentGet() (map[string]interface{}, error)
	EnvironmentUnset(keys ...string) error
}

type UnshareCommand

type UnshareCommand struct {
	envcmd.EnvCommandBase
	cmd.CommandBase

	// Users to unshare the environment with.
	Users []names.UserTag
	// contains filtered or unexported fields
}

UnshareCommand unshares an environment with the given user(s).

func (*UnshareCommand) Info

func (c *UnshareCommand) Info() *cmd.Info

func (*UnshareCommand) Init

func (c *UnshareCommand) Init(args []string) (err error)

func (*UnshareCommand) Run

func (c *UnshareCommand) Run(ctx *cmd.Context) error

type UnshareEnvironmentAPI

type UnshareEnvironmentAPI interface {
	Close() error
	UnshareEnvironment(...names.UserTag) error
}

UnshareEnvironmentAPI defines the API functions used by the environment unshare command.

type UserInfo

type UserInfo struct {
	Username       string `yaml:"user-name" json:"user-name"`
	DateCreated    string `yaml:"date-created" json:"date-created"`
	LastConnection string `yaml:"last-connection" json:"last-connection"`
}

UserInfo defines the serialization behaviour of the user information.

type UsersAPI

type UsersAPI interface {
	Close() error
	EnvironmentUserInfo() ([]params.EnvUserInfo, error)
}

UsersAPI defines the methods on the client API that the users command calls.

type UsersCommand

type UsersCommand struct {
	envcmd.EnvCommandBase
	// contains filtered or unexported fields
}

UsersCommand shows all the users with access to the current environment.

func (*UsersCommand) Info

func (c *UsersCommand) Info() *cmd.Info

Info implements Command.Info.

func (*UsersCommand) Run

func (c *UsersCommand) Run(ctx *cmd.Context) (err error)

Run implements Command.Run.

func (*UsersCommand) SetFlags

func (c *UsersCommand) SetFlags(f *gnuflag.FlagSet)

SetFlags implements Command.SetFlags.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL