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

FileSystem Datasource #8

Merged
merged 1 commit into from
Aug 1, 2023
Merged

FileSystem Datasource #8

merged 1 commit into from
Aug 1, 2023

Conversation

doriac11
Copy link
Collaborator

@doriac11 doriac11 commented Jul 31, 2023

Description

  • Given a directory path, get the metadata, acl, quota, and snapshots for a particular filesystem.
  • Modified the OpenAPI Json GetDirectoryMetadata and GetAcl to use the directory directly on the path.

ISSUE TYPE

  • Feature Pull Request
RESOURCE OR DATASOURCE NAME

FileSystem Datasource

OUTPUT
+ powerscale_filesystem_1 = {
      + directory_path       = "/ifs/tfacc_file_system_test"
      + file_systems_details = {
          + file_system_attributes    = [
              + {
                  + name      = "mode"
                  + namespace = ""
                  + value     = "0xc0004104bc"
                },
              + {
                  + name      = "mode"
                  + namespace = ""
                  + value     = "Mon, 31 Jul 2023 10:57:16 GMT"
                },
              + {
                  + name      = "mode"
                  + namespace = ""
                  + value     = "Mon, 31 Jul 2023 10:57:16 GMT"
                },
              + {
                  + name      = "mode"
                  + namespace = ""
                  + value     = "Mon, 31 Jul 2023 10:57:16 GMT"
                },
              + {
                  + name      = "mode"
                  + namespace = ""
                  + value     = "Mon, 31 Jul 2023 10:57:16 GMT"
                },
              + {
                  + name      = "mode"
                  + namespace = ""
                  + value     = "root"
                },
              + {
                  + name      = "mode"
                  + namespace = ""
                  + value     = "wheel"
                },
              + {
                  + name      = "mode"
                  + namespace = ""
                  + value     = "container"
                },
              + {
                  + name      = "mode"
                  + namespace = ""
                  + value     = "0xc0004104dc"
                },
              + {
                  + name      = "mode"
                  + namespace = ""
                  + value     = "0700"
                },
            ]
          + file_system_namespace_acl = {
              + acl           = [
                  + {
                      + accessrights  = [
                          + "dir_gen_read",
                          + "dir_gen_write",
                          + "dir_gen_execute",
                          + "std_write_dac",
                          + "delete_child",
                        ]
                      + accesstype    = "allow"
                      + inherit_flags = []
                      + op            = ""
                      + trustee       = {
                          + id   = "UID:0"
                          + name = "root"
                          + type = "user"
                        }
                    },
                  + {
                      + accessrights  = [
                          + "std_read_dac",
                          + "std_synchronize",
                          + "dir_read_attr",
                        ]
                      + accesstype    = "allow"
                      + inherit_flags = []
                      + op            = ""
                      + trustee       = {
                          + id   = "GID:0"
                          + name = "wheel"
                          + type = "group"
                        }
                    },
                ]
              + action        = null
              + authoritative = "mode"
              + group         = {
                  + id   = "GID:0"
                  + name = "wheel"
                  + type = "group"
                }
              + mode          = "0700"
              + owner         = {
                  + id   = "UID:0"
                  + name = "root"
                  + type = "user"
                }
            }
          + file_system_quotas        = [
              + {
                  + container = true
                  + enforced  = false
                  + id        = "jg4tAAEAAAAAAAAAAAAAQAMAAAAAAAAA"
                  + path      = "/ifs/tfacc_file_system_test"
                  + type      = "directory"
                  + usage     = {
                      + applogical                = 0
                      + applogical_ready          = true
                      + fslogical                 = 0
                      + fslogical_ready           = true
                      + fsphysical                = 2048
                      + fsphysical_ready          = true
                      + inodes                    = 1
                      + inodes_ready              = true
                      + physical                  = 2048
                      + physical_data             = 0
                      + physical_data_ready       = true
                      + physical_protection       = 0
                      + physical_protection_ready = true
                      + physical_ready            = true
                      + shadow_refs               = 0
                      + shadow_refs_ready         = true
                    }
                },
            ]
          + file_system_snapshots     = [
              + {
                  + alias          = null
                  + created        = 1690801105
                  + expires        = 0
                  + has_locks      = false
                  + id             = 4
                  + name           = "tfacc_file_system_snap_test_keep"
                  + path           = "/ifs/tfacc_file_system_test"
                  + pct_filesystem = 0.0000008119260996863886
                  + pct_reserve    = 0
                  + schedule       = ""
                  + shadow_bytes   = 0
                  + size           = 2048
                  + state          = "active"
                  + target_id      = 0
                  + target_name    = ""
                },
            ]
        }
      + id                   = "FileSystem-id"
    }

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 80% 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
  • I have maintained backward compatibility

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

  • [] Unit tests
  • Acceptance tests

- Given a directory path, get the metadata, acl, quota, and snapshots
  for a particular filesystem.
- Modified the OpenAPI Json GetDirectoryMetadata and GetAcl
to use directy directly on the path.
@doriac11
Copy link
Collaborator Author

run e2e test

@doriac11 doriac11 merged commit 745a6fa into main Aug 1, 2023
6 checks passed
@doriac11 doriac11 deleted the fileSystem-datasource branch August 1, 2023 11:52
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.

3 participants