~frankban/juju-gui/quickstart-real-bootstrap

« back to all changes in this revision

Viewing changes to quickstart/utils.py

  • Committer: Francesco Banconi
  • Date: 2013-10-15 15:47:31 UTC
  • Revision ID: francesco.banconi@canonical.com-20131015154731-p5ntjgm6a3d7ub02
Checkpoint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
      - the environment file contents are not parsable by YAML;
75
75
      - the YAML contents are not properly structured;
76
76
      - the environment named envname is not found;
77
 
      - the environment does not include the admin_secret field.
 
77
      - the environment does not include the "type" field;
 
78
      - the environment does not include the "admin_secret" field.
78
79
    """
79
80
    # Load the Juju environments file.
80
81
    try:
97
98
    if environment is None:
98
99
        msg = 'environment {} not found in {}'.format(env_name, env_file)
99
100
        raise ValueError(msg)
 
101
    # Retrieve the provider type and the admin secret.
100
102
    env_type = environment.get('type')
101
103
    if env_type is None:
102
104
        msg = '{} provider type not found in {}'.format(env_name, env_file)