knife-topo 0.0.7 → 0.0.8
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.
@@ -75,14 +75,14 @@ class Chef
|
|
75
75
|
|
76
76
|
# create the topology cookbooks
|
77
77
|
attribute_cookbooks = topo['cookbook_attributes']
|
78
|
-
|
79
|
-
succeeded = 0
|
78
|
+
cookbook_names = []
|
80
79
|
if attribute_cookbooks && attribute_cookbooks.length > 0
|
81
80
|
attribute_cookbooks.each do |cookbook_spec|
|
82
|
-
|
83
|
-
|
81
|
+
cookbook_name = cookbook_spec['cookbook']
|
82
|
+
run_create_cookbook(cookbook_name) unless cookbook_names.include?(cookbook_name)
|
83
|
+
cookbook_names << cookbook_name
|
84
|
+
create_attr_file(@cookbook_path, cookbook_name,
|
84
85
|
cookbook_spec['filename'] + ".rb", cookbook_spec)
|
85
|
-
succeeded += 1
|
86
86
|
end
|
87
87
|
else
|
88
88
|
ui.info "No cookbook attributes found for topology #{@topo_name}"
|
@@ -99,7 +99,6 @@ class Chef
|
|
99
99
|
command = run_cmd(Chef::Knife::CookbookCreate, @cookbook_create_args)
|
100
100
|
rescue Exception => e
|
101
101
|
raise if Chef::Config[:verbosity] == 2
|
102
|
-
@failed << cookbook_name
|
103
102
|
ui.warn "create of cookbook #{cookbook_name} exited with error"
|
104
103
|
humanize_exception(e)
|
105
104
|
end
|
@@ -65,10 +65,13 @@ class Chef
|
|
65
65
|
end
|
66
66
|
|
67
67
|
# Run cookbook upload command on the topology cookbooks
|
68
|
+
cookbook_names = []
|
68
69
|
if topo['cookbook_attributes'] && topo['cookbook_attributes'].length > 0
|
69
70
|
argPos = 2
|
70
71
|
topo['cookbook_attributes'].each do |entry|
|
71
|
-
|
72
|
+
cookbook_name = entry['cookbook']
|
73
|
+
@topo_upload_args[argPos] = cookbook_name unless cookbook_names.include?(cookbook_name)
|
74
|
+
cookbook_names << cookbook_name
|
72
75
|
argPos += 1
|
73
76
|
end
|
74
77
|
run_cmd(Chef::Knife::CookbookUpload, @topo_upload_args)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-topo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-08-
|
12
|
+
date: 2014-08-05 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Knife plugin that to manage topologies of nodes
|
15
15
|
email:
|