add more resources interfaces

This commit is contained in:
TangBin
2018-08-16 14:19:01 +08:00
parent c905dfd388
commit bb5beccf47
3 changed files with 47 additions and 1 deletions
+7 -1
View File
@@ -153,7 +153,12 @@ type ICloudVM interface {
StopVM(isForce bool) error
DeleteVM() error
UpdateVM(name string) error
RebuildRoot(imageId string) error
DeployVM(resetPassword bool, keypair string, deleteKeypair bool) error
ChangeConfig(instanceId string,ncpu int, vmem int) error
GetVNCInfo() (jsonutils.JSONObject, error)
AttachDisk(diskId string) error
}
type ICloudNic interface {
@@ -193,7 +198,8 @@ type ICloudDisk interface {
GetCacheMode() string
GetMountpoint() string
Delete() error
Resize(int64) error
Resize(newSize int64) error
}
type ICloudVpc interface {
+20
View File
@@ -539,3 +539,23 @@ func (self *SInstance) SyncSecurityGroup(secgroupId string, name string, rules [
}
return nil
}
func (self *SInstance) UpdateVM(name string) error {
return fmt.Errorf("not implement")
}
func (self *SInstance) RebuildRoot(imageId string) error {
return fmt.Errorf("not implement")
}
func (self *SInstance) DeployVM(resetPassword bool, keypair string, deleteKeypair bool) error {
return fmt.Errorf("not implement")
}
func (self *SInstance) ChangeConfig(instanceId string,ncpu int, vmem int) error {
return fmt.Errorf("not implement")
}
func (self *SInstance) AttachDisk(diskId string) error {
return fmt.Errorf("not implement")
}
+20
View File
@@ -209,3 +209,23 @@ func (self *SVirtualMachine) acquireVmrcUrl() (jsonutils.JSONObject, error) {
ret.Add(jsonutils.NewString(url), "url")
return ret, nil
}
func (self *SVirtualMachine) UpdateVM(name string) error {
return fmt.Errorf("not implement")
}
func (self *SVirtualMachine) RebuildRoot(imageId string) error {
return fmt.Errorf("not implement")
}
func (self *SVirtualMachine) DeployVM(resetPassword bool, keypair string, deleteKeypair bool) error {
return fmt.Errorf("not implement")
}
func (self *SVirtualMachine) ChangeConfig(instanceId string,ncpu int, vmem int) error {
return fmt.Errorf("not implement")
}
func (self *SVirtualMachine) AttachDisk(diskId string) error {
return fmt.Errorf("not implement")
}