Hosts to V2
This commit is contained in:
parent
02e499da47
commit
5a33b7ee54
|
@ -191,14 +191,14 @@ module Vagrant
|
||||||
# will return nil, and we don't want to trigger a detect load.
|
# will return nil, and we don't want to trigger a detect load.
|
||||||
host_klass = config.global.vagrant.host
|
host_klass = config.global.vagrant.host
|
||||||
if host_klass.nil? || host_klass == :detect
|
if host_klass.nil? || host_klass == :detect
|
||||||
hosts = Vagrant.plugin("1").manager.hosts
|
hosts = Vagrant.plugin("2").manager.hosts
|
||||||
|
|
||||||
# Get the flattened list of available hosts
|
# Get the flattened list of available hosts
|
||||||
host_klass = Hosts.detect(hosts)
|
host_klass = Hosts.detect(hosts)
|
||||||
end
|
end
|
||||||
|
|
||||||
# If no host class is detected, we use the base class.
|
# If no host class is detected, we use the base class.
|
||||||
host_klass ||= Vagrant.plugin("1", :host)
|
host_klass ||= Vagrant.plugin("2", :host)
|
||||||
|
|
||||||
@host ||= host_klass.new(@ui)
|
@host ||= host_klass.new(@ui)
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,7 +2,7 @@ require "vagrant"
|
||||||
|
|
||||||
module VagrantPlugins
|
module VagrantPlugins
|
||||||
module HostArch
|
module HostArch
|
||||||
class Plugin < Vagrant.plugin("1")
|
class Plugin < Vagrant.plugin("2")
|
||||||
name "Arch host"
|
name "Arch host"
|
||||||
description "Arch host support."
|
description "Arch host support."
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ require 'vagrant/util/platform'
|
||||||
module VagrantPlugins
|
module VagrantPlugins
|
||||||
module HostBSD
|
module HostBSD
|
||||||
# Represents a BSD host, such as FreeBSD and Darwin (Mac OS X).
|
# Represents a BSD host, such as FreeBSD and Darwin (Mac OS X).
|
||||||
class Host < Vagrant.plugin("1", :host)
|
class Host < Vagrant.plugin("2", :host)
|
||||||
include Vagrant::Util
|
include Vagrant::Util
|
||||||
include Vagrant::Util::Retryable
|
include Vagrant::Util::Retryable
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ require "vagrant"
|
||||||
|
|
||||||
module VagrantPlugins
|
module VagrantPlugins
|
||||||
module HostBSD
|
module HostBSD
|
||||||
class Plugin < Vagrant.plugin("1")
|
class Plugin < Vagrant.plugin("2")
|
||||||
name "BSD host"
|
name "BSD host"
|
||||||
description "BSD host support."
|
description "BSD host support."
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ require "vagrant"
|
||||||
|
|
||||||
module VagrantPlugins
|
module VagrantPlugins
|
||||||
module HostFedora
|
module HostFedora
|
||||||
class Plugin < Vagrant.plugin("1")
|
class Plugin < Vagrant.plugin("2")
|
||||||
name "Fedora host"
|
name "Fedora host"
|
||||||
description "Fedora host support."
|
description "Fedora host support."
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ require "vagrant"
|
||||||
|
|
||||||
module VagrantPlugins
|
module VagrantPlugins
|
||||||
module HostFreeBSD
|
module HostFreeBSD
|
||||||
class Plugin < Vagrant.plugin("1")
|
class Plugin < Vagrant.plugin("2")
|
||||||
name "FreeBSD host"
|
name "FreeBSD host"
|
||||||
description "FreeBSD host support."
|
description "FreeBSD host support."
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ require "vagrant"
|
||||||
|
|
||||||
module VagrantPlugins
|
module VagrantPlugins
|
||||||
module HostGentoo
|
module HostGentoo
|
||||||
class Plugin < Vagrant.plugin("1")
|
class Plugin < Vagrant.plugin("2")
|
||||||
name "Gentoo host"
|
name "Gentoo host"
|
||||||
description "Gentoo host support."
|
description "Gentoo host support."
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ require 'vagrant/util/platform'
|
||||||
module VagrantPlugins
|
module VagrantPlugins
|
||||||
module HostLinux
|
module HostLinux
|
||||||
# Represents a Linux based host, such as Ubuntu.
|
# Represents a Linux based host, such as Ubuntu.
|
||||||
class Host < Vagrant.plugin("1", :host)
|
class Host < Vagrant.plugin("2", :host)
|
||||||
include Vagrant::Util
|
include Vagrant::Util
|
||||||
include Vagrant::Util::Retryable
|
include Vagrant::Util::Retryable
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ require "vagrant"
|
||||||
|
|
||||||
module VagrantPlugins
|
module VagrantPlugins
|
||||||
module HostLinux
|
module HostLinux
|
||||||
class Plugin < Vagrant.plugin("1")
|
class Plugin < Vagrant.plugin("2")
|
||||||
name "Linux host"
|
name "Linux host"
|
||||||
description "Linux host support."
|
description "Linux host support."
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ require "vagrant"
|
||||||
|
|
||||||
module VagrantPlugins
|
module VagrantPlugins
|
||||||
module HostOpenSUSE
|
module HostOpenSUSE
|
||||||
class Plugin < Vagrant.plugin("1")
|
class Plugin < Vagrant.plugin("2")
|
||||||
name "OpenSUSE host"
|
name "OpenSUSE host"
|
||||||
description "OpenSUSE host support."
|
description "OpenSUSE host support."
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ require 'vagrant/util/platform'
|
||||||
|
|
||||||
module VagrantPlugins
|
module VagrantPlugins
|
||||||
module HostWindows
|
module HostWindows
|
||||||
class Host < Vagrant.plugin("1", :host)
|
class Host < Vagrant.plugin("2", :host)
|
||||||
def self.match?
|
def self.match?
|
||||||
Vagrant::Util::Platform.windows?
|
Vagrant::Util::Platform.windows?
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,7 +2,7 @@ require "vagrant"
|
||||||
|
|
||||||
module VagrantPlugins
|
module VagrantPlugins
|
||||||
module HostWindows
|
module HostWindows
|
||||||
class Plugin < Vagrant.plugin("1")
|
class Plugin < Vagrant.plugin("2")
|
||||||
name "Windows host"
|
name "Windows host"
|
||||||
description "Windows host support."
|
description "Windows host support."
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue