Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 33 additions & 5 deletions pkg/cloudprovider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,6 @@ type ICloudVM interface {
GetVga() string
GetVdi() string

// GetOSArch() string
// GetOsType() TOsType
// GetOSName() string
// GetBios() string

GetMachine() string
GetInstanceType() string

Expand Down Expand Up @@ -418,6 +413,39 @@ type ICloudVM interface {
GetPowerStates() string
GetHealthStatus() string
GetIsolateDeviceIds() ([]string, error)

GetContainers() ([]ICloudContainer, error)
}

type SContainerEnv struct {
Key string
Value string
}

type ICloudContainer interface {
ICloudResource

GetImage() string
GetCommand() []string
GetEnvs() []SContainerEnv

GetStartedAt() time.Time
GetLastFinishedAt() time.Time
GetRestartCount() int

GetVolumentMounts() ([]ICloudVolumeMount, error)
GetDevices() ([]IContainerDevice, error)
}

type ICloudVolumeMount interface {
GetName() string
IsReadOnly() bool
GetType() string
}

type IContainerDevice interface {
GetId() string
GetType() string
}

type ICloudNic interface {
Expand Down
4 changes: 4 additions & 0 deletions pkg/multicloud/instance_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,7 @@ func (instance *SInstanceBase) GetError() error {
func (instance *SInstanceBase) GetIsolateDeviceIds() ([]string, error) {
return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIsolateDeviceIds")
}

func (instance *SInstanceBase) GetContainers() ([]cloudprovider.ICloudContainer, error) {
return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetContainers")
}
4 changes: 4 additions & 0 deletions pkg/multicloud/remotefile/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,3 +292,7 @@ func (self *SInstance) GetHealthStatus() string {
func (self *SInstance) GetIsolateDeviceIds() ([]string, error) {
return nil, cloudprovider.ErrNotSupported
}

func (self *SInstance) GetContainers() ([]cloudprovider.ICloudContainer, error) {
return nil, cloudprovider.ErrNotSupported
}
Loading