veewee 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +1 -1
- data/Gemfile.lock +75 -0
- data/lib/veewee.rb +2 -0
- data/lib/veewee/command.rb +1 -59
- data/lib/veewee/command/basebox.rb +63 -0
- data/lib/veewee/command/basebox_build.rb +32 -0
- data/lib/veewee/command/basebox_define.rb +28 -0
- data/lib/veewee/command/basebox_destroy.rb +22 -0
- data/lib/veewee/command/basebox_export.rb +22 -0
- data/lib/veewee/command/basebox_list.rb +23 -0
- data/lib/veewee/command/basebox_ostypes.rb +23 -0
- data/lib/veewee/command/basebox_templates.rb +23 -0
- data/lib/veewee/command/basebox_undefine.rb +22 -0
- data/lib/veewee/command/basebox_validate.rb +26 -0
- data/lib/veewee/config.rb +1 -2
- data/lib/veewee/version.rb +1 -1
- data/templates/CentOS-6.0-x86_64-minimal/definition.rb +1 -1
- data/templates/CentOS-6.0-x86_64-minimal/postinstall.sh +12 -4
- data/templates/CentOS-6.2-x86_64-minimal/definition.rb +15 -0
- data/templates/CentOS-6.2-x86_64-minimal/ks.cfg +37 -0
- data/templates/CentOS-6.2-x86_64-minimal/postinstall.sh +50 -0
- data/templates/SLES-11-SP1-DVD-i586-GM/autoinst_de.xml +1127 -0
- data/templates/SLES-11-SP1-DVD-i586-GM/autoinst_en.xml +1127 -0
- data/templates/SLES-11-SP1-DVD-i586-GM/definition.rb +37 -0
- data/templates/SLES-11-SP1-DVD-i586-GM/postinstall.sh +43 -0
- data/templates/SLES-11-SP1-DVD-x86_64-GM/autoinst_de.xml +1171 -0
- data/templates/SLES-11-SP1-DVD-x86_64-GM/autoinst_en.xml +1171 -0
- data/templates/SLES-11-SP1-DVD-x86_64-GM/definition.rb +37 -0
- data/templates/SLES-11-SP1-DVD-x86_64-GM/postinstall.sh +43 -0
- data/templates/funtoo-latest-generic_64-stable/definition.rb +34 -0
- data/templates/funtoo-latest-generic_64-stable/postinstall.sh +177 -0
- data/templates/funtoo-latest-generic_64-stable/postinstall2.sh +83 -0
- data/templates/gentoo-latest-x86_64-experimental/definition.rb +4 -4
- data/templates/gentoo-latest-x86_64-experimental/postinstall.sh +2 -2
- data/templates/openSUSE-12.1-DVD+NET-i586/autoinst_de.xml +1483 -0
- data/templates/openSUSE-12.1-DVD+NET-i586/autoinst_en.xml +1483 -0
- data/templates/openSUSE-12.1-DVD+NET-i586/definition.rb +44 -0
- data/templates/openSUSE-12.1-DVD+NET-i586/postinstall.sh +43 -0
- data/templates/openSUSE-12.1-DVD+NET-x86_64/autoinst_de.xml +1727 -0
- data/templates/openSUSE-12.1-DVD+NET-x86_64/autoinst_en.xml +1727 -0
- data/templates/openSUSE-12.1-DVD+NET-x86_64/definition.rb +44 -0
- data/templates/openSUSE-12.1-DVD+NET-x86_64/postinstall.sh +43 -0
- data/templates/openbsd50_amd64/README +28 -0
- data/templates/openbsd50_amd64/definition.rb +84 -0
- data/templates/openbsd50_amd64/postinstall.sh +81 -0
- data/templates/openbsd50_i386/.definition.rb.swp +0 -0
- data/templates/openbsd50_i386/README +28 -0
- data/templates/openbsd50_i386/definition.rb +84 -0
- data/templates/openbsd50_i386/postinstall.sh +80 -0
- data/templates/windows-2008R1-serverstandard-amd64/Autounattend.xml +146 -0
- data/templates/windows-2008R1-serverstandard-amd64/README.md +134 -0
- data/templates/windows-2008R1-serverstandard-amd64/cygwin-setup.exe +0 -0
- data/templates/windows-2008R1-serverstandard-amd64/definition.rb +114 -0
- data/templates/windows-2008R1-serverstandard-amd64/install-cygwin-sshd.bat +40 -0
- data/templates/windows-2008R1-serverstandard-amd64/install-guest-additions.bat +5 -0
- data/templates/windows-2008R1-serverstandard-amd64/install-winrm.bat +14 -0
- data/templates/windows-2008R1-serverstandard-amd64/oracle-cert.cer +0 -0
- data/templates/windows-2008R1-serverstandard-amd64/postinstall.sh +74 -0
- data/templates/windows-2008R1-serverstandard-amd64/sudo +2 -0
- data/templates/windows-2008R1-serverstandard-amd64/winrm.rb +8 -0
- data/templates/windows-2008R2-amd64/cygwin-setup.exe +0 -0
- data/templates/windows-2008R2-amd64/install-winrm.bat +2 -0
- data/templates/windows-2008R2-serverstandard-amd64/Autounattend.xml +147 -0
- data/templates/windows-2008R2-serverstandard-amd64/README.md +142 -0
- data/templates/windows-2008R2-serverstandard-amd64/definition.rb +44 -0
- data/templates/windows-2008R2-serverstandard-amd64/install-cygwin-sshd.bat +41 -0
- data/templates/windows-2008R2-serverstandard-amd64/install-winrm.bat +11 -0
- data/templates/windows-2008R2-serverstandard-amd64/oracle-cert.cer +0 -0
- data/templates/windows-2008R2-serverstandard-amd64/postinstall.sh +74 -0
- data/templates/windows-7-enterprise-amd64/Autounattend.xml +149 -0
- data/templates/windows-7-enterprise-amd64/README.md +52 -0
- data/templates/windows-7-enterprise-amd64/definition.rb +39 -0
- data/templates/windows-7-enterprise-amd64/install-cygwin-sshd.bat +40 -0
- data/templates/windows-7-enterprise-amd64/install-winrm.bat +14 -0
- data/templates/windows-7-enterprise-amd64/oracle-cert.cer +0 -0
- data/templates/windows-7-enterprise-amd64/postinstall.sh +74 -0
- data/templates/windows-7-enterprise-i386/Autounattend.xml +151 -0
- data/templates/windows-7-enterprise-i386/README.md +169 -0
- data/templates/windows-7-enterprise-i386/definition.rb +40 -0
- data/templates/windows-7-enterprise-i386/install-cygwin-sshd.bat +40 -0
- data/templates/windows-7-enterprise-i386/install-winrm.bat +14 -0
- data/templates/windows-7-enterprise-i386/oracle-cert.cer +0 -0
- data/templates/windows-7-enterprise-i386/postinstall.sh +74 -0
- data/templates/windows-7-premium-amd64/Autounattend.xml +152 -0
- data/templates/windows-7-premium-amd64/README.md +171 -0
- data/templates/windows-7-premium-amd64/definition.rb +38 -0
- data/templates/windows-7-premium-amd64/install-chefclient.bat +44 -0
- data/templates/windows-7-premium-amd64/install-winrm.bat +11 -0
- data/templates/windows-7-premium-amd64/oracle-cert.cer +0 -0
- data/templates/windows-7-premium-amd64/postinstall.sh +124 -0
- data/templates/windows-7-premium-amd64/winrm.rb +8 -0
- data/templates/windows-7-professional-amd64/Autounattend.xml +152 -0
- data/templates/windows-7-professional-amd64/README.md +171 -0
- data/templates/windows-7-professional-amd64/definition.rb +41 -0
- data/templates/windows-7-professional-amd64/install-cygwin-sshd.bat +40 -0
- data/templates/windows-7-professional-amd64/install-winrm.bat +14 -0
- data/templates/windows-7-professional-amd64/oracle-cert.cer +0 -0
- data/templates/windows-7-professional-amd64/postinstall.sh +74 -0
- data/templates/windows-7-ultimate-amd64/Autounattend.xml +152 -0
- data/templates/windows-7-ultimate-amd64/README.md +89 -0
- data/templates/windows-7-ultimate-amd64/definition.rb +41 -0
- data/templates/windows-7-ultimate-amd64/install-cygwin-sshd.bat +40 -0
- data/templates/windows-7-ultimate-amd64/install-winrm.bat +14 -0
- data/templates/windows-7-ultimate-amd64/oracle-cert.cer +0 -0
- data/templates/windows-7-ultimate-amd64/postinstall.sh +74 -0
- data/templates/windows-7sp1-ultimate-amd64/Autounattend.xml +152 -0
- data/templates/windows-7sp1-ultimate-amd64/README.md +89 -0
- data/templates/windows-7sp1-ultimate-amd64/definition.rb +42 -0
- data/templates/windows-7sp1-ultimate-amd64/install-cygwin-sshd.bat +40 -0
- data/templates/windows-7sp1-ultimate-amd64/install-winrm.bat +14 -0
- data/templates/windows-7sp1-ultimate-amd64/oracle-cert.cer +0 -0
- data/templates/windows-7sp1-ultimate-amd64/postinstall.sh +74 -0
- data/templates/windows-8-preview-dev-amd64/Autounattend.xml +140 -0
- data/templates/windows-8-preview-dev-amd64/README.md +134 -0
- data/templates/windows-8-preview-dev-amd64/cygwin-setup.exe +0 -0
- data/templates/windows-8-preview-dev-amd64/definition.rb +114 -0
- data/templates/windows-8-preview-dev-amd64/install-cygwin-sshd.bat +38 -0
- data/templates/windows-8-preview-dev-amd64/install-winrm.bat +11 -0
- data/templates/windows-8-preview-dev-amd64/oracle-cert.cer +0 -0
- data/templates/windows-8-preview-dev-amd64/postinstall.sh +122 -0
- data/templates/windows-8-preview-dev-amd64/winrm.rb +8 -0
- data/veewee.gemspec +3 -2
- metadata +162 -34
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
veewee (0.2.3)
|
|
5
|
+
cucumber (>= 1.0.0)
|
|
6
|
+
highline (~> 1.6.1)
|
|
7
|
+
net-ssh (>= 2.1.0)
|
|
8
|
+
popen4 (~> 0.1.2)
|
|
9
|
+
progressbar
|
|
10
|
+
rspec (~> 2.5)
|
|
11
|
+
thor (~> 0.14.6)
|
|
12
|
+
vagrant (>= 0.9.0)
|
|
13
|
+
virtualbox (>= 0.9.2)
|
|
14
|
+
|
|
15
|
+
GEM
|
|
16
|
+
remote: http://rubygems.org/
|
|
17
|
+
specs:
|
|
18
|
+
Platform (0.4.0)
|
|
19
|
+
archive-tar-minitar (0.5.2)
|
|
20
|
+
builder (3.0.0)
|
|
21
|
+
childprocess (0.3.1)
|
|
22
|
+
ffi (~> 1.0.6)
|
|
23
|
+
cucumber (1.1.4)
|
|
24
|
+
builder (>= 2.1.2)
|
|
25
|
+
diff-lcs (>= 1.1.2)
|
|
26
|
+
gherkin (~> 2.7.1)
|
|
27
|
+
json (>= 1.4.6)
|
|
28
|
+
term-ansicolor (>= 1.0.6)
|
|
29
|
+
diff-lcs (1.1.3)
|
|
30
|
+
erubis (2.7.0)
|
|
31
|
+
ffi (1.0.11)
|
|
32
|
+
gherkin (2.7.6)
|
|
33
|
+
json (>= 1.4.6)
|
|
34
|
+
highline (1.6.11)
|
|
35
|
+
i18n (0.6.0)
|
|
36
|
+
json (1.5.4)
|
|
37
|
+
log4r (1.1.10)
|
|
38
|
+
net-scp (1.0.4)
|
|
39
|
+
net-ssh (>= 1.99.1)
|
|
40
|
+
net-ssh (2.2.2)
|
|
41
|
+
open4 (1.3.0)
|
|
42
|
+
popen4 (0.1.2)
|
|
43
|
+
Platform (>= 0.4.0)
|
|
44
|
+
open4 (>= 0.4.0)
|
|
45
|
+
progressbar (0.10.0)
|
|
46
|
+
rake (0.9.2.2)
|
|
47
|
+
rspec (2.8.0)
|
|
48
|
+
rspec-core (~> 2.8.0)
|
|
49
|
+
rspec-expectations (~> 2.8.0)
|
|
50
|
+
rspec-mocks (~> 2.8.0)
|
|
51
|
+
rspec-core (2.8.0)
|
|
52
|
+
rspec-expectations (2.8.0)
|
|
53
|
+
diff-lcs (~> 1.1.2)
|
|
54
|
+
rspec-mocks (2.8.0)
|
|
55
|
+
term-ansicolor (1.0.7)
|
|
56
|
+
thor (0.14.6)
|
|
57
|
+
vagrant (0.9.5)
|
|
58
|
+
archive-tar-minitar (= 0.5.2)
|
|
59
|
+
childprocess (~> 0.3.0)
|
|
60
|
+
erubis (~> 2.7.0)
|
|
61
|
+
i18n (~> 0.6.0)
|
|
62
|
+
json (~> 1.5.1)
|
|
63
|
+
log4r (~> 1.1.9)
|
|
64
|
+
net-scp (~> 1.0.4)
|
|
65
|
+
net-ssh (~> 2.2.2)
|
|
66
|
+
virtualbox (0.9.2)
|
|
67
|
+
ffi (~> 1.0.9)
|
|
68
|
+
|
|
69
|
+
PLATFORMS
|
|
70
|
+
ruby
|
|
71
|
+
|
|
72
|
+
DEPENDENCIES
|
|
73
|
+
bundler (>= 1.0.0)
|
|
74
|
+
rake
|
|
75
|
+
veewee!
|
data/lib/veewee.rb
CHANGED
data/lib/veewee/command.rb
CHANGED
|
@@ -19,64 +19,6 @@ Veewee::Session.setenv({:veewee_dir => veewee_dir, :definition_dir => definition
|
|
|
19
19
|
:template_dir => template_dir, :iso_dir => iso_dir, :box_dir => box_dir, :tmp_dir => tmp_dir, :validation_dir => validation_dir})
|
|
20
20
|
|
|
21
21
|
module Veewee
|
|
22
|
-
|
|
23
|
-
register "basebox","Commands to manage baseboxes"
|
|
24
|
-
|
|
25
|
-
desc "templates", "List the currently available basebox templates"
|
|
26
|
-
def templates
|
|
27
|
-
Veewee::Session.list_templates
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
desc "define BOXNAME TEMPLATE", "Define a new basebox starting from a template"
|
|
31
|
-
method_option :force,:type => :boolean , :default => false, :aliases => "-f", :desc => "overwrite the definition"
|
|
32
|
-
def define(boxname, template)
|
|
33
|
-
Veewee::Session.define(boxname,template,options)
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
desc "undefine BOXNAME", "Removes the definition of a basebox "
|
|
37
|
-
def undefine(boxname)
|
|
38
|
-
Veewee::Session.undefine(boxname)
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
desc "build BOXNAME", "Build the box BOXNAME"
|
|
42
|
-
method_option :force,:type => :boolean , :default => false, :aliases => "-f", :desc => "overwrite the basebox"
|
|
43
|
-
method_option :nogui,:type => :boolean , :default => false, :aliases => "-n", :desc => "no gui"
|
|
44
|
-
|
|
45
|
-
def build(boxname)
|
|
46
|
-
Veewee::Session.build(boxname,options)
|
|
22
|
+
module Command
|
|
47
23
|
end
|
|
48
|
-
|
|
49
|
-
desc "ostypes", "List the available Operating System types"
|
|
50
|
-
def ostypes
|
|
51
|
-
Veewee::Session.list_ostypes
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
desc "destroy BOXNAME", "Destroys the virtualmachine that was build for a basebox"
|
|
55
|
-
def destroy(boxname)
|
|
56
|
-
Veewee::Session.destroy_vm(boxname)
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
desc "list", "Lists all defined baseboxes"
|
|
60
|
-
def list
|
|
61
|
-
Veewee::Session.list_definitions
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
desc "export [NAME]", "Exports the basebox to the vagrant box format"
|
|
65
|
-
method_options :force => :boolean
|
|
66
|
-
def export(boxname)
|
|
67
|
-
if (!boxname.nil?)
|
|
68
|
-
Veewee::Session.export_box(boxname)
|
|
69
|
-
end
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
desc "validate [NAME]", "Validates a box against vagrant compliancy rules"
|
|
73
|
-
method_option :user,:default => "vagrant", :aliases => "-u", :desc => "user to login with"
|
|
74
|
-
def validate(boxname)
|
|
75
|
-
if (!boxname.nil?)
|
|
76
|
-
Veewee::Session.validate_box(boxname,options)
|
|
77
|
-
end
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
end
|
|
81
|
-
|
|
82
24
|
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
require 'optparse'
|
|
2
|
+
|
|
3
|
+
module Veewee
|
|
4
|
+
module Command
|
|
5
|
+
class Basebox < Vagrant::Command::Base
|
|
6
|
+
def initialize(argv, env)
|
|
7
|
+
super
|
|
8
|
+
|
|
9
|
+
@main_args, @sub_command, @sub_args = split_main_and_subcommand(argv)
|
|
10
|
+
|
|
11
|
+
@subcommands = Vagrant::Registry.new
|
|
12
|
+
@subcommands.register(:templates) { Veewee::Command::BaseboxTemplates }
|
|
13
|
+
@subcommands.register(:list) { Veewee::Command::BaseboxList }
|
|
14
|
+
@subcommands.register(:define) { Veewee::Command::BaseboxDefine }
|
|
15
|
+
@subcommands.register(:undefine) { Veewee::Command::BaseboxUndefine }
|
|
16
|
+
@subcommands.register(:build) { Veewee::Command::BaseboxBuild }
|
|
17
|
+
@subcommands.register(:ostypes) { Veewee::Command::BaseboxOstypes }
|
|
18
|
+
@subcommands.register(:destroy) { Veewee::Command::BaseboxDestroy }
|
|
19
|
+
@subcommands.register(:export) { Veewee::Command::BaseboxExport }
|
|
20
|
+
@subcommands.register(:validate) { Veewee::Command::BaseboxValidate }
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def execute
|
|
24
|
+
if @main_args.include?("-h") || @main_args.include?("--help")
|
|
25
|
+
# Print the help for all the box commands.
|
|
26
|
+
return help
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# If we reached this far then we must have a subcommand. If not,
|
|
30
|
+
# then we also just print the help and exit.
|
|
31
|
+
command_class = @subcommands.get(@sub_command.to_sym) if @sub_command
|
|
32
|
+
return help if !command_class || !@sub_command
|
|
33
|
+
@logger.debug("Invoking command class: #{command_class} #{@sub_args.inspect}")
|
|
34
|
+
|
|
35
|
+
# Initialize and execute the command class
|
|
36
|
+
command_class.new(@sub_args, @env).execute
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Prints the help out for this command
|
|
40
|
+
def help
|
|
41
|
+
opts = OptionParser.new do |opts|
|
|
42
|
+
opts.banner = "Usage: vagrant basebox <command> [<args>]"
|
|
43
|
+
opts.separator ""
|
|
44
|
+
opts.separator "Available subcommands:"
|
|
45
|
+
|
|
46
|
+
# Add the available subcommands as separators in order to print them
|
|
47
|
+
# out as well.
|
|
48
|
+
keys = []
|
|
49
|
+
@subcommands.each { |key, value| keys << key.to_s }
|
|
50
|
+
|
|
51
|
+
keys.sort.each do |key|
|
|
52
|
+
opts.separator " #{key}"
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
opts.separator ""
|
|
56
|
+
opts.separator "For help on any individual command run `vagrant basebox COMMAND -h`"
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
@env.ui.info(opts.help, :prefix => false)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
require 'optparse'
|
|
2
|
+
|
|
3
|
+
module Veewee
|
|
4
|
+
module Command
|
|
5
|
+
class BaseboxBuild < Vagrant::Command::Base
|
|
6
|
+
def execute
|
|
7
|
+
options = {}
|
|
8
|
+
|
|
9
|
+
opts = OptionParser.new do |opts|
|
|
10
|
+
opts.banner = "Build the box <boxname>"
|
|
11
|
+
opts.separator ""
|
|
12
|
+
opts.separator "Usage: vagrant basebox build <boxname>"
|
|
13
|
+
|
|
14
|
+
opts.on("-f", "--force", "overwrite the basebox") do |f|
|
|
15
|
+
options['force'] = f
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
opts.on("-n", "--nogui", "no gui") do |n|
|
|
19
|
+
options['nogui'] = n
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Parse the options
|
|
24
|
+
argv = parse_options(opts)
|
|
25
|
+
return if !argv
|
|
26
|
+
raise Vagrant::Errors::CLIInvalidUsage, :help => opts.help.chomp if argv.length < 1
|
|
27
|
+
|
|
28
|
+
Veewee::Session.build(argv[0], options)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
require 'optparse'
|
|
2
|
+
|
|
3
|
+
module Veewee
|
|
4
|
+
module Command
|
|
5
|
+
class BaseboxDefine < Vagrant::Command::Base
|
|
6
|
+
def execute
|
|
7
|
+
options = {}
|
|
8
|
+
|
|
9
|
+
opts = OptionParser.new do |opts|
|
|
10
|
+
opts.banner = "Define a new basebox starting from a template"
|
|
11
|
+
opts.separator ""
|
|
12
|
+
opts.separator "Usage: vagrant basebox define <boxname> <template>"
|
|
13
|
+
|
|
14
|
+
opts.on("-f", "--force", "overwrite the definition") do |f|
|
|
15
|
+
options['force'] = f
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# Parse the options
|
|
20
|
+
argv = parse_options(opts)
|
|
21
|
+
return if !argv
|
|
22
|
+
raise Vagrant::Errors::CLIInvalidUsage, :help => opts.help.chomp if argv.length < 2
|
|
23
|
+
|
|
24
|
+
Veewee::Session.define(argv[0], argv[1], options)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module Veewee
|
|
2
|
+
module Command
|
|
3
|
+
class BaseboxDestroy < Vagrant::Command::Base
|
|
4
|
+
def execute
|
|
5
|
+
options = {}
|
|
6
|
+
|
|
7
|
+
opts = OptionParser.new do |opts|
|
|
8
|
+
opts.banner = "Destroys the virtualmachine that was build for a basebox"
|
|
9
|
+
opts.separator ""
|
|
10
|
+
opts.separator "Usage: vagrant basebox destroy <boxname>"
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# Parse the options
|
|
14
|
+
argv = parse_options(opts)
|
|
15
|
+
return if !argv
|
|
16
|
+
raise Vagrant::Errors::CLIInvalidUsage, :help => opts.help.chomp if argv.length < 1
|
|
17
|
+
|
|
18
|
+
Veewee::Session.destroy_vm(argv[0])
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module Veewee
|
|
2
|
+
module Command
|
|
3
|
+
class BaseboxExport < Vagrant::Command::Base
|
|
4
|
+
def execute
|
|
5
|
+
options = {}
|
|
6
|
+
|
|
7
|
+
opts = OptionParser.new do |opts|
|
|
8
|
+
opts.banner = "Exports the basebox to the vagrant box format"
|
|
9
|
+
opts.separator ""
|
|
10
|
+
opts.separator "Usage: vagrant basebox export <boxname>"
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# Parse the options
|
|
14
|
+
argv = parse_options(opts)
|
|
15
|
+
return if !argv
|
|
16
|
+
raise Vagrant::Errors::CLIInvalidUsage, :help => opts.help.chomp if argv.length < 1
|
|
17
|
+
|
|
18
|
+
Veewee::Session.export_box(argv[0])
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'optparse'
|
|
2
|
+
|
|
3
|
+
module Veewee
|
|
4
|
+
module Command
|
|
5
|
+
class BaseboxList < Vagrant::Command::Base
|
|
6
|
+
def execute
|
|
7
|
+
options = {}
|
|
8
|
+
|
|
9
|
+
opts = OptionParser.new do |opts|
|
|
10
|
+
opts.banner = "Lists all defined baseboxes"
|
|
11
|
+
opts.separator ""
|
|
12
|
+
opts.separator "Usage: vagrant basebox list"
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Parse the options
|
|
16
|
+
argv = parse_options(opts)
|
|
17
|
+
return if !argv
|
|
18
|
+
|
|
19
|
+
Veewee::Session.list_definitions
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'optparse'
|
|
2
|
+
|
|
3
|
+
module Veewee
|
|
4
|
+
module Command
|
|
5
|
+
class BaseboxOstypes < Vagrant::Command::Base
|
|
6
|
+
def execute
|
|
7
|
+
options = {}
|
|
8
|
+
|
|
9
|
+
opts = OptionParser.new do |opts|
|
|
10
|
+
opts.banner = "List the available Operating System types"
|
|
11
|
+
opts.separator ""
|
|
12
|
+
opts.separator "Usage: vagrant basebox ostypes"
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Parse the options
|
|
16
|
+
argv = parse_options(opts)
|
|
17
|
+
return if !argv
|
|
18
|
+
|
|
19
|
+
Veewee::Session.list_ostypes
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'optparse'
|
|
2
|
+
|
|
3
|
+
module Veewee
|
|
4
|
+
module Command
|
|
5
|
+
class BaseboxTemplates < Vagrant::Command::Base
|
|
6
|
+
def execute
|
|
7
|
+
options = {}
|
|
8
|
+
|
|
9
|
+
opts = OptionParser.new do |opts|
|
|
10
|
+
opts.banner = "List the currently available basebox templates"
|
|
11
|
+
opts.separator ""
|
|
12
|
+
opts.separator "Usage: vagrant basebox templates"
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Parse the options
|
|
16
|
+
argv = parse_options(opts)
|
|
17
|
+
return if !argv
|
|
18
|
+
|
|
19
|
+
Veewee::Session.list_templates
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module Veewee
|
|
2
|
+
module Command
|
|
3
|
+
class BaseboxUndefine < Vagrant::Command::Base
|
|
4
|
+
def execute
|
|
5
|
+
options = {}
|
|
6
|
+
|
|
7
|
+
opts = OptionParser.new do |opts|
|
|
8
|
+
opts.banner = "Removes the definition of a basebox "
|
|
9
|
+
opts.separator ""
|
|
10
|
+
opts.separator "Usage: vagrant basebox undefine <boxname>"
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# Parse the options
|
|
14
|
+
argv = parse_options(opts)
|
|
15
|
+
return if !argv
|
|
16
|
+
raise Vagrant::Errors::CLIInvalidUsage, :help => opts.help.chomp if argv.length < 1
|
|
17
|
+
|
|
18
|
+
Veewee::Session.undefine(argv[0])
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module Veewee
|
|
2
|
+
module Command
|
|
3
|
+
class BaseboxValidate < Vagrant::Command::Base
|
|
4
|
+
def execute
|
|
5
|
+
options = {}
|
|
6
|
+
|
|
7
|
+
opts = OptionParser.new do |opts|
|
|
8
|
+
opts.banner = "Validates a box against vagrant compliancy rules"
|
|
9
|
+
opts.separator ""
|
|
10
|
+
opts.separator "Usage: vagrant basebox validate <boxname>"
|
|
11
|
+
|
|
12
|
+
opts.on("-u", "--user", "user to login with") do |u|
|
|
13
|
+
options['user'] = u
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Parse the options
|
|
18
|
+
argv = parse_options(opts)
|
|
19
|
+
return if !argv
|
|
20
|
+
raise Vagrant::Errors::CLIInvalidUsage, :help => opts.help.chomp if argv.length < 1
|
|
21
|
+
|
|
22
|
+
Veewee::Session.validate_box(argv[0], options)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|