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

added filesystem snapshot datasource #127

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

Krishnan-Priyanshu
Copy link
Collaborator

@Krishnan-Priyanshu Krishnan-Priyanshu commented Jan 7, 2025

Description

A few sentences describing the overall goals of the pull request's commits.

File System Snapshot Datasource

image

Test Run
image

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Acceptance tests

@shenda1
Copy link
Collaborator

shenda1 commented Jan 7, 2025

run e2e test HostGroupDs

@Krunal-Thakkar
Copy link
Collaborator

run e2e test HostGroupDs

@AnikaAgiwal2711
Copy link
Collaborator

image

@Krishnan-Priyanshu
Copy link
Collaborator Author

run e2e test FileSystemSnapshotDs

go.mod Outdated Show resolved Hide resolved
Optional: true,
Validators: []validator.String{
stringvalidator.LengthAtLeast(1),
stringvalidator.ConflictsWith(path.MatchRoot("id"), path.MatchRoot("name")),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think check is not needed since it already added to other 2 attributes

},
},
"filesystems": schema.ListNestedAttribute{
Description: "List of File System.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

List of file systems

@Krishnan-Priyanshu
Copy link
Collaborator Author

we can added the latest commit in go.mod
The PR on gopowerstore has been merged: dell/gopowerstore#168

@Krunal-Thakkar
Copy link
Collaborator

run e2e test FileSystemSnapshotDs


This datasource is used to query the existing File System Snapshot from PowerStore array. The information fetched from this datasource can be used for getting the details for further processing in resource block.

> **Note:** Only one of `name` or `id` or `filesystem_id` can be provided at a time.
Copy link
Contributor

Choose a reason for hiding this comment

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

This description seems outdated. Same in file_system daatasource.

}

data "powerstore_filesystem_snapshot" "test1" {
name = resource.powerstore_filesystem_snapshot.test.name
Copy link
Contributor

@rounak-adhikary rounak-adhikary Jan 17, 2025

Choose a reason for hiding this comment

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

Datasource examples are not given with resource prereqs since users will probably never write any code like this. Datasource examples can have datasource prereqs (eg. filesystem datasource prereq for filesystem_snapshot daatsource).
Only resource examples use resource or datasource prereqs, covering probable common scenarios.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, better give an example with nas_server_id

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.

6 participants