Beispiel #1
0
def cplane_controller_relation_changed():
    mport = relation_get('mport')
    cplane_controller = relation_get('private-address')
    if mport:
        cmd = "sed -ie 's/cplane_controller_hosts.*/cplane_controller_\
hosts = {}/g' /etc/neutron/plugins/ml2/ml2_conf.ini".format(cplane_controller)
        os.system(cmd)
        restart_service()
Beispiel #2
0
def install():
    apt_update(fatal=True)
    pkgs = determine_packages()
    apt_install(pkgs, fatal=True)
    install_cplane_packages()
    python_intall("bitarray")
    create_link()
    restart_service()
Beispiel #3
0
def install():
    apt_update(fatal=True)
    pkgs = determine_packages()
    apt_install(pkgs, fatal=True)
    install_cplane_packages()
    create_link()
    if config('cplane-version') == "1.3.7" or "1.3.8":
        configure_policy()
    restart_service()
Beispiel #4
0
def oracle_relation_changed():
    oracle_host = set_oracle_host()
    if oracle_host:
        create_ketstone_user()
        configs.write_all()
        restart_service()
        configure_keystone()
        create_domain()
        send_active_notification()
Beispiel #5
0
def start():
    if config('db-on-host'):
        oracle_host = set_oracle_host()
        if oracle_host:
            create_ketstone_user()
            configs.write_all()
            restart_service()
            configure_keystone()
            create_domain()
            send_active_notification()
Beispiel #6
0
def install():
    apt_update(fatal=True)
    pkgs = determine_packages()
    apt_install(pkgs, fatal=True)
    pkgs = determine_pip_packages()
    pip_install(pkgs, fatal=True, upgrade=True)
    download_cplane_packages()
    install_cplane_packages()
    prepare_env()
    install_keystone()
    cmd = 'pip install -r requirement.txt'
    os.system(cmd)
    if config('db-on-host') is False:
        install_oracle_client()
        configure_oracle_client()
    os.system("pip install python-openstackclient")
    restart_service()
 def test_restart_service(self, m_check_call):
     cplane_utils.restart_service()
     m_check_call.assert_called_with(['service',
                                      'neutron-server',
                                      'restart'])