topo-provision 0.0.3 → 0.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b7f60bc7bb92f55a6a0ab6971369d1e52ba5a86
4
- data.tar.gz: 5b51c4f439f90fc9f2295f17c587532dbae5f1fc
3
+ metadata.gz: c360dbd92b823258d67cb62d186882743a5e4404
4
+ data.tar.gz: b0b4ab6b8a2b81df1b72da7b6e55a9edd8194ced
5
5
  SHA512:
6
- metadata.gz: 7966f33a13984bab417173716c03c21ede9d48378b6fb556871aeab9d4963de4eb5d2219341359383fef197cc94a6cde10cd53e6b90e7b520b901b6e5f29ea00
7
- data.tar.gz: 90e2e7f8976a12381ee32bf9a7c4e6e08bc0500f0240a2f5079b8d4df5ecb2aaa234bcef3bfe693051b5647de58593b2d0053e1c49ae5ac2d0ff6257853fb0cb
6
+ metadata.gz: eee51503805e214da2d572e277928c87e581d02c2ccb05e7de9300b4d390958147208fa4c6f87b4e2e590afa0182dddf73db1e0c2348c82de36ac9f728efc7e5
7
+ data.tar.gz: e888d3a5ecfb1907391c7c177fdae9baf2bbc69990f1a99f99d9368ddd21c129e60470ac2f14b0865a9ef2d547d6b1bd06653c749029dc6aac361f3335c119df
data/README.md CHANGED
@@ -8,8 +8,8 @@ plugin. In addition, it is possible to convert from other formats. The
8
8
  only converter currently implemented is for CloudFormation.
9
9
 
10
10
  This utility IS NOT READY FOR PRODUCTION USE. It is best described as a
11
- "proof of concept". It has been tested with a pre-release version of
12
- chef-provisioning 1.0.
11
+ "proof of concept". It has been tested with a pre-release build of
12
+ chef-provisioning 0.5.
13
13
 
14
14
  ## Features
15
15
 
@@ -18,9 +18,6 @@
18
18
 
19
19
  require 'topo/provision/generators/resource'
20
20
 
21
- #
22
- # The ResourceGenerator class generates the recipe resources
23
- #
24
21
 
25
22
  module Topo
26
23
  module Provision
@@ -30,6 +27,11 @@ module Topo
30
27
  super
31
28
  @machine_options = convert_keys_to_sym_deep(@machine_options) if @machine_options
32
29
  end
30
+
31
+ # AWS driver doesnt currently support stop
32
+ def stop()
33
+ default_action('stop')
34
+ end
33
35
 
34
36
  end
35
37
  end
@@ -32,6 +32,11 @@ module Topo
32
32
  @resource_attributes['image_options'] = convert_keys_to_sym_deep(opts) if opts
33
33
  @machine_options = convert_keys_to_sym_deep(@machine_options) if @machine_options
34
34
  end
35
+
36
+ # AWS driver doesnt currently support stop
37
+ def stop()
38
+ default_action('stop')
39
+ end
35
40
 
36
41
  end
37
42
  end
@@ -34,7 +34,7 @@ module Topo
34
34
  def initialize(data)
35
35
  @resource_type||= "resource" # define in each class
36
36
  @template_base_name = @resource_type
37
- @undeploy_action = "delete"
37
+ @undeploy_action = "destroy"
38
38
  @resource_attributes = {} # define in each class
39
39
  @name = data['name']
40
40
  provisioning = data['provisioning']
@@ -3,7 +3,10 @@
3
3
  <% resource_attributes.each do |key, val| %><%=" #{key}(#{val.inspect})\n" %><% end %>
4
4
  <% normal_attributes.each do |key, val| %><%=" attribute '#{key}', #{val.inspect} \n" %><% end %>
5
5
  <% lazy_attributes.each do |key, val| %><%=" attribute '#{key}', lazy{
6
- topo_search_node_fn = Proc.new { |node, path| (search(:node, \"name:\" + node, :filter_result => { 'val' => path }).first)['data']['val'] }
6
+ topo_search_node_fn = Proc.new { |node, path|
7
+ result = search(:node, \"name:\" + node, :filter_result => { 'val' => path }).first
8
+ result['val'] if result
9
+ }
7
10
  {#{val}}
8
11
  } \n" %><% end %>
9
12
  <% if (machine_options) %><%= " add_machine_options(#{machine_options.inspect})\n" %><% end %>
@@ -1,5 +1,5 @@
1
1
  module Topo
2
2
  module Provision
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
@@ -88,13 +88,9 @@ module Topo
88
88
  str
89
89
  end
90
90
 
91
- # Expand a particular reference into either a node search
92
- # In future, may need to search resource type data bag, e.g. using
93
- # topo_search_data_bag_fn = Proc.new { |bag, id, path| (search(bag, "id:#{id}", :filter_result => { 'val' => path }).first)['data']['val'] }
94
- #
91
+ # Expand a particular reference into a node search
95
92
  def expand_ref(ref)
96
93
  path = ref['path']
97
- # Wanted to use the following and define a proc, but does not work for some resources
98
94
  "topo_search_node_fn.call(#{ref['name'].inspect}, #{path})"
99
95
  end
100
96
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: topo-provision
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christine Draper
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-26 00:00:00.000000000 Z
11
+ date: 2015-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-cli