This commit is contained in:
dima
2015-04-04 22:29:21 +02:00
parent cacdd0503a
commit 7a7844f773
3 changed files with 17 additions and 4 deletions

View File

@@ -6,7 +6,7 @@ module VagrantPlugins
module Action
# Include the built-in modules so we can use them as top-level things.
include Vagrant::Action::Builtin
@logger = Log4r::Logger.new('vagrant_libvirt::action')
@logger = Log4r::Logger.new('vagrant_libvirt::action')
# This action is called to bring the box up from nothing.
def self.action_up
@@ -38,7 +38,7 @@ module VagrantPlugins
b2.use StartDomain
b2.use WaitTillUp
b2.use ForwardPorts
@@ -145,6 +145,13 @@ module VagrantPlugins
end
end
# not implemented and looks like not require
def self.action_package
lambda do |env|
raise Errors::PackageNotSupported
end
end
# This is the action that is primarily responsible for completely
# freeing the resources of the underlying virtual machine.
def self.action_destroy
@@ -332,8 +339,8 @@ module VagrantPlugins
autoload :ReadState, action_root.join('read_state')
autoload :ResumeDomain, action_root.join('resume_domain')
autoload :SetNameOfDomain, action_root.join('set_name_of_domain')
# I don't think we need it anymore
# I don't think we need it anymore
autoload :ShareFolders, action_root.join('share_folders')
autoload :StartDomain, action_root.join('start_domain')
autoload :SuspendDomain, action_root.join('suspend_domain')

View File

@@ -7,6 +7,11 @@ module VagrantPlugins
error_namespace('vagrant_libvirt.errors')
end
# package not supported
class PackageNotSupported < VagrantLibvirtError
error_key(:package_not_supported)
end
# Storage pools and volumes exceptions
class NoStoragePool < VagrantLibvirtError
error_key(:no_storage_pool)

View File

@@ -46,6 +46,7 @@ en:
Machine is booted and ready for use!
errors:
package_not_supported: Not support package for libvirt. Create box manualy.
fog_error: |-
There was an error talking to Libvirt. The error message is shown
below: