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

add role to manage folders #47

Merged

Conversation

mikemorency
Copy link
Collaborator

@mikemorency mikemorency commented Jun 3, 2024

Allows a user to create or delete a folder tree in vmware, or create just the final folder in a tree. For example
Create any missing folders along the path /DC01/vms/my/production/web
Or just create the folder web in the already existing path /DC01/vms/my/production

@mikemorency mikemorency force-pushed the mm-feature/ACA-1588-create-vm-folder branch from 4759946 to 665c9f8 Compare June 3, 2024 17:38
@mikemorency mikemorency force-pushed the mm-feature/ACA-1588-create-vm-folder branch from 49efb07 to b81cbe6 Compare June 4, 2024 13:56
@mikemorency mikemorency marked this pull request as ready for review June 6, 2024 12:42
@shellymiron
Copy link
Collaborator

@mikemorency I have the tests ready for this PR, so once it merged, i'll open mine

- name: Fail If Folder Path Is Absolute
ansible.builtin.fail:
msg: Folder name should not be absolute. It should be relative to /<datacenter>/<type>
when: manage_folder_folder_name[0] == '/'
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe I'm wrong
I think you mean to fail if manage_folder_folder_name[0] != '/'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, the check is correct. Its making sure the user does not input a path/folder that starts with a slash

- uat/foo/web
- development/foo/web

- name: Create Folders Without Managing Full Tree
Copy link
Contributor

@bardielle bardielle Jun 18, 2024

Choose a reason for hiding this comment

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

Does it mean to create only foo?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it would create manage_folder_folder_name, so either backend or db in the already existing manage_folder_parent_folder

This is like running mkdir production/foo/backend for example

msg: Folder name should not be absolute. It should be relative to /<datacenter>/<type>
when: manage_folder_folder_name[0] == '/'

- name: Manage Full Folder Path
Copy link
Collaborator

Choose a reason for hiding this comment

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

This would be way nicer to have part of the module community.vmware.vcenter_folder IMHO.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree - maybe we can open a ticket for that?

@bardielle bardielle merged commit 8255905 into redhat-cop:main Jun 18, 2024
20 checks passed
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.

4 participants