fix: 安全组规则返回项目id信息

This commit is contained in:
Qu Xuan
2020-05-29 20:47:17 +08:00
parent 9307660d11
commit 61ff1544ec
11 changed files with 14 additions and 0 deletions
+2
View File
@@ -88,4 +88,6 @@ type DBInstanceAccountDetails struct {
// 账号权限列表
DBInstanceprivileges []DBInstancePrivilege `json:"dbinstanceprivileges,allowempty"`
ProjectId string `json:"tenant_id"`
}
+1
View File
@@ -70,6 +70,7 @@ type DBInstancedatabaseDetails struct {
// 数据库权限
DBInstanceprivileges []DBInstancePrivilege `json:"dbinstanceprivileges"`
ProjectId string `json:"tenant_id"`
}
type DBInstanceparameterDetails struct {
+2
View File
@@ -73,6 +73,7 @@ type ElasticcacheAccountDetails struct {
ElasticcacheResourceInfo
SElasticcacheAccount
ProjectId string `json:"tenant_id"`
}
type ElasticcacheAclDetails struct {
@@ -81,6 +82,7 @@ type ElasticcacheAclDetails struct {
ElasticcacheResourceInfo
SElasticcacheAcl
ProjectId string `json:"tenant_id"`
}
type ElasticcacheParameterDetails struct {
+1
View File
@@ -22,4 +22,5 @@ type ElasticcacheBackupDetails struct {
ElasticcacheResourceInfo
SElasticcacheBackup
ProjectId string `json:"tenant_id"`
}
+2
View File
@@ -21,4 +21,6 @@ type SecgroupRuleDetails struct {
apis.ProjectizedResourceInfo
SSecurityGroupRule
SecurityGroupResourceInfo
ProjectId string `json:"tenant_id"`
}
@@ -201,6 +201,7 @@ func (manager *SDBInstanceAccountManager) FetchCustomizeColumns(
for i := range rows {
if dbinstance, ok := dbinstances[dbinstanceIds[i]]; ok {
virObjs[i] = &dbinstance
rows[i].ProjectId = dbinstance.ProjectId
}
}
@@ -324,6 +324,7 @@ func (manager *SDBInstanceDatabaseManager) FetchCustomizeColumns(
for i := range rows {
if dbinstance, ok := dbinstances[dbinstanceIds[i]]; ok {
virObjs[i] = &dbinstance
rows[i].ProjectId = dbinstance.ProjectId
}
}
@@ -557,6 +557,7 @@ func (manager *SElasticcacheAccountManager) FetchCustomizeColumns(
for i := range rows {
if cache, ok := caches[cacheIds[i]]; ok {
virObjs[i] = &cache
rows[i].ProjectId = cache.ProjectId
}
}
+1
View File
@@ -441,6 +441,7 @@ func (manager *SElasticcacheAclManager) FetchCustomizeColumns(
for i := range rows {
if cache, ok := caches[cacheIds[i]]; ok {
virObjs[i] = &cache
rows[i].ProjectId = cache.ProjectId
}
}
@@ -454,6 +454,7 @@ func (manager *SElasticcacheBackupManager) FetchCustomizeColumns(
for i := range rows {
if cache, ok := caches[cacheIds[i]]; ok {
virObjs[i] = &cache
rows[i].ProjectId = cache.ProjectId
}
}
+1
View File
@@ -238,6 +238,7 @@ func (manager *SSecurityGroupRuleManager) FetchCustomizeColumns(
for i := range rows {
if secgroup, ok := secgroups[secIds[i]]; ok {
virObjs[i] = &secgroup
rows[i].ProjectId = secgroup.ProjectId
}
}