Handle charms with terms. #54

Merged
merged 3 commits into from Nov 8, 2016

Conversation

Projects
None yet
2 participants
Member

tvansteenburgh commented Nov 4, 2016

In order to download charms with terms, we need to be auth'd to the
charmstore, and we need to agree to the charm terms before
downloading.

A charmstore user/pass will be passed in via charm config. We then
use pexpect to charm login dynamically as needed. Any
other method would be problematic since the charmstore macaroons
and sso token will eventually expire, making it necessary to login
again.

Also added a catch-all 500 view just for the sake of aesthetics.

Fixes #46.

tvansteenburgh added some commits Nov 3, 2016

Handle charms with terms.
In order to download charms with terms, we need to be auth'd to the
charmstore, and we need to agree to the charm terms before
downloading.

A charmstore user/pass will be passed in via charm config. We then
use pexpect to `charm login` dynamically as needed. Any
other method would be problematic since the charmstore macaroons
and sso token will eventually expire, making it necessary to login
again.

Also added a catch-all 500 view just for the sake of aesthetics.
Owner

johnsca commented Nov 8, 2016

This LGTM 👍 but I had a couple of non-blocking comments:

I asked for confirmation on juju/charmstore#618 as to whether that fix has already been released as it was scheduled to, so we could maybe remove that work-around.

I recall Casey mentioning removing the go cookies explicitly, but your comment in the login function indicates that it will always do the right thing. I just wanted to confirm that explicitly removing the go cookies is not necessary.

@tvansteenburgh tvansteenburgh merged commit 0106fd6 into master Nov 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment