mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
fix: 安全组规则返回项目id信息
This commit is contained in:
@@ -88,4 +88,6 @@ type DBInstanceAccountDetails struct {
|
||||
|
||||
// 账号权限列表
|
||||
DBInstanceprivileges []DBInstancePrivilege `json:"dbinstanceprivileges,allowempty"`
|
||||
|
||||
ProjectId string `json:"tenant_id"`
|
||||
}
|
||||
|
||||
@@ -70,6 +70,7 @@ type DBInstancedatabaseDetails struct {
|
||||
|
||||
// 数据库权限
|
||||
DBInstanceprivileges []DBInstancePrivilege `json:"dbinstanceprivileges"`
|
||||
ProjectId string `json:"tenant_id"`
|
||||
}
|
||||
|
||||
type DBInstanceparameterDetails struct {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -22,4 +22,5 @@ type ElasticcacheBackupDetails struct {
|
||||
ElasticcacheResourceInfo
|
||||
|
||||
SElasticcacheBackup
|
||||
ProjectId string `json:"tenant_id"`
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user