Enables pagination for Cinder

Change-Id: I9fb16cc99c379650354a245cda09eb0bb60f00e3
Depends-On: I0c9bd6b0a02a4a402f3d18c2804a0d65defcbac8
diff --git a/cinder/files/collectd_openstack_cinder.conf b/cinder/files/collectd_openstack_cinder.conf
index 6b2928c..0882c06 100644
--- a/cinder/files/collectd_openstack_cinder.conf
+++ b/cinder/files/collectd_openstack_cinder.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(500) }}"
+    PollingInterval "{{ plugin.polling_interval|default(60) }}"
 </Module>
diff --git a/cinder/files/collectd_openstack_cinder_services.conf b/cinder/files/collectd_openstack_cinder_services.conf
new file mode 100644
index 0000000..e0fb576
--- /dev/null
+++ b/cinder/files/collectd_openstack_cinder_services.conf
@@ -0,0 +1,10 @@
+Import "openstack_cinder_services"
+
+<Module "openstack_cinder_services">
+    KeystoneUrl "{{ plugin.url }}"
+    Username "{{ plugin.username }}"
+    Password "{{ plugin.password }}"
+    Tenant "{{ plugin.tenant }}"
+    MaxRetries "2"
+    Timeout "20"
+</Module>
diff --git a/cinder/meta/collectd.yml b/cinder/meta/collectd.yml
index d0229c5..5edb5e0 100644
--- a/cinder/meta/collectd.yml
+++ b/cinder/meta/collectd.yml
@@ -15,5 +15,12 @@
     username: {{ controller.identity.user }}
     password: {{ controller.identity.password }}
     tenant: {{ controller.identity.tenant }}
+  openstack_cinder_services:
+    plugin: python
+    template: cinder/files/collectd_openstack_cinder_services.conf
+    url: "http://{{ controller.identity.host }}:{{ controller.identity.port }}/v{% if controller.identity.get('api_version', 2)|int == 2 %}2.0{% else %}3{% endif %}"
+    username: {{ controller.identity.user }}
+    password: {{ controller.identity.password }}
+    tenant: {{ controller.identity.tenant }}
 {%- endif %}
 {%- endif %}