Skip to content

Conversation

@farfarhad
Copy link

Good morning,

unfortunately it seems that a module that can start and stop OVH Cloud Instances is missing.

What I am referring is the OVH API Cloud /cloud/project/{serviceName}/instance/{instanceId}/start (link here) and /cloud/project/{serviceName}/instance/{instanceId}/stop (link here).

This module will be really needed and helpful for whoever desire to use your modules since it is not possible to start an instance otherwise.

I wrote that simple module called plugins/modules/public_cloud_instance_starting.py, hoping you could accept it in your repo and hope I could help you and other people with my code.

Thank you very much

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.

Thanks for this PR!

Another PR (#106) is opened covering the stop/start of public cloud instances amongst other things.


DOCUMENTATION = """
---
module: public_cloud_instance_starting
Copy link
Collaborator

Choose a reason for hiding this comment

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

Naming is hard, the module is not only managing start of instances. Maybe something like public_cloud_instance_manage_state


EXAMPLES = r"""
- name: Start the instance
synthesio.ovh.public_cloud_instance_shelving:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wrong module name

route = f"/cloud/project/{service_name}/instance/{instance_id}/stop"
else:
module.fail_json(msg=f"On-Off state {onoff_state} is unknown", changed=False)

Copy link
Collaborator

Choose a reason for hiding this comment

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

A check mode switch could be usefull here

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