chef_knives 0.5 → 0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +12 -8
- data/Manifest.txt +1 -0
- data/bin/chef_node_find_domu +45 -0
- data/chef_knives.gemspec +4 -7
- data/lib/chef/knives.rb +1 -1
- metadata +4 -2
data/History.txt
CHANGED
@@ -1,33 +1,37 @@
|
|
1
|
-
=== 0.
|
1
|
+
=== 0.6 / 2009-09-28
|
2
|
+
|
3
|
+
* added chef_node_find_domu script
|
4
|
+
|
5
|
+
=== 0.5 / 2009-09-15
|
2
6
|
|
3
7
|
* added chef_node_last_checkin script
|
4
8
|
|
5
|
-
=== 0.4.1 / 2009-14
|
9
|
+
=== 0.4.1 / 2009-09-14
|
6
10
|
|
7
11
|
* require chef gem >= 0.7
|
8
12
|
|
9
|
-
=== 0.4 / 2009-14
|
13
|
+
=== 0.4 / 2009-09-14
|
10
14
|
|
11
15
|
* added chef_vlan_stats command
|
12
16
|
|
13
|
-
=== 0.3.3 / 2009-11
|
17
|
+
=== 0.3.3 / 2009-09-11
|
14
18
|
|
15
19
|
* fixes in chef_node_find
|
16
20
|
* added --no-ifaces flag to chef_node_find
|
17
21
|
|
18
|
-
=== 0.3.2 / 2009-11
|
22
|
+
=== 0.3.2 / 2009-09-11
|
19
23
|
|
20
24
|
* fixes in chef_node_fs_usage
|
21
25
|
|
22
|
-
=== 0.3.1 / 2009-11
|
26
|
+
=== 0.3.1 / 2009-09-11
|
23
27
|
|
24
28
|
* fixes in chef_node_fs_usage
|
25
29
|
|
26
|
-
=== 0.3 / 2009-11
|
30
|
+
=== 0.3 / 2009-09-11
|
27
31
|
|
28
32
|
* chef_node_find script added
|
29
33
|
|
30
|
-
=== 0.2 / 2009-10
|
34
|
+
=== 0.2 / 2009-09-10
|
31
35
|
|
32
36
|
* chef_node_stats script added
|
33
37
|
|
data/Manifest.txt
CHANGED
@@ -0,0 +1,45 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'rubygems'
|
3
|
+
require 'couchrest'
|
4
|
+
require 'chef'
|
5
|
+
require 'choice'
|
6
|
+
require 'pp'
|
7
|
+
|
8
|
+
CHEF_DB_URL = 'http://localhost:5984/chef'
|
9
|
+
|
10
|
+
def main
|
11
|
+
Choice.options do
|
12
|
+
banner 'Usage: chef_node_find_domu <domu_name>'
|
13
|
+
header ''
|
14
|
+
header 'Available options:'
|
15
|
+
|
16
|
+
option :help do
|
17
|
+
long '--help'
|
18
|
+
short '-h'
|
19
|
+
desc 'Show this message'
|
20
|
+
action do
|
21
|
+
Choice.help
|
22
|
+
exit
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
db = CouchRest.database(CHEF_DB_URL)
|
28
|
+
domu_name = ARGV[0] || '.*'
|
29
|
+
|
30
|
+
db.documents['rows'].each do |doc|
|
31
|
+
if doc['id'] =~ /node_/
|
32
|
+
node = db.get(doc['id'])
|
33
|
+
next if node.virtualization.nil? or node.virtualization[:role] != 'host'
|
34
|
+
if node.virtualization.guest_list.nil?
|
35
|
+
$stderr.puts "WARNING: virtualization.guest_list attr not found in #{node.fqdn}"
|
36
|
+
else
|
37
|
+
node.virtualization.guest_list.each do |l|
|
38
|
+
puts "#{node.fqdn}-> #{l}" if l =~ /#{domu_name}/
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
main
|
data/chef_knives.gemspec
CHANGED
@@ -1,18 +1,15 @@
|
|
1
|
-
(in /Users/rubiojr/Work/github/chef_knives)
|
2
|
-
# -*- encoding: utf-8 -*-
|
3
|
-
|
4
1
|
Gem::Specification.new do |s|
|
5
2
|
s.name = %q{chef_knives}
|
6
|
-
s.version = "0.
|
3
|
+
s.version = "0.6"
|
7
4
|
|
8
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
9
6
|
s.authors = ["Sergio Rubio"]
|
10
|
-
s.date = %q{2009-09-
|
7
|
+
s.date = %q{2009-09-28}
|
11
8
|
s.description = %q{Unofficial Chef Server scripts and related stuff. http://wiki.opscode.com/display/chef}
|
12
9
|
s.email = ["sergio@rubio.name"]
|
13
|
-
s.executables = ["chef_node_find", "chef_node_fs_usage", "chef_node_last_checkin", "chef_node_mem_usage", "chef_node_stats", "chef_vlan_stats"]
|
10
|
+
s.executables = ["chef_node_find", "chef_node_find_domu", "chef_node_fs_usage", "chef_node_last_checkin", "chef_node_mem_usage", "chef_node_stats", "chef_vlan_stats"]
|
14
11
|
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt"]
|
15
|
-
s.files = ["AUTHORS", "History.txt", "Manifest.txt", "README.txt", "Rakefile", "bin/chef_node_find", "bin/chef_node_fs_usage", "bin/chef_node_last_checkin", "bin/chef_node_mem_usage", "bin/chef_node_stats", "bin/chef_vlan_stats", "chef_knives.gemspec", "lib/chef/knives.rb"]
|
12
|
+
s.files = ["AUTHORS", "History.txt", "Manifest.txt", "README.txt", "Rakefile", "bin/chef_node_find", "bin/chef_node_find_domu", "bin/chef_node_fs_usage", "bin/chef_node_last_checkin", "bin/chef_node_mem_usage", "bin/chef_node_stats", "bin/chef_vlan_stats", "chef_knives.gemspec", "lib/chef/knives.rb"]
|
16
13
|
s.homepage = %q{http://github.com/rubiojr/chef-knives}
|
17
14
|
s.rdoc_options = ["--main", "README.txt"]
|
18
15
|
s.require_paths = ["lib"]
|
data/lib/chef/knives.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef_knives
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: "0.
|
4
|
+
version: "0.6"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergio Rubio
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-28 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -77,6 +77,7 @@ email:
|
|
77
77
|
- sergio@rubio.name
|
78
78
|
executables:
|
79
79
|
- chef_node_find
|
80
|
+
- chef_node_find_domu
|
80
81
|
- chef_node_fs_usage
|
81
82
|
- chef_node_last_checkin
|
82
83
|
- chef_node_mem_usage
|
@@ -95,6 +96,7 @@ files:
|
|
95
96
|
- README.txt
|
96
97
|
- Rakefile
|
97
98
|
- bin/chef_node_find
|
99
|
+
- bin/chef_node_find_domu
|
98
100
|
- bin/chef_node_fs_usage
|
99
101
|
- bin/chef_node_last_checkin
|
100
102
|
- bin/chef_node_mem_usage
|