corl 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +8 -6
- data/VERSION +1 -1
- data/bootstrap/os/ubuntu/00_base.sh +2 -2
- data/bootstrap/os/ubuntu/05_ruby.sh +14 -2
- data/corl.gemspec +175 -5
- data/lib/CORL/builder/identity.rb +1 -1
- data/lib/CORL/builder/package.rb +1 -1
- data/lib/CORL/configuration/file.rb +7 -13
- data/lib/CORL/machine/physical.rb +1 -1
- data/lib/CORL/machine/vagrant.rb +12 -4
- data/lib/CORL/network/CORL.rb +1 -1
- data/lib/CORL/node/AWS.rb +25 -23
- data/lib/CORL/node/local.rb +1 -1
- data/lib/CORL/node/rackspace.rb +13 -15
- data/lib/CORL/node/vagrant.rb +1 -1
- data/lib/CORL/provisioner/puppetnode.rb +1 -1
- data/lib/core/mixin/action/keypair.rb +6 -6
- data/lib/core/mixin/action/registration.rb +39 -11
- data/lib/core/mod/fog_aws_server.rb +1 -3
- data/lib/core/plugin/builder.rb +1 -1
- data/lib/core/plugin/cloud_action.rb +59 -49
- data/lib/core/plugin/configuration.rb +4 -3
- data/lib/core/plugin/fog_machine.rb +10 -2
- data/lib/core/plugin/fog_node.rb +10 -4
- data/lib/core/plugin/machine.rb +2 -8
- data/lib/core/plugin/network.rb +9 -3
- data/lib/core/plugin/node.rb +30 -31
- data/lib/core/plugin/provisioner.rb +1 -1
- data/lib/core/vagrant/Vagrantfile +4 -1
- data/lib/core/vagrant/plugins.rb +6 -4
- data/lib/corl.rb +1 -1
- data/lib/nucleon/action/cloud/config.rb +167 -100
- data/lib/nucleon/action/cloud/create.rb +5 -1
- data/lib/nucleon/action/cloud/images.rb +10 -7
- data/lib/nucleon/action/cloud/inspect.rb +8 -6
- data/lib/nucleon/action/cloud/machines.rb +10 -7
- data/lib/nucleon/action/cloud/regions.rb +13 -8
- data/lib/nucleon/action/cloud/remote.rb +68 -0
- data/lib/nucleon/action/cloud/settings.rb +33 -47
- data/lib/nucleon/action/cloud/vagrantfile.rb +34 -17
- data/lib/nucleon/action/node/IP.rb +2 -2
- data/lib/nucleon/action/node/SSH.rb +3 -3
- data/lib/nucleon/action/node/authorize.rb +2 -2
- data/lib/nucleon/action/node/bootstrap.rb +17 -30
- data/lib/nucleon/action/node/build.rb +4 -4
- data/lib/nucleon/action/node/cache.rb +2 -4
- data/lib/nucleon/action/node/destroy.rb +25 -26
- data/lib/nucleon/action/node/exec.rb +2 -2
- data/lib/nucleon/action/node/fact.rb +10 -5
- data/lib/nucleon/action/node/group.rb +10 -5
- data/lib/nucleon/action/node/identity.rb +6 -8
- data/lib/nucleon/action/node/image.rb +3 -3
- data/lib/nucleon/action/node/keypair.rb +2 -2
- data/lib/nucleon/action/node/lookup.rb +2 -4
- data/lib/nucleon/action/node/provision.rb +2 -2
- data/lib/nucleon/action/node/reboot.rb +3 -3
- data/lib/nucleon/action/node/revoke.rb +2 -2
- data/lib/nucleon/action/node/seed.rb +28 -43
- data/lib/nucleon/action/node/spawn.rb +19 -14
- data/lib/nucleon/action/node/start.rb +3 -3
- data/lib/nucleon/action/node/status.rb +8 -8
- data/lib/nucleon/action/node/stop.rb +3 -3
- data/lib/nucleon/action/plugin/create.rb +10 -13
- data/lib/nucleon/action/plugin/list.rb +7 -7
- data/lib/nucleon/action/plugin/template/nucleon.action.erb +2 -2
- data/lib/nucleon/action/plugins.rb +12 -1
- data/lib/nucleon/event/puppet.rb +1 -1
- data/lib/nucleon/extension/corl_config.rb +26 -0
- data/lib/nucleon/template/environment.rb +1 -1
- data/locales/en.yml +483 -90
- data/rdoc/site/0.5.1/CORL/Build.html +781 -0
- data/rdoc/site/0.5.1/CORL/Builder/Identity.html +596 -0
- data/rdoc/site/0.5.1/CORL/Builder/Package.html +600 -0
- data/rdoc/site/0.5.1/CORL/Builder.html +384 -0
- data/rdoc/site/0.5.1/CORL/Configuration/File.html +1186 -0
- data/rdoc/site/0.5.1/CORL/Configuration.html +383 -0
- data/rdoc/site/0.5.1/CORL/Errors.html +383 -0
- data/rdoc/site/0.5.1/CORL/Facade.html +927 -0
- data/rdoc/site/0.5.1/CORL/Machine/AWS.html +777 -0
- data/rdoc/site/0.5.1/CORL/Machine/Fog.html +1313 -0
- data/rdoc/site/0.5.1/CORL/Machine/Physical.html +1083 -0
- data/rdoc/site/0.5.1/CORL/Machine/Rackspace.html +558 -0
- data/rdoc/site/0.5.1/CORL/Machine/Vagrant.html +1344 -0
- data/rdoc/site/0.5.1/CORL/Machine.html +387 -0
- data/rdoc/site/0.5.1/CORL/Mixin/Action/Keypair.html +616 -0
- data/rdoc/site/0.5.1/CORL/Mixin/Action/Registration.html +469 -0
- data/rdoc/site/0.5.1/CORL/Mixin/Action.html +384 -0
- data/rdoc/site/0.5.1/CORL/Mixin/Builder/Global.html +628 -0
- data/rdoc/site/0.5.1/CORL/Mixin/Builder/Instance.html +720 -0
- data/rdoc/site/0.5.1/CORL/Mixin/Builder.html +383 -0
- data/rdoc/site/0.5.1/CORL/Mixin/Lookup.html +1315 -0
- data/rdoc/site/0.5.1/CORL/Mixin/Machine/SSH.html +699 -0
- data/rdoc/site/0.5.1/CORL/Mixin/Machine.html +383 -0
- data/rdoc/site/0.5.1/CORL/Mixin/Macro/NetworkSettings.html +508 -0
- data/rdoc/site/0.5.1/CORL/Mixin/Macro.html +383 -0
- data/rdoc/site/0.5.1/CORL/Mixin.html +388 -0
- data/rdoc/site/0.5.1/CORL/Network/CORL.html +435 -0
- data/rdoc/site/0.5.1/CORL/Network.html +383 -0
- data/rdoc/site/0.5.1/CORL/Node/AWS.html +760 -0
- data/rdoc/site/0.5.1/CORL/Node/Fog.html +1268 -0
- data/rdoc/site/0.5.1/CORL/Node/Local.html +468 -0
- data/rdoc/site/0.5.1/CORL/Node/Rackspace.html +753 -0
- data/rdoc/site/0.5.1/CORL/Node/Vagrant.html +1497 -0
- data/rdoc/site/0.5.1/CORL/Node.html +387 -0
- data/rdoc/site/0.5.1/CORL/Plugin/Builder.html +524 -0
- data/rdoc/site/0.5.1/CORL/Plugin/Configuration.html +1294 -0
- data/rdoc/site/0.5.1/CORL/Plugin/Machine.html +1323 -0
- data/rdoc/site/0.5.1/CORL/Plugin/Network.html +1766 -0
- data/rdoc/site/0.5.1/CORL/Plugin/Node.html +4263 -0
- data/rdoc/site/0.5.1/CORL/Plugin/Provisioner.html +1139 -0
- data/rdoc/site/0.5.1/CORL/Plugin.html +673 -0
- data/rdoc/site/0.5.1/CORL/Provisioner/Puppetnode.html +1201 -0
- data/rdoc/site/0.5.1/CORL/Provisioner.html +383 -0
- data/rdoc/site/0.5.1/CORL/Util/Puppet/Resource.html +1082 -0
- data/rdoc/site/0.5.1/CORL/Util/Puppet/ResourceGroup.html +964 -0
- data/rdoc/site/0.5.1/CORL/Util/Puppet.html +1131 -0
- data/rdoc/site/0.5.1/CORL/Util.html +385 -0
- data/rdoc/site/0.5.1/CORL/Vagrant/Config.html +967 -0
- data/rdoc/site/0.5.1/CORL/Vagrant.html +462 -0
- data/rdoc/site/0.5.1/CORL.html +496 -0
- data/rdoc/site/0.5.1/Fog/Compute/AWS/Server.html +467 -0
- data/rdoc/site/0.5.1/Fog/Compute/AWS.html +389 -0
- data/rdoc/site/0.5.1/Fog/Compute/RackspaceV2/Server.html +452 -0
- data/rdoc/site/0.5.1/Fog/Compute/RackspaceV2.html +389 -0
- data/rdoc/site/0.5.1/Fog/Compute.html +384 -0
- data/rdoc/site/0.5.1/Fog.html +384 -0
- data/rdoc/site/0.5.1/Hiera/Backend.html +466 -0
- data/rdoc/site/0.5.1/Hiera/Corl_logger.html +493 -0
- data/rdoc/site/0.5.1/Hiera.html +390 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Config.html +978 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Create.html +562 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Images.html +596 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Inspect.html +567 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Machines.html +591 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Regions.html +591 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Settings.html +878 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Cloud/Vagrantfile.html +539 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Cloud.html +390 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Authorize.html +567 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Bootstrap.html +628 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Build.html +550 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Cache.html +773 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Destroy.html +597 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Exec.html +554 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Fact.html +733 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Facts.html +505 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Group.html +729 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Groups.html +505 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/IP.html +477 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Identity.html +614 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Image.html +597 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Keypair.html +596 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Lookup.html +579 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Provision.html +577 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Reboot.html +597 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Revoke.html +565 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/SSH.html +607 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Seed.html +626 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Spawn.html +699 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Start.html +597 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Status.html +615 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node/Stop.html +597 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Node.html +406 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Plugin/Create.html +736 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Plugin/List.html +570 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Plugin.html +384 -0
- data/rdoc/site/0.5.1/Nucleon/Action/Plugins.html +435 -0
- data/rdoc/site/0.5.1/Nucleon/Action.html +417 -0
- data/rdoc/site/0.5.1/Nucleon/Config.html +401 -0
- data/rdoc/site/0.5.1/Nucleon/Event/Puppet.html +717 -0
- data/rdoc/site/0.5.1/Nucleon/Event.html +383 -0
- data/rdoc/site/0.5.1/Nucleon/Plugin/Base.html +389 -0
- data/rdoc/site/0.5.1/Nucleon/Plugin/CloudAction.html +894 -0
- data/rdoc/site/0.5.1/Nucleon/Plugin.html +384 -0
- data/rdoc/site/0.5.1/Nucleon/Template/Environment.html +572 -0
- data/rdoc/site/0.5.1/Nucleon/Template.html +383 -0
- data/rdoc/site/0.5.1/Nucleon.html +421 -0
- data/rdoc/site/0.5.1/Object.html +402 -0
- data/rdoc/site/0.5.1/Puppet/DataBinding/Corl.html +389 -0
- data/rdoc/site/0.5.1/Puppet/DataBinding.html +382 -0
- data/rdoc/site/0.5.1/Puppet/Indirector/Corl.html +501 -0
- data/rdoc/site/0.5.1/Puppet/Indirector.html +382 -0
- data/rdoc/site/0.5.1/Puppet/Parser/Functions.html +524 -0
- data/rdoc/site/0.5.1/Puppet/Parser.html +382 -0
- data/rdoc/site/0.5.1/Puppet.html +382 -0
- data/rdoc/site/0.5.1/README_rdoc.html +384 -0
- data/rdoc/site/0.5.1/Vagrant/Config/Loader.html +443 -0
- data/rdoc/site/0.5.1/Vagrant/Config.html +383 -0
- data/rdoc/site/0.5.1/Vagrant/Vagrantfile.html +436 -0
- data/rdoc/site/0.5.1/Vagrant.html +390 -0
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Action/DeleteCache.html +446 -0
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Action/InitKeys.html +452 -0
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Action/LinkNetwork.html +450 -0
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Action.html +385 -0
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/BaseAction.html +535 -0
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Command/Launcher.html +577 -0
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Command.html +383 -0
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Config/CORL.html +776 -0
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Config.html +383 -0
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Plugin.html +389 -0
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Provisioner/CORL.html +580 -0
- data/rdoc/site/0.5.1/VagrantPlugins/CORL/Provisioner.html +383 -0
- data/rdoc/site/0.5.1/VagrantPlugins/CORL.html +390 -0
- data/rdoc/site/0.5.1/VagrantPlugins.html +390 -0
- data/rdoc/site/0.5.1/created.rid +114 -0
- data/rdoc/site/0.5.1/images/add.png +0 -0
- data/rdoc/site/0.5.1/images/brick.png +0 -0
- data/rdoc/site/0.5.1/images/brick_link.png +0 -0
- data/rdoc/site/0.5.1/images/bug.png +0 -0
- data/rdoc/site/0.5.1/images/bullet_black.png +0 -0
- data/rdoc/site/0.5.1/images/bullet_toggle_minus.png +0 -0
- data/rdoc/site/0.5.1/images/bullet_toggle_plus.png +0 -0
- data/rdoc/site/0.5.1/images/date.png +0 -0
- data/rdoc/site/0.5.1/images/delete.png +0 -0
- data/rdoc/site/0.5.1/images/find.png +0 -0
- data/rdoc/site/0.5.1/images/loadingAnimation.gif +0 -0
- data/rdoc/site/0.5.1/images/macFFBgHack.png +0 -0
- data/rdoc/site/0.5.1/images/package.png +0 -0
- data/rdoc/site/0.5.1/images/page_green.png +0 -0
- data/rdoc/site/0.5.1/images/page_white_text.png +0 -0
- data/rdoc/site/0.5.1/images/page_white_width.png +0 -0
- data/rdoc/site/0.5.1/images/plugin.png +0 -0
- data/rdoc/site/0.5.1/images/ruby.png +0 -0
- data/rdoc/site/0.5.1/images/tag_blue.png +0 -0
- data/rdoc/site/0.5.1/images/tag_green.png +0 -0
- data/rdoc/site/0.5.1/images/transparent.png +0 -0
- data/rdoc/site/0.5.1/images/wrench.png +0 -0
- data/rdoc/site/0.5.1/images/wrench_orange.png +0 -0
- data/rdoc/site/0.5.1/images/zoom.png +0 -0
- data/rdoc/site/0.5.1/index.html +383 -0
- data/rdoc/site/0.5.1/js/darkfish.js +155 -0
- data/rdoc/site/0.5.1/js/jquery.js +18 -0
- data/rdoc/site/0.5.1/js/navigation.js +142 -0
- data/rdoc/site/0.5.1/js/search.js +94 -0
- data/rdoc/site/0.5.1/js/search_index.js +1 -0
- data/rdoc/site/0.5.1/js/searcher.js +228 -0
- data/rdoc/site/0.5.1/rdoc.css +543 -0
- data/rdoc/site/0.5.1/table_of_contents.html +2005 -0
- metadata +174 -4
@@ -0,0 +1,967 @@
|
|
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.5.1</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/Build.html">CORL::Build</a>
|
111
|
+
|
112
|
+
<li><a href="../../CORL/Builder.html">CORL::Builder</a>
|
113
|
+
|
114
|
+
<li><a href="../../CORL/Builder/Identity.html">CORL::Builder::Identity</a>
|
115
|
+
|
116
|
+
<li><a href="../../CORL/Builder/Package.html">CORL::Builder::Package</a>
|
117
|
+
|
118
|
+
<li><a href="../../CORL/Configuration.html">CORL::Configuration</a>
|
119
|
+
|
120
|
+
<li><a href="../../CORL/Configuration/File.html">CORL::Configuration::File</a>
|
121
|
+
|
122
|
+
<li><a href="../../CORL/Errors.html">CORL::Errors</a>
|
123
|
+
|
124
|
+
<li><a href="../../CORL/Facade.html">CORL::Facade</a>
|
125
|
+
|
126
|
+
<li><a href="../../CORL/Machine.html">CORL::Machine</a>
|
127
|
+
|
128
|
+
<li><a href="../../CORL/Machine/AWS.html">CORL::Machine::AWS</a>
|
129
|
+
|
130
|
+
<li><a href="../../CORL/Machine/Fog.html">CORL::Machine::Fog</a>
|
131
|
+
|
132
|
+
<li><a href="../../CORL/Machine/Physical.html">CORL::Machine::Physical</a>
|
133
|
+
|
134
|
+
<li><a href="../../CORL/Machine/Rackspace.html">CORL::Machine::Rackspace</a>
|
135
|
+
|
136
|
+
<li><a href="../../CORL/Machine/Vagrant.html">CORL::Machine::Vagrant</a>
|
137
|
+
|
138
|
+
<li><a href="../../CORL/Mixin.html">CORL::Mixin</a>
|
139
|
+
|
140
|
+
<li><a href="../../CORL/Mixin/Action.html">CORL::Mixin::Action</a>
|
141
|
+
|
142
|
+
<li><a href="../../CORL/Mixin/Action/Keypair.html">CORL::Mixin::Action::Keypair</a>
|
143
|
+
|
144
|
+
<li><a href="../../CORL/Mixin/Action/Registration.html">CORL::Mixin::Action::Registration</a>
|
145
|
+
|
146
|
+
<li><a href="../../CORL/Mixin/Builder.html">CORL::Mixin::Builder</a>
|
147
|
+
|
148
|
+
<li><a href="../../CORL/Mixin/Builder/Global.html">CORL::Mixin::Builder::Global</a>
|
149
|
+
|
150
|
+
<li><a href="../../CORL/Mixin/Builder/Instance.html">CORL::Mixin::Builder::Instance</a>
|
151
|
+
|
152
|
+
<li><a href="../../CORL/Mixin/Lookup.html">CORL::Mixin::Lookup</a>
|
153
|
+
|
154
|
+
<li><a href="../../CORL/Mixin/Machine.html">CORL::Mixin::Machine</a>
|
155
|
+
|
156
|
+
<li><a href="../../CORL/Mixin/Machine/SSH.html">CORL::Mixin::Machine::SSH</a>
|
157
|
+
|
158
|
+
<li><a href="../../CORL/Mixin/Macro.html">CORL::Mixin::Macro</a>
|
159
|
+
|
160
|
+
<li><a href="../../CORL/Mixin/Macro/NetworkSettings.html">CORL::Mixin::Macro::NetworkSettings</a>
|
161
|
+
|
162
|
+
<li><a href="../../CORL/Network.html">CORL::Network</a>
|
163
|
+
|
164
|
+
<li><a href="../../CORL/Network/CORL.html">CORL::Network::CORL</a>
|
165
|
+
|
166
|
+
<li><a href="../../CORL/Node.html">CORL::Node</a>
|
167
|
+
|
168
|
+
<li><a href="../../CORL/Node/AWS.html">CORL::Node::AWS</a>
|
169
|
+
|
170
|
+
<li><a href="../../CORL/Node/Fog.html">CORL::Node::Fog</a>
|
171
|
+
|
172
|
+
<li><a href="../../CORL/Node/Local.html">CORL::Node::Local</a>
|
173
|
+
|
174
|
+
<li><a href="../../CORL/Node/Rackspace.html">CORL::Node::Rackspace</a>
|
175
|
+
|
176
|
+
<li><a href="../../CORL/Node/Vagrant.html">CORL::Node::Vagrant</a>
|
177
|
+
|
178
|
+
<li><a href="../../CORL/Plugin.html">CORL::Plugin</a>
|
179
|
+
|
180
|
+
<li><a href="../../CORL/Plugin/Builder.html">CORL::Plugin::Builder</a>
|
181
|
+
|
182
|
+
<li><a href="../../CORL/Plugin/Configuration.html">CORL::Plugin::Configuration</a>
|
183
|
+
|
184
|
+
<li><a href="../../CORL/Plugin/Machine.html">CORL::Plugin::Machine</a>
|
185
|
+
|
186
|
+
<li><a href="../../CORL/Plugin/Network.html">CORL::Plugin::Network</a>
|
187
|
+
|
188
|
+
<li><a href="../../CORL/Plugin/Node.html">CORL::Plugin::Node</a>
|
189
|
+
|
190
|
+
<li><a href="../../CORL/Plugin/Provisioner.html">CORL::Plugin::Provisioner</a>
|
191
|
+
|
192
|
+
<li><a href="../../CORL/Provisioner.html">CORL::Provisioner</a>
|
193
|
+
|
194
|
+
<li><a href="../../CORL/Provisioner/Puppetnode.html">CORL::Provisioner::Puppetnode</a>
|
195
|
+
|
196
|
+
<li><a href="../../CORL/Util.html">CORL::Util</a>
|
197
|
+
|
198
|
+
<li><a href="../../CORL/Util/Puppet.html">CORL::Util::Puppet</a>
|
199
|
+
|
200
|
+
<li><a href="../../CORL/Util/Puppet/Resource.html">CORL::Util::Puppet::Resource</a>
|
201
|
+
|
202
|
+
<li><a href="../../CORL/Util/Puppet/ResourceGroup.html">CORL::Util::Puppet::ResourceGroup</a>
|
203
|
+
|
204
|
+
<li><a href="../../CORL/Vagrant.html">CORL::Vagrant</a>
|
205
|
+
|
206
|
+
<li><a href="../../CORL/Vagrant/Config.html">CORL::Vagrant::Config</a>
|
207
|
+
|
208
|
+
<li><a href="../../Nucleon.html">Nucleon</a>
|
209
|
+
|
210
|
+
<li><a href="../../Nucleon/Action.html">Nucleon::Action</a>
|
211
|
+
|
212
|
+
<li><a href="../../Nucleon/Action/Cloud.html">Nucleon::Action::Cloud</a>
|
213
|
+
|
214
|
+
<li><a href="../../Nucleon/Action/Cloud/Config.html">Nucleon::Action::Cloud::Config</a>
|
215
|
+
|
216
|
+
<li><a href="../../Nucleon/Action/Cloud/Create.html">Nucleon::Action::Cloud::Create</a>
|
217
|
+
|
218
|
+
<li><a href="../../Nucleon/Action/Cloud/Images.html">Nucleon::Action::Cloud::Images</a>
|
219
|
+
|
220
|
+
<li><a href="../../Nucleon/Action/Cloud/Inspect.html">Nucleon::Action::Cloud::Inspect</a>
|
221
|
+
|
222
|
+
<li><a href="../../Nucleon/Action/Cloud/Machines.html">Nucleon::Action::Cloud::Machines</a>
|
223
|
+
|
224
|
+
<li><a href="../../Nucleon/Action/Cloud/Regions.html">Nucleon::Action::Cloud::Regions</a>
|
225
|
+
|
226
|
+
<li><a href="../../Nucleon/Action/Cloud/Settings.html">Nucleon::Action::Cloud::Settings</a>
|
227
|
+
|
228
|
+
<li><a href="../../Nucleon/Action/Cloud/Vagrantfile.html">Nucleon::Action::Cloud::Vagrantfile</a>
|
229
|
+
|
230
|
+
<li><a href="../../Nucleon/Action/Node.html">Nucleon::Action::Node</a>
|
231
|
+
|
232
|
+
<li><a href="../../Nucleon/Action/Node/Authorize.html">Nucleon::Action::Node::Authorize</a>
|
233
|
+
|
234
|
+
<li><a href="../../Nucleon/Action/Node/Bootstrap.html">Nucleon::Action::Node::Bootstrap</a>
|
235
|
+
|
236
|
+
<li><a href="../../Nucleon/Action/Node/Build.html">Nucleon::Action::Node::Build</a>
|
237
|
+
|
238
|
+
<li><a href="../../Nucleon/Action/Node/Cache.html">Nucleon::Action::Node::Cache</a>
|
239
|
+
|
240
|
+
<li><a href="../../Nucleon/Action/Node/Destroy.html">Nucleon::Action::Node::Destroy</a>
|
241
|
+
|
242
|
+
<li><a href="../../Nucleon/Action/Node/Exec.html">Nucleon::Action::Node::Exec</a>
|
243
|
+
|
244
|
+
<li><a href="../../Nucleon/Action/Node/Fact.html">Nucleon::Action::Node::Fact</a>
|
245
|
+
|
246
|
+
<li><a href="../../Nucleon/Action/Node/Facts.html">Nucleon::Action::Node::Facts</a>
|
247
|
+
|
248
|
+
<li><a href="../../Nucleon/Action/Node/Group.html">Nucleon::Action::Node::Group</a>
|
249
|
+
|
250
|
+
<li><a href="../../Nucleon/Action/Node/Groups.html">Nucleon::Action::Node::Groups</a>
|
251
|
+
|
252
|
+
<li><a href="../../Nucleon/Action/Node/IP.html">Nucleon::Action::Node::IP</a>
|
253
|
+
|
254
|
+
<li><a href="../../Nucleon/Action/Node/Identity.html">Nucleon::Action::Node::Identity</a>
|
255
|
+
|
256
|
+
<li><a href="../../Nucleon/Action/Node/Image.html">Nucleon::Action::Node::Image</a>
|
257
|
+
|
258
|
+
<li><a href="../../Nucleon/Action/Node/Keypair.html">Nucleon::Action::Node::Keypair</a>
|
259
|
+
|
260
|
+
<li><a href="../../Nucleon/Action/Node/Lookup.html">Nucleon::Action::Node::Lookup</a>
|
261
|
+
|
262
|
+
<li><a href="../../Nucleon/Action/Node/Provision.html">Nucleon::Action::Node::Provision</a>
|
263
|
+
|
264
|
+
<li><a href="../../Nucleon/Action/Node/Reboot.html">Nucleon::Action::Node::Reboot</a>
|
265
|
+
|
266
|
+
<li><a href="../../Nucleon/Action/Node/Revoke.html">Nucleon::Action::Node::Revoke</a>
|
267
|
+
|
268
|
+
<li><a href="../../Nucleon/Action/Node/SSH.html">Nucleon::Action::Node::SSH</a>
|
269
|
+
|
270
|
+
<li><a href="../../Nucleon/Action/Node/Seed.html">Nucleon::Action::Node::Seed</a>
|
271
|
+
|
272
|
+
<li><a href="../../Nucleon/Action/Node/Spawn.html">Nucleon::Action::Node::Spawn</a>
|
273
|
+
|
274
|
+
<li><a href="../../Nucleon/Action/Node/Start.html">Nucleon::Action::Node::Start</a>
|
275
|
+
|
276
|
+
<li><a href="../../Nucleon/Action/Node/Status.html">Nucleon::Action::Node::Status</a>
|
277
|
+
|
278
|
+
<li><a href="../../Nucleon/Action/Node/Stop.html">Nucleon::Action::Node::Stop</a>
|
279
|
+
|
280
|
+
<li><a href="../../Nucleon/Action/Plugin.html">Nucleon::Action::Plugin</a>
|
281
|
+
|
282
|
+
<li><a href="../../Nucleon/Action/Plugin/Create.html">Nucleon::Action::Plugin::Create</a>
|
283
|
+
|
284
|
+
<li><a href="../../Nucleon/Action/Plugin/List.html">Nucleon::Action::Plugin::List</a>
|
285
|
+
|
286
|
+
<li><a href="../../Nucleon/Action/Plugins.html">Nucleon::Action::Plugins</a>
|
287
|
+
|
288
|
+
<li><a href="../../Nucleon/Config.html">Nucleon::Config</a>
|
289
|
+
|
290
|
+
<li><a href="../../Nucleon/Event.html">Nucleon::Event</a>
|
291
|
+
|
292
|
+
<li><a href="../../Nucleon/Event/Puppet.html">Nucleon::Event::Puppet</a>
|
293
|
+
|
294
|
+
<li><a href="../../Nucleon/Plugin.html">Nucleon::Plugin</a>
|
295
|
+
|
296
|
+
<li><a href="../../Nucleon/Plugin/Base.html">Nucleon::Plugin::Base</a>
|
297
|
+
|
298
|
+
<li><a href="../../Nucleon/Plugin/CloudAction.html">Nucleon::Plugin::CloudAction</a>
|
299
|
+
|
300
|
+
<li><a href="../../Nucleon/Template.html">Nucleon::Template</a>
|
301
|
+
|
302
|
+
<li><a href="../../Nucleon/Template/Environment.html">Nucleon::Template::Environment</a>
|
303
|
+
|
304
|
+
<li><a href="../../VagrantPlugins.html">VagrantPlugins</a>
|
305
|
+
|
306
|
+
<li><a href="../../VagrantPlugins/CORL.html">VagrantPlugins::CORL</a>
|
307
|
+
|
308
|
+
<li><a href="../../VagrantPlugins/CORL/Action.html">VagrantPlugins::CORL::Action</a>
|
309
|
+
|
310
|
+
<li><a href="../../VagrantPlugins/CORL/Action/DeleteCache.html">VagrantPlugins::CORL::Action::DeleteCache</a>
|
311
|
+
|
312
|
+
<li><a href="../../VagrantPlugins/CORL/Action/InitKeys.html">VagrantPlugins::CORL::Action::InitKeys</a>
|
313
|
+
|
314
|
+
<li><a href="../../VagrantPlugins/CORL/Action/LinkNetwork.html">VagrantPlugins::CORL::Action::LinkNetwork</a>
|
315
|
+
|
316
|
+
<li><a href="../../VagrantPlugins/CORL/BaseAction.html">VagrantPlugins::CORL::BaseAction</a>
|
317
|
+
|
318
|
+
<li><a href="../../VagrantPlugins/CORL/Command.html">VagrantPlugins::CORL::Command</a>
|
319
|
+
|
320
|
+
<li><a href="../../VagrantPlugins/CORL/Command/Launcher.html">VagrantPlugins::CORL::Command::Launcher</a>
|
321
|
+
|
322
|
+
<li><a href="../../VagrantPlugins/CORL/Config.html">VagrantPlugins::CORL::Config</a>
|
323
|
+
|
324
|
+
<li><a href="../../VagrantPlugins/CORL/Config/CORL.html">VagrantPlugins::CORL::Config::CORL</a>
|
325
|
+
|
326
|
+
<li><a href="../../VagrantPlugins/CORL/Plugin.html">VagrantPlugins::CORL::Plugin</a>
|
327
|
+
|
328
|
+
<li><a href="../../VagrantPlugins/CORL/Provisioner.html">VagrantPlugins::CORL::Provisioner</a>
|
329
|
+
|
330
|
+
<li><a href="../../VagrantPlugins/CORL/Provisioner/CORL.html">VagrantPlugins::CORL::Provisioner::CORL</a>
|
331
|
+
|
332
|
+
<li><a href="../../Puppet.html">Puppet</a>
|
333
|
+
|
334
|
+
<li><a href="../../Puppet/DataBinding.html">Puppet::DataBinding</a>
|
335
|
+
|
336
|
+
<li><a href="../../Puppet/DataBinding/Corl.html">Puppet::DataBinding::Corl</a>
|
337
|
+
|
338
|
+
<li><a href="../../Puppet/Indirector.html">Puppet::Indirector</a>
|
339
|
+
|
340
|
+
<li><a href="../../Puppet/Indirector/Corl.html">Puppet::Indirector::Corl</a>
|
341
|
+
|
342
|
+
<li><a href="../../Puppet/Parser.html">Puppet::Parser</a>
|
343
|
+
|
344
|
+
<li><a href="../../Puppet/Parser/Functions.html">Puppet::Parser::Functions</a>
|
345
|
+
|
346
|
+
<li><a href="../../Fog.html">Fog</a>
|
347
|
+
|
348
|
+
<li><a href="../../Fog/Compute.html">Fog::Compute</a>
|
349
|
+
|
350
|
+
<li><a href="../../Fog/Compute/AWS.html">Fog::Compute::AWS</a>
|
351
|
+
|
352
|
+
<li><a href="../../Fog/Compute/AWS/Server.html">Fog::Compute::AWS::Server</a>
|
353
|
+
|
354
|
+
<li><a href="../../Fog/Compute/RackspaceV2.html">Fog::Compute::RackspaceV2</a>
|
355
|
+
|
356
|
+
<li><a href="../../Fog/Compute/RackspaceV2/Server.html">Fog::Compute::RackspaceV2::Server</a>
|
357
|
+
|
358
|
+
<li><a href="../../Vagrant.html">Vagrant</a>
|
359
|
+
|
360
|
+
<li><a href="../../Vagrant/Config.html">Vagrant::Config</a>
|
361
|
+
|
362
|
+
<li><a href="../../Vagrant/Config/Loader.html">Vagrant::Config::Loader</a>
|
363
|
+
|
364
|
+
<li><a href="../../Vagrant/Vagrantfile.html">Vagrant::Vagrantfile</a>
|
365
|
+
|
366
|
+
<li><a href="../../Hiera.html">Hiera</a>
|
367
|
+
|
368
|
+
<li><a href="../../Hiera/Backend.html">Hiera::Backend</a>
|
369
|
+
|
370
|
+
<li><a href="../../Hiera/Corl_logger.html">Hiera::Corl_logger</a>
|
371
|
+
|
372
|
+
<li><a href="../../Object.html">Object</a>
|
373
|
+
|
374
|
+
</ul>
|
375
|
+
</nav>
|
376
|
+
|
377
|
+
</div>
|
378
|
+
</nav>
|
379
|
+
|
380
|
+
<div id="documentation">
|
381
|
+
<h1 class="module">module CORL::Vagrant::Config</h1>
|
382
|
+
|
383
|
+
<div id="description" class="description">
|
384
|
+
|
385
|
+
</div><!-- description -->
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
<!-- Methods -->
|
400
|
+
|
401
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
402
|
+
<h3 class="section-header">Public Class Methods</h3>
|
403
|
+
|
404
|
+
|
405
|
+
<div id="method-c-configure_provisioner" class="method-detail ">
|
406
|
+
|
407
|
+
<div class="method-heading">
|
408
|
+
<span class="method-name">configure_provisioner</span><span
|
409
|
+
class="method-args">(network, node, machine, &code)</span>
|
410
|
+
<span class="method-click-advice">click to toggle source</span>
|
411
|
+
</div>
|
412
|
+
|
413
|
+
|
414
|
+
<div class="method-description">
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
<div class="method-source-code" id="configure_provisioner-source">
|
421
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 316</span>
|
422
|
+
<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>)
|
423
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">true</span>
|
424
|
+
|
425
|
+
<span class="ruby-comment"># CORL provisioning</span>
|
426
|
+
<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>
|
427
|
+
<span class="ruby-identifier">provisioner</span>.<span class="ruby-identifier">network</span> = <span class="ruby-identifier">network</span>
|
428
|
+
<span class="ruby-identifier">provisioner</span>.<span class="ruby-identifier">node</span> = <span class="ruby-identifier">node</span>
|
429
|
+
|
430
|
+
<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>
|
431
|
+
<span class="ruby-keyword">end</span>
|
432
|
+
<span class="ruby-identifier">success</span>
|
433
|
+
<span class="ruby-keyword">end</span></pre>
|
434
|
+
</div><!-- configure_provisioner-source -->
|
435
|
+
|
436
|
+
</div>
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
</div><!-- configure_provisioner-method -->
|
442
|
+
|
443
|
+
|
444
|
+
<div id="method-c-configure_shares" class="method-detail ">
|
445
|
+
|
446
|
+
<div class="method-heading">
|
447
|
+
<span class="method-name">configure_shares</span><span
|
448
|
+
class="method-args">(node, machine)</span>
|
449
|
+
<span class="method-click-advice">click to toggle source</span>
|
450
|
+
</div>
|
451
|
+
|
452
|
+
|
453
|
+
<div class="method-description">
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
<div class="method-source-code" id="configure_shares-source">
|
460
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 269</span>
|
461
|
+
<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>)
|
462
|
+
<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>)
|
463
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">true</span>
|
464
|
+
|
465
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">bindfs_installed</span>
|
466
|
+
<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>
|
467
|
+
<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>
|
468
|
+
<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>
|
469
|
+
<span class="ruby-keyword">end</span>
|
470
|
+
|
471
|
+
<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>
|
472
|
+
<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>)
|
473
|
+
<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>)
|
474
|
+
<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>)
|
475
|
+
<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>)
|
476
|
+
|
477
|
+
<span class="ruby-identifier">config</span>.<span class="ruby-identifier">init</span>(<span class="ruby-value">:create</span>, <span class="ruby-keyword">true</span>)
|
478
|
+
|
479
|
+
<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>
|
480
|
+
<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>, {})
|
481
|
+
<span class="ruby-identifier">share_options</span> = {}
|
482
|
+
|
483
|
+
<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>
|
484
|
+
<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>])
|
485
|
+
<span class="ruby-keyword">end</span>
|
486
|
+
|
487
|
+
<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>
|
488
|
+
<span class="ruby-identifier">final_dir</span> = <span class="ruby-identifier">remote_dir</span>
|
489
|
+
<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>)
|
490
|
+
|
491
|
+
<span class="ruby-comment">#dbg(remote_dir, 'vm bindfs local')</span>
|
492
|
+
<span class="ruby-comment">#dbg(final_dir, 'vm bindfs remote')</span>
|
493
|
+
<span class="ruby-comment">#dbg(bindfs_options, 'vm bindfs options') </span>
|
494
|
+
<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>
|
495
|
+
<span class="ruby-keyword">end</span>
|
496
|
+
|
497
|
+
<span class="ruby-comment">#dbg(local_dir, 'vm share local')</span>
|
498
|
+
<span class="ruby-comment">#dbg(remote_dir, 'vm share remote')</span>
|
499
|
+
<span class="ruby-comment">#dbg(share_options, 'vm share options') </span>
|
500
|
+
<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>
|
501
|
+
<span class="ruby-keyword">end</span>
|
502
|
+
<span class="ruby-keyword">end</span>
|
503
|
+
<span class="ruby-identifier">success</span>
|
504
|
+
<span class="ruby-keyword">end</span></pre>
|
505
|
+
</div><!-- configure_shares-source -->
|
506
|
+
|
507
|
+
</div>
|
508
|
+
|
509
|
+
|
510
|
+
|
511
|
+
|
512
|
+
</div><!-- configure_shares-method -->
|
513
|
+
|
514
|
+
|
515
|
+
<div id="method-c-configure_ssh" class="method-detail ">
|
516
|
+
|
517
|
+
<div class="method-heading">
|
518
|
+
<span class="method-name">configure_ssh</span><span
|
519
|
+
class="method-args">(node, machine)</span>
|
520
|
+
<span class="method-click-advice">click to toggle source</span>
|
521
|
+
</div>
|
522
|
+
|
523
|
+
|
524
|
+
<div class="method-description">
|
525
|
+
|
526
|
+
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
<div class="method-source-code" id="configure_ssh-source">
|
531
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 121</span>
|
532
|
+
<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>)
|
533
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">true</span>
|
534
|
+
|
535
|
+
<span class="ruby-comment">#dbg(node.user, 'ssh user')</span>
|
536
|
+
<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>
|
537
|
+
|
538
|
+
<span class="ruby-comment">#dbg(node.ssh_port, 'ssh port')</span>
|
539
|
+
<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>
|
540
|
+
|
541
|
+
<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>)
|
542
|
+
<span class="ruby-identifier">key_dir</span> = <span class="ruby-identifier">node</span>.<span class="ruby-identifier">network</span>.<span class="ruby-identifier">key_cache_directory</span>
|
543
|
+
<span class="ruby-identifier">key_name</span> = <span class="ruby-identifier">node</span>.<span class="ruby-identifier">plugin_name</span>
|
544
|
+
|
545
|
+
<span class="ruby-identifier">ssh_config</span> = <span class="ruby-operator">::</span><span class="ruby-constant">CORL</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</span>({
|
546
|
+
<span class="ruby-value">:keypair</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">keypair</span>,
|
547
|
+
<span class="ruby-value">:key_dir</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">key_dir</span>,
|
548
|
+
<span class="ruby-value">:key_name</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">key_name</span>
|
549
|
+
})
|
550
|
+
|
551
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">keypair</span> = <span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">SSH</span>.<span class="ruby-identifier">unlock_private_key</span>(<span class="ruby-identifier">node</span>.<span class="ruby-identifier">private_key</span>, <span class="ruby-identifier">ssh_config</span>)
|
552
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">keypair</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
|
553
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">ssh</span>.<span class="ruby-identifier">private_key_path</span> = <span class="ruby-identifier">keypair</span>
|
554
|
+
<span class="ruby-keyword">else</span>
|
555
|
+
<span class="ruby-identifier">node</span>.<span class="ruby-identifier">keypair</span> = <span class="ruby-identifier">keypair</span>
|
556
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">ssh</span>.<span class="ruby-identifier">private_key_path</span> = <span class="ruby-identifier">keypair</span>.<span class="ruby-identifier">private_key_file</span>(<span class="ruby-identifier">key_dir</span>, <span class="ruby-identifier">key_name</span>)
|
557
|
+
<span class="ruby-keyword">end</span>
|
558
|
+
<span class="ruby-keyword">end</span>
|
559
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">keypair</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">ssh</span>.<span class="ruby-identifier">private_key_path</span>)
|
560
|
+
<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>
|
561
|
+
<span class="ruby-keyword">end</span>
|
562
|
+
<span class="ruby-comment">#dbg(machine.ssh.private_key_path, 'ssh private key')</span>
|
563
|
+
<span class="ruby-keyword">end</span>
|
564
|
+
|
565
|
+
<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>
|
566
|
+
<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>)
|
567
|
+
<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>)
|
568
|
+
<span class="ruby-comment">#dbg(name, 'ssh property')</span>
|
569
|
+
<span class="ruby-comment">#dbg(data, 'ssh property data')</span>
|
570
|
+
<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>)
|
571
|
+
<span class="ruby-keyword">else</span>
|
572
|
+
<span class="ruby-identifier">params</span> = <span class="ruby-identifier">parse_params</span>(<span class="ruby-identifier">data</span>)
|
573
|
+
<span class="ruby-comment">#dbg(name, 'ssh method')</span>
|
574
|
+
<span class="ruby-comment">#dbg(params, 'ssh method params')</span>
|
575
|
+
<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>)
|
576
|
+
<span class="ruby-keyword">end</span>
|
577
|
+
<span class="ruby-keyword">end</span>
|
578
|
+
<span class="ruby-identifier">success</span>
|
579
|
+
<span class="ruby-keyword">end</span></pre>
|
580
|
+
</div><!-- configure_ssh-source -->
|
581
|
+
|
582
|
+
</div>
|
583
|
+
|
584
|
+
|
585
|
+
|
586
|
+
|
587
|
+
</div><!-- configure_ssh-method -->
|
588
|
+
|
589
|
+
|
590
|
+
<div id="method-c-configure_vagrant" class="method-detail ">
|
591
|
+
|
592
|
+
<div class="method-heading">
|
593
|
+
<span class="method-name">configure_vagrant</span><span
|
594
|
+
class="method-args">(network, vagrant)</span>
|
595
|
+
<span class="method-click-advice">click to toggle source</span>
|
596
|
+
</div>
|
597
|
+
|
598
|
+
|
599
|
+
<div class="method-description">
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
|
604
|
+
|
605
|
+
<div class="method-source-code" id="configure_vagrant-source">
|
606
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 101</span>
|
607
|
+
<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>)
|
608
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">true</span>
|
609
|
+
<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>
|
610
|
+
<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>)
|
611
|
+
<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>)
|
612
|
+
<span class="ruby-comment">#dbg(name, 'vagrant property')</span>
|
613
|
+
<span class="ruby-comment">#dbg(data, 'vagrant property data')</span>
|
614
|
+
<span class="ruby-identifier">vagrant</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">"#{name}="</span>, <span class="ruby-identifier">data</span>)
|
615
|
+
<span class="ruby-keyword">else</span>
|
616
|
+
<span class="ruby-identifier">params</span> = <span class="ruby-identifier">parse_params</span>(<span class="ruby-identifier">data</span>)
|
617
|
+
<span class="ruby-comment">#dbg(name, 'vagrant method')</span>
|
618
|
+
<span class="ruby-comment">#dbg(params, 'vagrant method params')</span>
|
619
|
+
<span class="ruby-identifier">vagrant</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">params</span>)
|
620
|
+
<span class="ruby-keyword">end</span>
|
621
|
+
<span class="ruby-keyword">end</span>
|
622
|
+
<span class="ruby-identifier">success</span>
|
623
|
+
<span class="ruby-keyword">end</span></pre>
|
624
|
+
</div><!-- configure_vagrant-source -->
|
625
|
+
|
626
|
+
</div>
|
627
|
+
|
628
|
+
|
629
|
+
|
630
|
+
|
631
|
+
</div><!-- configure_vagrant-method -->
|
632
|
+
|
633
|
+
|
634
|
+
<div id="method-c-configure_vm" class="method-detail ">
|
635
|
+
|
636
|
+
<div class="method-heading">
|
637
|
+
<span class="method-name">configure_vm</span><span
|
638
|
+
class="method-args">(node, machine)</span>
|
639
|
+
<span class="method-click-advice">click to toggle source</span>
|
640
|
+
</div>
|
641
|
+
|
642
|
+
|
643
|
+
<div class="method-description">
|
644
|
+
|
645
|
+
|
646
|
+
|
647
|
+
|
648
|
+
|
649
|
+
<div class="method-source-code" id="configure_vm-source">
|
650
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 172</span>
|
651
|
+
<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>)
|
652
|
+
<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>)
|
653
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">true</span>
|
654
|
+
|
655
|
+
<span class="ruby-comment">#dbg(node.hostname, 'VM hostname')</span>
|
656
|
+
<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>
|
657
|
+
|
658
|
+
<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>)
|
659
|
+
<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>)
|
660
|
+
|
661
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">box_url</span>
|
662
|
+
<span class="ruby-identifier">box_file</span> = <span class="ruby-identifier">box_url</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp">/^file\:\/\//</span>, <span class="ruby-string">''</span>)
|
663
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">box_file</span>)
|
664
|
+
<span class="ruby-identifier">box_url</span> = <span class="ruby-keyword">nil</span>
|
665
|
+
<span class="ruby-identifier">node</span>.<span class="ruby-identifier">clear_cache</span>
|
666
|
+
<span class="ruby-keyword">end</span>
|
667
|
+
<span class="ruby-keyword">end</span>
|
668
|
+
|
669
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">box</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">box_url</span>
|
670
|
+
<span class="ruby-comment">#dbg(box, 'VM box')</span>
|
671
|
+
<span class="ruby-identifier">machine</span>.<span class="ruby-identifier">vm</span>.<span class="ruby-identifier">box</span> = <span class="ruby-identifier">box</span>
|
672
|
+
<span class="ruby-comment">#dbg(box_url, 'VM box url')</span>
|
673
|
+
<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>
|
674
|
+
<span class="ruby-keyword">else</span>
|
675
|
+
<span class="ruby-comment">#dbg(node.image, 'VM box')</span>
|
676
|
+
<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>
|
677
|
+
<span class="ruby-keyword">end</span>
|
678
|
+
|
679
|
+
<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>)
|
680
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">public_ip</span>
|
681
|
+
<span class="ruby-comment">#dbg(node.public_ip, 'private ip address')</span>
|
682
|
+
<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>
|
683
|
+
<span class="ruby-keyword">else</span>
|
684
|
+
<span class="ruby-comment">#dbg('dhcp private ip address')</span>
|
685
|
+
<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>
|
686
|
+
<span class="ruby-keyword">end</span>
|
687
|
+
<span class="ruby-keyword">end</span>
|
688
|
+
|
689
|
+
<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>
|
690
|
+
<span class="ruby-keyword">case</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_sym</span>
|
691
|
+
<span class="ruby-comment"># Network interfaces</span>
|
692
|
+
<span class="ruby-keyword">when</span> <span class="ruby-value">:forwarded_ports</span>
|
693
|
+
<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>
|
694
|
+
<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>)
|
695
|
+
|
696
|
+
<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>
|
697
|
+
<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>])
|
698
|
+
<span class="ruby-keyword">end</span>
|
699
|
+
<span class="ruby-comment">#dbg(forward_config.export, 'vm forwarded port config') </span>
|
700
|
+
<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>
|
701
|
+
<span class="ruby-keyword">end</span>
|
702
|
+
<span class="ruby-keyword">when</span> <span class="ruby-value">:usable_port_range</span>
|
703
|
+
<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>)
|
704
|
+
<span class="ruby-comment">#dbg("#{low} <--> #{high}", 'vm usable port range') </span>
|
705
|
+
<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>)
|
706
|
+
|
707
|
+
<span class="ruby-keyword">when</span> <span class="ruby-value">:public_network</span>
|
708
|
+
<span class="ruby-comment">#dbg('public network')</span>
|
709
|
+
<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>
|
710
|
+
|
711
|
+
<span class="ruby-comment"># Provider specific settings</span>
|
712
|
+
<span class="ruby-keyword">when</span> <span class="ruby-value">:providers</span>
|
713
|
+
<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>
|
714
|
+
<span class="ruby-comment">#dbg(provider, 'vm provider')</span>
|
715
|
+
<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>
|
716
|
+
<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>
|
717
|
+
<span class="ruby-comment">#dbg(property, 'vm property')</span>
|
718
|
+
<span class="ruby-comment">#dbg(item, 'vm property item')</span>
|
719
|
+
<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>)
|
720
|
+
<span class="ruby-identifier">interface</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">"#{property}="</span>, <span class="ruby-identifier">item</span>)
|
721
|
+
<span class="ruby-keyword">else</span>
|
722
|
+
<span class="ruby-identifier">params</span> = <span class="ruby-identifier">parse_params</span>(<span class="ruby-identifier">item</span>)
|
723
|
+
<span class="ruby-comment">#dbg(params, 'vm method params')</span>
|
724
|
+
<span class="ruby-identifier">interface</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">property</span>, <span class="ruby-identifier">params</span>)
|
725
|
+
<span class="ruby-keyword">end</span>
|
726
|
+
<span class="ruby-keyword">end</span>
|
727
|
+
<span class="ruby-keyword">end</span>
|
728
|
+
<span class="ruby-keyword">end</span>
|
729
|
+
<span class="ruby-comment"># All other basic VM settings...</span>
|
730
|
+
<span class="ruby-keyword">else</span>
|
731
|
+
<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>)
|
732
|
+
<span class="ruby-comment">#dbg(name, 'other property')</span>
|
733
|
+
<span class="ruby-comment">#dbg(data, 'other property data')</span>
|
734
|
+
<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>)
|
735
|
+
<span class="ruby-keyword">else</span>
|
736
|
+
<span class="ruby-identifier">params</span> = <span class="ruby-identifier">parse_params</span>(<span class="ruby-identifier">data</span>)
|
737
|
+
<span class="ruby-comment">#dbg(name, 'other method')</span>
|
738
|
+
<span class="ruby-comment">#dbg(params, 'other method params')</span>
|
739
|
+
<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>)
|
740
|
+
<span class="ruby-keyword">end</span>
|
741
|
+
<span class="ruby-keyword">end</span>
|
742
|
+
<span class="ruby-keyword">end</span>
|
743
|
+
<span class="ruby-identifier">success</span>
|
744
|
+
<span class="ruby-keyword">end</span></pre>
|
745
|
+
</div><!-- configure_vm-source -->
|
746
|
+
|
747
|
+
</div>
|
748
|
+
|
749
|
+
|
750
|
+
|
751
|
+
|
752
|
+
</div><!-- configure_vm-method -->
|
753
|
+
|
754
|
+
|
755
|
+
<div id="method-c-load_network" class="method-detail ">
|
756
|
+
|
757
|
+
<div class="method-heading">
|
758
|
+
<span class="method-name">load_network</span><span
|
759
|
+
class="method-args">(directory)</span>
|
760
|
+
<span class="method-click-advice">click to toggle source</span>
|
761
|
+
</div>
|
762
|
+
|
763
|
+
|
764
|
+
<div class="method-description">
|
765
|
+
|
766
|
+
|
767
|
+
|
768
|
+
|
769
|
+
|
770
|
+
<div class="method-source-code" id="load_network-source">
|
771
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 94</span>
|
772
|
+
<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>)
|
773
|
+
<span class="ruby-comment"># Load network if it exists</span>
|
774
|
+
<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> }))
|
775
|
+
<span class="ruby-keyword">end</span></pre>
|
776
|
+
</div><!-- load_network-source -->
|
777
|
+
|
778
|
+
</div>
|
779
|
+
|
780
|
+
|
781
|
+
|
782
|
+
|
783
|
+
</div><!-- load_network-method -->
|
784
|
+
|
785
|
+
|
786
|
+
<div id="method-c-network" class="method-detail ">
|
787
|
+
|
788
|
+
<div class="method-heading">
|
789
|
+
<span class="method-name">network</span><span
|
790
|
+
class="method-args">()</span>
|
791
|
+
<span class="method-click-advice">click to toggle source</span>
|
792
|
+
</div>
|
793
|
+
|
794
|
+
|
795
|
+
<div class="method-description">
|
796
|
+
|
797
|
+
|
798
|
+
|
799
|
+
|
800
|
+
|
801
|
+
<div class="method-source-code" id="network-source">
|
802
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 46</span>
|
803
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">network</span>
|
804
|
+
<span class="ruby-identifier">@@network</span>
|
805
|
+
<span class="ruby-keyword">end</span></pre>
|
806
|
+
</div><!-- network-source -->
|
807
|
+
|
808
|
+
</div>
|
809
|
+
|
810
|
+
|
811
|
+
|
812
|
+
|
813
|
+
</div><!-- network-method -->
|
814
|
+
|
815
|
+
|
816
|
+
<div id="method-c-network-3D" class="method-detail ">
|
817
|
+
|
818
|
+
<div class="method-heading">
|
819
|
+
<span class="method-name">network=</span><span
|
820
|
+
class="method-args">(network)</span>
|
821
|
+
<span class="method-click-advice">click to toggle source</span>
|
822
|
+
</div>
|
823
|
+
|
824
|
+
|
825
|
+
<div class="method-description">
|
826
|
+
|
827
|
+
|
828
|
+
|
829
|
+
|
830
|
+
|
831
|
+
<div class="method-source-code" id="network-3D-source">
|
832
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 42</span>
|
833
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">network=</span><span class="ruby-identifier">network</span>
|
834
|
+
<span class="ruby-identifier">@@network</span> = <span class="ruby-identifier">network</span>
|
835
|
+
<span class="ruby-keyword">end</span></pre>
|
836
|
+
</div><!-- network-3D-source -->
|
837
|
+
|
838
|
+
</div>
|
839
|
+
|
840
|
+
|
841
|
+
|
842
|
+
|
843
|
+
</div><!-- network-3D-method -->
|
844
|
+
|
845
|
+
|
846
|
+
<div id="method-c-parse_params" class="method-detail ">
|
847
|
+
|
848
|
+
<div class="method-heading">
|
849
|
+
<span class="method-name">parse_params</span><span
|
850
|
+
class="method-args">(data)</span>
|
851
|
+
<span class="method-click-advice">click to toggle source</span>
|
852
|
+
</div>
|
853
|
+
|
854
|
+
|
855
|
+
<div class="method-description">
|
856
|
+
|
857
|
+
|
858
|
+
|
859
|
+
|
860
|
+
|
861
|
+
<div class="method-source-code" id="parse_params-source">
|
862
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 331</span>
|
863
|
+
<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>)
|
864
|
+
<span class="ruby-identifier">params</span> = <span class="ruby-identifier">data</span>
|
865
|
+
<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>)
|
866
|
+
<span class="ruby-identifier">params</span> = []
|
867
|
+
<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>
|
868
|
+
<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>)
|
869
|
+
<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> )
|
870
|
+
<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>)
|
871
|
+
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">item</span>
|
872
|
+
<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>)
|
873
|
+
<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>)
|
874
|
+
<span class="ruby-keyword">end</span>
|
875
|
+
<span class="ruby-keyword">end</span>
|
876
|
+
<span class="ruby-keyword">end</span>
|
877
|
+
<span class="ruby-keyword">end</span>
|
878
|
+
<span class="ruby-identifier">params</span>
|
879
|
+
<span class="ruby-keyword">end</span></pre>
|
880
|
+
</div><!-- parse_params-source -->
|
881
|
+
|
882
|
+
</div>
|
883
|
+
|
884
|
+
|
885
|
+
|
886
|
+
|
887
|
+
</div><!-- parse_params-method -->
|
888
|
+
|
889
|
+
|
890
|
+
<div id="method-c-register" class="method-detail ">
|
891
|
+
|
892
|
+
<div class="method-heading">
|
893
|
+
<span class="method-name">register</span><span
|
894
|
+
class="method-args">(directory, config, &code)</span>
|
895
|
+
<span class="method-click-advice">click to toggle source</span>
|
896
|
+
</div>
|
897
|
+
|
898
|
+
|
899
|
+
<div class="method-description">
|
900
|
+
|
901
|
+
<p>Gateway <a href="../../CORL.html">CORL</a> configurator for <a
|
902
|
+
href="../Vagrant.html">Vagrant</a>.</p>
|
903
|
+
|
904
|
+
|
905
|
+
|
906
|
+
<div class="method-source-code" id="register-source">
|
907
|
+
<pre><span class="ruby-comment"># File lib/core/vagrant/config.rb, line 54</span>
|
908
|
+
<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>)
|
909
|
+
<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>
|
910
|
+
|
911
|
+
<span class="ruby-identifier">config_network</span> = <span class="ruby-identifier">network</span>
|
912
|
+
<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>
|
913
|
+
|
914
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">config_network</span>
|
915
|
+
<span class="ruby-comment"># Vagrant settings</span>
|
916
|
+
<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>)
|
917
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-string">"Configuration of Vagrant general settings failed"</span>
|
918
|
+
<span class="ruby-keyword">end</span>
|
919
|
+
|
920
|
+
<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>
|
921
|
+
<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>
|
922
|
+
<span class="ruby-comment"># VM settings</span>
|
923
|
+
<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>)
|
924
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Configuration of Vagrant VM failed: #{node_name}"</span>
|
925
|
+
<span class="ruby-keyword">end</span>
|
926
|
+
|
927
|
+
<span class="ruby-comment"># SSH settings</span>
|
928
|
+
<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>)
|
929
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-string">"Configuration of Vagrant VM SSH settings failed"</span>
|
930
|
+
<span class="ruby-keyword">end</span>
|
931
|
+
|
932
|
+
<span class="ruby-comment"># Server shares</span>
|
933
|
+
<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>)
|
934
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Configuration of Vagrant shares failed: #{node_name}"</span>
|
935
|
+
<span class="ruby-keyword">end</span>
|
936
|
+
|
937
|
+
<span class="ruby-comment"># Provisioner configuration</span>
|
938
|
+
<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>)
|
939
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Configuration of Vagrant provisioner failed: #{node_name}"</span>
|
940
|
+
<span class="ruby-keyword">end</span>
|
941
|
+
<span class="ruby-keyword">end</span>
|
942
|
+
<span class="ruby-keyword">end</span>
|
943
|
+
<span class="ruby-keyword">end</span>
|
944
|
+
<span class="ruby-keyword">end</span></pre>
|
945
|
+
</div><!-- register-source -->
|
946
|
+
|
947
|
+
</div>
|
948
|
+
|
949
|
+
|
950
|
+
|
951
|
+
|
952
|
+
</div><!-- register-method -->
|
953
|
+
|
954
|
+
|
955
|
+
</section><!-- public-class-method-details -->
|
956
|
+
|
957
|
+
</section><!-- 5Buntitled-5D -->
|
958
|
+
|
959
|
+
</div><!-- documentation -->
|
960
|
+
|
961
|
+
|
962
|
+
<footer id="validator-badges">
|
963
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
964
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.2.
|
965
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
966
|
+
</footer>
|
967
|
+
|