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(lts): add resource to manage log metric rule #6013

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

wuzhuanhong
Copy link
Contributor

@wuzhuanhong wuzhuanhong commented Dec 12, 2024

What this PR does / why we need it:

Add new resource used to manage LTS log metric rule.

Which issue this PR fixes:
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)
fixes #xxx

Special notes for your reviewer:

Release note:

1. add new resource.
2. add related document and acceptance test.

PR Checklist

  • Tests added/passed.
./scripts/coverage.sh -o lts -f TestAccMetricRule_basic
Prepare to calculate the coverage the following command:
TF_ACC=1 go test "./huaweicloud/services/acceptance/lts" -v -coverprofile="./huaweicloud/services/acceptance/lts/lts_coverage.cov" -coverpkg="./huaweicloud/services/lts" -run TestAccMetricRule_basic -timeout 360m -parallel 10
=== RUN   TestAccMetricRule_basic
=== PAUSE TestAccMetricRule_basic
=== CONT  TestAccMetricRule_basic
--- PASS: TestAccMetricRule_basic (187.55s)
PASS
coverage: 13.7% of statements in ./huaweicloud/services/lts
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/lts       187.628s        coverage: 13.7% of statements in ./huaweicloud/services/lts
  • Documentation updated.

  • Schema updated.

  • CheckDeleted.

    • a. During query operation (Read Context)
      aa. Resource not found
      image

    • b. During delete/disassociate/unbind operation (Delete Context)
      ba. Resource not found
      image

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@wuzhuanhong wuzhuanhong changed the title feat(lts) add resource to manage log metric rule feat(lts): add resource to manage log metric rule Dec 13, 2024
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

1 similar comment
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

d.Set("window_size", utils.PathSearch("window_size", respBody, nil)),
d.Set("filter", flattenMetricRuleFilter(utils.PathSearch("filter", respBody, nil))),
d.Set("description", utils.PathSearch("description", respBody, nil)),
d.Set("created_at", utils.FormatTimeStampRFC3339(int64(utils.PathSearch("create_time", respBody, 0).(float64))/1000, false)),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
d.Set("created_at", utils.FormatTimeStampRFC3339(int64(utils.PathSearch("create_time", respBody, 0).(float64))/1000, false)),
d.Set("created_at", utils.FormatTimeStampRFC3339(int64(utils.PathSearch("create_time", respBody, float64(0)).(float64))/1000, false)),

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@Lance52259
Copy link
Contributor

/approve
/lgtm

@github-ci-robot github-ci-robot added LGTM /lgtm approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 17, 2024
Copy link
Collaborator

@github-ci-robot github-ci-robot left a comment

Choose a reason for hiding this comment

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

This PR has been approved by: @Lance52259

/approve
/lgtm

@github-ci-robot github-ci-robot merged commit bab5bdc into huaweicloud:master Dec 17, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. feature LGTM /lgtm size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants