Enables pagination for Nova

Change-Id: Icbda2b8b2ccf437d4c80b76478d36b10415db5c8
Depends-On: I0c9bd6b0a02a4a402f3d18c2804a0d65defcbac8
diff --git a/nova/files/collectd_openstack_nova.conf b/nova/files/collectd_openstack_nova.conf
index e6a1d1b..2fa58a2 100644
--- a/nova/files/collectd_openstack_nova.conf
+++ b/nova/files/collectd_openstack_nova.conf
@@ -5,6 +5,8 @@
   Tenant "{{ plugin.project }}"
   Username "{{ plugin.user }}"
   Password "{{ plugin.password }}"
-  Timeout "20"
-  MaxRetries "2"
+  Timeout "{{ plugin.timeout|default(20) }}"
+  MaxRetries "{{ plugin.max_retries|default(2) }}"
+  PaginationLimit "{{ plugin.pagination_limit|default(500) }}"
+  PollingInterval "{{ plugin.polling_interval|default(60) }}"
 </Module>
diff --git a/nova/files/collectd_openstack_nova_services.conf b/nova/files/collectd_openstack_nova_services.conf
new file mode 100644
index 0000000..301f16b
--- /dev/null
+++ b/nova/files/collectd_openstack_nova_services.conf
@@ -0,0 +1,10 @@
+Import "openstack_nova_services"
+
+<Module "openstack_nova_services">
+  KeystoneUrl "{{ plugin.url }}"
+  Tenant "{{ plugin.project }}"
+  Username "{{ plugin.user }}"
+  Password "{{ plugin.password }}"
+  Timeout "20"
+  MaxRetries "2"
+</Module>
diff --git a/nova/meta/collectd.yml b/nova/meta/collectd.yml
index 705130b..093d212 100644
--- a/nova/meta/collectd.yml
+++ b/nova/meta/collectd.yml
@@ -24,6 +24,13 @@
     project: {{ controller.identity.tenant }}
     user: {{ controller.identity.user }}
     password: {{ controller.identity.password }}
+  nova_services:
+    plugin: python
+    template: nova/files/collectd_openstack_nova_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 %}"
+    project: {{ controller.identity.tenant }}
+    user: {{ controller.identity.user }}
+    password: {{ controller.identity.password }}
   nova_hypervisor_stats:
     plugin: python
     template: nova/files/collectd_hypervisor_stats.conf