mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 02:37:24 +08:00
fix(region): vpc sync misc fix
This commit is contained in:
@@ -70,4 +70,7 @@ type RouteTableRouteSetListInput struct {
|
||||
apis.StatusStandaloneResourceListInput
|
||||
apis.ExternalizedResourceBaseListInput
|
||||
RouteTableFilterList
|
||||
Type string `json:"type"`
|
||||
NextHopType string `json:"next_hop_type"`
|
||||
NextHopId string `json:"next_hop_id"`
|
||||
}
|
||||
|
||||
@@ -188,6 +188,15 @@ func (manager *SRouteTableRouteSetManager) ListItemFilter(
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "SRouteTableResourceBaseManager.ListItemFilter")
|
||||
}
|
||||
if len(query.Type) > 0 {
|
||||
q = q.Equals("type", query.Type)
|
||||
}
|
||||
if len(query.NextHopType) > 0 {
|
||||
q = q.Equals("next_hop_type", query.NextHopType)
|
||||
}
|
||||
if len(query.NextHopId) > 0 {
|
||||
q = q.Equals("next_hop_id", query.NextHopId)
|
||||
}
|
||||
return q, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,9 @@ type RouteTableRouteSetListOptions struct {
|
||||
BaseListOptions
|
||||
RouteTableId string
|
||||
VpcId string
|
||||
Type string
|
||||
NextHopType string
|
||||
NextHopId string
|
||||
}
|
||||
|
||||
func (opts *RouteTableRouteSetListOptions) Params() (jsonutils.JSONObject, error) {
|
||||
|
||||
@@ -228,10 +228,14 @@ func (self *SVpc) GetSVpcPeeringConnections() ([]SVpcPC, error) {
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "self.region.GetAllVpcPeeringConnections(%s)", self.GetId())
|
||||
}
|
||||
ret := []SVpcPC{}
|
||||
for i := range svpcPCs {
|
||||
svpcPCs[i].vpc = self
|
||||
if svpcPCs[i].UnVpcID == self.VpcId {
|
||||
svpcPCs[i].vpc = self
|
||||
ret = append(ret, svpcPCs[i])
|
||||
}
|
||||
}
|
||||
return svpcPCs, nil
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func (self *SVpc) GetAccepterSVpcPeeringConnections() ([]SVpcPC, error) {
|
||||
|
||||
Reference in New Issue
Block a user