Implement the "juju environment jenv" command #1388

Merged
merged 4 commits into from Jan 13, 2015

Conversation

Projects
None yet
2 participants
Member

frankban commented Jan 12, 2015

This is used to import Juju generated jenv files into
the environments directory of the Juju home.

(Review request: http://reviews.vapour.ws/r/710/)

Member

frankban commented Jan 12, 2015

QA:

  • juju bootstrap an environment;
  • add a user to the environment:
    juju user add who --generate -o /tmp/myenv.jenv;
  • import the resulting environment:
    juju environment jenv /tmp/myenv.jenv;
  • the new default environment is called "myenv":
    juju switch;
  • the "myenv" environment properly connects:
    juju status;
  • ensure the imported environment contents make sense:
    cat ~/.juju/environments/myenv.jenv;
  • try to import the environment another time: you should
    see an "environment already exists" error:
    juju environment jenv /tmp/myenv.jenv;
  • do what suggested in the error message, i.e. pass a
    second parameter:
    juju environment jenv /tmp/myenv.jenv foo;
  • the new default environment is called "foo" and
    it works: juju switch && juju status;
  • check wrong paths are correctly handled e.g.:
    juju environment jenv /no/such,
    juju environment jenv /tmp;
  • destroy the environment.

Done, thank you!

Member

frankban commented Jan 13, 2015

$$merge$$

Contributor

jujubot commented Jan 13, 2015

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

jujubot added a commit that referenced this pull request Jan 13, 2015

Merge pull request #1388 from frankban/cmd-environment-jenv
Implement the "juju environment jenv" command

This is used to import Juju generated jenv files into
the environments directory of the Juju home.

(Review request: http://reviews.vapour.ws/r/710/)

@jujubot jujubot merged commit d7ed15e into juju:1.22 Jan 13, 2015

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