~gnuoy/charms/trusty/nova-compute/1427660

« back to all changes in this revision

Viewing changes to hooks/nova_compute_proxy.py

  • Committer: james.page at ubuntu
  • Date: 2014-06-01 14:26:17 UTC
  • mto: (83.2.1 nova-compute.lp1286762)
  • mto: This revision was merged to the branch mainline in revision 94.
  • Revision ID: james.page@ubuntu.com-20140601142617-r56j67iagf4xn0ed
Revert accidental commits

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import tempfile
2
 
 
3
 
 
4
 
from charmhelpers.core.hookenv import (
5
 
    unit_get,
6
 
    cached,
7
 
    log
8
 
    config
9
 
)
10
 
 
11
 
from charmhelpers.fetch import (
12
 
    apt_install,
13
 
    filter_installed_packages
14
 
)
15
 
 
16
 
try:
17
 
    import jinja2
18
 
except ImportError:
19
 
    apt_install(filter_installed_packages(['python-jinja2']),
20
 
                                        fatal=True)
21
 
    import jinja2
22
 
 
23
 
try:
24
 
    from fabric.api import cd, env, local, parallel, serial
25
 
    from fabric.api import put, run, settings, sudo
26
 
except ImportError:
27
 
    apt_install(filter_installed_packages(['fabric']),
28
 
                fatal=True)
29
 
 
30
 
 
31
 
def launch_power():
32
 
    log('Power launched')
33
 
    print config