chef-provisioning 0.19 → 0.20

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.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +62 -32
  3. data/lib/chef/provider/load_balancer.rb +18 -8
  4. data/lib/chef/provider/machine.rb +11 -7
  5. data/lib/chef/provider/machine_batch.rb +8 -4
  6. data/lib/chef/provider/machine_execute.rb +1 -1
  7. data/lib/chef/provider/machine_image.rb +46 -14
  8. data/lib/chef/provisioning.rb +9 -1
  9. data/lib/chef/provisioning/chef_managed_entry_store.rb +128 -0
  10. data/lib/chef/provisioning/chef_run_data.rb +9 -16
  11. data/lib/chef/provisioning/convergence_strategy/install_cached.rb +25 -7
  12. data/lib/chef/provisioning/convergence_strategy/install_msi.rb +26 -8
  13. data/lib/chef/provisioning/convergence_strategy/install_sh.rb +28 -6
  14. data/lib/chef/provisioning/driver.rb +28 -21
  15. data/lib/chef/provisioning/load_balancer_spec.rb +6 -71
  16. data/lib/chef/provisioning/machine_image_spec.rb +34 -0
  17. data/lib/chef/provisioning/machine_spec.rb +23 -47
  18. data/lib/chef/provisioning/managed_entry.rb +121 -0
  19. data/lib/chef/provisioning/managed_entry_store.rb +136 -0
  20. data/lib/chef/provisioning/recipe_dsl.rb +0 -4
  21. data/lib/chef/provisioning/version.rb +1 -1
  22. data/lib/chef/resource/chef_data_bag_resource.rb +1 -2
  23. data/lib/chef/resource/load_balancer.rb +1 -0
  24. data/lib/chef/resource/machine.rb +1 -1
  25. data/lib/chef/resource/machine_batch.rb +2 -2
  26. data/lib/chef/resource/machine_execute.rb +2 -1
  27. metadata +7 -8
  28. data/lib/chef/provisioning/chef_image_spec.rb +0 -111
  29. data/lib/chef/provisioning/chef_load_balancer_spec.rb +0 -108
  30. data/lib/chef/provisioning/chef_machine_spec.rb +0 -83
  31. data/lib/chef/provisioning/image_spec.rb +0 -72
@@ -1,72 +0,0 @@
1
- class Chef
2
- module Provisioning
3
- #
4
- # Specification for a image. Sufficient information to find and contact it
5
- # after it has been set up.
6
- #
7
- class ImageSpec
8
- def initialize(image_data)
9
- @image_data = image_data
10
- end
11
-
12
- attr_reader :image_data
13
-
14
- #
15
- # Globally unique identifier for this image. Does not depend on the image's
16
- # location or existence.
17
- #
18
- def id
19
- raise "id unimplemented"
20
- end
21
-
22
- #
23
- # Name of the image. Corresponds to the name in "image 'name' do" ...
24
- #
25
- def name
26
- image_data['id']
27
- end
28
-
29
- #
30
- # Location of this image. This should be a freeform hash, with enough
31
- # information for the driver to look it up and create a image object to
32
- # access it.
33
- #
34
- # This MUST include a 'driver_url' attribute with the driver's URL in it.
35
- #
36
- # chef-provisioning will do its darnedest to not lose this information.
37
- #
38
- def location
39
- image_data['location']
40
- end
41
-
42
- #
43
- # Set the location for this image.
44
- #
45
- def location=(value)
46
- image_data['location'] = value
47
- end
48
-
49
- def machine_options
50
- image_data['machine_options']
51
- end
52
-
53
- def machine_options=(value)
54
- image_data['machine_options'] = value
55
- end
56
-
57
- # URL to the driver. Convenience for location['driver_url']
58
- def driver_url
59
- location ? location['driver_url'] : nil
60
- end
61
-
62
- #
63
- # Save this image_data to the server. If you have significant information that
64
- # could be lost, you should do this as quickly as possible. image_data will be
65
- # saved automatically for you after allocate_image and ready_image.
66
- #
67
- def save(action_handler)
68
- raise "save unimplemented"
69
- end
70
- end
71
- end
72
- end