Update plumgrid plugin installation from pip to deb

- Installation for networking-plumgrid has been updated from
  pip to debian.
- Installs debian using apt
- Links files inside venv in case of virtualenv

Change-Id: Id63f69690c5025175846a0a0db9e87292dd17d90
Signed-off-by: alij <alij@plumgrid.com>
This commit is contained in:
alij 2016-08-19 05:58:09 -07:00
parent ed0836fd6f
commit b94bd9a180
2 changed files with 25 additions and 25 deletions

View File

@ -453,9 +453,6 @@ neutron_pip_packages:
- python-novaclient - python-novaclient
- repoze.lru - repoze.lru
neutron_optional_plumgrid_pip_packages:
- networking-plumgrid==2015.2.1.1
neutron_proprietary_nuage_pip_packages: neutron_proprietary_nuage_pip_packages:
- nuage-openstack-neutron - nuage-openstack-neutron
- nuage-openstack-neutronclient - nuage-openstack-neutronclient

View File

@ -28,32 +28,35 @@
owner: "{{ neutron_system_user_name }}" owner: "{{ neutron_system_user_name }}"
group: "{{ neutron_system_group_name }}" group: "{{ neutron_system_group_name }}"
- name: Install plumgrid pip packages - name: Install networking-plumgrid
pip: apt:
name: "{{ neutron_optional_plumgrid_pip_packages | join(' ') }}" name: networking-plumgrid
state: latest state: "{{ neutron_package_state }}"
virtualenv: "{{ neutron_bin | dirname }}" force: yes
virtualenv_site_packages: "no"
extra_args: "{{ pip_install_options|default('') }}"
register: install_packages register: install_packages
until: install_packages|success until: install_packages|success
ignore_errors: True
retries: 5 retries: 5
delay: 2 delay: 2
when: when:
- neutron_services['neutron-server']['group'] in group_names - inventory_hostname in groups[neutron_services['neutron-server']['group']]
- name: Install plumgrid pip packages fall back - name: Register networking_plumgrid version
pip: shell: >
name: "{{ neutron_optional_plumgrid_pip_packages | join(' ') }}" dpkg -l | grep networking-plumgrid | awk '{print $3}'
state: latest register: np_ver
virtualenv: "{{ neutron_bin | dirname }}"
virtualenv_site_packages: "no"
extra_args: "--isolated"
register: install_packages_fall_back
until: install_packages_fall_back|success
retries: 5
delay: 2
when: when:
- install_packages | failed - inventory_hostname in groups[neutron_services['neutron-server']['group']]
- neutron_services['neutron-server']['group'] in group_names
- name: Link networking-plumgrid files (venv)
file:
src: "{{ item.name }}"
dest: "{{ neutron_venv_lib_dir }}{{ item.name | basename }}"
state: "{{ item.state }}"
force: "yes"
with_items:
- { state: link, name: "/usr/local/lib/python2.7/dist-packages/networking_plumgrid" }
- { state: link, name: "/usr/local/lib/python2.7/dist-packages/networking_plumgrid-{{ np_ver.stdout }}-py2.7.egg-info" }
when:
- neutron_venv_enabled | bool
- inventory_hostname in groups[neutron_services['neutron-server']['group']]