コード例 #1
0
def install():
    status_set('maintenance', 'Executing pre-install')
    execd_preinstall()
    configure_installation_source(config('openstack-origin'))

    status_set('maintenance', 'Installing apt packages')
    apt_update()
    apt_install(determine_packages(), fatal=True)

    if placement_api_enabled():
        disable_package_apache_site()

    git_install(config('openstack-origin-git'))

    _files = os.path.join(charm_dir(), 'files')
    if os.path.isdir(_files):
        for f in os.listdir(_files):
            f = os.path.join(_files, f)
            if os.path.isfile(f):
                log('Installing %s to /usr/bin' % f)
                shutil.copy2(f, '/usr/bin')
    [open_port(port) for port in determine_ports()]
    msg = 'Disabling services into db relation joined'
    log(msg)
    status_set('maintenance', msg)
    disable_services()
    cmd_all_services('stop')
コード例 #2
0
 def test_determine_ports(self, restart_map):
     restart_map.return_value = {
         '/etc/nova/nova.conf': ['nova-api-os-compute', 'nova-api-ec2'],
         '/etc/nova/api-paste.ini': ['nova-api-os-compute', 'nova-api-ec2'],
     }
     ports = utils.determine_ports()
     ex = [8773, 8774]
     self.assertEquals(ex, sorted(ports))
コード例 #3
0
def install():
    execd_preinstall()
    plugin = config('quantum-plugin')
    if (plugin == 'n1kv'):
        command = "cp templates/havana/openrc /root/"
        process = subprocess.Popen(command.split(), stdout=subprocess.PIPE)
        output = process.communicate()[0]
    configure_installation_source(config('openstack-origin'))
    apt_update()
    apt_install(determine_packages(), fatal=True)

    _files = os.path.join(charm_dir(), 'files')
    if os.path.isdir(_files):
        for f in os.listdir(_files):
            f = os.path.join(_files, f)
            log('Installing %s to /usr/bin' % f)
            shutil.copy2(f, '/usr/bin')
    [open_port(port) for port in determine_ports()]
コード例 #4
0
def install():
    status_set('maintenance', 'Executing pre-install')
    execd_preinstall()
    configure_installation_source(config('openstack-origin'))

    status_set('maintenance', 'Installing apt packages')
    apt_update()
    apt_install(determine_packages(), fatal=True)

    git_install(config('openstack-origin-git'))

    _files = os.path.join(charm_dir(), 'files')
    if os.path.isdir(_files):
        for f in os.listdir(_files):
            f = os.path.join(_files, f)
            if os.path.isfile(f):
                log('Installing %s to /usr/bin' % f)
                shutil.copy2(f, '/usr/bin')
    [open_port(port) for port in determine_ports()]
    msg = 'Disabling services into db relation joined'
    log(msg)
    status_set('maintenance', msg)
    disable_services()
    cmd_all_services('stop')
コード例 #5
0
 def __call__(self):
     # late import to work around circular dependency
     from nova_cc_utils import determine_ports
     self.external_ports = determine_ports()
     return super(ApacheSSLContext, self).__call__()
コード例 #6
0
 def __call__(self):
     # late import to work around circular dependency
     from nova_cc_utils import determine_ports
     self.external_ports = determine_ports()
     return super(ApacheSSLContext, self).__call__()