knife-ec-backup 1.1.3 → 1.1.4
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.
- checksums.yaml +4 -4
- data/lib/chef/knife/ec_backup.rb +8 -3
- data/lib/knife_ec_backup/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fff49faa32b80dca130c569470c7294e5b3b85ac
|
|
4
|
+
data.tar.gz: d704f4be0d92946605874737c318a8c79e57c163
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5550e8d418ecd3e27284c6b6d6d273037599fcc7009c1fa571ef76a353b96fc9442d69b7d9fcf2788e6d200b1b2ed23c7edf1c94d392ee795c1d13d3fc3542f7
|
|
7
|
+
data.tar.gz: b7aa8833898097da9b0c3cd697c4e2afa089b3608673594ba5d86a099319b2e3cce2ea8af04ab5c408fa52cd8084458c81868c2df7a7852ec1c8801b61d480e8
|
data/lib/chef/knife/ec_backup.rb
CHANGED
|
@@ -187,12 +187,16 @@ class Chef
|
|
|
187
187
|
|
|
188
188
|
ensure_dir(Chef::Config.chef_repo_path)
|
|
189
189
|
|
|
190
|
-
# Download the billing-admins
|
|
190
|
+
# Download the billing-admins ACL and group as pivotal
|
|
191
191
|
chef_fs_config = ::ChefFS::Config.new
|
|
192
192
|
pattern = ::ChefFS::FilePattern.new('/acls/groups/billing-admins.json')
|
|
193
193
|
if ::ChefFS::FileSystem.copy_to(pattern, chef_fs_config.chef_fs, chef_fs_config.local_fs, nil, config, ui, proc { |entry| chef_fs_config.format_path(entry) })
|
|
194
194
|
@error = true
|
|
195
195
|
end
|
|
196
|
+
pattern = ::ChefFS::FilePattern.new('/groups/billing-admins.json')
|
|
197
|
+
if ::ChefFS::FileSystem.copy_to(pattern, chef_fs_config.chef_fs, chef_fs_config.local_fs, nil, config, ui, proc { |entry| chef_fs_config.format_path(entry) })
|
|
198
|
+
@error = true
|
|
199
|
+
end
|
|
196
200
|
|
|
197
201
|
# Figure out who the admin is so we can spoof him and retrieve his stuff
|
|
198
202
|
rest = Chef::REST.new(Chef::Config.chef_server_url)
|
|
@@ -203,11 +207,12 @@ class Chef
|
|
|
203
207
|
Chef::Config.client_key = webui_key
|
|
204
208
|
Chef::Config.custom_http_headers = (Chef::Config.custom_http_headers || {}).merge({'x-ops-request-source' => 'web'})
|
|
205
209
|
|
|
206
|
-
# Download the entire org skipping the billing admins group ACL
|
|
210
|
+
# Download the entire org skipping the billing admins group ACL and the group itself
|
|
207
211
|
chef_fs_config = ::ChefFS::Config.new
|
|
208
|
-
top_level_paths = chef_fs_config.chef_fs.children.select { |entry| entry.name != 'acls' }.map { |entry| entry.path }
|
|
212
|
+
top_level_paths = chef_fs_config.chef_fs.children.select { |entry| entry.name != 'acls' && entry.name != 'groups' }.map { |entry| entry.path }
|
|
209
213
|
acl_paths = ::ChefFS::FileSystem.list(chef_fs_config.chef_fs, ::ChefFS::FilePattern.new('/acls/*')).select { |entry| entry.name != 'groups' }.map { |entry| entry.path }
|
|
210
214
|
group_acl_paths = ::ChefFS::FileSystem.list(chef_fs_config.chef_fs, ::ChefFS::FilePattern.new('/acls/groups/*')).select { |entry| entry.name != 'billing-admins.json' }.map { |entry| entry.path }
|
|
215
|
+
group_paths = ::ChefFS::FileSystem.list(chef_fs_config.chef_fs, ::ChefFS::FilePattern.new('/groups/*')).select { |entry| entry.name != 'billing-admins.json' }.map { |entry| entry.path }
|
|
211
216
|
(top_level_paths + group_acl_paths + acl_paths).each do |path|
|
|
212
217
|
::ChefFS::FileSystem.copy_to(::ChefFS::FilePattern.new(path), chef_fs_config.chef_fs, chef_fs_config.local_fs, nil, config, ui, proc { |entry| chef_fs_config.format_path(entry) })
|
|
213
218
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: knife-ec-backup
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- John Keiser
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-12-
|
|
11
|
+
date: 2013-12-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|