mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Merge pull request #119 from teto/error_correction
Corrected a wrongly spelled key and added domain_name to the error outpu...
This commit is contained in:
commit
6ebb73e555
@ -5,6 +5,7 @@ module VagrantPlugins
|
||||
# Setup name for domain and domain volumes.
|
||||
class SetNameOfDomain
|
||||
def initialize(app, env)
|
||||
@logger = Log4r::Logger.new("vagrant_libvirt::action::set_name_of_domain")
|
||||
@app = app
|
||||
end
|
||||
|
||||
@ -15,11 +16,15 @@ module VagrantPlugins
|
||||
env[:domain_name] << '_'
|
||||
env[:domain_name] << env[:machine].name.to_s
|
||||
|
||||
@logger.info("Looking for domain #{env[:domain_name]} through list #{env[:libvirt_compute].servers.all}")
|
||||
# Check if the domain name is not already taken
|
||||
domain = ProviderLibvirt::Util::Collection.find_matching(
|
||||
env[:libvirt_compute].servers.all, env[:domain_name])
|
||||
|
||||
@logger.info("Looking for domain #{env[:domain_name]}")
|
||||
|
||||
if domain != nil
|
||||
raise Vagrant::Errors::DomainNameExists,
|
||||
raise ProviderLibvirt::Errors::DomainNameExists,
|
||||
:domain_name => env[:domain_name]
|
||||
end
|
||||
|
||||
|
@ -103,7 +103,7 @@ module VagrantPlugins
|
||||
end
|
||||
|
||||
class DomainNameExists < VagrantLibvirtError
|
||||
error_key(:domain_name_exists_error)
|
||||
error_key(:domain_name_exists)
|
||||
end
|
||||
|
||||
class NoDomainError < VagrantLibvirtError
|
||||
|
@ -89,7 +89,7 @@ en:
|
||||
fog_create_server_error: |-
|
||||
Error while creating domain: %{error_message}
|
||||
domain_name_exists: |-
|
||||
Name of domain about to create is already taken. Please try to run
|
||||
Name `%{domain_name}` of domain about to create is already taken. Please try to run
|
||||
`vagrant up` command again.
|
||||
creating_storage_pool_error: |-
|
||||
There was error while creating libvirt storage pool: %{error_message}
|
||||
|
Loading…
Reference in New Issue
Block a user