corl 0.4.29 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -3
- data/Gemfile.lock +16 -13
- data/VERSION +1 -1
- data/bin/corl +21 -1
- data/bootstrap/os/ubuntu/00_base.sh +2 -2
- data/bootstrap/os/ubuntu/06_puppet.sh +7 -12
- data/bootstrap/os/ubuntu/09_nucleon.sh +1 -1
- data/bootstrap/os/ubuntu/10_corl.sh +1 -4
- data/corl.gemspec +193 -40
- data/lib/CORL/builder/identity.rb +68 -0
- data/lib/CORL/builder/package.rb +75 -0
- data/lib/CORL/configuration/file.rb +5 -5
- data/lib/CORL/machine/{aws.rb → AWS.rb} +2 -2
- data/lib/CORL/machine/physical.rb +1 -1
- data/lib/CORL/machine/rackspace.rb +1 -1
- data/lib/CORL/machine/vagrant.rb +2 -2
- data/lib/CORL/network/{default.rb → CORL.rb} +1 -1
- data/lib/CORL/node/{aws.rb → AWS.rb} +1 -1
- data/lib/CORL/node/local.rb +1 -1
- data/lib/CORL/node/vagrant.rb +7 -2
- data/lib/CORL/provisioner/puppetnode.rb +139 -131
- data/lib/core/build.rb +112 -0
- data/lib/core/facade.rb +48 -8
- data/lib/core/mixin/builder.rb +158 -0
- data/lib/core/mixin/lookup.rb +51 -20
- data/lib/core/mixin/machine/ssh.rb +16 -4
- data/lib/core/plugin/builder.rb +49 -0
- data/lib/core/plugin/{action.rb → cloud_action.rb} +22 -16
- data/lib/core/plugin/configuration.rb +9 -3
- data/lib/core/plugin/fog_machine.rb +3 -3
- data/lib/core/plugin/fog_node.rb +1 -1
- data/lib/core/plugin/machine.rb +2 -2
- data/lib/core/plugin/network.rb +39 -10
- data/lib/core/plugin/node.rb +95 -35
- data/lib/core/plugin/provisioner.rb +133 -113
- data/lib/core/util/puppet/resource.rb +1 -1
- data/lib/core/vagrant/actions/delete_cache.rb +7 -1
- data/lib/core/vagrant/commands/launcher.rb +2 -2
- data/lib/core/vagrant/config.rb +29 -2
- data/lib/corl.rb +9 -8
- data/lib/facter/corl_config_ready.rb +1 -1
- data/lib/facter/vagrant_exists.rb +1 -1
- data/lib/nucleon/action/cloud/create.rb +51 -0
- data/lib/nucleon/action/cloud/hiera.rb +61 -0
- data/lib/{CORL/action → nucleon/action/cloud}/images.rb +11 -2
- data/lib/nucleon/action/cloud/inspect.rb +47 -0
- data/lib/{CORL/action → nucleon/action/cloud}/machines.rb +11 -2
- data/lib/{CORL/action → nucleon/action/cloud}/regions.rb +11 -2
- data/lib/{CORL/action → nucleon/action/cloud}/vagrantfile.rb +11 -2
- data/lib/{CORL/action/ip.rb → nucleon/action/node/IP.rb} +11 -2
- data/lib/{CORL/action/ssh.rb → nucleon/action/node/SSH.rb} +15 -7
- data/lib/{CORL/action → nucleon/action/node}/authorize.rb +11 -2
- data/lib/{CORL/action → nucleon/action/node}/bootstrap.rb +13 -4
- data/lib/nucleon/action/node/build.rb +49 -0
- data/lib/{CORL/action → nucleon/action/node}/destroy.rb +14 -5
- data/lib/{CORL/action → nucleon/action/node}/exec.rb +11 -2
- data/lib/{CORL/action → nucleon/action/node}/facts.rb +12 -3
- data/lib/{CORL/action → nucleon/action/node}/image.rb +13 -4
- data/lib/nucleon/action/node/keypair.rb +85 -0
- data/lib/{CORL/action → nucleon/action/node}/lookup.rb +13 -4
- data/lib/{CORL/action → nucleon/action/node}/provision.rb +30 -8
- data/lib/{CORL/action → nucleon/action/node}/reboot.rb +13 -4
- data/lib/{CORL/action → nucleon/action/node}/revoke.rb +11 -2
- data/lib/{CORL/action → nucleon/action/node}/seed.rb +13 -4
- data/lib/{CORL/action → nucleon/action/node}/spawn.rb +19 -9
- data/lib/{CORL/action → nucleon/action/node}/start.rb +13 -4
- data/lib/{CORL/action → nucleon/action/node}/stop.rb +13 -4
- data/lib/{CORL → nucleon}/event/puppet.rb +2 -2
- data/lib/{CORL → nucleon}/template/environment.rb +2 -2
- data/lib/puppet/indirector/corl.rb +7 -4
- data/lib/puppet/parser/functions/corl_resources.rb +1 -0
- data/lib/puppet/parser/functions/global_array.rb +2 -1
- data/lib/puppet/parser/functions/global_hash.rb +2 -1
- data/lib/puppet/parser/functions/global_param.rb +2 -1
- data/lib/puppet/parser/functions/module_array.rb +2 -1
- data/lib/puppet/parser/functions/module_hash.rb +3 -2
- data/lib/puppet/parser/functions/module_param.rb +3 -2
- data/lib/puppet/parser/functions/render.rb +1 -0
- data/locales/en.yml +80 -0
- data/rdoc/site/0.4.29/CORL/Action/Authorize.html +485 -0
- data/rdoc/site/0.4.29/CORL/Action/Bootstrap.html +546 -0
- data/rdoc/site/0.4.29/CORL/Action/Build.html +396 -0
- data/rdoc/site/0.4.29/CORL/Action/Destroy.html +515 -0
- data/rdoc/site/0.4.29/CORL/Action/Exec.html +472 -0
- data/rdoc/site/0.4.29/CORL/Action/Facts.html +398 -0
- data/rdoc/site/0.4.29/CORL/Action/Image.html +515 -0
- data/rdoc/site/0.4.29/CORL/Action/Images.html +514 -0
- data/rdoc/site/0.4.29/CORL/Action/Ip.html +395 -0
- data/rdoc/site/0.4.29/CORL/Action/Keypair.html +494 -0
- data/rdoc/site/0.4.29/CORL/Action/Lookup.html +474 -0
- data/rdoc/site/0.4.29/CORL/Action/Machines.html +509 -0
- data/rdoc/site/0.4.29/CORL/Action/Provision.html +456 -0
- data/rdoc/site/0.4.29/CORL/Action/Reboot.html +515 -0
- data/rdoc/site/0.4.29/CORL/Action/Regions.html +509 -0
- data/rdoc/site/0.4.29/CORL/Action/Revoke.html +483 -0
- data/rdoc/site/0.4.29/CORL/Action/Seed.html +544 -0
- data/rdoc/site/0.4.29/CORL/Action/Spawn.html +616 -0
- data/rdoc/site/0.4.29/CORL/Action/Ssh.html +526 -0
- data/rdoc/site/0.4.29/CORL/Action/Start.html +515 -0
- data/rdoc/site/0.4.29/CORL/Action/Stop.html +515 -0
- data/rdoc/site/0.4.29/CORL/Action/Vagrantfile.html +457 -0
- data/rdoc/site/0.4.29/CORL/Action.html +360 -0
- data/rdoc/site/0.4.29/CORL/Configuration/File.html +1128 -0
- data/rdoc/site/0.4.29/CORL/Configuration.html +339 -0
- data/rdoc/site/0.4.29/CORL/Errors.html +339 -0
- data/rdoc/site/0.4.29/CORL/Event/Puppet.html +673 -0
- data/rdoc/site/0.4.29/CORL/Event.html +339 -0
- data/rdoc/site/0.4.29/CORL/Facade.html +742 -0
- data/rdoc/site/0.4.29/CORL/Machine/Aws.html +733 -0
- data/rdoc/site/0.4.29/CORL/Machine/Fog.html +1269 -0
- data/rdoc/site/0.4.29/CORL/Machine/Physical.html +1039 -0
- data/rdoc/site/0.4.29/CORL/Machine/Rackspace.html +514 -0
- data/rdoc/site/0.4.29/CORL/Machine/Vagrant.html +1300 -0
- data/rdoc/site/0.4.29/CORL/Machine.html +343 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Action/Keypair.html +572 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Action.html +339 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Lookup.html +954 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Machine/SSH.html +643 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Machine.html +339 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Macro/NetworkSettings.html +464 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Macro.html +339 -0
- data/rdoc/site/0.4.29/CORL/Mixin.html +342 -0
- data/rdoc/site/0.4.29/CORL/Network/Default.html +391 -0
- data/rdoc/site/0.4.29/CORL/Network.html +339 -0
- data/rdoc/site/0.4.29/CORL/Node/Aws.html +716 -0
- data/rdoc/site/0.4.29/CORL/Node/Fog.html +1192 -0
- data/rdoc/site/0.4.29/CORL/Node/Local.html +424 -0
- data/rdoc/site/0.4.29/CORL/Node/Rackspace.html +709 -0
- data/rdoc/site/0.4.29/CORL/Node/Vagrant.html +1451 -0
- data/rdoc/site/0.4.29/CORL/Node.html +343 -0
- data/rdoc/site/0.4.29/CORL/Plugin/CloudAction.html +810 -0
- data/rdoc/site/0.4.29/CORL/Plugin.html +339 -0
- data/rdoc/site/0.4.29/CORL/Provisioner/Puppetnode.html +1095 -0
- data/rdoc/site/0.4.29/CORL/Provisioner.html +339 -0
- data/rdoc/site/0.4.29/CORL/Template/Environment.html +528 -0
- data/rdoc/site/0.4.29/CORL/Template.html +339 -0
- data/rdoc/site/0.4.29/CORL/Util/Puppet/Resource.html +1038 -0
- data/rdoc/site/0.4.29/CORL/Util/Puppet/ResourceGroup.html +920 -0
- data/rdoc/site/0.4.29/CORL/Util/Puppet.html +1087 -0
- data/rdoc/site/0.4.29/CORL/Util.html +341 -0
- data/rdoc/site/0.4.29/CORL/Vagrant/Config.html +896 -0
- data/rdoc/site/0.4.29/CORL/Vagrant.html +418 -0
- data/rdoc/site/0.4.29/CORL.html +465 -0
- data/rdoc/site/0.4.29/Facter/Util/Loader.html +396 -0
- data/rdoc/site/0.4.29/Facter/Util.html +339 -0
- data/rdoc/site/0.4.29/Facter.html +339 -0
- data/rdoc/site/0.4.29/Fog/Compute/AWS/Server.html +423 -0
- data/rdoc/site/0.4.29/Fog/Compute/AWS.html +345 -0
- data/rdoc/site/0.4.29/Fog/Compute/RackspaceV2/Server.html +408 -0
- data/rdoc/site/0.4.29/Fog/Compute/RackspaceV2.html +345 -0
- data/rdoc/site/0.4.29/Fog/Compute.html +340 -0
- data/rdoc/site/0.4.29/Fog.html +340 -0
- data/rdoc/site/0.4.29/Hiera/Backend.html +422 -0
- data/rdoc/site/0.4.29/Hiera/Corl_logger.html +449 -0
- data/rdoc/site/0.4.29/Hiera.html +346 -0
- data/rdoc/site/0.4.29/Nucleon/Config.html +357 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin/Base.html +345 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin/Configuration.html +1213 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin/Machine.html +1279 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin/Network.html +1425 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin/Node.html +3715 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin/Provisioner.html +1297 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin.html +344 -0
- data/rdoc/site/0.4.29/Nucleon.html +344 -0
- data/rdoc/site/0.4.29/Object.html +358 -0
- data/rdoc/site/0.4.29/Puppet/DataBinding/Corl.html +345 -0
- data/rdoc/site/0.4.29/Puppet/DataBinding.html +338 -0
- data/rdoc/site/0.4.29/Puppet/Indirector/Corl.html +454 -0
- data/rdoc/site/0.4.29/Puppet/Indirector.html +338 -0
- data/rdoc/site/0.4.29/Puppet/Parser/Functions.html +480 -0
- data/rdoc/site/0.4.29/Puppet/Parser.html +338 -0
- data/rdoc/site/0.4.29/Puppet.html +338 -0
- data/rdoc/site/0.4.29/README_rdoc.html +340 -0
- data/rdoc/site/0.4.29/Vagrant/Config/Loader.html +399 -0
- data/rdoc/site/0.4.29/Vagrant/Config.html +339 -0
- data/rdoc/site/0.4.29/Vagrant/Vagrantfile.html +392 -0
- data/rdoc/site/0.4.29/Vagrant.html +346 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action/DeleteCache.html +396 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action/InitKeys.html +408 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action/LinkNetwork.html +406 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action.html +341 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/BaseAction.html +491 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Command/Launcher.html +533 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Command.html +339 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Config/CORL.html +732 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Config.html +339 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Plugin.html +345 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Provisioner/CORL.html +536 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Provisioner.html +339 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL.html +346 -0
- data/rdoc/site/0.4.29/VagrantPlugins.html +346 -0
- data/rdoc/site/0.4.29/created.rid +96 -0
- data/rdoc/site/0.4.29/images/add.png +0 -0
- data/rdoc/site/0.4.29/images/brick.png +0 -0
- data/rdoc/site/0.4.29/images/brick_link.png +0 -0
- data/rdoc/site/0.4.29/images/bug.png +0 -0
- data/rdoc/site/0.4.29/images/bullet_black.png +0 -0
- data/rdoc/site/0.4.29/images/bullet_toggle_minus.png +0 -0
- data/rdoc/site/0.4.29/images/bullet_toggle_plus.png +0 -0
- data/rdoc/site/0.4.29/images/date.png +0 -0
- data/rdoc/site/0.4.29/images/delete.png +0 -0
- data/rdoc/site/0.4.29/images/find.png +0 -0
- data/rdoc/site/0.4.29/images/loadingAnimation.gif +0 -0
- data/rdoc/site/0.4.29/images/macFFBgHack.png +0 -0
- data/rdoc/site/0.4.29/images/package.png +0 -0
- data/rdoc/site/0.4.29/images/page_green.png +0 -0
- data/rdoc/site/0.4.29/images/page_white_text.png +0 -0
- data/rdoc/site/0.4.29/images/page_white_width.png +0 -0
- data/rdoc/site/0.4.29/images/plugin.png +0 -0
- data/rdoc/site/0.4.29/images/ruby.png +0 -0
- data/rdoc/site/0.4.29/images/tag_blue.png +0 -0
- data/rdoc/site/0.4.29/images/tag_green.png +0 -0
- data/rdoc/site/0.4.29/images/transparent.png +0 -0
- data/rdoc/site/0.4.29/images/wrench.png +0 -0
- data/rdoc/site/0.4.29/images/wrench_orange.png +0 -0
- data/rdoc/site/0.4.29/images/zoom.png +0 -0
- data/rdoc/site/0.4.29/index.html +339 -0
- data/rdoc/site/0.4.29/js/darkfish.js +155 -0
- data/rdoc/site/0.4.29/js/jquery.js +18 -0
- data/rdoc/site/0.4.29/js/navigation.js +142 -0
- data/rdoc/site/0.4.29/js/search.js +94 -0
- data/rdoc/site/0.4.29/js/search_index.js +1 -0
- data/rdoc/site/0.4.29/js/searcher.js +228 -0
- data/rdoc/site/0.4.29/rdoc.css +543 -0
- data/rdoc/site/0.4.29/table_of_contents.html +1561 -0
- metadata +192 -45
- data/lib/CORL/action/build.rb +0 -22
- data/lib/CORL/action/keypair.rb +0 -56
- data/lib/core/mod/facter_loader.rb +0 -15
@@ -0,0 +1,1300 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>class CORL::Machine::Vagrant - corl 0.4.29</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "../../";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="../../js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="../../js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="../../js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="../../js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="../../js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body id="top" class="class">
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="../../index.html">Home</a>
|
28
|
+
<a href="../../table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="../../table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
<div id="file-metadata">
|
47
|
+
<nav id="file-list-section" class="section">
|
48
|
+
<h3 class="section-header">Defined In</h3>
|
49
|
+
<ul>
|
50
|
+
<li>lib/CORL/machine/vagrant.rb
|
51
|
+
</ul>
|
52
|
+
</nav>
|
53
|
+
|
54
|
+
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<div id="class-metadata">
|
58
|
+
|
59
|
+
<nav id="parent-class-section" class="section">
|
60
|
+
<h3 class="section-header">Parent</h3>
|
61
|
+
|
62
|
+
<p class="link">CORL.plugin_class(:machine)
|
63
|
+
|
64
|
+
</nav>
|
65
|
+
|
66
|
+
<!-- Included Modules -->
|
67
|
+
<nav id="includes-section" class="section">
|
68
|
+
<h3 class="section-header">Included Modules</h3>
|
69
|
+
|
70
|
+
<ul class="link-list">
|
71
|
+
|
72
|
+
|
73
|
+
<li><a class="include" href="../Mixin/Machine/SSH.html">CORL::Mixin::Machine::SSH</a>
|
74
|
+
|
75
|
+
|
76
|
+
</ul>
|
77
|
+
</nav>
|
78
|
+
|
79
|
+
<!-- Method Quickref -->
|
80
|
+
<nav id="method-list-section" class="section">
|
81
|
+
<h3 class="section-header">Methods</h3>
|
82
|
+
|
83
|
+
<ul class="link-list">
|
84
|
+
|
85
|
+
<li><a href="#method-i-command">#command</a>
|
86
|
+
|
87
|
+
<li><a href="#method-i-create">#create</a>
|
88
|
+
|
89
|
+
<li><a href="#method-i-create_image">#create_image</a>
|
90
|
+
|
91
|
+
<li><a href="#method-i-created-3F">#created?</a>
|
92
|
+
|
93
|
+
<li><a href="#method-i-destroy">#destroy</a>
|
94
|
+
|
95
|
+
<li><a href="#method-i-download">#download</a>
|
96
|
+
|
97
|
+
<li><a href="#method-i-env">#env</a>
|
98
|
+
|
99
|
+
<li><a href="#method-i-exec">#exec</a>
|
100
|
+
|
101
|
+
<li><a href="#method-i-load">#load</a>
|
102
|
+
|
103
|
+
<li><a href="#method-i-machine_types">#machine_types</a>
|
104
|
+
|
105
|
+
<li><a href="#method-i-new_machine">#new_machine</a>
|
106
|
+
|
107
|
+
<li><a href="#method-i-refresh_config">#refresh_config</a>
|
108
|
+
|
109
|
+
<li><a href="#method-i-reload">#reload</a>
|
110
|
+
|
111
|
+
<li><a href="#method-i-run">#run</a>
|
112
|
+
|
113
|
+
<li><a href="#method-i-running-3F">#running?</a>
|
114
|
+
|
115
|
+
<li><a href="#method-i-server">#server</a>
|
116
|
+
|
117
|
+
<li><a href="#method-i-server-3D">#server=</a>
|
118
|
+
|
119
|
+
<li><a href="#method-i-set_command">#set_command</a>
|
120
|
+
|
121
|
+
<li><a href="#method-i-start">#start</a>
|
122
|
+
|
123
|
+
<li><a href="#method-i-start_machine">#start_machine</a>
|
124
|
+
|
125
|
+
<li><a href="#method-i-state">#state</a>
|
126
|
+
|
127
|
+
<li><a href="#method-i-stop">#stop</a>
|
128
|
+
|
129
|
+
<li><a href="#method-i-terminal">#terminal</a>
|
130
|
+
|
131
|
+
<li><a href="#method-i-upload">#upload</a>
|
132
|
+
|
133
|
+
</ul>
|
134
|
+
</nav>
|
135
|
+
|
136
|
+
</div>
|
137
|
+
|
138
|
+
<div id="project-metadata">
|
139
|
+
<nav id="fileindex-section" class="section project-section">
|
140
|
+
<h3 class="section-header">Pages</h3>
|
141
|
+
|
142
|
+
<ul>
|
143
|
+
|
144
|
+
<li class="file"><a href="../../README_rdoc.html">README</a>
|
145
|
+
|
146
|
+
</ul>
|
147
|
+
</nav>
|
148
|
+
|
149
|
+
<nav id="classindex-section" class="section project-section">
|
150
|
+
<h3 class="section-header">Class and Module Index</h3>
|
151
|
+
|
152
|
+
<ul class="link-list">
|
153
|
+
|
154
|
+
<li><a href="../../CORL.html">CORL</a>
|
155
|
+
|
156
|
+
<li><a href="../../CORL/Action.html">CORL::Action</a>
|
157
|
+
|
158
|
+
<li><a href="../../CORL/Action/Authorize.html">CORL::Action::Authorize</a>
|
159
|
+
|
160
|
+
<li><a href="../../CORL/Action/Bootstrap.html">CORL::Action::Bootstrap</a>
|
161
|
+
|
162
|
+
<li><a href="../../CORL/Action/Build.html">CORL::Action::Build</a>
|
163
|
+
|
164
|
+
<li><a href="../../CORL/Action/Destroy.html">CORL::Action::Destroy</a>
|
165
|
+
|
166
|
+
<li><a href="../../CORL/Action/Exec.html">CORL::Action::Exec</a>
|
167
|
+
|
168
|
+
<li><a href="../../CORL/Action/Facts.html">CORL::Action::Facts</a>
|
169
|
+
|
170
|
+
<li><a href="../../CORL/Action/Image.html">CORL::Action::Image</a>
|
171
|
+
|
172
|
+
<li><a href="../../CORL/Action/Images.html">CORL::Action::Images</a>
|
173
|
+
|
174
|
+
<li><a href="../../CORL/Action/Ip.html">CORL::Action::Ip</a>
|
175
|
+
|
176
|
+
<li><a href="../../CORL/Action/Keypair.html">CORL::Action::Keypair</a>
|
177
|
+
|
178
|
+
<li><a href="../../CORL/Action/Lookup.html">CORL::Action::Lookup</a>
|
179
|
+
|
180
|
+
<li><a href="../../CORL/Action/Machines.html">CORL::Action::Machines</a>
|
181
|
+
|
182
|
+
<li><a href="../../CORL/Action/Provision.html">CORL::Action::Provision</a>
|
183
|
+
|
184
|
+
<li><a href="../../CORL/Action/Reboot.html">CORL::Action::Reboot</a>
|
185
|
+
|
186
|
+
<li><a href="../../CORL/Action/Regions.html">CORL::Action::Regions</a>
|
187
|
+
|
188
|
+
<li><a href="../../CORL/Action/Revoke.html">CORL::Action::Revoke</a>
|
189
|
+
|
190
|
+
<li><a href="../../CORL/Action/Seed.html">CORL::Action::Seed</a>
|
191
|
+
|
192
|
+
<li><a href="../../CORL/Action/Spawn.html">CORL::Action::Spawn</a>
|
193
|
+
|
194
|
+
<li><a href="../../CORL/Action/Ssh.html">CORL::Action::Ssh</a>
|
195
|
+
|
196
|
+
<li><a href="../../CORL/Action/Start.html">CORL::Action::Start</a>
|
197
|
+
|
198
|
+
<li><a href="../../CORL/Action/Stop.html">CORL::Action::Stop</a>
|
199
|
+
|
200
|
+
<li><a href="../../CORL/Action/Vagrantfile.html">CORL::Action::Vagrantfile</a>
|
201
|
+
|
202
|
+
<li><a href="../../CORL/Configuration.html">CORL::Configuration</a>
|
203
|
+
|
204
|
+
<li><a href="../../CORL/Configuration/File.html">CORL::Configuration::File</a>
|
205
|
+
|
206
|
+
<li><a href="../../CORL/Errors.html">CORL::Errors</a>
|
207
|
+
|
208
|
+
<li><a href="../../CORL/Event.html">CORL::Event</a>
|
209
|
+
|
210
|
+
<li><a href="../../CORL/Event/Puppet.html">CORL::Event::Puppet</a>
|
211
|
+
|
212
|
+
<li><a href="../../CORL/Facade.html">CORL::Facade</a>
|
213
|
+
|
214
|
+
<li><a href="../../CORL/Machine.html">CORL::Machine</a>
|
215
|
+
|
216
|
+
<li><a href="../../CORL/Machine/Aws.html">CORL::Machine::Aws</a>
|
217
|
+
|
218
|
+
<li><a href="../../CORL/Machine/Fog.html">CORL::Machine::Fog</a>
|
219
|
+
|
220
|
+
<li><a href="../../CORL/Machine/Physical.html">CORL::Machine::Physical</a>
|
221
|
+
|
222
|
+
<li><a href="../../CORL/Machine/Rackspace.html">CORL::Machine::Rackspace</a>
|
223
|
+
|
224
|
+
<li><a href="../../CORL/Machine/Vagrant.html">CORL::Machine::Vagrant</a>
|
225
|
+
|
226
|
+
<li><a href="../../CORL/Mixin.html">CORL::Mixin</a>
|
227
|
+
|
228
|
+
<li><a href="../../CORL/Mixin/Action.html">CORL::Mixin::Action</a>
|
229
|
+
|
230
|
+
<li><a href="../../CORL/Mixin/Action/Keypair.html">CORL::Mixin::Action::Keypair</a>
|
231
|
+
|
232
|
+
<li><a href="../../CORL/Mixin/Lookup.html">CORL::Mixin::Lookup</a>
|
233
|
+
|
234
|
+
<li><a href="../../CORL/Mixin/Machine.html">CORL::Mixin::Machine</a>
|
235
|
+
|
236
|
+
<li><a href="../../CORL/Mixin/Machine/SSH.html">CORL::Mixin::Machine::SSH</a>
|
237
|
+
|
238
|
+
<li><a href="../../CORL/Mixin/Macro.html">CORL::Mixin::Macro</a>
|
239
|
+
|
240
|
+
<li><a href="../../CORL/Mixin/Macro/NetworkSettings.html">CORL::Mixin::Macro::NetworkSettings</a>
|
241
|
+
|
242
|
+
<li><a href="../../CORL/Network.html">CORL::Network</a>
|
243
|
+
|
244
|
+
<li><a href="../../CORL/Network/Default.html">CORL::Network::Default</a>
|
245
|
+
|
246
|
+
<li><a href="../../CORL/Node.html">CORL::Node</a>
|
247
|
+
|
248
|
+
<li><a href="../../CORL/Node/Aws.html">CORL::Node::Aws</a>
|
249
|
+
|
250
|
+
<li><a href="../../CORL/Node/Fog.html">CORL::Node::Fog</a>
|
251
|
+
|
252
|
+
<li><a href="../../CORL/Node/Local.html">CORL::Node::Local</a>
|
253
|
+
|
254
|
+
<li><a href="../../CORL/Node/Rackspace.html">CORL::Node::Rackspace</a>
|
255
|
+
|
256
|
+
<li><a href="../../CORL/Node/Vagrant.html">CORL::Node::Vagrant</a>
|
257
|
+
|
258
|
+
<li><a href="../../CORL/Plugin.html">CORL::Plugin</a>
|
259
|
+
|
260
|
+
<li><a href="../../CORL/Plugin/CloudAction.html">CORL::Plugin::CloudAction</a>
|
261
|
+
|
262
|
+
<li><a href="../../CORL/Provisioner.html">CORL::Provisioner</a>
|
263
|
+
|
264
|
+
<li><a href="../../CORL/Provisioner/Puppetnode.html">CORL::Provisioner::Puppetnode</a>
|
265
|
+
|
266
|
+
<li><a href="../../CORL/Template.html">CORL::Template</a>
|
267
|
+
|
268
|
+
<li><a href="../../CORL/Template/Environment.html">CORL::Template::Environment</a>
|
269
|
+
|
270
|
+
<li><a href="../../CORL/Util.html">CORL::Util</a>
|
271
|
+
|
272
|
+
<li><a href="../../CORL/Util/Puppet.html">CORL::Util::Puppet</a>
|
273
|
+
|
274
|
+
<li><a href="../../CORL/Util/Puppet/Resource.html">CORL::Util::Puppet::Resource</a>
|
275
|
+
|
276
|
+
<li><a href="../../CORL/Util/Puppet/ResourceGroup.html">CORL::Util::Puppet::ResourceGroup</a>
|
277
|
+
|
278
|
+
<li><a href="../../CORL/Vagrant.html">CORL::Vagrant</a>
|
279
|
+
|
280
|
+
<li><a href="../../CORL/Vagrant/Config.html">CORL::Vagrant::Config</a>
|
281
|
+
|
282
|
+
<li><a href="../../VagrantPlugins.html">VagrantPlugins</a>
|
283
|
+
|
284
|
+
<li><a href="../../VagrantPlugins/CORL.html">VagrantPlugins::CORL</a>
|
285
|
+
|
286
|
+
<li><a href="../../VagrantPlugins/CORL/Action.html">VagrantPlugins::CORL::Action</a>
|
287
|
+
|
288
|
+
<li><a href="../../VagrantPlugins/CORL/Action/DeleteCache.html">VagrantPlugins::CORL::Action::DeleteCache</a>
|
289
|
+
|
290
|
+
<li><a href="../../VagrantPlugins/CORL/Action/InitKeys.html">VagrantPlugins::CORL::Action::InitKeys</a>
|
291
|
+
|
292
|
+
<li><a href="../../VagrantPlugins/CORL/Action/LinkNetwork.html">VagrantPlugins::CORL::Action::LinkNetwork</a>
|
293
|
+
|
294
|
+
<li><a href="../../VagrantPlugins/CORL/BaseAction.html">VagrantPlugins::CORL::BaseAction</a>
|
295
|
+
|
296
|
+
<li><a href="../../VagrantPlugins/CORL/Command.html">VagrantPlugins::CORL::Command</a>
|
297
|
+
|
298
|
+
<li><a href="../../VagrantPlugins/CORL/Command/Launcher.html">VagrantPlugins::CORL::Command::Launcher</a>
|
299
|
+
|
300
|
+
<li><a href="../../VagrantPlugins/CORL/Config.html">VagrantPlugins::CORL::Config</a>
|
301
|
+
|
302
|
+
<li><a href="../../VagrantPlugins/CORL/Config/CORL.html">VagrantPlugins::CORL::Config::CORL</a>
|
303
|
+
|
304
|
+
<li><a href="../../VagrantPlugins/CORL/Plugin.html">VagrantPlugins::CORL::Plugin</a>
|
305
|
+
|
306
|
+
<li><a href="../../VagrantPlugins/CORL/Provisioner.html">VagrantPlugins::CORL::Provisioner</a>
|
307
|
+
|
308
|
+
<li><a href="../../VagrantPlugins/CORL/Provisioner/CORL.html">VagrantPlugins::CORL::Provisioner::CORL</a>
|
309
|
+
|
310
|
+
<li><a href="../../Nucleon.html">Nucleon</a>
|
311
|
+
|
312
|
+
<li><a href="../../Nucleon/Config.html">Nucleon::Config</a>
|
313
|
+
|
314
|
+
<li><a href="../../Nucleon/Plugin.html">Nucleon::Plugin</a>
|
315
|
+
|
316
|
+
<li><a href="../../Nucleon/Plugin/Base.html">Nucleon::Plugin::Base</a>
|
317
|
+
|
318
|
+
<li><a href="../../Nucleon/Plugin/Configuration.html">Nucleon::Plugin::Configuration</a>
|
319
|
+
|
320
|
+
<li><a href="../../Nucleon/Plugin/Machine.html">Nucleon::Plugin::Machine</a>
|
321
|
+
|
322
|
+
<li><a href="../../Nucleon/Plugin/Network.html">Nucleon::Plugin::Network</a>
|
323
|
+
|
324
|
+
<li><a href="../../Nucleon/Plugin/Node.html">Nucleon::Plugin::Node</a>
|
325
|
+
|
326
|
+
<li><a href="../../Nucleon/Plugin/Provisioner.html">Nucleon::Plugin::Provisioner</a>
|
327
|
+
|
328
|
+
<li><a href="../../Puppet.html">Puppet</a>
|
329
|
+
|
330
|
+
<li><a href="../../Puppet/DataBinding.html">Puppet::DataBinding</a>
|
331
|
+
|
332
|
+
<li><a href="../../Puppet/DataBinding/Corl.html">Puppet::DataBinding::Corl</a>
|
333
|
+
|
334
|
+
<li><a href="../../Puppet/Indirector.html">Puppet::Indirector</a>
|
335
|
+
|
336
|
+
<li><a href="../../Puppet/Indirector/Corl.html">Puppet::Indirector::Corl</a>
|
337
|
+
|
338
|
+
<li><a href="../../Puppet/Parser.html">Puppet::Parser</a>
|
339
|
+
|
340
|
+
<li><a href="../../Puppet/Parser/Functions.html">Puppet::Parser::Functions</a>
|
341
|
+
|
342
|
+
<li><a href="../../Fog.html">Fog</a>
|
343
|
+
|
344
|
+
<li><a href="../../Fog/Compute.html">Fog::Compute</a>
|
345
|
+
|
346
|
+
<li><a href="../../Fog/Compute/AWS.html">Fog::Compute::AWS</a>
|
347
|
+
|
348
|
+
<li><a href="../../Fog/Compute/AWS/Server.html">Fog::Compute::AWS::Server</a>
|
349
|
+
|
350
|
+
<li><a href="../../Fog/Compute/RackspaceV2.html">Fog::Compute::RackspaceV2</a>
|
351
|
+
|
352
|
+
<li><a href="../../Fog/Compute/RackspaceV2/Server.html">Fog::Compute::RackspaceV2::Server</a>
|
353
|
+
|
354
|
+
<li><a href="../../Vagrant.html">Vagrant</a>
|
355
|
+
|
356
|
+
<li><a href="../../Vagrant/Config.html">Vagrant::Config</a>
|
357
|
+
|
358
|
+
<li><a href="../../Vagrant/Config/Loader.html">Vagrant::Config::Loader</a>
|
359
|
+
|
360
|
+
<li><a href="../../Vagrant/Vagrantfile.html">Vagrant::Vagrantfile</a>
|
361
|
+
|
362
|
+
<li><a href="../../Facter.html">Facter</a>
|
363
|
+
|
364
|
+
<li><a href="../../Facter/Util.html">Facter::Util</a>
|
365
|
+
|
366
|
+
<li><a href="../../Facter/Util/Loader.html">Facter::Util::Loader</a>
|
367
|
+
|
368
|
+
<li><a href="../../Hiera.html">Hiera</a>
|
369
|
+
|
370
|
+
<li><a href="../../Hiera/Backend.html">Hiera::Backend</a>
|
371
|
+
|
372
|
+
<li><a href="../../Hiera/Corl_logger.html">Hiera::Corl_logger</a>
|
373
|
+
|
374
|
+
<li><a href="../../Object.html">Object</a>
|
375
|
+
|
376
|
+
</ul>
|
377
|
+
</nav>
|
378
|
+
|
379
|
+
</div>
|
380
|
+
</nav>
|
381
|
+
|
382
|
+
<div id="documentation">
|
383
|
+
<h1 class="class">class CORL::Machine::Vagrant</h1>
|
384
|
+
|
385
|
+
<div id="description" class="description">
|
386
|
+
|
387
|
+
</div><!-- description -->
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
<!-- Methods -->
|
402
|
+
|
403
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
404
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
405
|
+
|
406
|
+
|
407
|
+
<div id="method-i-command" class="method-detail ">
|
408
|
+
|
409
|
+
<div class="method-heading">
|
410
|
+
<span class="method-name">command</span><span
|
411
|
+
class="method-args">()</span>
|
412
|
+
<span class="method-click-advice">click to toggle source</span>
|
413
|
+
</div>
|
414
|
+
|
415
|
+
|
416
|
+
<div class="method-description">
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
<div class="method-source-code" id="command-source">
|
423
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 45</span>
|
424
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">command</span>
|
425
|
+
<span class="ruby-identifier">set_command</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@command</span>
|
426
|
+
<span class="ruby-ivar">@command</span>
|
427
|
+
<span class="ruby-keyword">end</span></pre>
|
428
|
+
</div><!-- command-source -->
|
429
|
+
|
430
|
+
</div>
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
</div><!-- command-method -->
|
436
|
+
|
437
|
+
|
438
|
+
<div id="method-i-create" class="method-detail ">
|
439
|
+
|
440
|
+
<div class="method-heading">
|
441
|
+
<span class="method-name">create</span><span
|
442
|
+
class="method-args">(options = {})</span>
|
443
|
+
<span class="method-click-advice">click to toggle source</span>
|
444
|
+
</div>
|
445
|
+
|
446
|
+
|
447
|
+
<div class="method-description">
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
<div class="method-source-code" id="create-source">
|
454
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 100</span>
|
455
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">create</span>(<span class="ruby-identifier">options</span> = {})
|
456
|
+
<span class="ruby-keyword">super</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span><span class="ruby-operator">|</span>
|
457
|
+
<span class="ruby-identifier">start_machine</span>(<span class="ruby-identifier">config</span>)
|
458
|
+
<span class="ruby-keyword">end</span>
|
459
|
+
<span class="ruby-keyword">end</span></pre>
|
460
|
+
</div><!-- create-source -->
|
461
|
+
|
462
|
+
</div>
|
463
|
+
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
</div><!-- create-method -->
|
468
|
+
|
469
|
+
|
470
|
+
<div id="method-i-create_image" class="method-detail ">
|
471
|
+
|
472
|
+
<div class="method-heading">
|
473
|
+
<span class="method-name">create_image</span><span
|
474
|
+
class="method-args">(options = {})</span>
|
475
|
+
<span class="method-click-advice">click to toggle source</span>
|
476
|
+
</div>
|
477
|
+
|
478
|
+
|
479
|
+
<div class="method-description">
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
<div class="method-source-code" id="create_image-source">
|
486
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 149</span>
|
487
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">create_image</span>(<span class="ruby-identifier">options</span> = {})
|
488
|
+
<span class="ruby-keyword">super</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span><span class="ruby-operator">|</span>
|
489
|
+
<span class="ruby-identifier">stop</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:stop</span>, <span class="ruby-keyword">false</span>)
|
490
|
+
|
491
|
+
<span class="ruby-comment"># TODO: Decide how to handle versions?? </span>
|
492
|
+
<span class="ruby-comment"># Timestamps stink since these things are huge (>600MB)</span>
|
493
|
+
<span class="ruby-identifier">box_name</span> = <span class="ruby-identifier">sprintf</span>(<span class="ruby-string">"%s"</span>, <span class="ruby-identifier">node</span>.<span class="ruby-identifier">id</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp">/\s+/</span>, <span class="ruby-string">'-'</span>)
|
494
|
+
<span class="ruby-identifier">box_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">node</span>.<span class="ruby-identifier">network</span>.<span class="ruby-identifier">directory</span>, <span class="ruby-string">'boxes'</span>, <span class="ruby-node">"#{box_name}.box"</span>)
|
495
|
+
<span class="ruby-identifier">box_url</span> = <span class="ruby-node">"file://#{box_path}"</span>
|
496
|
+
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">box_path</span>))
|
497
|
+
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_f</span>(<span class="ruby-identifier">box_path</span>)
|
498
|
+
|
499
|
+
<span class="ruby-keyword">begin</span>
|
500
|
+
<span class="ruby-identifier">close_ssh_session</span>
|
501
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-identifier">run</span>(<span class="ruby-value">:package</span>, <span class="ruby-identifier">config</span>.<span class="ruby-identifier">defaults</span>({ <span class="ruby-string">'package.output'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">box_path</span> }), <span class="ruby-keyword">false</span>)
|
502
|
+
|
503
|
+
<span class="ruby-identifier">node</span>.<span class="ruby-identifier">set_cache_setting</span>(<span class="ruby-value">:box</span>, <span class="ruby-identifier">box_name</span>)
|
504
|
+
<span class="ruby-identifier">node</span>.<span class="ruby-identifier">set_cache_setting</span>(<span class="ruby-value">:box_url</span>, <span class="ruby-identifier">box_url</span>)
|
505
|
+
|
506
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">success</span>
|
507
|
+
<span class="ruby-identifier">env</span>.<span class="ruby-identifier">action_runner</span>.<span class="ruby-identifier">run</span>(<span class="ruby-operator">::</span><span class="ruby-constant">Vagrant</span><span class="ruby-operator">::</span><span class="ruby-constant">Action</span>.<span class="ruby-identifier">action_box_add</span>, {
|
508
|
+
<span class="ruby-value">:box_name</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">box_name</span>,
|
509
|
+
<span class="ruby-value">:box_url</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">box_url</span>,
|
510
|
+
<span class="ruby-value">:box_clean</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">false</span>,
|
511
|
+
<span class="ruby-value">:box_force</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">true</span>,
|
512
|
+
<span class="ruby-value">:ui</span> =<span class="ruby-operator">></span> <span class="ruby-operator">::</span><span class="ruby-constant">Vagrant</span><span class="ruby-operator">::</span><span class="ruby-constant">UI</span><span class="ruby-operator">::</span><span class="ruby-constant">Prefixed</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">env</span>.<span class="ruby-identifier">ui</span>, <span class="ruby-string">"box"</span>)
|
513
|
+
})
|
514
|
+
<span class="ruby-identifier">load</span>
|
515
|
+
<span class="ruby-keyword">end</span>
|
516
|
+
|
517
|
+
<span class="ruby-keyword">rescue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">error</span>
|
518
|
+
<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span>(<span class="ruby-identifier">error</span>.<span class="ruby-identifier">message</span>)
|
519
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">false</span>
|
520
|
+
<span class="ruby-keyword">end</span>
|
521
|
+
|
522
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-identifier">run</span>(<span class="ruby-value">:up</span>, <span class="ruby-identifier">config</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">success</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span> <span class="ruby-identifier">stop</span>
|
523
|
+
<span class="ruby-identifier">success</span>
|
524
|
+
<span class="ruby-keyword">end</span>
|
525
|
+
<span class="ruby-keyword">end</span></pre>
|
526
|
+
</div><!-- create_image-source -->
|
527
|
+
|
528
|
+
</div>
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
</div><!-- create_image-method -->
|
534
|
+
|
535
|
+
|
536
|
+
<div id="method-i-created-3F" class="method-detail ">
|
537
|
+
|
538
|
+
<div class="method-heading">
|
539
|
+
<span class="method-name">created?</span><span
|
540
|
+
class="method-args">()</span>
|
541
|
+
<span class="method-click-advice">click to toggle source</span>
|
542
|
+
</div>
|
543
|
+
|
544
|
+
|
545
|
+
<div class="method-description">
|
546
|
+
|
547
|
+
|
548
|
+
|
549
|
+
|
550
|
+
|
551
|
+
<div class="method-source-code" id="created-3F-source">
|
552
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 15</span>
|
553
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">created?</span>
|
554
|
+
<span class="ruby-identifier">server</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">state</span> <span class="ruby-operator">!=</span> <span class="ruby-value">:not_created</span>
|
555
|
+
<span class="ruby-keyword">end</span></pre>
|
556
|
+
</div><!-- created-3F-source -->
|
557
|
+
|
558
|
+
</div>
|
559
|
+
|
560
|
+
|
561
|
+
|
562
|
+
|
563
|
+
</div><!-- created-3F-method -->
|
564
|
+
|
565
|
+
|
566
|
+
<div id="method-i-destroy" class="method-detail ">
|
567
|
+
|
568
|
+
<div class="method-heading">
|
569
|
+
<span class="method-name">destroy</span><span
|
570
|
+
class="method-args">(options = {})</span>
|
571
|
+
<span class="method-click-advice">click to toggle source</span>
|
572
|
+
</div>
|
573
|
+
|
574
|
+
|
575
|
+
<div class="method-description">
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
|
580
|
+
|
581
|
+
<div class="method-source-code" id="destroy-source">
|
582
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 207</span>
|
583
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">destroy</span>(<span class="ruby-identifier">options</span> = {})
|
584
|
+
<span class="ruby-keyword">super</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span><span class="ruby-operator">|</span>
|
585
|
+
<span class="ruby-comment"># We should handle prompting internally to keep it consistent</span>
|
586
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-identifier">run</span>(<span class="ruby-value">:destroy</span>, <span class="ruby-identifier">config</span>.<span class="ruby-identifier">defaults</span>({ <span class="ruby-value">:force_confirm_destroy</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">true</span> }))
|
587
|
+
|
588
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">success</span>
|
589
|
+
<span class="ruby-identifier">box_name</span> = <span class="ruby-identifier">sprintf</span>(<span class="ruby-string">"%s"</span>, <span class="ruby-identifier">node</span>.<span class="ruby-identifier">id</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp">/\s+/</span>, <span class="ruby-string">'-'</span>)
|
590
|
+
<span class="ruby-identifier">found</span> = <span class="ruby-keyword">false</span>
|
591
|
+
|
592
|
+
<span class="ruby-comment"># TODO: Figure out box versions.</span>
|
593
|
+
|
594
|
+
<span class="ruby-identifier">env</span>.<span class="ruby-identifier">boxes</span>.<span class="ruby-identifier">all</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">info</span><span class="ruby-operator">|</span>
|
595
|
+
<span class="ruby-identifier">registered_box_name</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value">0</span>]
|
596
|
+
<span class="ruby-identifier">registered_box_version</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value">1</span>]
|
597
|
+
<span class="ruby-identifier">registered_box_provider</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value">2</span>]
|
598
|
+
|
599
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">box_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">registered_box_name</span>
|
600
|
+
<span class="ruby-identifier">found</span> = <span class="ruby-keyword">true</span>
|
601
|
+
<span class="ruby-keyword">break</span>
|
602
|
+
<span class="ruby-keyword">end</span>
|
603
|
+
<span class="ruby-keyword">end</span>
|
604
|
+
|
605
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">found</span>
|
606
|
+
<span class="ruby-identifier">env</span>.<span class="ruby-identifier">action_runner</span>.<span class="ruby-identifier">run</span>(<span class="ruby-operator">::</span><span class="ruby-constant">Vagrant</span><span class="ruby-operator">::</span><span class="ruby-constant">Action</span>.<span class="ruby-identifier">action_box_remove</span>, {
|
607
|
+
<span class="ruby-value">:box_name</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">box_name</span>,
|
608
|
+
<span class="ruby-value">:box_provider</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">machine_type</span>
|
609
|
+
})
|
610
|
+
|
611
|
+
<span class="ruby-identifier">box_name</span> = <span class="ruby-identifier">sprintf</span>(<span class="ruby-string">"%s"</span>, <span class="ruby-identifier">node</span>.<span class="ruby-identifier">id</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp">/\s+/</span>, <span class="ruby-string">'-'</span>)
|
612
|
+
<span class="ruby-identifier">box_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">node</span>.<span class="ruby-identifier">network</span>.<span class="ruby-identifier">directory</span>, <span class="ruby-string">'boxes'</span>, <span class="ruby-node">"#{box_name}.box"</span>)
|
613
|
+
<span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Disk</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">box_path</span>)
|
614
|
+
<span class="ruby-keyword">end</span>
|
615
|
+
<span class="ruby-keyword">end</span>
|
616
|
+
<span class="ruby-identifier">close_ssh_session</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">success</span>
|
617
|
+
<span class="ruby-identifier">success</span>
|
618
|
+
<span class="ruby-keyword">end</span>
|
619
|
+
<span class="ruby-keyword">end</span></pre>
|
620
|
+
</div><!-- destroy-source -->
|
621
|
+
|
622
|
+
</div>
|
623
|
+
|
624
|
+
|
625
|
+
|
626
|
+
|
627
|
+
</div><!-- destroy-method -->
|
628
|
+
|
629
|
+
|
630
|
+
<div id="method-i-download" class="method-detail ">
|
631
|
+
|
632
|
+
<div class="method-heading">
|
633
|
+
<span class="method-name">download</span><span
|
634
|
+
class="method-args">(remote_path, local_path, options = {}, &code)</span>
|
635
|
+
<span class="method-click-advice">click to toggle source</span>
|
636
|
+
</div>
|
637
|
+
|
638
|
+
|
639
|
+
<div class="method-description">
|
640
|
+
|
641
|
+
|
642
|
+
|
643
|
+
|
644
|
+
|
645
|
+
<div class="method-source-code" id="download-source">
|
646
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 108</span>
|
647
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">download</span>(<span class="ruby-identifier">remote_path</span>, <span class="ruby-identifier">local_path</span>, <span class="ruby-identifier">options</span> = {}, &<span class="ruby-identifier">code</span>)
|
648
|
+
<span class="ruby-keyword">super</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span>, <span class="ruby-identifier">success</span><span class="ruby-operator">|</span>
|
649
|
+
<span class="ruby-identifier">ssh_download</span>(<span class="ruby-identifier">remote_path</span>, <span class="ruby-identifier">local_path</span>, <span class="ruby-identifier">config</span>, &<span class="ruby-identifier">code</span>)
|
650
|
+
<span class="ruby-keyword">end</span>
|
651
|
+
<span class="ruby-keyword">end</span></pre>
|
652
|
+
</div><!-- download-source -->
|
653
|
+
|
654
|
+
</div>
|
655
|
+
|
656
|
+
|
657
|
+
|
658
|
+
|
659
|
+
</div><!-- download-method -->
|
660
|
+
|
661
|
+
|
662
|
+
<div id="method-i-env" class="method-detail ">
|
663
|
+
|
664
|
+
<div class="method-heading">
|
665
|
+
<span class="method-name">env</span><span
|
666
|
+
class="method-args">()</span>
|
667
|
+
<span class="method-click-advice">click to toggle source</span>
|
668
|
+
</div>
|
669
|
+
|
670
|
+
|
671
|
+
<div class="method-description">
|
672
|
+
|
673
|
+
|
674
|
+
|
675
|
+
|
676
|
+
|
677
|
+
<div class="method-source-code" id="env-source">
|
678
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 52</span>
|
679
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">env</span>
|
680
|
+
<span class="ruby-keyword">return</span> <span class="ruby-identifier">command</span>.<span class="ruby-identifier">env</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">command</span>
|
681
|
+
<span class="ruby-keyword">nil</span>
|
682
|
+
<span class="ruby-keyword">end</span></pre>
|
683
|
+
</div><!-- env-source -->
|
684
|
+
|
685
|
+
</div>
|
686
|
+
|
687
|
+
|
688
|
+
|
689
|
+
|
690
|
+
</div><!-- env-method -->
|
691
|
+
|
692
|
+
|
693
|
+
<div id="method-i-exec" class="method-detail ">
|
694
|
+
|
695
|
+
<div class="method-heading">
|
696
|
+
<span class="method-name">exec</span><span
|
697
|
+
class="method-args">(commands, options = {}, &code)</span>
|
698
|
+
<span class="method-click-advice">click to toggle source</span>
|
699
|
+
</div>
|
700
|
+
|
701
|
+
|
702
|
+
<div class="method-description">
|
703
|
+
|
704
|
+
|
705
|
+
|
706
|
+
|
707
|
+
|
708
|
+
<div class="method-source-code" id="exec-source">
|
709
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 124</span>
|
710
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">exec</span>(<span class="ruby-identifier">commands</span>, <span class="ruby-identifier">options</span> = {}, &<span class="ruby-identifier">code</span>)
|
711
|
+
<span class="ruby-keyword">super</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span><span class="ruby-operator">|</span>
|
712
|
+
<span class="ruby-identifier">ssh_exec</span>(<span class="ruby-identifier">commands</span>, <span class="ruby-identifier">config</span>, &<span class="ruby-identifier">code</span>)
|
713
|
+
<span class="ruby-keyword">end</span>
|
714
|
+
<span class="ruby-keyword">end</span></pre>
|
715
|
+
</div><!-- exec-source -->
|
716
|
+
|
717
|
+
</div>
|
718
|
+
|
719
|
+
|
720
|
+
|
721
|
+
|
722
|
+
</div><!-- exec-method -->
|
723
|
+
|
724
|
+
|
725
|
+
<div id="method-i-load" class="method-detail ">
|
726
|
+
|
727
|
+
<div class="method-heading">
|
728
|
+
<span class="method-name">load</span><span
|
729
|
+
class="method-args">()</span>
|
730
|
+
<span class="method-click-advice">click to toggle source</span>
|
731
|
+
</div>
|
732
|
+
|
733
|
+
|
734
|
+
<div class="method-description">
|
735
|
+
|
736
|
+
|
737
|
+
|
738
|
+
|
739
|
+
|
740
|
+
<div class="method-source-code" id="load-source">
|
741
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 91</span>
|
742
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">load</span>
|
743
|
+
<span class="ruby-keyword">super</span> <span class="ruby-keyword">do</span>
|
744
|
+
<span class="ruby-identifier">myself</span>.<span class="ruby-identifier">server</span> = <span class="ruby-identifier">plugin_name</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">command</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">plugin_name</span>
|
745
|
+
<span class="ruby-operator">!</span> <span class="ruby-identifier">plugin_name</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@server</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">?</span> <span class="ruby-keyword">false</span> <span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>
|
746
|
+
<span class="ruby-keyword">end</span>
|
747
|
+
<span class="ruby-keyword">end</span></pre>
|
748
|
+
</div><!-- load-source -->
|
749
|
+
|
750
|
+
</div>
|
751
|
+
|
752
|
+
|
753
|
+
|
754
|
+
|
755
|
+
</div><!-- load-method -->
|
756
|
+
|
757
|
+
|
758
|
+
<div id="method-i-machine_types" class="method-detail ">
|
759
|
+
|
760
|
+
<div class="method-heading">
|
761
|
+
<span class="method-name">machine_types</span><span
|
762
|
+
class="method-args">()</span>
|
763
|
+
<span class="method-click-advice">click to toggle source</span>
|
764
|
+
</div>
|
765
|
+
|
766
|
+
|
767
|
+
<div class="method-description">
|
768
|
+
|
769
|
+
|
770
|
+
|
771
|
+
|
772
|
+
|
773
|
+
<div class="method-source-code" id="machine_types-source">
|
774
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 84</span>
|
775
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">machine_types</span>
|
776
|
+
[ <span class="ruby-value">:virtualbox</span>, <span class="ruby-value">:vmware_fusion</span>, <span class="ruby-value">:hyperv</span> ]
|
777
|
+
<span class="ruby-keyword">end</span></pre>
|
778
|
+
</div><!-- machine_types-source -->
|
779
|
+
|
780
|
+
</div>
|
781
|
+
|
782
|
+
|
783
|
+
|
784
|
+
|
785
|
+
</div><!-- machine_types-method -->
|
786
|
+
|
787
|
+
|
788
|
+
<div id="method-i-reload" class="method-detail ">
|
789
|
+
|
790
|
+
<div class="method-heading">
|
791
|
+
<span class="method-name">reload</span><span
|
792
|
+
class="method-args">(options = {})</span>
|
793
|
+
<span class="method-click-advice">click to toggle source</span>
|
794
|
+
</div>
|
795
|
+
|
796
|
+
|
797
|
+
<div class="method-description">
|
798
|
+
|
799
|
+
|
800
|
+
|
801
|
+
|
802
|
+
|
803
|
+
<div class="method-source-code" id="reload-source">
|
804
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 140</span>
|
805
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">reload</span>(<span class="ruby-identifier">options</span> = {})
|
806
|
+
<span class="ruby-keyword">super</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span><span class="ruby-operator">|</span>
|
807
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-identifier">run</span>(<span class="ruby-value">:reload</span>, <span class="ruby-identifier">config</span>)
|
808
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-identifier">init_ssh_session</span>(<span class="ruby-keyword">true</span>, <span class="ruby-identifier">config</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value">:tries</span>, <span class="ruby-value">5</span>), <span class="ruby-identifier">config</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value">:sleep_time</span>, <span class="ruby-value">5</span>)) <span class="ruby-keyword">if</span> <span class="ruby-identifier">success</span>
|
809
|
+
<span class="ruby-keyword">end</span>
|
810
|
+
<span class="ruby-keyword">end</span></pre>
|
811
|
+
</div><!-- reload-source -->
|
812
|
+
|
813
|
+
</div>
|
814
|
+
|
815
|
+
|
816
|
+
|
817
|
+
|
818
|
+
</div><!-- reload-method -->
|
819
|
+
|
820
|
+
|
821
|
+
<div id="method-i-running-3F" class="method-detail ">
|
822
|
+
|
823
|
+
<div class="method-heading">
|
824
|
+
<span class="method-name">running?</span><span
|
825
|
+
class="method-args">()</span>
|
826
|
+
<span class="method-click-advice">click to toggle source</span>
|
827
|
+
</div>
|
828
|
+
|
829
|
+
|
830
|
+
<div class="method-description">
|
831
|
+
|
832
|
+
|
833
|
+
|
834
|
+
|
835
|
+
|
836
|
+
<div class="method-source-code" id="running-3F-source">
|
837
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 21</span>
|
838
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">running?</span>
|
839
|
+
<span class="ruby-identifier">server</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">state</span> <span class="ruby-operator">==</span> <span class="ruby-value">:running</span>
|
840
|
+
<span class="ruby-keyword">end</span></pre>
|
841
|
+
</div><!-- running-3F-source -->
|
842
|
+
|
843
|
+
</div>
|
844
|
+
|
845
|
+
|
846
|
+
|
847
|
+
|
848
|
+
</div><!-- running-3F-method -->
|
849
|
+
|
850
|
+
|
851
|
+
<div id="method-i-server" class="method-detail ">
|
852
|
+
|
853
|
+
<div class="method-heading">
|
854
|
+
<span class="method-name">server</span><span
|
855
|
+
class="method-args">()</span>
|
856
|
+
<span class="method-click-advice">click to toggle source</span>
|
857
|
+
</div>
|
858
|
+
|
859
|
+
|
860
|
+
<div class="method-description">
|
861
|
+
|
862
|
+
|
863
|
+
|
864
|
+
|
865
|
+
|
866
|
+
<div class="method-source-code" id="server-source">
|
867
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 69</span>
|
868
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">server</span>
|
869
|
+
<span class="ruby-identifier">command</span>
|
870
|
+
<span class="ruby-identifier">load</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@server</span>
|
871
|
+
<span class="ruby-ivar">@server</span>
|
872
|
+
<span class="ruby-keyword">end</span></pre>
|
873
|
+
</div><!-- server-source -->
|
874
|
+
|
875
|
+
</div>
|
876
|
+
|
877
|
+
|
878
|
+
|
879
|
+
|
880
|
+
</div><!-- server-method -->
|
881
|
+
|
882
|
+
|
883
|
+
<div id="method-i-server-3D" class="method-detail ">
|
884
|
+
|
885
|
+
<div class="method-heading">
|
886
|
+
<span class="method-name">server=</span><span
|
887
|
+
class="method-args">(id)</span>
|
888
|
+
<span class="method-click-advice">click to toggle source</span>
|
889
|
+
</div>
|
890
|
+
|
891
|
+
|
892
|
+
<div class="method-description">
|
893
|
+
|
894
|
+
|
895
|
+
|
896
|
+
|
897
|
+
|
898
|
+
<div class="method-source-code" id="server-3D-source">
|
899
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 59</span>
|
900
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">server=</span><span class="ruby-identifier">id</span>
|
901
|
+
<span class="ruby-ivar">@server</span> = <span class="ruby-keyword">nil</span>
|
902
|
+
|
903
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">id</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
|
904
|
+
<span class="ruby-ivar">@server</span> = <span class="ruby-identifier">new_machine</span>(<span class="ruby-identifier">id</span>)
|
905
|
+
<span class="ruby-keyword">elsif</span> <span class="ruby-operator">!</span> <span class="ruby-identifier">id</span>.<span class="ruby-identifier">nil?</span>
|
906
|
+
<span class="ruby-ivar">@server</span> = <span class="ruby-identifier">id</span>
|
907
|
+
<span class="ruby-keyword">end</span>
|
908
|
+
<span class="ruby-keyword">end</span></pre>
|
909
|
+
</div><!-- server-3D-source -->
|
910
|
+
|
911
|
+
</div>
|
912
|
+
|
913
|
+
|
914
|
+
|
915
|
+
|
916
|
+
</div><!-- server-3D-method -->
|
917
|
+
|
918
|
+
|
919
|
+
<div id="method-i-start" class="method-detail ">
|
920
|
+
|
921
|
+
<div class="method-heading">
|
922
|
+
<span class="method-name">start</span><span
|
923
|
+
class="method-args">(options = {})</span>
|
924
|
+
<span class="method-click-advice">click to toggle source</span>
|
925
|
+
</div>
|
926
|
+
|
927
|
+
|
928
|
+
<div class="method-description">
|
929
|
+
|
930
|
+
|
931
|
+
|
932
|
+
|
933
|
+
|
934
|
+
<div class="method-source-code" id="start-source">
|
935
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 199</span>
|
936
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">start</span>(<span class="ruby-identifier">options</span> = {})
|
937
|
+
<span class="ruby-keyword">super</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span><span class="ruby-operator">|</span>
|
938
|
+
<span class="ruby-identifier">start_machine</span>(<span class="ruby-identifier">config</span>)
|
939
|
+
<span class="ruby-keyword">end</span>
|
940
|
+
<span class="ruby-keyword">end</span></pre>
|
941
|
+
</div><!-- start-source -->
|
942
|
+
|
943
|
+
</div>
|
944
|
+
|
945
|
+
|
946
|
+
|
947
|
+
|
948
|
+
</div><!-- start-method -->
|
949
|
+
|
950
|
+
|
951
|
+
<div id="method-i-state" class="method-detail ">
|
952
|
+
|
953
|
+
<div class="method-heading">
|
954
|
+
<span class="method-name">state</span><span
|
955
|
+
class="method-args">()</span>
|
956
|
+
<span class="method-click-advice">click to toggle source</span>
|
957
|
+
</div>
|
958
|
+
|
959
|
+
|
960
|
+
<div class="method-description">
|
961
|
+
|
962
|
+
|
963
|
+
|
964
|
+
|
965
|
+
|
966
|
+
<div class="method-source-code" id="state-source">
|
967
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 77</span>
|
968
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">state</span>
|
969
|
+
<span class="ruby-keyword">return</span> <span class="ruby-identifier">server</span>.<span class="ruby-identifier">state</span>.<span class="ruby-identifier">id</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">server</span>
|
970
|
+
<span class="ruby-value">:not_loaded</span>
|
971
|
+
<span class="ruby-keyword">end</span></pre>
|
972
|
+
</div><!-- state-source -->
|
973
|
+
|
974
|
+
</div>
|
975
|
+
|
976
|
+
|
977
|
+
|
978
|
+
|
979
|
+
</div><!-- state-method -->
|
980
|
+
|
981
|
+
|
982
|
+
<div id="method-i-stop" class="method-detail ">
|
983
|
+
|
984
|
+
<div class="method-heading">
|
985
|
+
<span class="method-name">stop</span><span
|
986
|
+
class="method-args">(options = {})</span>
|
987
|
+
<span class="method-click-advice">click to toggle source</span>
|
988
|
+
</div>
|
989
|
+
|
990
|
+
|
991
|
+
<div class="method-description">
|
992
|
+
|
993
|
+
|
994
|
+
|
995
|
+
|
996
|
+
|
997
|
+
<div class="method-source-code" id="stop-source">
|
998
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 191</span>
|
999
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">stop</span>(<span class="ruby-identifier">options</span> = {})
|
1000
|
+
<span class="ruby-keyword">super</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span><span class="ruby-operator">|</span>
|
1001
|
+
<span class="ruby-identifier">create_image</span>(<span class="ruby-identifier">config</span>.<span class="ruby-identifier">import</span>({ <span class="ruby-value">:stop</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">true</span> }))
|
1002
|
+
<span class="ruby-keyword">end</span>
|
1003
|
+
<span class="ruby-keyword">end</span></pre>
|
1004
|
+
</div><!-- stop-source -->
|
1005
|
+
|
1006
|
+
</div>
|
1007
|
+
|
1008
|
+
|
1009
|
+
|
1010
|
+
|
1011
|
+
</div><!-- stop-method -->
|
1012
|
+
|
1013
|
+
|
1014
|
+
<div id="method-i-terminal" class="method-detail ">
|
1015
|
+
|
1016
|
+
<div class="method-heading">
|
1017
|
+
<span class="method-name">terminal</span><span
|
1018
|
+
class="method-args">(user, options = {})</span>
|
1019
|
+
<span class="method-click-advice">click to toggle source</span>
|
1020
|
+
</div>
|
1021
|
+
|
1022
|
+
|
1023
|
+
<div class="method-description">
|
1024
|
+
|
1025
|
+
|
1026
|
+
|
1027
|
+
|
1028
|
+
|
1029
|
+
<div class="method-source-code" id="terminal-source">
|
1030
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 132</span>
|
1031
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">terminal</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">options</span> = {})
|
1032
|
+
<span class="ruby-keyword">super</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span><span class="ruby-operator">|</span>
|
1033
|
+
<span class="ruby-identifier">ssh_terminal</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">config</span>)
|
1034
|
+
<span class="ruby-keyword">end</span>
|
1035
|
+
<span class="ruby-keyword">end</span></pre>
|
1036
|
+
</div><!-- terminal-source -->
|
1037
|
+
|
1038
|
+
</div>
|
1039
|
+
|
1040
|
+
|
1041
|
+
|
1042
|
+
|
1043
|
+
</div><!-- terminal-method -->
|
1044
|
+
|
1045
|
+
|
1046
|
+
<div id="method-i-upload" class="method-detail ">
|
1047
|
+
|
1048
|
+
<div class="method-heading">
|
1049
|
+
<span class="method-name">upload</span><span
|
1050
|
+
class="method-args">(local_path, remote_path, options = {}, &code)</span>
|
1051
|
+
<span class="method-click-advice">click to toggle source</span>
|
1052
|
+
</div>
|
1053
|
+
|
1054
|
+
|
1055
|
+
<div class="method-description">
|
1056
|
+
|
1057
|
+
|
1058
|
+
|
1059
|
+
|
1060
|
+
|
1061
|
+
<div class="method-source-code" id="upload-source">
|
1062
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 116</span>
|
1063
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">upload</span>(<span class="ruby-identifier">local_path</span>, <span class="ruby-identifier">remote_path</span>, <span class="ruby-identifier">options</span> = {}, &<span class="ruby-identifier">code</span>)
|
1064
|
+
<span class="ruby-keyword">super</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span>, <span class="ruby-identifier">success</span><span class="ruby-operator">|</span>
|
1065
|
+
<span class="ruby-identifier">ssh_upload</span>(<span class="ruby-identifier">local_path</span>, <span class="ruby-identifier">remote_path</span>, <span class="ruby-identifier">config</span>, &<span class="ruby-identifier">code</span>)
|
1066
|
+
<span class="ruby-keyword">end</span>
|
1067
|
+
<span class="ruby-keyword">end</span></pre>
|
1068
|
+
</div><!-- upload-source -->
|
1069
|
+
|
1070
|
+
</div>
|
1071
|
+
|
1072
|
+
|
1073
|
+
|
1074
|
+
|
1075
|
+
</div><!-- upload-method -->
|
1076
|
+
|
1077
|
+
|
1078
|
+
</section><!-- public-instance-method-details -->
|
1079
|
+
|
1080
|
+
<section id="protected-instance-5Buntitled-5D-method-details" class="method-section section">
|
1081
|
+
<h3 class="section-header">Protected Instance Methods</h3>
|
1082
|
+
|
1083
|
+
|
1084
|
+
<div id="method-i-new_machine" class="method-detail ">
|
1085
|
+
|
1086
|
+
<div class="method-heading">
|
1087
|
+
<span class="method-name">new_machine</span><span
|
1088
|
+
class="method-args">(id)</span>
|
1089
|
+
<span class="method-click-advice">click to toggle source</span>
|
1090
|
+
</div>
|
1091
|
+
|
1092
|
+
|
1093
|
+
<div class="method-description">
|
1094
|
+
|
1095
|
+
|
1096
|
+
|
1097
|
+
|
1098
|
+
|
1099
|
+
<div class="method-source-code" id="new_machine-source">
|
1100
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 264</span>
|
1101
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">new_machine</span>(<span class="ruby-identifier">id</span>)
|
1102
|
+
<span class="ruby-identifier">server</span> = <span class="ruby-keyword">nil</span>
|
1103
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">command</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span> <span class="ruby-identifier">id</span>.<span class="ruby-identifier">empty?</span>
|
1104
|
+
<span class="ruby-identifier">refresh_config</span>
|
1105
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">env</span>.<span class="ruby-identifier">vagrantfile</span>.<span class="ruby-identifier">machine_names</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_sym</span>)
|
1106
|
+
<span class="ruby-identifier">server</span> = <span class="ruby-identifier">command</span>.<span class="ruby-identifier">vm_machine</span>(<span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">node</span>.<span class="ruby-identifier">machine_type</span>, <span class="ruby-keyword">true</span>)
|
1107
|
+
<span class="ruby-keyword">end</span>
|
1108
|
+
<span class="ruby-keyword">end</span>
|
1109
|
+
<span class="ruby-identifier">server</span>
|
1110
|
+
<span class="ruby-keyword">end</span></pre>
|
1111
|
+
</div><!-- new_machine-source -->
|
1112
|
+
|
1113
|
+
</div>
|
1114
|
+
|
1115
|
+
|
1116
|
+
|
1117
|
+
|
1118
|
+
</div><!-- new_machine-method -->
|
1119
|
+
|
1120
|
+
|
1121
|
+
<div id="method-i-refresh_config" class="method-detail ">
|
1122
|
+
|
1123
|
+
<div class="method-heading">
|
1124
|
+
<span class="method-name">refresh_config</span><span
|
1125
|
+
class="method-args">()</span>
|
1126
|
+
<span class="method-click-advice">click to toggle source</span>
|
1127
|
+
</div>
|
1128
|
+
|
1129
|
+
|
1130
|
+
<div class="method-description">
|
1131
|
+
|
1132
|
+
|
1133
|
+
|
1134
|
+
|
1135
|
+
|
1136
|
+
<div class="method-source-code" id="refresh_config-source">
|
1137
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 248</span>
|
1138
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">refresh_config</span>
|
1139
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">env</span>
|
1140
|
+
<span class="ruby-identifier">@@lock</span>.<span class="ruby-identifier">synchronize</span> <span class="ruby-keyword">do</span>
|
1141
|
+
<span class="ruby-keyword">begin</span>
|
1142
|
+
<span class="ruby-constant">CORL</span><span class="ruby-operator">::</span><span class="ruby-constant">Vagrant</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>.<span class="ruby-identifier">network</span> = <span class="ruby-identifier">node</span>.<span class="ruby-identifier">network</span>
|
1143
|
+
<span class="ruby-identifier">env</span>.<span class="ruby-identifier">vagrantfile</span>.<span class="ruby-identifier">reload</span>
|
1144
|
+
<span class="ruby-keyword">ensure</span>
|
1145
|
+
<span class="ruby-constant">CORL</span><span class="ruby-operator">::</span><span class="ruby-constant">Vagrant</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>.<span class="ruby-identifier">network</span> = <span class="ruby-keyword">nil</span>
|
1146
|
+
<span class="ruby-keyword">end</span>
|
1147
|
+
<span class="ruby-keyword">end</span>
|
1148
|
+
<span class="ruby-keyword">end</span>
|
1149
|
+
<span class="ruby-keyword">end</span></pre>
|
1150
|
+
</div><!-- refresh_config-source -->
|
1151
|
+
|
1152
|
+
</div>
|
1153
|
+
|
1154
|
+
|
1155
|
+
|
1156
|
+
|
1157
|
+
</div><!-- refresh_config-method -->
|
1158
|
+
|
1159
|
+
|
1160
|
+
<div id="method-i-run" class="method-detail ">
|
1161
|
+
|
1162
|
+
<div class="method-heading">
|
1163
|
+
<span class="method-name">run</span><span
|
1164
|
+
class="method-args">(action, options = {}, symbolize_keys = true)</span>
|
1165
|
+
<span class="method-click-advice">click to toggle source</span>
|
1166
|
+
</div>
|
1167
|
+
|
1168
|
+
|
1169
|
+
<div class="method-description">
|
1170
|
+
|
1171
|
+
|
1172
|
+
|
1173
|
+
|
1174
|
+
|
1175
|
+
<div class="method-source-code" id="run-source">
|
1176
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 295</span>
|
1177
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">run</span>(<span class="ruby-identifier">action</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">symbolize_keys</span> = <span class="ruby-keyword">true</span>)
|
1178
|
+
<span class="ruby-identifier">config</span> = <span class="ruby-constant">Config</span>.<span class="ruby-identifier">ensure</span>(<span class="ruby-identifier">options</span>)
|
1179
|
+
|
1180
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">server</span>
|
1181
|
+
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Running Vagrant action #{action} on machine #{node.id}"</span>)
|
1182
|
+
|
1183
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">true</span>
|
1184
|
+
<span class="ruby-keyword">begin</span>
|
1185
|
+
<span class="ruby-identifier">params</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">export</span>
|
1186
|
+
<span class="ruby-identifier">params</span> = <span class="ruby-identifier">string_map</span>(<span class="ruby-identifier">params</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">symbolize_keys</span>
|
1187
|
+
|
1188
|
+
<span class="ruby-identifier">server</span>.<span class="ruby-identifier">send</span>(<span class="ruby-value">:action</span>, <span class="ruby-identifier">action</span>.<span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">params</span>)
|
1189
|
+
|
1190
|
+
<span class="ruby-keyword">rescue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">error</span>
|
1191
|
+
<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span>(<span class="ruby-identifier">error</span>)
|
1192
|
+
<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span>(<span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">to_yaml</span>(<span class="ruby-identifier">error</span>.<span class="ruby-identifier">backtrace</span>))
|
1193
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">false</span>
|
1194
|
+
<span class="ruby-keyword">end</span>
|
1195
|
+
<span class="ruby-keyword">end</span>
|
1196
|
+
<span class="ruby-identifier">success</span>
|
1197
|
+
<span class="ruby-keyword">end</span></pre>
|
1198
|
+
</div><!-- run-source -->
|
1199
|
+
|
1200
|
+
</div>
|
1201
|
+
|
1202
|
+
|
1203
|
+
|
1204
|
+
|
1205
|
+
</div><!-- run-method -->
|
1206
|
+
|
1207
|
+
|
1208
|
+
<div id="method-i-set_command" class="method-detail ">
|
1209
|
+
|
1210
|
+
<div class="method-heading">
|
1211
|
+
<span class="method-name">set_command</span><span
|
1212
|
+
class="method-args">()</span>
|
1213
|
+
<span class="method-click-advice">click to toggle source</span>
|
1214
|
+
</div>
|
1215
|
+
|
1216
|
+
|
1217
|
+
<div class="method-description">
|
1218
|
+
|
1219
|
+
|
1220
|
+
|
1221
|
+
|
1222
|
+
|
1223
|
+
<div class="method-source-code" id="set_command-source">
|
1224
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 28</span>
|
1225
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">set_command</span>
|
1226
|
+
<span class="ruby-ivar">@command</span> = <span class="ruby-keyword">nil</span>
|
1227
|
+
|
1228
|
+
<span class="ruby-keyword">begin</span>
|
1229
|
+
<span class="ruby-comment"># Ensure we are running within Vagrant from the corl base command</span>
|
1230
|
+
<span class="ruby-identifier">require</span> <span class="ruby-string">'vagrant'</span>
|
1231
|
+
|
1232
|
+
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-string">"Setting up Vagrant for machine"</span>)
|
1233
|
+
<span class="ruby-ivar">@command</span> = <span class="ruby-constant">CORL</span><span class="ruby-operator">::</span><span class="ruby-constant">Vagrant</span>.<span class="ruby-identifier">command</span>
|
1234
|
+
|
1235
|
+
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">LoadError</span>
|
1236
|
+
<span class="ruby-keyword">end</span>
|
1237
|
+
<span class="ruby-keyword">end</span></pre>
|
1238
|
+
</div><!-- set_command-source -->
|
1239
|
+
|
1240
|
+
</div>
|
1241
|
+
|
1242
|
+
|
1243
|
+
|
1244
|
+
|
1245
|
+
</div><!-- set_command-method -->
|
1246
|
+
|
1247
|
+
|
1248
|
+
<div id="method-i-start_machine" class="method-detail ">
|
1249
|
+
|
1250
|
+
<div class="method-heading">
|
1251
|
+
<span class="method-name">start_machine</span><span
|
1252
|
+
class="method-args">(options)</span>
|
1253
|
+
<span class="method-click-advice">click to toggle source</span>
|
1254
|
+
</div>
|
1255
|
+
|
1256
|
+
|
1257
|
+
<div class="method-description">
|
1258
|
+
|
1259
|
+
|
1260
|
+
|
1261
|
+
|
1262
|
+
|
1263
|
+
<div class="method-source-code" id="start_machine-source">
|
1264
|
+
<pre><span class="ruby-comment"># File lib/CORL/machine/vagrant.rb, line 278</span>
|
1265
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">start_machine</span>(<span class="ruby-identifier">options</span>)
|
1266
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">false</span>
|
1267
|
+
|
1268
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">server</span>
|
1269
|
+
<span class="ruby-identifier">load</span>
|
1270
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-identifier">run</span>(<span class="ruby-value">:up</span>, <span class="ruby-identifier">options</span>)
|
1271
|
+
|
1272
|
+
<span class="ruby-comment"># Make sure provisioner changes (key changes) are accounted for</span>
|
1273
|
+
<span class="ruby-comment"># TODO: Is there a better way?</span>
|
1274
|
+
<span class="ruby-identifier">load</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">success</span>
|
1275
|
+
<span class="ruby-keyword">end</span>
|
1276
|
+
<span class="ruby-identifier">success</span>
|
1277
|
+
<span class="ruby-keyword">end</span></pre>
|
1278
|
+
</div><!-- start_machine-source -->
|
1279
|
+
|
1280
|
+
</div>
|
1281
|
+
|
1282
|
+
|
1283
|
+
|
1284
|
+
|
1285
|
+
</div><!-- start_machine-method -->
|
1286
|
+
|
1287
|
+
|
1288
|
+
</section><!-- protected-instance-method-details -->
|
1289
|
+
|
1290
|
+
</section><!-- 5Buntitled-5D -->
|
1291
|
+
|
1292
|
+
</div><!-- documentation -->
|
1293
|
+
|
1294
|
+
|
1295
|
+
<footer id="validator-badges">
|
1296
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
1297
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.2.
|
1298
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
1299
|
+
</footer>
|
1300
|
+
|