mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix format
This commit is contained in:
@@ -137,7 +137,7 @@ type ElasticcacheListInput struct {
|
||||
NetworkType []string `json:"network_type"`
|
||||
|
||||
NetworkFilterListBase
|
||||
|
||||
|
||||
// 内网DNS
|
||||
PrivateDNS []string `json:"private_dns"`
|
||||
|
||||
|
||||
@@ -19,9 +19,9 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"yunion.io/x/pkg/errors"
|
||||
"yunion.io/x/jsonutils"
|
||||
"yunion.io/x/log"
|
||||
"yunion.io/x/pkg/errors"
|
||||
"yunion.io/x/pkg/util/reflectutils"
|
||||
"yunion.io/x/sqlchemy"
|
||||
|
||||
@@ -288,4 +288,4 @@ func (manager *SJointResourceBaseManager) OrderByExtraFields(
|
||||
}
|
||||
|
||||
return q, nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,9 +17,9 @@ package db
|
||||
import (
|
||||
"context"
|
||||
"reflect"
|
||||
"yunion.io/x/pkg/errors"
|
||||
|
||||
"yunion.io/x/jsonutils"
|
||||
"yunion.io/x/pkg/errors"
|
||||
"yunion.io/x/pkg/util/reflectutils"
|
||||
"yunion.io/x/sqlchemy"
|
||||
|
||||
@@ -179,4 +179,4 @@ func (manager *SVirtualJointResourceBaseManager) OrderByExtraFields(
|
||||
}
|
||||
|
||||
return q, nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,7 +199,6 @@ func (manager *SDiskManager) ListItemFilter(
|
||||
q = q.In("id", sq)
|
||||
}
|
||||
|
||||
|
||||
if len(query.DiskFormat) > 0 {
|
||||
q = q.Equals("disk_format", query.DiskFormat)
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ func (manager *SElasticcacheManager) ListItemFilter(
|
||||
if len(query.NetworkType) > 0 {
|
||||
q = q.In("network_type", query.NetworkType)
|
||||
}
|
||||
netQuery := api.NetworkFilterListInput {
|
||||
netQuery := api.NetworkFilterListInput{
|
||||
NetworkFilterListBase: query.NetworkFilterListBase,
|
||||
}
|
||||
q, err = manager.SNetworkResourceBaseManager.ListItemFilter(ctx, q, userCred, netQuery)
|
||||
|
||||
@@ -279,7 +279,7 @@ func (manager *SElasticcacheSkuManager) ListItemFilter(
|
||||
if len(query.EngineArch) > 0 {
|
||||
q = q.In("engine_arch", query.EngineArch)
|
||||
}
|
||||
if len(query.LocalCategory)> 0 {
|
||||
if len(query.LocalCategory) > 0 {
|
||||
q = q.In("local_category", query.LocalCategory)
|
||||
}
|
||||
if len(query.PrepaidStatus) > 0 {
|
||||
|
||||
@@ -17,10 +17,10 @@ package models
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"yunion.io/x/pkg/errors"
|
||||
|
||||
"yunion.io/x/jsonutils"
|
||||
"yunion.io/x/log"
|
||||
"yunion.io/x/pkg/errors"
|
||||
"yunion.io/x/sqlchemy"
|
||||
|
||||
api "yunion.io/x/onecloud/pkg/apis/compute"
|
||||
@@ -374,4 +374,4 @@ func (manager *SGuestdiskManager) OrderByExtraFields(
|
||||
}
|
||||
|
||||
return q, nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,12 +16,12 @@ package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
"yunion.io/x/pkg/errors"
|
||||
"yunion.io/x/sqlchemy"
|
||||
|
||||
"yunion.io/x/jsonutils"
|
||||
"yunion.io/x/log"
|
||||
"yunion.io/x/pkg/errors"
|
||||
"yunion.io/x/pkg/util/reflectutils"
|
||||
"yunion.io/x/sqlchemy"
|
||||
|
||||
api "yunion.io/x/onecloud/pkg/apis/compute"
|
||||
"yunion.io/x/onecloud/pkg/cloudcommon/db"
|
||||
@@ -149,4 +149,4 @@ func (manager *SGuestJointsManager) OrderByExtraFields(
|
||||
}
|
||||
|
||||
return q, nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,19 +81,19 @@ type SGuestnetwork struct {
|
||||
// MAC地址
|
||||
MacAddr string `width:"32" charset:"ascii" nullable:"false" list:"user"`
|
||||
// IPv4地址
|
||||
IpAddr string `width:"16" charset:"ascii" nullable:"false" list:"user"`
|
||||
IpAddr string `width:"16" charset:"ascii" nullable:"false" list:"user"`
|
||||
// IPv6地址
|
||||
Ip6Addr string `width:"64" charset:"ascii" nullable:"true" list:"user"`
|
||||
// 虚拟网卡驱动
|
||||
Driver string `width:"16" charset:"ascii" nullable:"true" list:"user" update:"user"`
|
||||
Driver string `width:"16" charset:"ascii" nullable:"true" list:"user" update:"user"`
|
||||
// 带宽限制,单位mbps
|
||||
BwLimit int `nullable:"false" default:"0" list:"user"`
|
||||
BwLimit int `nullable:"false" default:"0" list:"user"`
|
||||
// 网卡序号
|
||||
Index int8 `nullable:"false" default:"0" list:"user" update:"user"`
|
||||
Index int8 `nullable:"false" default:"0" list:"user" update:"user"`
|
||||
// 是否为虚拟接口(无IP)
|
||||
Virtual bool `default:"false" list:"user"`
|
||||
Virtual bool `default:"false" list:"user"`
|
||||
// 虚拟网卡设备名称
|
||||
Ifname string `width:"16" charset:"ascii" nullable:"true" list:"user" update:"user"`
|
||||
Ifname string `width:"16" charset:"ascii" nullable:"true" list:"user" update:"user"`
|
||||
|
||||
// bind配对网卡MAC地址
|
||||
TeamWith string `width:"32" charset:"ascii" nullable:"false" list:"user"`
|
||||
@@ -902,4 +902,4 @@ func (manager *SGuestnetworkManager) OrderByExtraFields(
|
||||
}
|
||||
|
||||
return q, nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -430,10 +430,10 @@ func (manager *SGuestManager) ListItemFilter(
|
||||
} else {
|
||||
q = q.IsFalse("src_ip_check")
|
||||
}
|
||||
}
|
||||
if query.SrcMacCheck != nil {
|
||||
if *query.SrcMacCheck {
|
||||
q = q.IsTrue("src_mac_check")
|
||||
}
|
||||
if query.SrcMacCheck != nil {
|
||||
if *query.SrcMacCheck {
|
||||
q = q.IsTrue("src_mac_check")
|
||||
} else {
|
||||
q = q.IsFalse("src_mac_check")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user