knife-ec-backup 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3be6b56c7c0a6b7cd445ebf3ca610866e91476ab
4
- data.tar.gz: a975490841095a7ed627def37f7f2a8b78ad860f
3
+ metadata.gz: fff49faa32b80dca130c569470c7294e5b3b85ac
4
+ data.tar.gz: d704f4be0d92946605874737c318a8c79e57c163
5
5
  SHA512:
6
- metadata.gz: 92e010b8025271bf57ddbcb074944574da406fc6a8bcfb5026f01c872fce547b21dc224151e131b9db3f41b36b5140898d2ea2e1f03d07dd70464c3db96bb15e
7
- data.tar.gz: 9320e5c0ad882373b5f894d5fc752f6b17f9c312e1deeb5c0327cf3d65316862b01ed5ff33c6ad9f393e5a00bb645ce5dedcec78b618e846d38d914a4d800683
6
+ metadata.gz: 5550e8d418ecd3e27284c6b6d6d273037599fcc7009c1fa571ef76a353b96fc9442d69b7d9fcf2788e6d200b1b2ed23c7edf1c94d392ee795c1d13d3fc3542f7
7
+ data.tar.gz: b7aa8833898097da9b0c3cd697c4e2afa089b3608673594ba5d86a099319b2e3cce2ea8af04ab5c408fa52cd8084458c81868c2df7a7852ec1c8801b61d480e8
@@ -187,12 +187,16 @@ class Chef
187
187
 
188
188
  ensure_dir(Chef::Config.chef_repo_path)
189
189
 
190
- # Download the billing-admins acls as pivotal
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
@@ -1,3 +1,3 @@
1
1
  module KnifeECBackup
2
- VERSION = '1.1.3'
2
+ VERSION = '1.1.4'
3
3
  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.3
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-19 00:00:00.000000000 Z
11
+ date: 2013-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec