Install python-osc-placement for Queens
PROD-34009
Change-Id: I1f6f826c9d352f6ccb6767532b1e36facca4211b
diff --git a/metadata/service/client/init.yml b/metadata/service/client/init.yml
index 46046d6..0129687 100644
--- a/metadata/service/client/init.yml
+++ b/metadata/service/client/init.yml
@@ -4,3 +4,4 @@
nova:
client:
enabled: true
+ version: ${_param:nova_version}
\ No newline at end of file
diff --git a/nova/map.jinja b/nova/map.jinja
index 921535e..a2deb0d 100644
--- a/nova/map.jinja
+++ b/nova/map.jinja
@@ -20,16 +20,20 @@
{%- if grains.os_family == "Debian" %}
{%- set pkgs_list = [ 'nova-common', 'nova-consoleproxy', 'novnc', 'nova-api', 'nova-conductor', 'nova-consoleauth', 'nova-doc', 'nova-scheduler', 'python-novaclient', 'python-memcache', 'gettext-base', 'python-pycadf'] %}
{%- set services_list = ['nova-conductor', 'nova-api', 'nova-consoleauth', 'nova-scheduler', 'nova-novncproxy'] %}
-{%- if pillar.nova.controller is defined and pillar.nova.controller.get('version',{}) in ["juno", "kilo", "liberty", "mitaka"] %}
+{%- if pillar.nova.controller is defined and pillar.nova.controller.get('version', '') in ["juno", "kilo", "liberty", "mitaka"] %}
{%- do pkgs_list.append('nova-cert') %}
{%- do services_list.append('nova-cert') %}
{%- endif %}
+{# python-osc-placement package is available starting Queens #}
+{%- if pillar.nova.controller is defined and pillar.nova.controller.get('version', '') in ["queens"] %}
+{%- do pkgs_list.append('python-osc-placement') %}
+{%- endif %}
{%- endif %}
{%- if grains.os_family == "RedHat" %}
{%- set pkgs_list = ['openstack-nova-novncproxy', 'python-nova', 'openstack-nova-api', 'openstack-nova-console', 'openstack-nova-scheduler', 'python-novaclient', 'openstack-nova-common', 'openstack-nova-conductor', 'python-pycadf'] %}
{%- set services_list = ['openstack-nova-conductor', 'openstack-nova-api', 'openstack-nova-consoleauth', 'openstack-nova-scheduler', 'openstack-nova-novncproxy'] %}
-{%- if pillar.nova.controller is defined and pillar.nova.controller.get('version',{}) in ["juno", "kilo", "liberty", "mitaka", "newton", "ocata"] %}
+{%- if pillar.nova.controller is defined and pillar.nova.controller.get('version', '') in ["juno", "kilo", "liberty", "mitaka", "newton", "ocata"] %}
{%- do pkgs_list.append('openstack-nova-cert') %}
{%- do services_list.append('openstack-nova-cert') %}
{%- endif %}
@@ -134,14 +138,23 @@
} %}
{% endif %}
-{% set client = salt['grains.filter_by']({
- 'Debian': {
- 'pkgs': ['python-novaclient']
- },
- 'RedHat': {
- 'pkgs': ['python-novaclient']
- },
-}, merge=pillar.nova.get('client', {})) %}
+{%- load_yaml as client_defaults %}
+Debian:
+ pkgs:
+ - python-novaclient
+{# python-osc-placement package is available starting Queens #}
+{%- if pillar.nova.client is defined and pillar.nova.client.get('version', '') in ["queens"] %}
+ - python-osc-placement
+{%- endif %}
+RedHat:
+ pkgs:
+ - python-novaclient
+{# python-osc-placement package is available starting Queens #}
+{%- if pillar.nova.client is defined and pillar.nova.client.get('version', '') in ["queens"] %}
+ - python-osc-placement
+{%- endif %}
+{%- endload %}
+{% set client = salt["grains.filter_by"](client_defaults, merge=pillar.nova.get("client", {})) %}
{% set compute_network = salt['grains.filter_by']({
'default': {
@@ -165,6 +178,10 @@
- nova-common
- nova-compute-kvm
- python-novaclient
+{# python-osc-placement package is available starting Queens #}
+{%- if pillar.nova.compute is defined and pillar.nova.compute.get('version', '') in ["queens"] %}
+ - python-osc-placement
+{%- endif %}
- pm-utils
- sysfsutils
- sg3-utils
diff --git a/tests/pillar/repo_mcp_openstack_queens.sls b/tests/pillar/repo_mcp_openstack_queens.sls
index 31e8f6c..8266452 100644
--- a/tests/pillar/repo_mcp_openstack_queens.sls
+++ b/tests/pillar/repo_mcp_openstack_queens.sls
@@ -17,4 +17,4 @@
pin:
- pin: 'release l=queens'
priority: 1100
- package: '*'
\ No newline at end of file
+ package: '*'