~ionutbalutoiu/charms/trusty/neutron-api/next

« back to all changes in this revision

Viewing changes to hooks/neutron_api_hooks.py

  • Committer: James Page
  • Date: 2015-04-16 19:58:18 UTC
  • mfrom: (86.2.12 trunk)
  • Revision ID: james.page@ubuntu.com-20150416195818-rpkf53uuc58igl9u
[coreycb,r=james-page] Add deploy from source support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
)
33
33
 
34
34
from charmhelpers.contrib.openstack.utils import (
 
35
    config_value_changed,
35
36
    configure_installation_source,
 
37
    git_install_requested,
36
38
    openstack_upgrade_available,
37
39
    os_requires_version,
38
40
    sync_db_with_multi_ipv6_addresses
44
46
    determine_packages,
45
47
    determine_ports,
46
48
    do_openstack_upgrade,
 
49
    git_install,
47
50
    dvr_router_present,
48
51
    l3ha_router_present,
49
52
    register_configs,
114
117
def install():
115
118
    execd_preinstall()
116
119
    configure_installation_source(config('openstack-origin'))
 
120
 
117
121
    apt_update()
118
122
    apt_install(determine_packages(config('openstack-origin')),
119
123
                fatal=True)
 
124
 
 
125
    git_install(config('openstack-origin-git'))
 
126
 
120
127
    [open_port(port) for port in determine_ports()]
121
128
 
122
129
 
143
150
                                          config('database-user'))
144
151
 
145
152
    global CONFIGS
146
 
    if openstack_upgrade_available('neutron-server'):
147
 
        do_openstack_upgrade(CONFIGS)
 
153
    if git_install_requested():
 
154
        if config_value_changed('openstack-origin-git'):
 
155
            git_install(config('openstack-origin-git'))
 
156
    else:
 
157
        if openstack_upgrade_available('neutron-server'):
 
158
            do_openstack_upgrade(CONFIGS)
148
159
    configure_https()
149
160
    update_nrpe_config()
150
161
    CONFIGS.write_all()