class CORL::Node::Vagrant

Public Instance Methods

bootstrap_script() click to toggle source
    # File lib/CORL/node/vagrant.rb
103 def bootstrap_script
104   cache_setting(:bootstrap, nil)
105 end
bootstrap_script=(bootstrap) click to toggle source
    # File lib/CORL/node/vagrant.rb
 99 def bootstrap_script=bootstrap
100   set_cache_setting(:bootstrap, bootstrap)
101 end
build(options = {}) click to toggle source
Calls superclass method
    # File lib/CORL/node/vagrant.rb
128 def build(options = {})
129   super(Config.ensure(options).import({ :save => false }))
130 end
build_time() click to toggle source
   # File lib/CORL/node/vagrant.rb
93 def build_time
94   cache_setting(:build, nil)
95 end
build_time=(time) click to toggle source
   # File lib/CORL/node/vagrant.rb
89 def build_time=time
90   set_cache_setting(:build, time)
91 end
create(options = {}) click to toggle source
Calls superclass method
    # File lib/CORL/node/vagrant.rb
134 def create(options = {})
135   super do |op, config|
136     if op == :config
137       config.import(exec_options(:create))
138       config[:provision_enabled] = false
139     end
140   end
141 end
create_image(options = {}) click to toggle source
Calls superclass method
    # File lib/CORL/node/vagrant.rb
206 def create_image(options = {})
207   super do |op, config|
208     if op == :config
209       config.import(exec_options(:image))
210     end
211   end
212 end
destroy(options = {}) click to toggle source
Calls superclass method
    # File lib/CORL/node/vagrant.rb
228 def destroy(options = {})
229   super do |op, config|
230     if op == :config
231       config.import(exec_options(:destroy))
232     end
233   end
234 end
download(remote_path, local_path, options = {}) click to toggle source
Calls superclass method
    # File lib/CORL/node/vagrant.rb
145 def download(remote_path, local_path, options = {})
146   super do |op, config|
147     if op == :config
148       config.import(exec_options(:download))
149     end
150   end
151 end
exec(options = {}) click to toggle source
Calls superclass method
    # File lib/CORL/node/vagrant.rb
165 def exec(options = {})
166   super do |op, config|
167     if op == :config
168       config.import(exec_options(:exec))
169     end
170   end
171 end
exec_options(name, options = {}) click to toggle source
    # File lib/CORL/node/vagrant.rb
121 def exec_options(name, options = {})
122   extended_config(name, options).export
123 end
image(reset = false) click to toggle source
   # File lib/CORL/node/vagrant.rb
71 def image(reset = false)
72   return machine.image if machine
73   nil
74 end
image=(image) click to toggle source
   # File lib/CORL/node/vagrant.rb
67 def image=image
68   # Images can not be set
69 end
image_id(image) click to toggle source
    # File lib/CORL/node/vagrant.rb
262 def image_id(image)
263   image.id
264 end
image_search_text(image) click to toggle source
    # File lib/CORL/node/vagrant.rb
274 def image_search_text(image)
275   image.to_s
276 end
init_shares() click to toggle source
    # File lib/CORL/node/vagrant.rb
239 def init_shares
240   shares.each do |name, info|
241     local_dir = info[:local]
242     network.ignore(local_dir) unless info[:type].to_s =~ /^rsync-?.*/
243   end
244 end
machine_config() { |config| ... } click to toggle source
Calls superclass method
    # File lib/CORL/node/vagrant.rb
110 def machine_config
111   super do |config|
112     config[:vm]     = vm
113     config[:shares] = shares
114 
115     yield(config) if block_given?
116   end
117 end
machine_type_id(machine_type) click to toggle source
    # File lib/CORL/node/vagrant.rb
249 def machine_type_id(machine_type)
250   machine_type
251 end
normalize(reload) { || ... } click to toggle source
Calls superclass method
   # File lib/CORL/node/vagrant.rb
 9 def normalize(reload)
10   super
11 
12   unless reload
13     machine_provider = :vagrant
14     machine_provider = yield if block_given?
15 
16     myself.machine = create_machine(:machine, machine_provider, machine_config)
17   end
18 
19   network.ignore([ '.vagrant', 'boxes' ])
20   init_shares
21 end
private_ip(reset = false) click to toggle source
   # File lib/CORL/node/vagrant.rb
40 def private_ip(reset = false)
41   return machine.private_ip if machine
42   nil
43 end
public_ip(reset = false) click to toggle source
   # File lib/CORL/node/vagrant.rb
35 def public_ip(reset = false)
36   return machine.public_ip if machine
37   nil
38 end
reload(options = {}) click to toggle source
Calls superclass method
    # File lib/CORL/node/vagrant.rb
195 def reload(options = {})
196   super do |op, config|
197     if op == :config
198       config.import(exec_options(:reload))
199       config[:provision_enabled] = false
200     end
201   end
202 end
render_image(image) click to toggle source
    # File lib/CORL/node/vagrant.rb
268 def render_image(image)
269   ''
270 end
render_machine_type(machine_type) click to toggle source
    # File lib/CORL/node/vagrant.rb
255 def render_machine_type(machine_type)
256   machine_type.to_s
257 end
save(options = {}) click to toggle source
Calls superclass method
    # File lib/CORL/node/vagrant.rb
175 def save(options = {})
176   super do
177     id(true)
178     delete_setting(:machine_type)
179   end
180 end
shares() click to toggle source
   # File lib/CORL/node/vagrant.rb
83 def shares
84   hash(myself[:shares])
85 end
shares=(shares) click to toggle source
   # File lib/CORL/node/vagrant.rb
78 def shares=shares
79   myself[:shares] = shares
80   init_shares
81 end
ssh() click to toggle source
   # File lib/CORL/node/vagrant.rb
61 def ssh
62   hash(myself[:ssh])
63 end
ssh=(ssh) click to toggle source
   # File lib/CORL/node/vagrant.rb
57 def ssh=ssh
58   myself[:ssh] = ssh
59 end
start(options = {}) click to toggle source
Calls superclass method
    # File lib/CORL/node/vagrant.rb
184 def start(options = {})
185   super do |op, config|
186     if op == :config
187       config.import(exec_options(:start))
188       config[:provision_enabled] = false
189     end
190   end
191 end
state(reset = false) click to toggle source
   # File lib/CORL/node/vagrant.rb
29 def state(reset = false)
30   machine.state
31 end
stop(options = {}) click to toggle source
Calls superclass method
    # File lib/CORL/node/vagrant.rb
216 def stop(options = {})
217   super do |op, config|
218     if op == :config
219       config.import(exec_options(:stop))
220     elsif op == :finalize
221       true
222     end
223   end
224 end
upload(local_path, remote_path, options = {}) click to toggle source
Calls superclass method
    # File lib/CORL/node/vagrant.rb
155 def upload(local_path, remote_path, options = {})
156   super do |op, config|
157     if op == :config
158       config.import(exec_options(:upload))
159     end
160   end
161 end
vm() click to toggle source
   # File lib/CORL/node/vagrant.rb
51 def vm
52   hash(myself[:vm])
53 end
vm=(vm) click to toggle source
   # File lib/CORL/node/vagrant.rb
47 def vm=vm
48   myself[:vm] = vm
49 end