Sha256: a875ed96e16e1c2509e7ada5f11995b5f46f12663bc8de95af177b28853711e5

Contents?: true

Size: 1.15 KB

Versions: 1

Compression:

Stored size: 1.15 KB

Contents

require 'log4r'
require 'json'

require 'vagrant-openstack-illuin-provider/client/heat'
require 'vagrant-openstack-illuin-provider/client/keystone'
require 'vagrant-openstack-illuin-provider/client/nova'
require 'vagrant-openstack-illuin-provider/client/neutron'
require 'vagrant-openstack-illuin-provider/client/cinder'
require 'vagrant-openstack-illuin-provider/client/glance'

module VagrantPlugins
  module Openstack
    class Session
      include Singleton

      attr_accessor :token
      attr_accessor :project_id
      attr_accessor :endpoints

      def initialize
        @token = nil
        @project_id = nil
        @endpoints = {}
      end

      def reset
        initialize
      end
    end

    def self.session
      Session.instance
    end

    def self.keystone
      Openstack::KeystoneClient.instance
    end

    def self.nova
      Openstack::NovaClient.instance
    end

    def self.heat
      Openstack::HeatClient.instance
    end

    def self.neutron
      Openstack::NeutronClient.instance
    end

    def self.cinder
      Openstack::CinderClient.instance
    end

    def self.glance
      Openstack::GlanceClient.instance
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-openstack-illuin-provider-0.12.0 lib/vagrant-openstack-illuin-provider/client/openstack.rb