topo-provision 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/topo/provision/aws/generators/machine.rb +5 -3
- data/lib/topo/provision/aws/generators/machine_image.rb +5 -0
- data/lib/topo/provision/generators/resource.rb +1 -1
- data/lib/topo/provision/generators/templates/machine_deploy.erb +4 -1
- data/lib/topo/provision/version.rb +1 -1
- data/lib/topo/utils/parsegen.rb +1 -5
- 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: c360dbd92b823258d67cb62d186882743a5e4404
|
4
|
+
data.tar.gz: b0b4ab6b8a2b81df1b72da7b6e55a9edd8194ced
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
12
|
-
chef-provisioning
|
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 = "
|
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|
|
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 %>
|
data/lib/topo/utils/parsegen.rb
CHANGED
@@ -88,13 +88,9 @@ module Topo
|
|
88
88
|
str
|
89
89
|
end
|
90
90
|
|
91
|
-
# Expand a particular reference into
|
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.
|
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-
|
11
|
+
date: 2015-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-cli
|