contrail-snmp-collector auth issue in version 3

snmp collecter requires keystone configuration to be able
to connect to api with multi_tenancy enabled.

snmp collector in version 3 does not use contrail-keystone-auth.conf
by default in contradiction to what is written inside of [KEYSTONE]
section in contrail-snmp-collector.conf. Version 4.0 does read this
file and this configuration is generated for analytics nodes.

Fix this by generating configuration inside of the [KEYSTONE] section
of contrail-snmp-collector.conf configuration file.

PROD-17823

Change-Id: Ic07190efa3c9a89b6469a6a81698c0938abc9c85
diff --git a/opencontrail/files/3.0/contrail-snmp-collector.conf b/opencontrail/files/3.0/contrail-snmp-collector.conf
index 7beb090..d57251a 100644
--- a/opencontrail/files/3.0/contrail-snmp-collector.conf
+++ b/opencontrail/files/3.0/contrail-snmp-collector.conf
@@ -24,10 +24,23 @@
 #disc_server_port=5998
 
 [KEYSTONE]
-#keystone parameters come from contrail-keystone-auth.conf
-#auth_host=127.0.0.1
-#auth_protocol=http
-#auth_port=35357
-#admin_user=user1
-#admin_password=password1
-#admin_tenant_name=default-domain
+{%- if collector.get('identity', {}).get('engine') == 'keystone' %}
+auth_host={{ collector.identity.host }}
+auth_protocol=http
+auth_port={{ collector.identity.port }}
+admin_user={{ collector.identity.user }}
+admin_password={{ collector.identity.password }}
+admin_tenant_name={{ collector.identity.tenant }}
+insecure=True
+{%- if collector.cache is defined %}
+#memcache_servers=127.0.0.1:11211
+memcache_servers={% for member in collector.cache.members %}{{ member.host }}:{{ member.port }}{% if not loop.last %},{% endif %}{% endfor %}
+{%- endif %}
+{%- if collector.identity.version == "3" %}
+project_name={{ collector.identity.tenant }}
+project_domain_name={{ collector.identity.get('domain', 'default')|lower}}
+auth_url=http://{{ collector.identity.host }}:{{ collector.identity.port }}/v3
+{%- else %}
+auth_url=http://{{ collector.identity.host }}:{{ collector.identity.port }}/v2.0
+{%- endif %}
+{%- endif %}