Merge pull request #8942 from yousong/bugfix/yousong-vm-changeip

Bugfix/yousong vm changeip
This commit is contained in:
yunion-ci-robot
2020-11-25 09:16:16 +08:00
committed by GitHub
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ import (
type SJointResourceBase struct {
SResourceBase
RowId int64 `primary:"true" auto_increment:"true"`
RowId int64 `primary:"true" auto_increment:"true" list:"user"`
}
type SJointResourceBaseManager struct {
+5 -2
View File
@@ -15,6 +15,8 @@
package models
import (
"fmt"
"yunion.io/x/log"
"yunion.io/x/onecloud/pkg/cloudcommon/db"
@@ -33,7 +35,7 @@ type (
SecurityGroupRules map[string]*SecurityGroupRule
Elasticips map[string]*Elasticip
Guestnetworks map[string]*Guestnetwork // key: guestId/ifname
Guestnetworks map[string]*Guestnetwork // key: rowId
Guestsecgroups map[string]*Guestsecgroup // key: guestId/secgroupId
DnsRecords map[string]*DnsRecord
@@ -332,7 +334,8 @@ func (set Guestnetworks) NewModel() db.IModel {
func (set Guestnetworks) AddModel(i db.IModel) {
m := i.(*Guestnetwork)
set[m.GuestId+"/"+m.Ifname] = m
k := fmt.Sprintf("%d", m.RowId)
set[k] = m
}
func (set Guestnetworks) Copy() apihelper.IModelSet {