~andrewjbeach/juju-ci-tools/make-local-patcher

« back to all changes in this revision

Viewing changes to cloud_deploy.py

  • Committer: Curtis Hovey
  • Date: 2016-09-20 01:59:47 UTC
  • mto: This revision was merged to the branch mainline in revision 1602.
  • Revision ID: curtis@canonical.com-20160920015947-ko27xkj3a4i774h6
Convert juju instance=ids to true azuzre ids.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
import sys
8
8
from time import sleep
9
9
 
 
10
from jujucharm import (
 
11
    local_charm_path,
 
12
)
10
13
from jujupy import (
11
14
    CannotConnectEnv,
12
 
    EnvJujuClient,
13
 
    SimpleEnvironment,
 
15
    client_from_config,
14
16
)
15
17
from substrate import (
16
18
    LIBVIRT_DOMAIN_RUNNING,
18
20
    stop_libvirt_domain,
19
21
    verify_libvirt_domain,
20
22
)
21
 
from utility import local_charm_path
22
23
 
23
24
 
24
25
__metaclass__ = type
29
30
 
30
31
    :param environment: The name of the desired environment.
31
32
    """
32
 
    client = EnvJujuClient.by_version(
33
 
        SimpleEnvironment.from_config(environment), debug=debug)
 
33
    client = client_from_config(environment, None, debug=debug)
34
34
    running_domains = dict()
35
35
    if client.env.config['type'] == 'maas':
36
36
        # Split the hypervisor_URI and machine name