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

Stop(deallocate) and Start vm actions #45119

Merged
merged 11 commits into from Jan 3, 2018

Conversation

Projects
None yet
2 participants
@sumeetisp
Copy link
Contributor

commented Dec 21, 2017

Adding missing functionality for starting and stopping vm

What does this PR do?

This PR adds functionality for stopping(deallocate) and starting azure virtual machines.

What issues does this PR fix or reference?

Previous Behavior

Remove this section if not relevant

New Behavior

Remove this section if not relevant

Tests written?

Yes/No

Commits signed with GPG?

Yes/No

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

Stop and Start vm actions
Adding missing functionality for starting and stopping vm
@rallytime

This comment has been minimized.

Copy link
Contributor

commented Dec 21, 2017

sumeetisp added some commits Dec 22, 2017

@sumeetisp

This comment has been minimized.

Copy link
Contributor Author

commented Dec 22, 2017

Done

@rallytime
Copy link
Contributor

left a comment

I had a couple of questions and suggestions here. Otherwise this looks good.

def stop(name, resource_group=None, call=None):
'''
Stop a VM

This comment has been minimized.

Copy link
@rallytime

rallytime Dec 22, 2017

Contributor

Can you add a .. versionadded:: Fluorine here?

def start(name, resource_group=None, call=None):
'''
Start a VM

This comment has been minimized.

Copy link
@rallytime

rallytime Dec 22, 2017

Contributor

This also need the same version added tag.

try:
instance_stop = compconn.virtual_machines.deallocate(group, name)
instance_stop.wait()
resource_group = group

This comment has been minimized.

Copy link
@rallytime

rallytime Dec 22, 2017

Contributor

What is the purpose of setting this resource_group variable? It looks like it's not being used anywhere later.

try:
instance_start = compconn.virtual_machines.start(group, name)
instance_start.wait()
resource_group = group

This comment has been minimized.

Copy link
@rallytime

rallytime Dec 22, 2017

Contributor

Same question about setting the resource group here as above.

@sumeetisp

This comment has been minimized.

Copy link
Contributor Author

commented Dec 23, 2017

@sumeetisp

This comment has been minimized.

Copy link
Contributor Author

commented Jan 2, 2018

I have made the suggested changes

@rallytime

This comment has been minimized.

Copy link
Contributor

commented Jan 2, 2018

@sumeetisp This looks good, but there's a lint failure: https://jenkins.saltstack.com/job/PR/job/salt-pr-lint-n/17815/violations/file/salt/cloud/clouds/azurearm.py/

Once that is fixed up we can get this in. :)

sumeetisp added some commits Jan 3, 2018

@rallytime

This comment has been minimized.

Copy link
Contributor

commented Jan 3, 2018

Go Go Jenkins!

@rallytime rallytime merged commit bb3ad9b into saltstack:develop Jan 3, 2018

4 of 9 checks passed

jenkins/PR/salt-pr-linode-ubuntu16-py3 Pull Requests » Salt PR - Linode Ubuntu16.04 - PY3 #5308 — ABORTED
Details
codeclimate 4 issues to fix
Details
default Build finished.
Details
jenkins/PR/salt-pr-linode-ubuntu14-n Pull Requests » Salt PR - Linode Ubuntu14.04 #18302 — FAILURE
Details
jenkins/PR/salt-pr-rs-cent7-n Pull Requests » Salt PR - RS CentOS 7 #14860 — FAILURE
Details
WIP ready for review
Details
jenkins/PR/salt-pr-clone Pull Requests » Salt PR - Clone #20795 — SUCCESS
Details
jenkins/PR/salt-pr-docs-n Pull Requests » Salt PR - Docs #13276 — SUCCESS
Details
jenkins/PR/salt-pr-lint-n Pull Requests » Salt PR - Code Lint #17872 — SUCCESS
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.