Dzahn has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/295982

Change subject: diamond: move _lib classes to own files
......................................................................

diamond: move _lib classes to own files

Each class should have its own file, per style guide
and lint check.

Change-Id: Ibbdab575b26b3f06d9986351ac01b5db53534872
---
M modules/diamond/manifests/collector/nagios.pp
A modules/diamond/manifests/collector/nagios_lib.pp
M modules/diamond/manifests/collector/servicestats.pp
A modules/diamond/manifests/collector/servicestats_lib.pp
4 files changed, 41 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/82/295982/1

diff --git a/modules/diamond/manifests/collector/nagios.pp 
b/modules/diamond/manifests/collector/nagios.pp
index 2e0a7b4..67d58c1 100644
--- a/modules/diamond/manifests/collector/nagios.pp
+++ b/modules/diamond/manifests/collector/nagios.pp
@@ -36,16 +36,3 @@
     }
 }
 
-# support class, to be include'd multiple times
-class diamond::collector::nagios_lib {
-    diamond::collector { 'Nagios':
-        source   => 'puppet:///modules/diamond/collector/nagios.py'
-    }
-
-    file { '/etc/diamond/nagios.d':
-        ensure => directory,
-        owner  => 'root',
-        group  => 'root',
-        mode   => '0444',
-    }
-}
diff --git a/modules/diamond/manifests/collector/nagios_lib.pp 
b/modules/diamond/manifests/collector/nagios_lib.pp
new file mode 100644
index 0000000..8a61b01
--- /dev/null
+++ b/modules/diamond/manifests/collector/nagios_lib.pp
@@ -0,0 +1,13 @@
+# support class, to be include'd multiple times
+class diamond::collector::nagios_lib {
+    diamond::collector { 'Nagios':
+        source   => 'puppet:///modules/diamond/collector/nagios.py'
+    }
+
+    file { '/etc/diamond/nagios.d':
+        ensure => directory,
+        owner  => 'root',
+        group  => 'root',
+        mode   => '0444',
+    }
+}
diff --git a/modules/diamond/manifests/collector/servicestats.pp 
b/modules/diamond/manifests/collector/servicestats.pp
index 01957bd..94b0fef 100644
--- a/modules/diamond/manifests/collector/servicestats.pp
+++ b/modules/diamond/manifests/collector/servicestats.pp
@@ -30,31 +30,3 @@
     }
 }
 
-# support class, to be include'd multiple times
-class diamond::collector::servicestats_lib {
-    diamond::collector { 'ServiceStats':
-        source   => 'puppet:///modules/diamond/collector/servicestats.py',
-        settings => {
-          initsystem => $::initsystem
-        }
-    }
-
-    file { '/usr/share/diamond/collectors/servicestats/servicestats_lib.py':
-        owner   => 'root',
-        group   => 'root',
-        mode    => '0444',
-        source  => 'puppet:///modules/diamond/collector/servicestats_lib.py',
-        require => Diamond::Collector['ServiceStats'],
-    }
-
-    file { '/etc/diamond/servicestats.d':
-        ensure => directory,
-        owner  => 'root',
-        group  => 'root',
-        mode   => '0444',
-    }
-
-    package { ['python-psutil', 'python-configparser']:
-        before => Diamond::Collector['ServiceStats'],
-    }
-}
diff --git a/modules/diamond/manifests/collector/servicestats_lib.pp 
b/modules/diamond/manifests/collector/servicestats_lib.pp
new file mode 100644
index 0000000..60ec86d
--- /dev/null
+++ b/modules/diamond/manifests/collector/servicestats_lib.pp
@@ -0,0 +1,28 @@
+# support class, to be include'd multiple times
+class diamond::collector::servicestats_lib {
+    diamond::collector { 'ServiceStats':
+        source   => 'puppet:///modules/diamond/collector/servicestats.py',
+        settings => {
+          initsystem => $::initsystem
+        }
+    }
+
+    file { '/usr/share/diamond/collectors/servicestats/servicestats_lib.py':
+        owner   => 'root',
+        group   => 'root',
+        mode    => '0444',
+        source  => 'puppet:///modules/diamond/collector/servicestats_lib.py',
+        require => Diamond::Collector['ServiceStats'],
+    }
+
+    file { '/etc/diamond/servicestats.d':
+        ensure => directory,
+        owner  => 'root',
+        group  => 'root',
+        mode   => '0444',
+    }
+
+    package { ['python-psutil', 'python-configparser']:
+        before => Diamond::Collector['ServiceStats'],
+    }
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/295982
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibbdab575b26b3f06d9986351ac01b5db53534872
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <dz...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to