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,896 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>module CORL::Vagrant::Config - 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="module">
|
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/core/vagrant/config.rb
|
51
|
+
</ul>
|
52
|
+
</nav>
|
53
|
+
|
54
|
+
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<div id="class-metadata">
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
<!-- Method Quickref -->
|
62
|
+
<nav id="method-list-section" class="section">
|
63
|
+
<h3 class="section-header">Methods</h3>
|
64
|
+
|
65
|
+
<ul class="link-list">
|
66
|
+
|
67
|
+
<li><a href="#method-c-configure_provisioner">::configure_provisioner</a>
|
68
|
+
|
69
|
+
<li><a href="#method-c-configure_shares">::configure_shares</a>
|
70
|
+
|
71
|
+
<li><a href="#method-c-configure_ssh">::configure_ssh</a>
|
72
|
+
|
73
|
+
<li><a href="#method-c-configure_vagrant">::configure_vagrant</a>
|
74
|
+
|
75
|
+
<li><a href="#method-c-configure_vm">::configure_vm</a>
|
76
|
+
|
77
|
+
<li><a href="#method-c-load_network">::load_network</a>
|
78
|
+
|
79
|
+
<li><a href="#method-c-network">::network</a>
|
80
|
+
|
81
|
+
<li><a href="#method-c-network-3D">::network=</a>
|
82
|
+
|
83
|
+
<li><a href="#method-c-parse_params">::parse_params</a>
|
84
|
+
|
85
|
+
<li><a href="#method-c-register">::register</a>
|
86
|
+
|
87
|
+
</ul>
|
88
|
+
</nav>
|
89
|
+
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<div id="project-metadata">
|
93
|
+
<nav id="fileindex-section" class="section project-section">
|
94
|
+
<h3 class="section-header">Pages</h3>
|
95
|
+
|
96
|
+
<ul>
|
97
|
+
|
98
|
+
<li class="file"><a href="../../README_rdoc.html">README</a>
|
99
|
+
|
100
|
+
</ul>
|
101
|
+
</nav>
|
102
|
+
|
103
|
+
<nav id="classindex-section" class="section project-section">
|
104
|
+
<h3 class="section-header">Class and Module Index</h3>
|
105
|
+
|
106
|
+
<ul class="link-list">
|
107
|
+
|
108
|
+
<li><a href="../../CORL.html">CORL</a>
|
109
|
+
|
110
|
+
<li><a href="../../CORL/Action.html">CORL::Action</a>
|
111
|
+
|
112
|
+
<li><a href="../../CORL/Action/Authorize.html">CORL::Action::Authorize</a>
|
113
|
+
|
114
|
+
<li><a href="../../CORL/Action/Bootstrap.html">CORL::Action::Bootstrap</a>
|
115
|
+
|
116
|
+
<li><a href="../../CORL/Action/Build.html">CORL::Action::Build</a>
|
117
|
+
|
118
|
+
<li><a href="../../CORL/Action/Destroy.html">CORL::Action::Destroy</a>
|
119
|
+
|
120
|
+
<li><a href="../../CORL/Action/Exec.html">CORL::Action::Exec</a>
|
121
|
+
|
122
|
+
<li><a href="../../CORL/Action/Facts.html">CORL::Action::Facts</a>
|
123
|
+
|
124
|
+
<li><a href="../../CORL/Action/Image.html">CORL::Action::Image</a>
|
125
|
+
|
126
|
+
<li><a href="../../CORL/Action/Images.html">CORL::Action::Images</a>
|
127
|
+
|
128
|
+
<li><a href="../../CORL/Action/Ip.html">CORL::Action::Ip</a>
|
129
|
+
|
130
|
+
<li><a href="../../CORL/Action/Keypair.html">CORL::Action::Keypair</a>
|
131
|
+
|
132
|
+
<li><a href="../../CORL/Action/Lookup.html">CORL::Action::Lookup</a>
|
133
|
+
|
134
|
+
<li><a href="../../CORL/Action/Machines.html">CORL::Action::Machines</a>
|
135
|
+
|
136
|
+
<li><a href="../../CORL/Action/Provision.html">CORL::Action::Provision</a>
|
137
|
+
|
138
|
+
<li><a href="../../CORL/Action/Reboot.html">CORL::Action::Reboot</a>
|
139
|
+
|
140
|
+
<li><a href="../../CORL/Action/Regions.html">CORL::Action::Regions</a>
|
141
|
+
|
142
|
+
<li><a href="../../CORL/Action/Revoke.html">CORL::Action::Revoke</a>
|
143
|
+
|
144
|
+
<li><a href="../../CORL/Action/Seed.html">CORL::Action::Seed</a>
|
145
|
+
|
146
|
+
<li><a href="../../CORL/Action/Spawn.html">CORL::Action::Spawn</a>
|
147
|
+
|
148
|
+
<li><a href="../../CORL/Action/Ssh.html">CORL::Action::Ssh</a>
|
149
|
+
|
150
|
+
<li><a href="../../CORL/Action/Start.html">CORL::Action::Start</a>
|
151
|
+
|
152
|
+
<li><a href="../../CORL/Action/Stop.html">CORL::Action::Stop</a>
|
153
|
+
|
154
|
+
<li><a href="../../CORL/Action/Vagrantfile.html">CORL::Action::Vagrantfile</a>
|
155
|
+
|
156
|
+
<li><a href="../../CORL/Configuration.html">CORL::Configuration</a>
|
157
|
+
|
158
|
+
<li><a href="../../CORL/Configuration/File.html">CORL::Configuration::File</a>
|
159
|
+
|
160
|
+
<li><a href="../../CORL/Errors.html">CORL::Errors</a>
|
161
|
+
|
162
|
+
<li><a href="../../CORL/Event.html">CORL::Event</a>
|
163
|
+
|
164
|
+
<li><a href="../../CORL/Event/Puppet.html">CORL::Event::Puppet</a>
|
165
|
+
|
166
|
+
<li><a href="../../CORL/Facade.html">CORL::Facade</a>
|
167
|
+
|
168
|
+
<li><a href="../../CORL/Machine.html">CORL::Machine</a>
|
169
|
+
|
170
|
+
<li><a href="../../CORL/Machine/Aws.html">CORL::Machine::Aws</a>
|
171
|
+
|
172
|
+
<li><a href="../../CORL/Machine/Fog.html">CORL::Machine::Fog</a>
|
173
|
+
|
174
|
+
<li><a href="../../CORL/Machine/Physical.html">CORL::Machine::Physical</a>
|
175
|
+
|
176
|
+
<li><a href="../../CORL/Machine/Rackspace.html">CORL::Machine::Rackspace</a>
|
177
|
+
|
178
|
+
<li><a href="../../CORL/Machine/Vagrant.html">CORL::Machine::Vagrant</a>
|
179
|
+
|
180
|
+
<li><a href="../../CORL/Mixin.html">CORL::Mixin</a>
|
181
|
+
|
182
|
+
<li><a href="../../CORL/Mixin/Action.html">CORL::Mixin::Action</a>
|
183
|
+
|
184
|
+
<li><a href="../../CORL/Mixin/Action/Keypair.html">CORL::Mixin::Action::Keypair</a>
|
185
|
+
|
186
|
+
<li><a href="../../CORL/Mixin/Lookup.html">CORL::Mixin::Lookup</a>
|
187
|
+
|
188
|
+
<li><a href="../../CORL/Mixin/Machine.html">CORL::Mixin::Machine</a>
|
189
|
+
|
190
|
+
<li><a href="../../CORL/Mixin/Machine/SSH.html">CORL::Mixin::Machine::SSH</a>
|
191
|
+
|
192
|
+
<li><a href="../../CORL/Mixin/Macro.html">CORL::Mixin::Macro</a>
|
193
|
+
|
194
|
+
<li><a href="../../CORL/Mixin/Macro/NetworkSettings.html">CORL::Mixin::Macro::NetworkSettings</a>
|
195
|
+
|
196
|
+
<li><a href="../../CORL/Network.html">CORL::Network</a>
|
197
|
+
|
198
|
+
<li><a href="../../CORL/Network/Default.html">CORL::Network::Default</a>
|
199
|
+
|
200
|
+
<li><a href="../../CORL/Node.html">CORL::Node</a>
|
201
|
+
|
202
|
+
<li><a href="../../CORL/Node/Aws.html">CORL::Node::Aws</a>
|
203
|
+
|
204
|
+
<li><a href="../../CORL/Node/Fog.html">CORL::Node::Fog</a>
|
205
|
+
|
206
|
+
<li><a href="../../CORL/Node/Local.html">CORL::Node::Local</a>
|
207
|
+
|
208
|
+
<li><a href="../../CORL/Node/Rackspace.html">CORL::Node::Rackspace</a>
|
209
|
+
|
210
|
+
<li><a href="../../CORL/Node/Vagrant.html">CORL::Node::Vagrant</a>
|
211
|
+
|
212
|
+
<li><a href="../../CORL/Plugin.html">CORL::Plugin</a>
|
213
|
+
|
214
|
+
<li><a href="../../CORL/Plugin/CloudAction.html">CORL::Plugin::CloudAction</a>
|
215
|
+
|
216
|
+
<li><a href="../../CORL/Provisioner.html">CORL::Provisioner</a>
|
217
|
+
|
218
|
+
<li><a href="../../CORL/Provisioner/Puppetnode.html">CORL::Provisioner::Puppetnode</a>
|
219
|
+
|
220
|
+
<li><a href="../../CORL/Template.html">CORL::Template</a>
|
221
|
+
|
222
|
+
<li><a href="../../CORL/Template/Environment.html">CORL::Template::Environment</a>
|
223
|
+
|
224
|
+
<li><a href="../../CORL/Util.html">CORL::Util</a>
|
225
|
+
|
226
|
+
<li><a href="../../CORL/Util/Puppet.html">CORL::Util::Puppet</a>
|
227
|
+
|
228
|
+
<li><a href="../../CORL/Util/Puppet/Resource.html">CORL::Util::Puppet::Resource</a>
|
229
|
+
|
230
|
+
<li><a href="../../CORL/Util/Puppet/ResourceGroup.html">CORL::Util::Puppet::ResourceGroup</a>
|
231
|
+
|
232
|
+
<li><a href="../../CORL/Vagrant.html">CORL::Vagrant</a>
|
233
|
+
|
234
|
+
<li><a href="../../CORL/Vagrant/Config.html">CORL::Vagrant::Config</a>
|
235
|
+
|
236
|
+
<li><a href="../../VagrantPlugins.html">VagrantPlugins</a>
|
237
|
+
|
238
|
+
<li><a href="../../VagrantPlugins/CORL.html">VagrantPlugins::CORL</a>
|
239
|
+
|
240
|
+
<li><a href="../../VagrantPlugins/CORL/Action.html">VagrantPlugins::CORL::Action</a>
|
241
|
+
|
242
|
+
<li><a href="../../VagrantPlugins/CORL/Action/DeleteCache.html">VagrantPlugins::CORL::Action::DeleteCache</a>
|
243
|
+
|
244
|
+
<li><a href="../../VagrantPlugins/CORL/Action/InitKeys.html">VagrantPlugins::CORL::Action::InitKeys</a>
|
245
|
+
|
246
|
+
<li><a href="../../VagrantPlugins/CORL/Action/LinkNetwork.html">VagrantPlugins::CORL::Action::LinkNetwork</a>
|
247
|
+
|
248
|
+
<li><a href="../../VagrantPlugins/CORL/BaseAction.html">VagrantPlugins::CORL::BaseAction</a>
|
249
|
+
|
250
|
+
<li><a href="../../VagrantPlugins/CORL/Command.html">VagrantPlugins::CORL::Command</a>
|
251
|
+
|
252
|
+
<li><a href="../../VagrantPlugins/CORL/Command/Launcher.html">VagrantPlugins::CORL::Command::Launcher</a>
|
253
|
+
|
254
|
+
<li><a href="../../VagrantPlugins/CORL/Config.html">VagrantPlugins::CORL::Config</a>
|
255
|
+
|
256
|
+
<li><a href="../../VagrantPlugins/CORL/Config/CORL.html">VagrantPlugins::CORL::Config::CORL</a>
|
257
|
+
|
258
|
+
<li><a href="../../VagrantPlugins/CORL/Plugin.html">VagrantPlugins::CORL::Plugin</a>
|
259
|
+
|
260
|
+
<li><a href="../../VagrantPlugins/CORL/Provisioner.html">VagrantPlugins::CORL::Provisioner</a>
|
261
|
+
|
262
|
+
<li><a href="../../VagrantPlugins/CORL/Provisioner/CORL.html">VagrantPlugins::CORL::Provisioner::CORL</a>
|
263
|
+
|
264
|
+
<li><a href="../../Nucleon.html">Nucleon</a>
|
265
|
+
|
266
|
+
<li><a href="../../Nucleon/Config.html">Nucleon::Config</a>
|
267
|
+
|
268
|
+
<li><a href="../../Nucleon/Plugin.html">Nucleon::Plugin</a>
|
269
|
+
|
270
|
+
<li><a href="../../Nucleon/Plugin/Base.html">Nucleon::Plugin::Base</a>
|
271
|
+
|
272
|
+
<li><a href="../../Nucleon/Plugin/Configuration.html">Nucleon::Plugin::Configuration</a>
|
273
|
+
|
274
|
+
<li><a href="../../Nucleon/Plugin/Machine.html">Nucleon::Plugin::Machine</a>
|
275
|
+
|
276
|
+
<li><a href="../../Nucleon/Plugin/Network.html">Nucleon::Plugin::Network</a>
|
277
|
+
|
278
|
+
<li><a href="../../Nucleon/Plugin/Node.html">Nucleon::Plugin::Node</a>
|
279
|
+
|
280
|
+
<li><a href="../../Nucleon/Plugin/Provisioner.html">Nucleon::Plugin::Provisioner</a>
|
281
|
+
|
282
|
+
<li><a href="../../Puppet.html">Puppet</a>
|
283
|
+
|
284
|
+
<li><a href="../../Puppet/DataBinding.html">Puppet::DataBinding</a>
|
285
|
+
|
286
|
+
<li><a href="../../Puppet/DataBinding/Corl.html">Puppet::DataBinding::Corl</a>
|
287
|
+
|
288
|
+
<li><a href="../../Puppet/Indirector.html">Puppet::Indirector</a>
|
289
|
+
|
290
|
+
<li><a href="../../Puppet/Indirector/Corl.html">Puppet::Indirector::Corl</a>
|
291
|
+
|
292
|
+
<li><a href="../../Puppet/Parser.html">Puppet::Parser</a>
|
293
|
+
|
294
|
+
<li><a href="../../Puppet/Parser/Functions.html">Puppet::Parser::Functions</a>
|
295
|
+
|
296
|
+
<li><a href="../../Fog.html">Fog</a>
|
297
|
+
|
298
|
+
<li><a href="../../Fog/Compute.html">Fog::Compute</a>
|
299
|
+
|
300
|
+
<li><a href="../../Fog/Compute/AWS.html">Fog::Compute::AWS</a>
|
301
|
+
|
302
|
+
<li><a href="../../Fog/Compute/AWS/Server.html">Fog::Compute::AWS::Server</a>
|
303
|
+
|
304
|
+
<li><a href="../../Fog/Compute/RackspaceV2.html">Fog::Compute::RackspaceV2</a>
|
305
|
+
|
306
|
+
<li><a href="../../Fog/Compute/RackspaceV2/Server.html">Fog::Compute::RackspaceV2::Server</a>
|
307
|
+
|
308
|
+
<li><a href="../../Vagrant.html">Vagrant</a>
|
309
|
+
|
310
|
+
<li><a href="../../Vagrant/Config.html">Vagrant::Config</a>
|
311
|
+
|
312
|
+
<li><a href="../../Vagrant/Config/Loader.html">Vagrant::Config::Loader</a>
|
313
|
+
|
314
|
+
<li><a href="../../Vagrant/Vagrantfile.html">Vagrant::Vagrantfile</a>
|
315
|
+
|
316
|
+
<li><a href="../../Facter.html">Facter</a>
|
317
|
+
|
318
|
+
<li><a href="../../Facter/Util.html">Facter::Util</a>
|
319
|
+
|
320
|
+
<li><a href="../../Facter/Util/Loader.html">Facter::Util::Loader</a>
|
321
|
+
|
322
|
+
<li><a href="../../Hiera.html">Hiera</a>
|
323
|
+
|
324
|
+
<li><a href="../../Hiera/Backend.html">Hiera::Backend</a>
|
325
|
+
|
326
|
+
<li><a href="../../Hiera/Corl_logger.html">Hiera::Corl_logger</a>
|
327
|
+
|
328
|
+
<li><a href="../../Object.html">Object</a>
|
329
|
+
|
330
|
+
</ul>
|
331
|
+
</nav>
|
332
|
+
|
333
|
+
</div>
|
334
|
+
</nav>
|
335
|
+
|
336
|
+
<div id="documentation">
|
337
|
+
<h1 class="module">module CORL::Vagrant::Config</h1>
|
338
|
+
|
339
|
+
<div id="description" class="description">
|
340
|
+
|
341
|
+
</div><!-- description -->
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
<!-- Methods -->
|
356
|
+
|
357
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
358
|
+
<h3 class="section-header">Public Class Methods</h3>
|
359
|
+
|
360
|
+
|
361
|
+
<div id="method-c-configure_provisioner" class="method-detail ">
|
362
|
+
|
363
|
+
<div class="method-heading">
|
364
|
+
<span class="method-name">configure_provisioner</span><span
|
365
|
+
class="method-args">(network, node, machine, &code)</span>
|
366
|
+
<span class="method-click-advice">click to toggle source</span>
|
367
|
+
</div>
|
368
|
+
|
369
|
+
|
370
|
+
<div class="method-description">
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
<div class="method-source-code" id="configure_provisioner-source">
|
377
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 289</span>
|
378
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">configure_provisioner</span>(<span class="ruby-identifier">network</span>, <span class="ruby-identifier">node</span>, <span class="ruby-identifier">machine</span>, &<span class="ruby-identifier">code</span>)
|
379
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">true</span>
|
380
|
+
|
381
|
+
<span class="ruby-comment"># CORL provisioning</span>
|
382
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">vm</span>.<span class="ruby-identifier">provision</span> <span class="ruby-value">:corl</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">provisioner</span><span class="ruby-operator">|</span>
|
383
|
+
<span class="ruby-identifier">provisioner</span>.<span class="ruby-identifier">network</span> = <span class="ruby-identifier">network</span>
|
384
|
+
<span class="ruby-identifier">provisioner</span>.<span class="ruby-identifier">node</span> = <span class="ruby-identifier">node</span>
|
385
|
+
|
386
|
+
<span class="ruby-identifier">code</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">node</span>, <span class="ruby-identifier">machine</span>, <span class="ruby-identifier">provisioner</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">code</span>
|
387
|
+
<span class="ruby-keyword">end</span>
|
388
|
+
<span class="ruby-identifier">success</span>
|
389
|
+
<span class="ruby-keyword">end</span></pre>
|
390
|
+
</div><!-- configure_provisioner-source -->
|
391
|
+
|
392
|
+
</div>
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
</div><!-- configure_provisioner-method -->
|
398
|
+
|
399
|
+
|
400
|
+
<div id="method-c-configure_shares" class="method-detail ">
|
401
|
+
|
402
|
+
<div class="method-heading">
|
403
|
+
<span class="method-name">configure_shares</span><span
|
404
|
+
class="method-args">(node, machine)</span>
|
405
|
+
<span class="method-click-advice">click to toggle source</span>
|
406
|
+
</div>
|
407
|
+
|
408
|
+
|
409
|
+
<div class="method-description">
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
<div class="method-source-code" id="configure_shares-source">
|
416
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 242</span>
|
417
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">configure_shares</span>(<span class="ruby-identifier">node</span>, <span class="ruby-identifier">machine</span>)
|
418
|
+
<span class="ruby-identifier">bindfs_installed</span> = <span class="ruby-constant">Gems</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-string">'vagrant-bindfs'</span>)
|
419
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">true</span>
|
420
|
+
|
421
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">bindfs_installed</span>
|
422
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">vm</span>.<span class="ruby-identifier">synced_folder</span> <span class="ruby-string">"."</span>, <span class="ruby-string">"/vagrant"</span>, <span class="ruby-identifier">disabled</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>
|
423
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">vm</span>.<span class="ruby-identifier">synced_folder</span> <span class="ruby-string">"."</span>, <span class="ruby-string">"/tmp/vagrant"</span>, <span class="ruby-value">:type</span> =<span class="ruby-operator">></span> <span class="ruby-string">"nfs"</span>
|
424
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">bindfs</span>.<span class="ruby-identifier">bind_folder</span> <span class="ruby-string">"/tmp/vagrant"</span>, <span class="ruby-string">"/vagrant"</span>
|
425
|
+
<span class="ruby-keyword">end</span>
|
426
|
+
|
427
|
+
<span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">hash</span>(<span class="ruby-identifier">node</span>.<span class="ruby-identifier">shares</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span><span class="ruby-operator">|</span>
|
428
|
+
<span class="ruby-identifier">config</span> = <span class="ruby-constant">CORL</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>.<span class="ruby-identifier">ensure</span>(<span class="ruby-identifier">options</span>)
|
429
|
+
<span class="ruby-identifier">share_type</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value">:type</span>, <span class="ruby-keyword">nil</span>)
|
430
|
+
<span class="ruby-identifier">local_dir</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:local</span>, <span class="ruby-string">''</span>)
|
431
|
+
<span class="ruby-identifier">remote_dir</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:remote</span>, <span class="ruby-string">''</span>)
|
432
|
+
|
433
|
+
<span class="ruby-identifier">config</span>.<span class="ruby-identifier">init</span>(<span class="ruby-value">:create</span>, <span class="ruby-keyword">true</span>)
|
434
|
+
|
435
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">local_dir</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">remote_dir</span>.<span class="ruby-identifier">empty?</span>
|
436
|
+
<span class="ruby-identifier">bindfs_options</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:bindfs</span>, {})
|
437
|
+
<span class="ruby-identifier">share_options</span> = {}
|
438
|
+
|
439
|
+
<span class="ruby-identifier">config</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span><span class="ruby-operator">|</span>
|
440
|
+
<span class="ruby-identifier">share_options</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">value</span>(<span class="ruby-identifier">config</span>[<span class="ruby-identifier">key</span>])
|
441
|
+
<span class="ruby-keyword">end</span>
|
442
|
+
|
443
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">share_type</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">share_type</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-operator">==</span> <span class="ruby-value">:nfs</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">bindfs_installed</span>
|
444
|
+
<span class="ruby-identifier">final_dir</span> = <span class="ruby-identifier">remote_dir</span>
|
445
|
+
<span class="ruby-identifier">remote_dir</span> = [ <span class="ruby-string">'/tmp'</span>, <span class="ruby-identifier">remote_dir</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp">/^\//</span>, <span class="ruby-string">''</span>) ].<span class="ruby-identifier">join</span>(<span class="ruby-string">'/'</span>)
|
446
|
+
|
447
|
+
<span class="ruby-comment">#dbg(remote_dir, 'vm bindfs local')</span>
|
448
|
+
<span class="ruby-comment">#dbg(final_dir, 'vm bindfs remote')</span>
|
449
|
+
<span class="ruby-comment">#dbg(bindfs_options, 'vm bindfs options') </span>
|
450
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">bindfs</span>.<span class="ruby-identifier">bind_folder</span> <span class="ruby-identifier">remote_dir</span>, <span class="ruby-identifier">final_dir</span>, <span class="ruby-identifier">bindfs_options</span>
|
451
|
+
<span class="ruby-keyword">end</span>
|
452
|
+
|
453
|
+
<span class="ruby-comment">#dbg(local_dir, 'vm share local')</span>
|
454
|
+
<span class="ruby-comment">#dbg(remote_dir, 'vm share remote')</span>
|
455
|
+
<span class="ruby-comment">#dbg(share_options, 'vm share options') </span>
|
456
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">vm</span>.<span class="ruby-identifier">synced_folder</span> <span class="ruby-identifier">local_dir</span>, <span class="ruby-identifier">remote_dir</span>, <span class="ruby-identifier">share_options</span>
|
457
|
+
<span class="ruby-keyword">end</span>
|
458
|
+
<span class="ruby-keyword">end</span>
|
459
|
+
<span class="ruby-identifier">success</span>
|
460
|
+
<span class="ruby-keyword">end</span></pre>
|
461
|
+
</div><!-- configure_shares-source -->
|
462
|
+
|
463
|
+
</div>
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
|
468
|
+
</div><!-- configure_shares-method -->
|
469
|
+
|
470
|
+
|
471
|
+
<div id="method-c-configure_ssh" class="method-detail ">
|
472
|
+
|
473
|
+
<div class="method-heading">
|
474
|
+
<span class="method-name">configure_ssh</span><span
|
475
|
+
class="method-args">(node, machine)</span>
|
476
|
+
<span class="method-click-advice">click to toggle source</span>
|
477
|
+
</div>
|
478
|
+
|
479
|
+
|
480
|
+
<div class="method-description">
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
|
486
|
+
<div class="method-source-code" id="configure_ssh-source">
|
487
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 121</span>
|
488
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">configure_ssh</span>(<span class="ruby-identifier">node</span>, <span class="ruby-identifier">machine</span>)
|
489
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">true</span>
|
490
|
+
|
491
|
+
<span class="ruby-comment">#dbg(node.user, 'ssh user')</span>
|
492
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">ssh</span>.<span class="ruby-identifier">username</span> = <span class="ruby-identifier">node</span>.<span class="ruby-identifier">user</span>
|
493
|
+
|
494
|
+
<span class="ruby-comment">#dbg(node.ssh_port, 'ssh port')</span>
|
495
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">ssh</span>.<span class="ruby-identifier">guest_port</span> = <span class="ruby-identifier">node</span>.<span class="ruby-identifier">ssh_port</span>
|
496
|
+
|
497
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">cache_setting</span>(<span class="ruby-value">:use_private_key</span>, <span class="ruby-keyword">false</span>)
|
498
|
+
<span class="ruby-comment">#dbg(node.private_key, 'ssh private key')</span>
|
499
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">ssh</span>.<span class="ruby-identifier">private_key_path</span> = <span class="ruby-identifier">node</span>.<span class="ruby-identifier">private_key</span>
|
500
|
+
<span class="ruby-keyword">end</span>
|
501
|
+
|
502
|
+
<span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">hash</span>(<span class="ruby-identifier">node</span>.<span class="ruby-identifier">ssh</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">data</span><span class="ruby-operator">|</span>
|
503
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">machine</span>.<span class="ruby-identifier">ssh</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-node">"#{name}="</span>)
|
504
|
+
<span class="ruby-identifier">data</span> = <span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">value</span>(<span class="ruby-identifier">data</span>)
|
505
|
+
<span class="ruby-comment">#dbg(name, 'ssh property')</span>
|
506
|
+
<span class="ruby-comment">#dbg(data, 'ssh property data')</span>
|
507
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">ssh</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">"#{name}="</span>, <span class="ruby-identifier">data</span>)
|
508
|
+
<span class="ruby-keyword">else</span>
|
509
|
+
<span class="ruby-identifier">params</span> = <span class="ruby-identifier">parse_params</span>(<span class="ruby-identifier">data</span>)
|
510
|
+
<span class="ruby-comment">#dbg(name, 'ssh method')</span>
|
511
|
+
<span class="ruby-comment">#dbg(params, 'ssh method params')</span>
|
512
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">ssh</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">params</span>)
|
513
|
+
<span class="ruby-keyword">end</span>
|
514
|
+
<span class="ruby-keyword">end</span>
|
515
|
+
<span class="ruby-identifier">success</span>
|
516
|
+
<span class="ruby-keyword">end</span></pre>
|
517
|
+
</div><!-- configure_ssh-source -->
|
518
|
+
|
519
|
+
</div>
|
520
|
+
|
521
|
+
|
522
|
+
|
523
|
+
|
524
|
+
</div><!-- configure_ssh-method -->
|
525
|
+
|
526
|
+
|
527
|
+
<div id="method-c-configure_vagrant" class="method-detail ">
|
528
|
+
|
529
|
+
<div class="method-heading">
|
530
|
+
<span class="method-name">configure_vagrant</span><span
|
531
|
+
class="method-args">(network, vagrant)</span>
|
532
|
+
<span class="method-click-advice">click to toggle source</span>
|
533
|
+
</div>
|
534
|
+
|
535
|
+
|
536
|
+
<div class="method-description">
|
537
|
+
|
538
|
+
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
<div class="method-source-code" id="configure_vagrant-source">
|
543
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 101</span>
|
544
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">configure_vagrant</span>(<span class="ruby-identifier">network</span>, <span class="ruby-identifier">vagrant</span>)
|
545
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">true</span>
|
546
|
+
<span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">hash</span>(<span class="ruby-identifier">network</span>.<span class="ruby-identifier">settings</span>(<span class="ruby-value">:vagrant_config</span>)).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">data</span><span class="ruby-operator">|</span>
|
547
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">vagrant</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-node">"#{name}="</span>)
|
548
|
+
<span class="ruby-identifier">data</span> = <span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">value</span>(<span class="ruby-identifier">data</span>)
|
549
|
+
<span class="ruby-comment">#dbg(name, 'vagrant property')</span>
|
550
|
+
<span class="ruby-comment">#dbg(data, 'vagrant property data')</span>
|
551
|
+
<span class="ruby-identifier">vagrant</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">"#{name}="</span>, <span class="ruby-identifier">data</span>)
|
552
|
+
<span class="ruby-keyword">else</span>
|
553
|
+
<span class="ruby-identifier">params</span> = <span class="ruby-identifier">parse_params</span>(<span class="ruby-identifier">data</span>)
|
554
|
+
<span class="ruby-comment">#dbg(name, 'vagrant method')</span>
|
555
|
+
<span class="ruby-comment">#dbg(params, 'vagrant method params')</span>
|
556
|
+
<span class="ruby-identifier">vagrant</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">params</span>)
|
557
|
+
<span class="ruby-keyword">end</span>
|
558
|
+
<span class="ruby-keyword">end</span>
|
559
|
+
<span class="ruby-identifier">success</span>
|
560
|
+
<span class="ruby-keyword">end</span></pre>
|
561
|
+
</div><!-- configure_vagrant-source -->
|
562
|
+
|
563
|
+
</div>
|
564
|
+
|
565
|
+
|
566
|
+
|
567
|
+
|
568
|
+
</div><!-- configure_vagrant-method -->
|
569
|
+
|
570
|
+
|
571
|
+
<div id="method-c-configure_vm" class="method-detail ">
|
572
|
+
|
573
|
+
<div class="method-heading">
|
574
|
+
<span class="method-name">configure_vm</span><span
|
575
|
+
class="method-args">(node, machine)</span>
|
576
|
+
<span class="method-click-advice">click to toggle source</span>
|
577
|
+
</div>
|
578
|
+
|
579
|
+
|
580
|
+
<div class="method-description">
|
581
|
+
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
|
586
|
+
<div class="method-source-code" id="configure_vm-source">
|
587
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 153</span>
|
588
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">configure_vm</span>(<span class="ruby-identifier">node</span>, <span class="ruby-identifier">machine</span>)
|
589
|
+
<span class="ruby-identifier">vm_config</span> = <span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">hash</span>(<span class="ruby-identifier">node</span>.<span class="ruby-identifier">vm</span>)
|
590
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">true</span>
|
591
|
+
|
592
|
+
<span class="ruby-comment">#dbg(node.hostname, 'VM hostname')</span>
|
593
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">vm</span>.<span class="ruby-identifier">hostname</span> = <span class="ruby-identifier">node</span>.<span class="ruby-identifier">hostname</span>
|
594
|
+
|
595
|
+
<span class="ruby-identifier">box</span> = <span class="ruby-identifier">node</span>.<span class="ruby-identifier">cache_setting</span>(<span class="ruby-value">:box</span>)
|
596
|
+
<span class="ruby-identifier">box_url</span> = <span class="ruby-identifier">node</span>.<span class="ruby-identifier">cache_setting</span>(<span class="ruby-value">:box_url</span>)
|
597
|
+
|
598
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">box</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">box_url</span>
|
599
|
+
<span class="ruby-comment">#dbg(box, 'VM box')</span>
|
600
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">vm</span>.<span class="ruby-identifier">box</span> = <span class="ruby-identifier">box</span>
|
601
|
+
<span class="ruby-comment">#dbg(box_url, 'VM box url')</span>
|
602
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">vm</span>.<span class="ruby-identifier">box_url</span> = <span class="ruby-identifier">box_url</span>
|
603
|
+
<span class="ruby-keyword">else</span>
|
604
|
+
<span class="ruby-comment">#dbg(node.image, 'VM box')</span>
|
605
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">vm</span>.<span class="ruby-identifier">box</span> = <span class="ruby-identifier">node</span>.<span class="ruby-identifier">image</span>
|
606
|
+
<span class="ruby-keyword">end</span>
|
607
|
+
|
608
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">vm_config</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-value">:public_network</span>)
|
609
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">public_ip</span>
|
610
|
+
<span class="ruby-comment">#dbg(node.public_ip, 'private ip address')</span>
|
611
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">vm</span>.<span class="ruby-identifier">network</span> <span class="ruby-value">:private_network</span>, <span class="ruby-value">:ip</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">public_ip</span>
|
612
|
+
<span class="ruby-keyword">else</span>
|
613
|
+
<span class="ruby-comment">#dbg('dhcp private ip address')</span>
|
614
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">vm</span>.<span class="ruby-identifier">network</span> <span class="ruby-value">:private_network</span>, <span class="ruby-value">:type</span> =<span class="ruby-operator">></span> <span class="ruby-string">"dhcp"</span>
|
615
|
+
<span class="ruby-keyword">end</span>
|
616
|
+
<span class="ruby-keyword">end</span>
|
617
|
+
|
618
|
+
<span class="ruby-identifier">vm_config</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">data</span><span class="ruby-operator">|</span>
|
619
|
+
<span class="ruby-keyword">case</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_sym</span>
|
620
|
+
<span class="ruby-comment"># Network interfaces</span>
|
621
|
+
<span class="ruby-keyword">when</span> <span class="ruby-value">:forwarded_ports</span>
|
622
|
+
<span class="ruby-identifier">data</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">forward_name</span>, <span class="ruby-identifier">info</span><span class="ruby-operator">|</span>
|
623
|
+
<span class="ruby-identifier">forward_config</span> = <span class="ruby-constant">CORL</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</span>({ <span class="ruby-value">:auto_correct</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">true</span> }).<span class="ruby-identifier">import</span>(<span class="ruby-identifier">info</span>)
|
624
|
+
|
625
|
+
<span class="ruby-identifier">forward_config</span>.<span class="ruby-identifier">keys</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span><span class="ruby-operator">|</span>
|
626
|
+
<span class="ruby-identifier">forward_config</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">value</span>(<span class="ruby-identifier">forward_config</span>[<span class="ruby-identifier">key</span>])
|
627
|
+
<span class="ruby-keyword">end</span>
|
628
|
+
<span class="ruby-comment">#dbg(forward_config.export, 'vm forwarded port config') </span>
|
629
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">vm</span>.<span class="ruby-identifier">network</span> <span class="ruby-value">:forwarded_port</span>, <span class="ruby-identifier">forward_config</span>.<span class="ruby-identifier">export</span>
|
630
|
+
<span class="ruby-keyword">end</span>
|
631
|
+
<span class="ruby-keyword">when</span> <span class="ruby-value">:usable_port_range</span>
|
632
|
+
<span class="ruby-identifier">low</span>, <span class="ruby-identifier">high</span> = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp">/\s*--?\s*/</span>)
|
633
|
+
<span class="ruby-comment">#dbg("#{low} <--> #{high}", 'vm usable port range') </span>
|
634
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">vm</span>.<span class="ruby-identifier">usable_port_range</span> = <span class="ruby-constant">Range</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">low</span>, <span class="ruby-identifier">high</span>)
|
635
|
+
|
636
|
+
<span class="ruby-keyword">when</span> <span class="ruby-value">:public_network</span>
|
637
|
+
<span class="ruby-comment">#dbg('public network')</span>
|
638
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">vm</span>.<span class="ruby-identifier">network</span> <span class="ruby-value">:public_network</span>
|
639
|
+
|
640
|
+
<span class="ruby-comment"># Provider specific settings</span>
|
641
|
+
<span class="ruby-keyword">when</span> <span class="ruby-value">:providers</span>
|
642
|
+
<span class="ruby-identifier">data</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">provider</span>, <span class="ruby-identifier">info</span><span class="ruby-operator">|</span>
|
643
|
+
<span class="ruby-comment">#dbg(provider, 'vm provider')</span>
|
644
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">vm</span>.<span class="ruby-identifier">provider</span> <span class="ruby-identifier">provider</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">interface</span><span class="ruby-operator">|</span>
|
645
|
+
<span class="ruby-identifier">info</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">property</span>, <span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
|
646
|
+
<span class="ruby-comment">#dbg(property, 'vm property')</span>
|
647
|
+
<span class="ruby-comment">#dbg(item, 'vm property item')</span>
|
648
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">interface</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-node">"#{property}="</span>)
|
649
|
+
<span class="ruby-identifier">interface</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">"#{property}="</span>, <span class="ruby-identifier">item</span>)
|
650
|
+
<span class="ruby-keyword">else</span>
|
651
|
+
<span class="ruby-identifier">params</span> = <span class="ruby-identifier">parse_params</span>(<span class="ruby-identifier">item</span>)
|
652
|
+
<span class="ruby-comment">#dbg(params, 'vm method params')</span>
|
653
|
+
<span class="ruby-identifier">interface</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">property</span>, <span class="ruby-identifier">params</span>)
|
654
|
+
<span class="ruby-keyword">end</span>
|
655
|
+
<span class="ruby-keyword">end</span>
|
656
|
+
<span class="ruby-keyword">end</span>
|
657
|
+
<span class="ruby-keyword">end</span>
|
658
|
+
<span class="ruby-comment"># All other basic VM settings...</span>
|
659
|
+
<span class="ruby-keyword">else</span>
|
660
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">machine</span>.<span class="ruby-identifier">vm</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-node">"#{name}="</span>)
|
661
|
+
<span class="ruby-comment">#dbg(name, 'other property')</span>
|
662
|
+
<span class="ruby-comment">#dbg(data, 'other property data')</span>
|
663
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">vm</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">"#{name}="</span>, <span class="ruby-identifier">data</span>)
|
664
|
+
<span class="ruby-keyword">else</span>
|
665
|
+
<span class="ruby-identifier">params</span> = <span class="ruby-identifier">parse_params</span>(<span class="ruby-identifier">data</span>)
|
666
|
+
<span class="ruby-comment">#dbg(name, 'other method')</span>
|
667
|
+
<span class="ruby-comment">#dbg(params, 'other method params')</span>
|
668
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">vm</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">params</span>)
|
669
|
+
<span class="ruby-keyword">end</span>
|
670
|
+
<span class="ruby-keyword">end</span>
|
671
|
+
<span class="ruby-keyword">end</span>
|
672
|
+
<span class="ruby-identifier">success</span>
|
673
|
+
<span class="ruby-keyword">end</span></pre>
|
674
|
+
</div><!-- configure_vm-source -->
|
675
|
+
|
676
|
+
</div>
|
677
|
+
|
678
|
+
|
679
|
+
|
680
|
+
|
681
|
+
</div><!-- configure_vm-method -->
|
682
|
+
|
683
|
+
|
684
|
+
<div id="method-c-load_network" class="method-detail ">
|
685
|
+
|
686
|
+
<div class="method-heading">
|
687
|
+
<span class="method-name">load_network</span><span
|
688
|
+
class="method-args">(directory)</span>
|
689
|
+
<span class="method-click-advice">click to toggle source</span>
|
690
|
+
</div>
|
691
|
+
|
692
|
+
|
693
|
+
<div class="method-description">
|
694
|
+
|
695
|
+
|
696
|
+
|
697
|
+
|
698
|
+
|
699
|
+
<div class="method-source-code" id="load_network-source">
|
700
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 94</span>
|
701
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">load_network</span>(<span class="ruby-identifier">directory</span>)
|
702
|
+
<span class="ruby-comment"># Load network if it exists</span>
|
703
|
+
<span class="ruby-identifier">@@network</span> = <span class="ruby-constant">CORL</span>.<span class="ruby-identifier">network</span>(<span class="ruby-identifier">directory</span>, <span class="ruby-constant">CORL</span>.<span class="ruby-identifier">config</span>(<span class="ruby-value">:vagrant_network</span>, { <span class="ruby-value">:directory</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">directory</span> }))
|
704
|
+
<span class="ruby-keyword">end</span></pre>
|
705
|
+
</div><!-- load_network-source -->
|
706
|
+
|
707
|
+
</div>
|
708
|
+
|
709
|
+
|
710
|
+
|
711
|
+
|
712
|
+
</div><!-- load_network-method -->
|
713
|
+
|
714
|
+
|
715
|
+
<div id="method-c-network" class="method-detail ">
|
716
|
+
|
717
|
+
<div class="method-heading">
|
718
|
+
<span class="method-name">network</span><span
|
719
|
+
class="method-args">()</span>
|
720
|
+
<span class="method-click-advice">click to toggle source</span>
|
721
|
+
</div>
|
722
|
+
|
723
|
+
|
724
|
+
<div class="method-description">
|
725
|
+
|
726
|
+
|
727
|
+
|
728
|
+
|
729
|
+
|
730
|
+
<div class="method-source-code" id="network-source">
|
731
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 46</span>
|
732
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">network</span>
|
733
|
+
<span class="ruby-identifier">@@network</span>
|
734
|
+
<span class="ruby-keyword">end</span></pre>
|
735
|
+
</div><!-- network-source -->
|
736
|
+
|
737
|
+
</div>
|
738
|
+
|
739
|
+
|
740
|
+
|
741
|
+
|
742
|
+
</div><!-- network-method -->
|
743
|
+
|
744
|
+
|
745
|
+
<div id="method-c-network-3D" class="method-detail ">
|
746
|
+
|
747
|
+
<div class="method-heading">
|
748
|
+
<span class="method-name">network=</span><span
|
749
|
+
class="method-args">(network)</span>
|
750
|
+
<span class="method-click-advice">click to toggle source</span>
|
751
|
+
</div>
|
752
|
+
|
753
|
+
|
754
|
+
<div class="method-description">
|
755
|
+
|
756
|
+
|
757
|
+
|
758
|
+
|
759
|
+
|
760
|
+
<div class="method-source-code" id="network-3D-source">
|
761
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 42</span>
|
762
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">network=</span><span class="ruby-identifier">network</span>
|
763
|
+
<span class="ruby-identifier">@@network</span> = <span class="ruby-identifier">network</span>
|
764
|
+
<span class="ruby-keyword">end</span></pre>
|
765
|
+
</div><!-- network-3D-source -->
|
766
|
+
|
767
|
+
</div>
|
768
|
+
|
769
|
+
|
770
|
+
|
771
|
+
|
772
|
+
</div><!-- network-3D-method -->
|
773
|
+
|
774
|
+
|
775
|
+
<div id="method-c-parse_params" class="method-detail ">
|
776
|
+
|
777
|
+
<div class="method-heading">
|
778
|
+
<span class="method-name">parse_params</span><span
|
779
|
+
class="method-args">(data)</span>
|
780
|
+
<span class="method-click-advice">click to toggle source</span>
|
781
|
+
</div>
|
782
|
+
|
783
|
+
|
784
|
+
<div class="method-description">
|
785
|
+
|
786
|
+
|
787
|
+
|
788
|
+
|
789
|
+
|
790
|
+
<div class="method-source-code" id="parse_params-source">
|
791
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 304</span>
|
792
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">parse_params</span>(<span class="ruby-identifier">data</span>)
|
793
|
+
<span class="ruby-identifier">params</span> = <span class="ruby-identifier">data</span>
|
794
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
795
|
+
<span class="ruby-identifier">params</span> = []
|
796
|
+
<span class="ruby-identifier">data</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
|
797
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">undef?</span>(<span class="ruby-identifier">item</span>)
|
798
|
+
<span class="ruby-identifier">params</span> <span class="ruby-operator"><<</span> ( <span class="ruby-identifier">key</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">/^\:/</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">key</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp">/^\:/</span>, <span class="ruby-string">''</span>).<span class="ruby-identifier">to_sym</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span> )
|
799
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">empty?</span>(<span class="ruby-identifier">item</span>)
|
800
|
+
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">item</span>
|
801
|
+
<span class="ruby-identifier">value</span> = ((<span class="ruby-identifier">item</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">item</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">/^\:/</span>)) <span class="ruby-operator">?</span> <span class="ruby-identifier">item</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp">/^\:/</span>, <span class="ruby-string">''</span>).<span class="ruby-identifier">to_sym</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">item</span>)
|
802
|
+
<span class="ruby-identifier">params</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">value</span>(<span class="ruby-identifier">value</span>)
|
803
|
+
<span class="ruby-keyword">end</span>
|
804
|
+
<span class="ruby-keyword">end</span>
|
805
|
+
<span class="ruby-keyword">end</span>
|
806
|
+
<span class="ruby-keyword">end</span>
|
807
|
+
<span class="ruby-identifier">params</span>
|
808
|
+
<span class="ruby-keyword">end</span></pre>
|
809
|
+
</div><!-- parse_params-source -->
|
810
|
+
|
811
|
+
</div>
|
812
|
+
|
813
|
+
|
814
|
+
|
815
|
+
|
816
|
+
</div><!-- parse_params-method -->
|
817
|
+
|
818
|
+
|
819
|
+
<div id="method-c-register" class="method-detail ">
|
820
|
+
|
821
|
+
<div class="method-heading">
|
822
|
+
<span class="method-name">register</span><span
|
823
|
+
class="method-args">(directory, config, &code)</span>
|
824
|
+
<span class="method-click-advice">click to toggle source</span>
|
825
|
+
</div>
|
826
|
+
|
827
|
+
|
828
|
+
<div class="method-description">
|
829
|
+
|
830
|
+
<p>Gateway <a href="../../CORL.html">CORL</a> configurator for <a
|
831
|
+
href="../Vagrant.html">Vagrant</a>.</p>
|
832
|
+
|
833
|
+
|
834
|
+
|
835
|
+
<div class="method-source-code" id="register-source">
|
836
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 54</span>
|
837
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">register</span>(<span class="ruby-identifier">directory</span>, <span class="ruby-identifier">config</span>, &<span class="ruby-identifier">code</span>)
|
838
|
+
<span class="ruby-operator">::</span><span class="ruby-constant">Vagrant</span>.<span class="ruby-identifier">require_version</span> <span class="ruby-string">">= 1.5.0"</span>
|
839
|
+
|
840
|
+
<span class="ruby-identifier">config_network</span> = <span class="ruby-identifier">network</span>
|
841
|
+
<span class="ruby-identifier">config_network</span> = <span class="ruby-identifier">load_network</span>(<span class="ruby-identifier">directory</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">config_network</span>
|
842
|
+
|
843
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">config_network</span>
|
844
|
+
<span class="ruby-comment"># Vagrant settings</span>
|
845
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">configure_vagrant</span>(<span class="ruby-identifier">config_network</span>, <span class="ruby-identifier">config</span>.<span class="ruby-identifier">vagrant</span>)
|
846
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-string">"Configuration of Vagrant general settings failed"</span>
|
847
|
+
<span class="ruby-keyword">end</span>
|
848
|
+
|
849
|
+
<span class="ruby-identifier">config_network</span>.<span class="ruby-identifier">nodes</span>(<span class="ruby-value">:vagrant</span>, <span class="ruby-keyword">true</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">node_name</span>, <span class="ruby-identifier">node</span><span class="ruby-operator">|</span>
|
850
|
+
<span class="ruby-identifier">config</span>.<span class="ruby-identifier">vm</span>.<span class="ruby-identifier">define</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">machine</span><span class="ruby-operator">|</span>
|
851
|
+
<span class="ruby-comment"># VM settings</span>
|
852
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">configure_vm</span>(<span class="ruby-identifier">node</span>, <span class="ruby-identifier">machine</span>)
|
853
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Configuration of Vagrant VM failed: #{node_name}"</span>
|
854
|
+
<span class="ruby-keyword">end</span>
|
855
|
+
|
856
|
+
<span class="ruby-comment"># SSH settings</span>
|
857
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">configure_ssh</span>(<span class="ruby-identifier">node</span>, <span class="ruby-identifier">machine</span>)
|
858
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-string">"Configuration of Vagrant VM SSH settings failed"</span>
|
859
|
+
<span class="ruby-keyword">end</span>
|
860
|
+
|
861
|
+
<span class="ruby-comment"># Server shares</span>
|
862
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">configure_shares</span>(<span class="ruby-identifier">node</span>, <span class="ruby-identifier">machine</span>)
|
863
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Configuration of Vagrant shares failed: #{node_name}"</span>
|
864
|
+
<span class="ruby-keyword">end</span>
|
865
|
+
|
866
|
+
<span class="ruby-comment"># Provisioner configuration</span>
|
867
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">configure_provisioner</span>(<span class="ruby-identifier">network</span>, <span class="ruby-identifier">node</span>, <span class="ruby-identifier">machine</span>, &<span class="ruby-identifier">code</span>)
|
868
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Configuration of Vagrant provisioner failed: #{node_name}"</span>
|
869
|
+
<span class="ruby-keyword">end</span>
|
870
|
+
<span class="ruby-keyword">end</span>
|
871
|
+
<span class="ruby-keyword">end</span>
|
872
|
+
<span class="ruby-keyword">end</span>
|
873
|
+
<span class="ruby-keyword">end</span></pre>
|
874
|
+
</div><!-- register-source -->
|
875
|
+
|
876
|
+
</div>
|
877
|
+
|
878
|
+
|
879
|
+
|
880
|
+
|
881
|
+
</div><!-- register-method -->
|
882
|
+
|
883
|
+
|
884
|
+
</section><!-- public-class-method-details -->
|
885
|
+
|
886
|
+
</section><!-- 5Buntitled-5D -->
|
887
|
+
|
888
|
+
</div><!-- documentation -->
|
889
|
+
|
890
|
+
|
891
|
+
<footer id="validator-badges">
|
892
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
893
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.2.
|
894
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
895
|
+
</footer>
|
896
|
+
|