Implement more robust tests in Salt states

Change-Id: I0aa5038f24b3073e7f8bed1bdcea5bbe5a31ade4
diff --git a/cinder/controller.sls b/cinder/controller.sls
index 7799f88..25d60bb 100644
--- a/cinder/controller.sls
+++ b/cinder/controller.sls
@@ -1,5 +1,5 @@
 {%- from "cinder/map.jinja" import controller with context %}
-{%- if controller.enabled %}
+{%- if controller.get('enabled', False) %}
 
 include:
 - cinder.user
diff --git a/cinder/user.sls b/cinder/user.sls
index aabf39d..18f1cb5 100644
--- a/cinder/user.sls
+++ b/cinder/user.sls
@@ -8,10 +8,10 @@
     - shell: /bin/false
     - system: True
     - require_in:
-      {%- if pillar.cinder.controller is defined and pillar.cinder.controller.enabled %}
+      {%- if pillar.cinder.get('controller', {}).get('enabled', False) %}
       - pkg: cinder_controller_packages
       {%- endif %}
-      {%- if pillar.cinder.volume is defined and pillar.cinder.volume.enabled %}
+      {%- if pillar.cinder.get('volume', {}).get('enabled', False) %}
       - pkg: cinder_volume_packages
       {%- endif %}
 
diff --git a/cinder/volume.sls b/cinder/volume.sls
index 46a361b..6b28ca9 100644
--- a/cinder/volume.sls
+++ b/cinder/volume.sls
@@ -18,7 +18,7 @@
   - require_in:
     - service: cinder_volume_services
 
-{%- if pillar.cinder.controller is not defined or not pillar.cinder.controller.enabled %}
+{%- if not pillar.cinder.get('controller', {}).get('enabled', False) %}
 
 /etc/cinder/cinder.conf:
   file.managed: