Skip to content

Commit

Permalink
fix: update fields permission tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Qiu Jian committed May 18, 2020
1 parent bbeb6be commit d1fd245
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions pkg/compute/models/hostnetworks.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ type SHostnetwork struct {
SHostJointsBase

// 宿主机ID
BaremetalId string `width:"36" charset:"ascii" nullable:"false" list:"admin"`
BaremetalId string `width:"36" charset:"ascii" nullable:"false" list:"domain"`
// 网络ID
NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"admin"`
NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"domain"`
// IP地址
IpAddr string `width:"16" charset:"ascii" list:"admin"`
IpAddr string `width:"16" charset:"ascii" list:"domain"`
// MAC地址
MacAddr string `width:"18" charset:"ascii" list:"admin"`
MacAddr string `width:"18" charset:"ascii" list:"domain"`
}

func (manager *SHostnetworkManager) GetMasterFieldName() string {
Expand Down
10 changes: 5 additions & 5 deletions pkg/compute/models/hoststorages.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ type SHoststorage struct {
SHostJointsBase

// 宿主机Id
HostId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"required" json:"host_id"`
HostId string `width:"36" charset:"ascii" nullable:"false" list:"domain" create:"required" json:"host_id"`
// 存储Id
StorageId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"required" json:"storage_id"`
StorageId string `width:"36" charset:"ascii" nullable:"false" list:"domain" create:"required" json:"storage_id"`

// 挂载点
MountPoint string `width:"256" charset:"ascii" nullable:"false" list:"admin" update:"admin" create:"required" json:"mount_point"`
MountPoint string `width:"256" charset:"ascii" nullable:"false" list:"domain" update:"domain" create:"required" json:"mount_point"`

// 配置信息
Config *jsonutils.JSONArray `nullable:"true" get:"admin" json:"config"`
Config *jsonutils.JSONArray `nullable:"true" get:"domain" json:"config"`
// 真实容量大小
RealCapacity int64 `nullable:"true" list:"admin" json:"real_capacity"`
RealCapacity int64 `nullable:"true" list:"domain" json:"real_capacity"`
}

func (manager *SHoststorageManager) GetMasterFieldName() string {
Expand Down
12 changes: 6 additions & 6 deletions pkg/compute/models/hostwires.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@ func init() {
type SHostwire struct {
SHostJointsBase

Bridge string `width:"16" charset:"ascii" nullable:"false" list:"admin" update:"admin" create:"admin_required"`
Bridge string `width:"16" charset:"ascii" nullable:"false" list:"domain" update:"domain" create:"domain_required"`
// 接口名称
Interface string `width:"16" charset:"ascii" nullable:"false" list:"admin" update:"admin" create:"admin_required"`
Interface string `width:"16" charset:"ascii" nullable:"false" list:"domain" update:"domain" create:"domain_required"`
// 是否是主地址
IsMaster bool `nullable:"true" default:"false" list:"admin" update:"admin" create:"admin_optional"`
IsMaster bool `nullable:"true" default:"false" list:"domain" update:"domain" create:"domain_optional"`
// MAC地址
MacAddr string `width:"18" charset:"ascii" list:"admin" update:"admin" create:"admin_required"`
MacAddr string `width:"18" charset:"ascii" list:"domain" update:"domain" create:"domain_required"`

// 宿主机Id
HostId string `width:"128" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"`
HostId string `width:"128" charset:"ascii" nullable:"false" list:"domain" create:"domain_required"`
// 二层网络Id
WireId string `width:"128" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"`
WireId string `width:"128" charset:"ascii" nullable:"false" list:"domain" create:"domain_required"`
}

func (manager *SHostwireManager) GetMasterFieldName() string {
Expand Down
6 changes: 3 additions & 3 deletions pkg/compute/models/loadbalancernetworks.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ func init() {
type SLoadbalancerNetwork struct {
db.SVirtualJointResourceBase

LoadbalancerId string `width:"36" charset:"ascii" nullable:"false" list:"admin"`
NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"admin"`
IpAddr string `width:"16" charset:"ascii" list:"admin"`
LoadbalancerId string `width:"36" charset:"ascii" nullable:"false" list:"user"`
NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"user"`
IpAddr string `width:"16" charset:"ascii" list:"user"`
}

func (manager *SLoadbalancernetworkManager) GetMasterFieldName() string {
Expand Down
2 changes: 1 addition & 1 deletion pkg/compute/models/managedresource.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (

type SManagedResourceBase struct {
// 云订阅ID
ManagerId string `width:"128" charset:"ascii" nullable:"true" list:"admin" create:"optional"`
ManagerId string `width:"128" charset:"ascii" nullable:"true" list:"user" create:"optional"`
}

type SManagedResourceBaseManager struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/compute/models/networkinterfacenetwork.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type SNetworkinterfacenetwork struct {
Primary bool `nullable:"false" list:"user"`
IpAddr string `width:"16" charset:"ascii" nullable:"false" list:"user"`
NetworkinterfaceId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False)
NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"admin"`
NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"user"`
}

func (manager *SNetworkinterfacenetworkManager) GetMasterFieldName() string {
Expand Down

0 comments on commit d1fd245

Please sign in to comment.