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

New Start/Stop instance module for OVH Cloud Instances #105

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

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
Contributor

@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
Contributor

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
Contributor

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
Contributor

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