mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: Override Master and Slave for scalinggroup_guest
This commit is contained in:
@@ -102,6 +102,15 @@ func (sgg *SScalingGroupGuest) SetGuestStatus(status string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (sgg *SScalingGroupGuest) Master() db.IStandaloneModel {
|
||||
return sgg.getGuest()
|
||||
}
|
||||
|
||||
func (sgg *SScalingGroupGuest) Slave() db.IStandaloneModel {
|
||||
sg, _ := ScalingGroupManager.FetchById(sgg.ScalingGroupId)
|
||||
return sg.(*SScalingGroup)
|
||||
}
|
||||
|
||||
func (sggm *SScalingGroupGuestManager) Query(fields ...string) *sqlchemy.SQuery {
|
||||
return sggm.SVirtualJointResourceBaseManager.Query(fields...).NotEquals("guest_status",
|
||||
compute.SG_GUEST_STATUS_PENDING_REMOVE)
|
||||
|
||||
Reference in New Issue
Block a user