mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #469 in YUNIONIO/onecloud from ~QUXUAN/onecloud:hotfix/qx-baremtal-op to release/2.1.0
* commit '4339e38e6988aac7b9265248931e30efd7023a51': 适配裸金属服务器操作状态
This commit is contained in:
@@ -49,6 +49,18 @@ func (self *SBaremetalGuestDriver) PrepareDiskRaidConfig(host *models.SHost, par
|
||||
return nil
|
||||
}
|
||||
|
||||
func (self *SBaremetalGuestDriver) GetRebuildRootStatus() ([]string, error) {
|
||||
return []string{models.VM_READY, models.VM_ADMIN}, nil
|
||||
}
|
||||
|
||||
func (self *SBaremetalGuestDriver) GetChangeConfigStatus() ([]string, error) {
|
||||
return nil, httperrors.NewUnsupportOperationError("Cannot change config for baremtal")
|
||||
}
|
||||
|
||||
func (self *SBaremetalGuestDriver) GetDeployStatus() ([]string, error) {
|
||||
return []string{models.VM_READY, models.VM_ADMIN}, nil
|
||||
}
|
||||
|
||||
func (self *SBaremetalGuestDriver) GetNamedNetworkConfiguration(guest *models.SGuest, userCred mcclient.TokenCredential, host *models.SHost, netConfig *models.SNetworkConfig) (*models.SNetwork, string, int8, models.IPAddlocationDirection) {
|
||||
net, _ := host.GetNetworkWithIdAndCredential(netConfig.Network, userCred, netConfig.Reserved)
|
||||
return net, netConfig.Mac, -1, models.IPAllocationStepdown
|
||||
|
||||
Reference in New Issue
Block a user