Checking cache.members is defined or not

Change-Id: Ic2418af671b828c45c25577324c08641da3c30bc
diff --git a/neutron/files/mitaka/neutron-server.conf b/neutron/files/mitaka/neutron-server.conf
index 6bfbe6a..c082d7f 100644
--- a/neutron/files/mitaka/neutron-server.conf
+++ b/neutron/files/mitaka/neutron-server.conf
@@ -880,7 +880,7 @@
 password = {{ server.identity.password }}
 auth_uri=http://{{ server.identity.host }}:5000
 auth_url=http://{{ server.identity.host }}:35357
-{%- if server.cache is defined %}
+{%- if server.get('cache',{}).members is defined %}
 memcached_servers={%- for member in server.cache.members %}{{ member.host }}:11211{% if not loop.last %},{% endif %}{%- endfor %}
 {%- endif %}
 #
diff --git a/neutron/files/newton/neutron-server.conf b/neutron/files/newton/neutron-server.conf
index 0c89ab8..4be5241 100644
--- a/neutron/files/newton/neutron-server.conf
+++ b/neutron/files/newton/neutron-server.conf
@@ -881,7 +881,7 @@
 {%- if server.identity.get('protocol', 'http') == 'https' %}
 cafile={{ server.identity.get('cacert_file', server.cacert_file) }}
 {%- endif %}
-{%- if server.cache is defined %}
+{%- if server.get('cache',{}).members is defined %}
 memcached_servers={%- for member in server.cache.members %}{{ member.host }}:11211{% if not loop.last %},{% endif %}{%- endfor %}
 {%- endif %}
 #
diff --git a/neutron/files/ocata/neutron-server.conf b/neutron/files/ocata/neutron-server.conf
index a7645e7..e63053e 100644
--- a/neutron/files/ocata/neutron-server.conf
+++ b/neutron/files/ocata/neutron-server.conf
@@ -975,7 +975,7 @@
 {%- if server.identity.get('protocol', 'http') == 'https' %}
 cafile={{ server.identity.get('cacert_file', server.cacert_file) }}
 {%- endif %}
-{%- if server.cache is defined %}
+{%- if server.get('cache',{}).members is defined %}
 memcached_servers={%- for member in server.cache.members %}{{ member.host }}:11211{% if not loop.last %},{% endif %}{%- endfor %}
 {%- endif %}
 #
diff --git a/neutron/files/pike/neutron-server.conf b/neutron/files/pike/neutron-server.conf
index 49aeff0..648faae 100644
--- a/neutron/files/pike/neutron-server.conf
+++ b/neutron/files/pike/neutron-server.conf
@@ -1016,7 +1016,9 @@
 cafile={{ server.identity.get('cacert_file', server.cacert_file) }}
 {%- endif %}
 {%- if server.cache is defined %}
+{%- if server.cache.members is defined %}
 memcached_servers={%- for member in server.cache.members %}{{ member.host }}:11211{% if not loop.last %},{% endif %}{%- endfor %}
+{%- endif %}
   {%- if server.cache.get('security', {}).get('enabled', False) %}
 memcache_security_strategy = {{ server.cache.security.get('strategy', 'ENCRYPT') }}
     {%- if server.cache.security.secret_key is not defined or not server.cache.security.secret_key %}