Sha256: 6b1beb9c38f975074438fe8efb02ff36c5d2c53d5657033c9e166d0f7e1ab7c5

Contents?: true

Size: 1.16 KB

Versions: 5

Compression:

Stored size: 1.16 KB

Contents

begin
  require 'vagrant'
rescue LoadError
  raise 'The Openstack Cloud provider must be run within Vagrant.'
end

require 'vagrant-openstack-provider/version_checker'

# This is a sanity check to make sure no one is attempting to install
# this into an early Vagrant version.
if Vagrant::VERSION < '1.4.0'
  fail 'Openstack Cloud provider is only compatible with Vagrant 1.4+'
end

module VagrantPlugins
  module Openstack
    class Plugin < Vagrant.plugin('2')
      name 'Openstack Cloud'
      description <<-DESC
      This plugin enables Vagrant to manage machines in Openstack Cloud.
      DESC

      config(:openstack, :provider) do
        require_relative 'config'
        Config
      end

      provider(:openstack, box_optional: true) do
        Openstack.init_i18n
        Openstack.init_logging
        VagrantPlugins::Openstack.check_version

        # Load the actual provider
        require_relative 'provider'
        Provider
      end

      command('openstack') do
        Openstack.init_i18n
        Openstack.init_logging
        VagrantPlugins::Openstack.check_version

        require_relative 'command/main'
        Command::Main
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vagrant-openstack-provider-0.9.0 lib/vagrant-openstack-provider/plugin.rb
vagrant-openstack-provider-0.8.0 lib/vagrant-openstack-provider/plugin.rb
vagrant-openstack-provider-0.7.2 lib/vagrant-openstack-provider/plugin.rb
vagrant-openstack-provider-0.7.1 lib/vagrant-openstack-provider/plugin.rb
vagrant-openstack-provider-0.7.0 lib/vagrant-openstack-provider/plugin.rb