forked from jedi4ever/veewee
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleaned up the output during the execution + major changes to make it…
… work on 4.x
- Loading branch information
Showing
16 changed files
with
311 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
require 'veewee' | ||
puts "here we are" | ||
require 'veewee' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,2 @@ | ||
require 'vagrant' | ||
#require 'veewee/config' | ||
require 'veewee/command' | ||
#require 'veewee/middleware' | ||
|
||
|
||
#basebox = Vagrant::Action::Builder.new do | ||
#use BaseBoxMiddleware | ||
#end | ||
|
||
#Vagrant::Action.register :basebox, basebox | ||
|
||
# Add our custom translations to the load path | ||
I18n.load_path << File.expand_path("../../locales/en.yml", __FILE__) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,58 @@ | ||
require 'veewee/session' | ||
|
||
#Load Veewee::Session libraries | ||
lib_dir= File.expand_path(File.join(File.dirname(__FILE__),"..","..", "lib")) | ||
Dir.glob(File.join(lib_dir, '**','*.rb')).each {|f| require f } | ||
|
||
#Setup some base variables to use | ||
template_dir=File.expand_path(File.join(lib_dir,"..", "templates")) | ||
|
||
veewee_dir="." | ||
definition_dir= File.expand_path(File.join(veewee_dir, "definitions")) | ||
tmp_dir=File.expand_path(File.join(veewee_dir, "tmp")) | ||
iso_dir=File.expand_path(File.join(veewee_dir, "iso")) | ||
box_dir=File.expand_path(File.join(veewee_dir, "boxes")) | ||
|
||
#Initialize | ||
Veewee::Session.setenv({:veewee_dir => veewee_dir, :definition_dir => definition_dir, | ||
:template_dir => template_dir, :iso_dir => iso_dir, :box_dir => box_dir, :tmp_dir => tmp_dir}) | ||
|
||
module Veewee | ||
class Command < Vagrant::Command::Base | ||
register "bla", "Run a rake task inside the VM environment" | ||
#argument :rake_command, :type => :array, :required => false, :desc => "The command to run on the VM via Rake" | ||
#class_option :cwd, :type => :string, :default => nil | ||
|
||
# Executes the given rake command on the VMs that are represented | ||
# by this environment. | ||
def execute | ||
command = (rake_command || []).join(" ") | ||
target_vms.each { |vm| execute_on_vm(vm, command) } | ||
end | ||
|
||
protected | ||
|
||
# Executes a command on a specific VM. | ||
def execute_on_vm(vm, command) | ||
vm.env.actions.run(:rake, | ||
"rake.command" => command, | ||
"rake.cwd" => options[:cwd]) | ||
end | ||
class Command < Vagrant::Command::GroupBase | ||
register "basebox","Commands to manage baseboxes" | ||
|
||
desc "templates", "List the currently available box templates" | ||
def templates | ||
Veewee::Session.list_templates | ||
end | ||
|
||
desc "define BOXNAME TEMPLATE", "Define a new box starting from a template" | ||
method_option :force,:type => :boolean , :default => false, :aliases => "-f", :desc => "overwrite the definition" | ||
def define(boxname, template) | ||
Veewee::Session.define(boxname,template,options) | ||
end | ||
|
||
desc "build BOXNAME", "Build the box BOXNAME" | ||
method_option :force,:type => :boolean , :default => false, :aliases => "-f", :desc => "overwrite the basebox" | ||
def build(boxname) | ||
Veewee::Session.build(boxname,options) | ||
end | ||
|
||
desc "ostypes", "List the available Operating System types" | ||
def ostypes | ||
Veewee::Session.list_ostypes | ||
end | ||
|
||
desc "destroy", "Destroy the virtualmachine of a basebox" | ||
def destroy(boxname) | ||
puts Veewee::Session.destroy_vm(boxname) | ||
end | ||
|
||
desc "list", "Lists all defined boxes" | ||
def list | ||
Veewee::Session.list_definitions | ||
end | ||
|
||
end | ||
|
||
end |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.