Refactor pkgs for contrail-database and fix kitchen tests

It is useless to specify supervisor in map.jinja because it is already
a dependency for the specified packages
Kitchen tests triggered unwanted tests, it is fixed by changing the name
of the suite.

Change-Id: I526c67095d06001283b5c67e3e43616a8bf4f31a
diff --git a/.kitchen.yml b/.kitchen.yml
index 755b36f..c6d8196 100644
--- a/.kitchen.yml
+++ b/.kitchen.yml
@@ -56,7 +56,7 @@
 
 suites:
 
-  - name: single
+  - name: single3
     provisioner:
       pillars-from-files:
         opencontrail.sls: tests/pillar/single.sls
@@ -64,7 +64,7 @@
     provisioner:
       pillars-from-files:
         opencontrail.sls: tests/pillar/single40.sls
-  - name: analytics
+  - name: analytics3
     provisioner:
       pillars-from-files:
         opencontrail.sls: tests/pillar/analytics.sls
@@ -72,7 +72,7 @@
     provisioner:
       pillars-from-files:
         opencontrail.sls: tests/pillar/analytics40.sls
-  - name: control
+  - name: control3
     provisioner:
       pillars-from-files:
         opencontrail.sls: tests/pillar/control.sls
@@ -80,7 +80,7 @@
     provisioner:
       pillars-from-files:
         opencontrail.sls: tests/pillar/control40.sls
-  - name: cluster
+  - name: cluster3
     provisioner:
       pillars-from-files:
         opencontrail.sls: tests/pillar/cluster.sls
@@ -88,7 +88,7 @@
     provisioner:
       pillars-from-files:
         opencontrail.sls: tests/pillar/cluster40.sls
-  - name: tor
+  - name: tor3
     provisioner:
       pillars-from-files:
         opencontrail.sls: tests/pillar/tor.sls
@@ -96,7 +96,7 @@
     provisioner:
       pillars-from-files:
         opencontrail.sls: tests/pillar/tor40.sls
-  - name: vrouter
+  - name: vrouter3
     provisioner:
       pillars-from-files:
         opencontrail.sls: tests/pillar/vrouter.sls
diff --git a/.travis.yml b/.travis.yml
index 2fc6f70..950b7af 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,24 +18,24 @@
   - bundle install
 
 env:
-  # - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc311 SUITE=single
-  - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc311 SUITE=analytics
-  - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc311 SUITE=control
-  # - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc311 SUITE=cluster
-  # - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc311 SUITE=tor
-  # - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc311 SUITE=vrouter
-  # - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc323 SUITE=single
-  - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc323 SUITE=analytics
-  - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc323 SUITE=control
-  # - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc323 SUITE=cluster
-  # - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc323 SUITE=tor
-  # - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc323 SUITE=vrouter
-  # - PLATFORM=trevorj/salty-whales:xenial OC_REPO=oc323 SUITE=single
-  - PLATFORM=trevorj/salty-whales:xenial OC_REPO=oc323 SUITE=analytics
-  - PLATFORM=trevorj/salty-whales:xenial OC_REPO=oc323 SUITE=control
-  # - PLATFORM=trevorj/salty-whales:xenial OC_REPO=oc323 SUITE=cluster
-  # - PLATFORM=trevorj/salty-whales:xenial OC_REPO=oc323 SUITE=tor
-  - PLATFORM=trevorj/salty-whales:xenial OC_REPO=oc323 SUITE=vrouter
+  # - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc311 SUITE=single3
+  - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc311 SUITE=analytics3
+  - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc311 SUITE=control3
+  # - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc311 SUITE=cluster3
+  # - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc311 SUITE=tor3
+  # - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc311 SUITE=vrouter3
+  # - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc323 SUITE=single3
+  - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc323 SUITE=analytics3
+  - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc323 SUITE=control3
+  # - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc323 SUITE=cluster3
+  # - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc323 SUITE=tor3
+  # - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc323 SUITE=vrouter3
+  # - PLATFORM=trevorj/salty-whales:xenial OC_REPO=oc323 SUITE=single3
+  - PLATFORM=trevorj/salty-whales:xenial OC_REPO=oc323 SUITE=analytics3
+  - PLATFORM=trevorj/salty-whales:xenial OC_REPO=oc323 SUITE=control3
+  # - PLATFORM=trevorj/salty-whales:xenial OC_REPO=oc323 SUITE=cluster3
+  # - PLATFORM=trevorj/salty-whales:xenial OC_REPO=oc323 SUITE=tor3
+  - PLATFORM=trevorj/salty-whales:xenial OC_REPO=oc323 SUITE=vrouter3
   # - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc40 SUITE=single40
   - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc40 SUITE=analytics40
   - PLATFORM=trevorj/salty-whales:trusty OC_REPO=oc40 SUITE=control40
diff --git a/opencontrail/map.jinja b/opencontrail/map.jinja
index 921274a..c492828 100644
--- a/opencontrail/map.jinja
+++ b/opencontrail/map.jinja
@@ -98,16 +98,10 @@
     {%- endif %}
 database:
   Debian:
-    {%- if grains.get('oscodename') == 'trusty' %}
     pkgs:
-         ['cassandra', 'zookeeper', 'supervisor', 'openjdk-7-jre-headless', 'contrail-database']
-    {%- elif version < 4.0 %}
-    pkgs:
-         ['cassandra', 'zookeeper', 'supervisor', 'openjdk-8-jre-headless', 'contrail-database']
-    {%- else %}
-    pkgs:
-         ['cassandra', 'zookeeper', 'openjdk-8-jre-headless', 'contrail-database']
-    {%- endif %}
+    {%- set openjdkPackage = 'openjdk-8-jre-headless' if grains.get('oscodename') == 'xenial' else 'openjdk-7-jre-headless' %}
+    {%- set databasePackage = 'contrail-openstack-database' if version >= 4.0 else 'contrail-database' %}
+         ['cassandra', 'zookeeper', '{{ openjdkPackage }}' , '{{ databasePackage }}']
     cassandra_config: '/etc/cassandra/'
     compaction_throughput_mb_per_sec: 16
     services:
@@ -249,13 +243,9 @@
     {%- endif %}
 database:
   Debian:
-    {%- if grains.get('oscodename') == 'trusty' %}
     pkgs:
-         ['cassandra', 'zookeeper', 'supervisor', 'openjdk-7-jre-headless', 'contrail-openstack-database']
-    {%- else %}
-    pkgs:
-         ['cassandra', 'zookeeper', 'supervisor', 'openjdk-8-jre-headless', 'contrail-openstack-database']
-    {%- endif %}
+    {%- set openjdkPackage = 'openjdk-8-jre-headless' if grains.get('oscodename') == 'xenial' else 'openjdk-7-jre-headless' %}
+         ['cassandra', 'zookeeper', '{{ openjdkPackage }}', 'contrail-openstack-database']
     cassandra_config: '/etc/cassandra/'
     compaction_throughput_mb_per_sec: 16
     services: