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

MAAS reacts to invalid cloud credentials. #9009

Merged
merged 1 commit into from Aug 3, 2018

Conversation

anastasiamac
Copy link
Contributor

Description of change

This PR ensures that juju maas provider is responsive to cloud denying access to a credential.

The most interesting bits are contained in ~/provider/maas/errors.go file. This is the code that examines maas errors and determines whether the error is related to credential and worth reacting to.
All cloud calls that throw errors have now been modified to go through this logic to ensure that if the cloud complained about a credential, juju marks it as invalid.

Unit tests have been added to provide adequate initial coverage.
Since this code also cater for maas v1 type errors which contain http Status Code, these codes have been moved to a common area.

@anastasiamac
Copy link
Contributor Author

Copy link
Member

@wallyworld wallyworld left a comment

Choose a reason for hiding this comment

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

Looks ok to me. I assume it will be tested live.

@anastasiamac
Copy link
Contributor Author

ahhh infamous: github.com/juju/juju/cmd/juju/machine.TestPackage

@anastasiamac
Copy link
Contributor Author

!!build!!

@anastasiamac
Copy link
Contributor Author

$$merge$$

@jujubot jujubot merged commit 9e55068 into juju:develop Aug 3, 2018
@anastasiamac anastasiamac deleted the maas-invalid-creds-reaction branch August 3, 2018 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants