Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 补充腾讯云没加vendor、region过滤条件的请求, 并补充region索引 #1216

Open
wants to merge 1 commit into
base: v1.7.x
Choose a base branch
from

Conversation

KooKouse
Copy link
Contributor

No description provided.

@chenjr15 chenjr15 changed the title feat: 梳理腾讯云所有资源没加vendor、region过滤条件的请求, 补充region索引 --story=121118778 feat: 补充腾讯云没加vendor、region过滤条件的请求, 并补充region索引 Dec 23, 2024
@@ -427,6 +427,7 @@ func (cli *client) getVpcMap(kt *kit.Kit, accountID string, cloudVpcIDsMap map[s
Rules: []filter.RuleFactory{
&filter.AtomRule{Field: "account_id", Op: filter.Equal.Factory(), Value: accountID},
&filter.AtomRule{Field: "cloud_id", Op: filter.In.Factory(), Value: cloudVpcIDs},
&filter.AtomRule{Field: "vendor", Op: filter.Equal.Factory(), Value: enumor.Azure},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里怎么没有加region?我看“cmd/hc-service/logics/res-sync/aws/cvm.go”里面是有的呢

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

azure的上下文里面没有region这个参数,没办法给查询强行加上

Filter: tools.ExpressionAnd(
tools.RuleIn("cloud_id", delCloudIDs),
tools.RuleEqual("vendor", enumor.Azure),
),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里也没加region,我看“cmd/hc-service/logics/res-sync/aws/subnet.go”的deleteSubnet()里面是有的呢

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

Filter: tools.ContainersExpression("cloud_id", delCloudIDs),
Filter: tools.ExpressionAnd(
tools.RuleIn("cloud_id", delCloudIDs),
tools.RuleEqual("vendor", enumor.Azure),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

azure的上下文里面没有region这个参数,没办法给查询强行加上

Filter: tools.ContainersExpression("cloud_id", partIDs),
Page: core.NewDefaultBasePage(),
Filter: tools.ExpressionAnd(
tools.RuleIn("cloud_id", partIDs),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

传过来的partIDs不一定都是同一个region的吧?而且也不一定是同一个vendor的

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对的,所以这里已经写了注释 没有修改原有的逻辑

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants