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

Fixes for juju-dhx for 2.0rc2 #70

Merged
merged 1 commit into from Oct 12, 2016
Merged

Conversation

johnsca
Copy link
Contributor

@johnsca johnsca commented Oct 4, 2016

No description provided.

Copy link
Contributor

@lazypower lazypower left a comment

Choose a reason for hiding this comment

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

Aside from my comments about anecdotal reactions, i've pulled this branch and tested its basic functionality on 2.0-rc3.

👍 LGTM

return get_env._env


def _unit_errored(unit):
if JUJU_2:
return unit['WorkloadStatus']['Status'] == 'error'
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume this was early beta format?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed.

@@ -32,11 +34,29 @@ def call(*args):
sys.exit(e.returncode)


JUJU_ENV = call('juju', 'switch').rstrip('\n').split(':')[-1]
JUJU_ENV = call('juju', 'switch').rstrip('\n')
Copy link
Contributor

Choose a reason for hiding this comment

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

praise the sun, we get to ditch the funky splits \o/

annotations = env.get_annotation(machine, 'machine')
if annotations['Annotations'].get('import-ids') != ','.join(import_ids):
annotations = env.get_annotation(machine, 'machine')['Annotations'] or {}
import_ids = ['lp:{}'.format(iid) if ':' not in iid else iid
Copy link
Contributor

Choose a reason for hiding this comment

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

this line makes my head explode. 💣 I was looking for where iid is declared, and its on 208. Using a variable before assignment... oh my lambda.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that's a bit of an annoyance when you have to line-break list comprehensions. This might have been marginally clearer using map() instead.

@lazypower lazypower merged commit 38bb5eb into juju:master Oct 12, 2016
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.

None yet

2 participants