File tree Expand file tree Collapse file tree 3 files changed +41
-5
lines changed
Expand file tree Collapse file tree 3 files changed +41
-5
lines changed Original file line number Diff line number Diff line change @@ -367,11 +367,6 @@ type ICloudVM interface {
367367 GetVga () string
368368 GetVdi () string
369369
370- // GetOSArch() string
371- // GetOsType() TOsType
372- // GetOSName() string
373- // GetBios() string
374-
375370 GetMachine () string
376371 GetInstanceType () string
377372
@@ -418,6 +413,39 @@ type ICloudVM interface {
418413 GetPowerStates () string
419414 GetHealthStatus () string
420415 GetIsolateDeviceIds () ([]string , error )
416+
417+ GetContainers () ([]ICloudContainer , error )
418+ }
419+
420+ type SContainerEnv struct {
421+ Key string
422+ Value string
423+ }
424+
425+ type ICloudContainer interface {
426+ ICloudResource
427+
428+ GetImage () string
429+ GetCommand () []string
430+ GetEnvs () []SContainerEnv
431+
432+ GetStartedAt () time.Time
433+ GetLastFinishedAt () time.Time
434+ GetRestartCount () int
435+
436+ GetVolumentMounts () ([]ICloudVolumeMount , error )
437+ GetDevices () ([]IContainerDevice , error )
438+ }
439+
440+ type ICloudVolumeMount interface {
441+ GetName () string
442+ IsReadOnly () bool
443+ GetType () string
444+ }
445+
446+ type IContainerDevice interface {
447+ GetId () string
448+ GetType () string
421449}
422450
423451type ICloudNic interface {
Original file line number Diff line number Diff line change @@ -102,3 +102,7 @@ func (instance *SInstanceBase) GetError() error {
102102func (instance * SInstanceBase ) GetIsolateDeviceIds () ([]string , error ) {
103103 return nil , errors .Wrapf (cloudprovider .ErrNotImplemented , "GetIsolateDeviceIds" )
104104}
105+
106+ func (instance * SInstanceBase ) GetContainers () ([]cloudprovider.ICloudContainer , error ) {
107+ return nil , errors .Wrapf (cloudprovider .ErrNotImplemented , "GetContainers" )
108+ }
Original file line number Diff line number Diff line change @@ -292,3 +292,7 @@ func (self *SInstance) GetHealthStatus() string {
292292func (self * SInstance ) GetIsolateDeviceIds () ([]string , error ) {
293293 return nil , cloudprovider .ErrNotSupported
294294}
295+
296+ func (self * SInstance ) GetContainers () ([]cloudprovider.ICloudContainer , error ) {
297+ return nil , cloudprovider .ErrNotSupported
298+ }
You can’t perform that action at this time.
0 commit comments