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

loosen azure sdk dependencies in azurearm cloud driver #49696

Merged
merged 2 commits into from Sep 20, 2018

Conversation

Projects
None yet
2 participants
@jgleissner
Copy link
Contributor

commented Sep 18, 2018

What does this PR do?

This PR removes the dependency on azure-cli from the azurearm cloud driver, which is not used at all. It also changes the driver to import the azure-storage sdk package in lieu of the multiapi storage package, in case the latter is not available.

What issues does this PR fix or reference?

Allows the azurearm cloud driver to be used on platforms that do not have the azure-cli or azure-multiapi-storage packages.

Tests written?

Manually tested with azure-storage 0.36 and azure-multiapi-storage 0.1.4.

Commits signed with GPG?

Yes

loosen azure sdk dependencies in azurearm cloud driver
Remove dependency to azure-cli, which is not used at all.
Use azure-storage-sdk as fallback if multiapi version is not available.

@salt-jenkins salt-jenkins requested a review from saltstack/team-cloud Sep 18, 2018

@rallytime

This comment has been minimized.

Copy link
Contributor

commented Sep 19, 2018

Welcome @jgleissner! Thank you for contributing.

Can you fix the lint error? https://jenkinsci.saltstack.com/job/pr-lint/job/PR-49696/1/warnings52Result/

from azure.multiapi.storage.v2016_05_31 import CloudStorageAccount
from azure.cli import core
HAS_LIBS = LooseVersion(core.__version__) >= LooseVersion("2.0.12")
if pkgutil.find_loader('azure.multiapi'):

This comment has been minimized.

Copy link
@rallytime

rallytime Sep 19, 2018

Contributor

What about using the salt.utils.path.which function instead here?

This comment has been minimized.

Copy link
@jgleissner

jgleissner Sep 19, 2018

Author Contributor

Hi @rallytime , if I'm not mistaken, salt.utils.path.which looks for an executable, whereas this code looks for an importable module. I don't see how which would be useful here, or am I missing something?

@rallytime
Copy link
Contributor

left a comment

I have one small suggestion.

@rallytime rallytime merged commit 91acb82 into saltstack:2018.3 Sep 20, 2018

6 of 10 checks passed

continuous-integration/jenkins/pr-merge This commit cannot be built
Details
jenkins/pr/py2-centos-7 The py2-centos-7 job has failed
Details
jenkins/pr/py2-windows-2016 The py2-windows-2016 job has failed
Details
jenkins/pr/py3-windows-2016 The py3-windows-2016 job has failed
Details
WIP ready for review
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint The lint job has passed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has passed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has passed
Details
@rallytime

This comment has been minimized.

Copy link
Contributor

commented Sep 20, 2018

Thank you @jgleissner!

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.