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

refactor!: move the cloud specification to Model #141

Merged
merged 5 commits into from
Jun 11, 2024

Conversation

tonyandrewmeyer
Copy link
Collaborator

@tonyandrewmeyer tonyandrewmeyer commented Jun 6, 2024

The cloud specification is really a controller property, and in Scenario the Model object is closest to the controller. This means that it is more logical to have the cloud_spec property on the Model object than on State.

The one charm (application) specific aspect of credential-get is trust - you don't trust an entire model at a time, you trust individual applications. However, trust is broader than cloud credentials (e.g. the extra access available with k8s). To facilitate this, a new app_trusted Boolean attribute is added to the Context, which controls whether the cloud specification can be accessed (and might do other things in the future).

@tonyandrewmeyer tonyandrewmeyer marked this pull request as ready for review June 7, 2024 02:49
Copy link
Collaborator

@PietroPasotti PietroPasotti left a comment

Choose a reason for hiding this comment

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

In principle I'm fine with the change, but if you agree with the thought that trusted does not belong in State, we should do that first.

scenario/mocking.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@PietroPasotti PietroPasotti left a comment

Choose a reason for hiding this comment

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

LGTM! thanks :)

@tonyandrewmeyer tonyandrewmeyer merged commit f1f58e5 into canonical:main Jun 11, 2024
2 checks passed
@tonyandrewmeyer tonyandrewmeyer deleted the cloud-spec-on-model branch June 11, 2024 06:33
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.

3 participants