Skip to content

feat: add public cloud user modules #111

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jpiron
Copy link
Contributor

@jpiron jpiron commented Jan 13, 2025

Add the following modules:

  • public_cloud_user_info
  • public_cloud_user_s3credentials_info
  • public_cloud_user_s3credentials
  • public_cloud_user
  • public_cloud_users_info

Copy link
Collaborator

@tortuegenialez tortuegenialez left a comment

Choose a reason for hiding this comment

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

Thank you for your PR

try:
client.wrap_call("DELETE",
f"/cloud/project/{service_name}/user/{user_id}")
except OVHResourceNotFound:
Copy link
Collaborator

Choose a reason for hiding this comment

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

The exception should be catched in the OVH class.

delay: 5
'''

RETURN = ''' # '''
Copy link
Collaborator

Choose a reason for hiding this comment

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

The module returns a json

description = module.params['description']
user_id = module.params['user_id']
state = module.params['state']

Copy link
Collaborator

Choose a reason for hiding this comment

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

You are missing a check mode here


service_name = module.params['service_name']
user_id = module.params['user_id']
result = client.wrap_call("GET",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Check mode is also missing here

user_id = module.params['user_id']
access = module.params['access']
state = module.params['state']

Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing check mode also

EXAMPLES = '''
synthesio.ovh.public_cloud_user_s3credentials:
service_name: "{{ service_name }}"
user_id: "{{ user_id }}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add an exemple of the access that has to be added?

'''

EXAMPLES = '''
synthesio.ovh.public_cloud_user_s3credentials_info:
Copy link
Collaborator

Choose a reason for hiding this comment

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

This module returns credentials, examples should mention a register

client = OVH(module)

service_name = module.params['service_name']
user_id = module.params['user_id']
Copy link
Collaborator

Choose a reason for hiding this comment

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

Check mode is missing


EXAMPLES = '''
synthesio.ovh.public_cloud_users_info:
service_name: "{{ service_name }}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

The module also returns informations, the example is missing a register

client = OVH(module)

service_name = module.params['service_name']
result = client.wrap_call("GET",
Copy link
Collaborator

Choose a reason for hiding this comment

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

check mode is missing

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