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
Merged

Conversation

@sumeetisp
Copy link
Contributor

@sumeetisp sumeetisp 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.

Adding missing functionality for starting and stopping vm
@rallytime
Copy link
Contributor

@rallytime rallytime commented Dec 21, 2017

@sumeetisp
Copy link
Contributor Author

@sumeetisp sumeetisp commented Dec 22, 2017

Done

Copy link
Contributor

@rallytime rallytime 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
Copy link
Contributor

@rallytime rallytime Dec 22, 2017

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

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

@rallytime rallytime Dec 22, 2017

This also need the same version added tag.

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

@rallytime rallytime Dec 22, 2017

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
Copy link
Contributor

@rallytime rallytime Dec 22, 2017

Same question about setting the resource group here as above.

@sumeetisp
Copy link
Contributor Author

@sumeetisp sumeetisp commented Dec 23, 2017

@sumeetisp
Copy link
Contributor Author

@sumeetisp sumeetisp commented Jan 2, 2018

I have made the suggested changes

@rallytime
Copy link
Contributor

@rallytime rallytime 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. :)

@rallytime
Copy link
Contributor

@rallytime rallytime commented Jan 3, 2018

Go Go Jenkins!

@rallytime rallytime merged commit bb3ad9b into saltstack:develop Jan 3, 2018
4 of 9 checks passed
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[bot]
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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants