netapp plugin: Rename the “Capacity” and “Snapshot” options again.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 29 Sep 2009 14:37:48 +0000 (16:37 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 29 Sep 2009 14:37:48 +0000 (16:37 +0200)
They've been renamed to “GetCapacity” and “GetSnapshot” so the
names used within the “VolumeUsage” block are the same as the names
used elsewhere in the plugin.

src/collectd.conf.pod
src/netapp.c

index f3f2f48..ff44ba1 100644 (file)
@@ -1691,11 +1691,11 @@ Required capabilities are documented below.
     </VolumePerf>
     
     <VolumeUsage>
     </VolumePerf>
     
     <VolumeUsage>
-      Capacity "vol0"
-      Capacity "vol1"
+      GetCapacity "vol0"
+      GetCapacity "vol1"
       IgnoreSelectedCapacity false
       IgnoreSelectedCapacity false
-      Snapshot "vol1"
-      Snapshot "vol3"
+      GetSnapshot "vol1"
+      GetSnapshot "vol3"
       IgnoreSelectedSnapshot false
     </VolumeUsage>
     
       IgnoreSelectedSnapshot false
     </VolumeUsage>
     
@@ -2035,7 +2035,7 @@ capability.
 
 =over 4
 
 
 =over 4
 
-=item B<Capacity> I<VolumeName>
+=item B<GetCapacity> I<VolumeName>
 
 The current capacity of the volume will be collected. This will result in two
 to four value lists, depending on the configuration of the volume. All data
 
 The current capacity of the volume will be collected. This will result in two
 to four value lists, depending on the configuration of the volume. All data
@@ -2057,12 +2057,12 @@ Repeat this option to specify multiple volumes.
 
 =item B<IgnoreSelectedCapacity> B<true>|B<false>
 
 
 =item B<IgnoreSelectedCapacity> B<true>|B<false>
 
-Specify whether to collect only the volumes selected by the B<Capacity> option
-or to ignore those volumes. B<IgnoreSelectedCapacity> defaults to B<false>.
-However, if no B<Capacity> option is specified at all, all capacities will be
-selected anyway.
+Specify whether to collect only the volumes selected by the B<GetCapacity>
+option or to ignore those volumes. B<IgnoreSelectedCapacity> defaults to
+B<false>. However, if no B<GetCapacity> option is specified at all, all
+capacities will be selected anyway.
 
 
-=item B<Snapshot> I<VolumeName>
+=item B<GetSnapshot> I<VolumeName>
 
 B<Defunct!> Select volumes from which to collect snapshot information.
 
 
 B<Defunct!> Select volumes from which to collect snapshot information.
 
@@ -2070,10 +2070,10 @@ Repeat this option to specify multiple volumes.
 
 =item B<IgnoreSelectedSnapshot>
 
 
 =item B<IgnoreSelectedSnapshot>
 
-Specify whether to collect only the volumes selected by the B<Snapshot> option
-or to ignore those volumes. B<IgnoreSelectedSnapshot> defaults to B<false>.
-However, if no B<Snapshot> option is specified at all, all capacities will be
-selected anyway.
+Specify whether to collect only the volumes selected by the B<GetSnapshot>
+option or to ignore those volumes. B<IgnoreSelectedSnapshot> defaults to
+B<false>. However, if no B<GetSnapshot> option is specified at all, all
+capacities will be selected anyway.
 
 =back
 
 
 =back
 
index d8077e2..bea86f6 100644 (file)
@@ -1923,8 +1923,8 @@ static int cna_config_volume_performance (host_config_t *host, /* {{{ */
        return (0);
 } /* }}} int cna_config_volume_performance */
 
        return (0);
 } /* }}} int cna_config_volume_performance */
 
-/* Handling of the "Capacity" and "Snapshot" options within a <VolumeUsage />
- * block. */
+/* Handling of the "GetCapacity" and "GetSnapshot" options within a
+ * <VolumeUsage /> block. */
 static void cna_config_volume_usage_option (cfg_volume_usage_t *cvu, /* {{{ */
                const oconfig_item_t *ci)
 {
 static void cna_config_volume_usage_option (cfg_volume_usage_t *cvu, /* {{{ */
                const oconfig_item_t *ci)
 {
@@ -1940,9 +1940,9 @@ static void cna_config_volume_usage_option (cfg_volume_usage_t *cvu, /* {{{ */
 
        name = ci->values[0].value.string;
 
 
        name = ci->values[0].value.string;
 
-       if (strcasecmp ("Capacity", ci->key) == 0)
+       if (strcasecmp ("GetCapacity", ci->key) == 0)
                il = cvu->il_capacity;
                il = cvu->il_capacity;
-       else if (strcasecmp ("Snapshot", ci->key) == 0)
+       else if (strcasecmp ("GetSnapshot", ci->key) == 0)
                il = cvu->il_snapshot;
        else
                return;
                il = cvu->il_snapshot;
        else
                return;
@@ -2076,17 +2076,17 @@ static int cna_config_wafl(host_config_t *host, oconfig_item_t *ci) /* {{{ */
 
 /*
  * <VolumeUsage>
 
 /*
  * <VolumeUsage>
- *   Capacity "vol0"
- *   Capacity "vol1"
- *   Capacity "vol2"
- *   Capacity "vol3"
- *   Capacity "vol4"
+ *   GetCapacity "vol0"
+ *   GetCapacity "vol1"
+ *   GetCapacity "vol2"
+ *   GetCapacity "vol3"
+ *   GetCapacity "vol4"
  *   IgnoreSelectedCapacity false
  *
  *   IgnoreSelectedCapacity false
  *
- *   Snapshot "vol0"
- *   Snapshot "vol3"
- *   Snapshot "vol4"
- *   Snapshot "vol7"
+ *   GetSnapshot "vol0"
+ *   GetSnapshot "vol3"
+ *   GetSnapshot "vol4"
+ *   GetSnapshot "vol7"
  *   IgnoreSelectedSnapshot false
  * </VolumeUsage>
  */
  *   IgnoreSelectedSnapshot false
  * </VolumeUsage>
  */
@@ -2136,9 +2136,9 @@ static int cna_config_volume_usage(host_config_t *host, /* {{{ */
                /* if (!item || !item->key || !*item->key) continue; */
                if (strcasecmp(item->key, "Interval") == 0)
                        cna_config_get_interval (item, &cfg_volume_usage->interval);
                /* if (!item || !item->key || !*item->key) continue; */
                if (strcasecmp(item->key, "Interval") == 0)
                        cna_config_get_interval (item, &cfg_volume_usage->interval);
-               else if (!strcasecmp(item->key, "Capacity"))
+               else if (!strcasecmp(item->key, "GetCapacity"))
                        cna_config_volume_usage_option (cfg_volume_usage, item);
                        cna_config_volume_usage_option (cfg_volume_usage, item);
-               else if (!strcasecmp(item->key, "Snapshot"))
+               else if (!strcasecmp(item->key, "GetSnapshot"))
                        cna_config_volume_usage_option (cfg_volume_usage, item);
                else if (!strcasecmp(item->key, "IgnoreSelectedCapacity"))
                        cna_config_volume_usage_default (cfg_volume_usage, item);
                        cna_config_volume_usage_option (cfg_volume_usage, item);
                else if (!strcasecmp(item->key, "IgnoreSelectedCapacity"))
                        cna_config_volume_usage_default (cfg_volume_usage, item);