Documentation ¶
Index ¶
- Constants
- type ComputerResources
- type ComputerResourcesType
- type DatastoreType
- type Datastores
- type Error
- type StatusStorager
- type TaskStatuser
- type VMDeploy
- type VMDeployRequest
- type VMDeployResponse
- type VMInfo
- type VMInfoRequest
- type VMInfoResponse
- type VMList
- type VMListRequest
- type VMListResponse
- type VMRepository
Constants ¶
View Source
const ErrVMAlreadyExist = Error("Virtual Machine already exist")
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComputerResources ¶
type ComputerResources struct { Path string Type ComputerResourcesType }
type ComputerResourcesType ¶
type ComputerResourcesType int
const ( // Computer Resources Enum ComputerResourceInvalid ComputerResourcesType = iota ComputerResourceHost ComputerResourceCluster ComputerResourceResourcePool )
type DatastoreType ¶
type DatastoreType int
const ( // Datastore Type Enum DatastoreInvalid DatastoreType = iota DatastoreCluster DatastoreDatastore )
type Datastores ¶
type Datastores struct { Type DatastoreType Names []string }
type StatusStorager ¶
type StatusStorager interface { NewTask() TaskStatuser FindByID(id string) TaskStatuser }
StatusStorager represents behavior of storage that keeps deploy jobs statuses
type TaskStatuser ¶
type TaskStatuser interface { ID() string Str(keyvals ...string) TaskStatuser StrArr(key string, arr []string) TaskStatuser Get() (statuses map[string]interface{}) }
TaskStatuser represents behavior of every single task
type VMDeploy ¶
type VMDeploy struct { VMRepository // contains filtered or unexported fields }
VMDeploy is a command that implements a usecase that deploy a Virtual Machine from OVA file.
func NewVMDeploy ¶
func NewVMDeploy(r VMRepository, params VMDeployRequest) VMDeploy
func (*VMDeploy) Execute ¶
func (d *VMDeploy) Execute() (VMDeployResponse, error)
type VMDeployRequest ¶
type VMDeployRequest struct { Name string Datacenter string OvaURL string Folder string Annotation string ComputerResources Datastores }
type VMDeployResponse ¶
type VMDeployResponse struct {
TaskID string
}
type VMInfo ¶
type VMInfo struct { VMRepository // contains filtered or unexported fields }
VMInfo is a command that implements a usecase that requests information about a Virtual Machine.
func NewVMInfo ¶
func NewVMInfo(r VMRepository, params VMInfoRequest) *VMInfo
func (*VMInfo) Execute ¶
func (i *VMInfo) Execute() (VMInfoResponse, error)
Execute returns a Virtual Machine information
type VMInfoRequest ¶
type VMInfoRequest struct {
UUID string
}
type VMInfoResponse ¶
type VMList ¶
type VMList struct { VMRepository // contains filtered or unexported fields }
VMList is a command that implements a usecase that retrieve Virtual Machines list.
func NewVMList ¶
func NewVMList(r VMRepository, params VMListRequest) *VMList
func (*VMList) Execute ¶
func (i *VMList) Execute() ([]VMListResponse, error)
Execute returns a Virtual Machine information
type VMListRequest ¶
type VMListResponse ¶
type VMRepository ¶
type VMRepository interface { IsVMExist(context.Context, string, string) (bool, error) VMList(VMListRequest) ([]VMListResponse, error) VMInfo(uuid string) (VMInfoResponse, error) VMDeploy(context.Context, VMDeployRequest) (VMDeployResponse, error) }
VMRepository describes abstract methods to interact with VMWare servers in Virtual Machine bounded context.
Directories ¶
Path | Synopsis |
---|---|
repository is a concrete implementations of virtualmachine/virtualmachine.VMRepository interface
|
repository is a concrete implementations of virtualmachine/virtualmachine.VMRepository interface |
Click to show internal directories.
Click to hide internal directories.