Enables pagination for Neutron

Change-Id: I7b58c30d71035574f26d90932a5d6392574c04bb
Depends-On: I0c9bd6b0a02a4a402f3d18c2804a0d65defcbac8
diff --git a/neutron/files/collectd_openstack_neutron.conf b/neutron/files/collectd_openstack_neutron.conf
index 8593cdf..43bbf02 100644
--- a/neutron/files/collectd_openstack_neutron.conf
+++ b/neutron/files/collectd_openstack_neutron.conf
@@ -5,6 +5,8 @@
     Username "{{ plugin.username }}"
     Password "{{ plugin.password }}"
     Tenant "{{ plugin.tenant }}"
-    MaxRetries "2"
-    Timeout "20"
+    MaxRetries "{{ plugin.max_retries|default(2) }}"
+    Timeout "{{ plugin.timeout|default(20) }}"
+    PaginationLimit "{{ plugin.pagination_limit|default(100) }}"
+    PollingInterval "{{ plugin.polling_interval|default(60) }}"
 </Module>
diff --git a/neutron/files/collectd_openstack_neutron_agents.conf b/neutron/files/collectd_openstack_neutron_agents.conf
new file mode 100644
index 0000000..41a42b4
--- /dev/null
+++ b/neutron/files/collectd_openstack_neutron_agents.conf
@@ -0,0 +1,10 @@
+Import "openstack_neutron_agents"
+
+<Module "openstack_neutron_agents">
+    KeystoneUrl "{{ plugin.url }}"
+    Username "{{ plugin.username }}"
+    Password "{{ plugin.password }}"
+    Tenant "{{ plugin.tenant }}"
+    MaxRetries "2"
+    Timeout "20"
+</Module>
diff --git a/neutron/meta/collectd.yml b/neutron/meta/collectd.yml
index 5afd628..e96fe23 100644
--- a/neutron/meta/collectd.yml
+++ b/neutron/meta/collectd.yml
@@ -15,5 +15,12 @@
     username: {{ server.identity.user }}
     password: {{ server.identity.password }}
     tenant: {{ server.identity.tenant }}
+  openstack_neutron_agents:
+    plugin: python
+    template: neutron/files/collectd_openstack_neutron_agents.conf
+    url: "http://{{ server.identity.host }}:{{ server.identity.port }}/v{% if server.identity.get('api_version', 2)|int == 2 %}2.0{% else %}3{% endif %}"
+    username: {{ server.identity.user }}
+    password: {{ server.identity.password }}
+    tenant: {{ server.identity.tenant }}
 {%- endif %}
 {%- endif %}