Module: VagrantPlugins::ArubaCloud
- Defined in:
- lib/vagrant-arubacloud.rb,
lib/vagrant-arubacloud/action.rb,
lib/vagrant-arubacloud/config.rb,
lib/vagrant-arubacloud/errors.rb,
lib/vagrant-arubacloud/plugin.rb,
lib/vagrant-arubacloud/provider.rb,
lib/vagrant-arubacloud/command/root.rb,
lib/vagrant-arubacloud/command/servers.rb,
lib/vagrant-arubacloud/action/is_created.rb,
lib/vagrant-arubacloud/action/read_state.rb,
lib/vagrant-arubacloud/command/templates.rb,
lib/vagrant-arubacloud/action/halt_server.rb,
lib/vagrant-arubacloud/action/list_servers.rb,
lib/vagrant-arubacloud/action/start_server.rb,
lib/vagrant-arubacloud/action/create_server.rb,
lib/vagrant-arubacloud/action/delete_server.rb,
lib/vagrant-arubacloud/action/read_ssh_info.rb,
lib/vagrant-arubacloud/action/list_templates.rb,
lib/vagrant-arubacloud/action/aruba_provision.rb,
lib/vagrant-arubacloud/action/connect_arubacloud.rb,
lib/vagrant-arubacloud/action/disable_requiretty.rb,
lib/vagrant-arubacloud/action/message_not_created.rb,
lib/vagrant-arubacloud/action/message_already_created.rb
Defined Under Namespace
Modules: Action, Command, Errors Classes: Config, Plugin, Provider
Constant Summary collapse
- DC_TABLES =
{ :dc1 => "https://api.dc1.computing.cloud.it/WsEndUser/v2.9/WsEndUser.svc/json", :dc2 => "https://api.dc2.computing.cloud.it/WsEndUser/v2.9/WsEndUser.svc/json", :dc3 => "https://api.dc3.computing.cloud.it/WsEndUser/v2.9/WsEndUser.svc/json", :dc4 => "https://api.dc4.computing.cloud.it/WsEndUser/v2.9/WsEndUser.svc/json", :dc5 => "https://api.dc5.computing.cloud.it/WsEndUser/v2.9/WsEndUser.svc/json", :dc6 => "https://api.dc6.computing.cloud.it/WsEndUser/v2.9/WsEndUser.svc/json", :dc8 => "https://api.dc8.computing.cloud.it/WsEndUser/v2.9/WsEndUser.svc/json" }
- DC_DEFAULT =
"dc2"
Class Method Summary collapse
- .init_i18n ⇒ Object
-
.init_logging ⇒ Object
This initializes the logging so that our logs are outputted at the same level as Vagrant core logs.
-
.source_root ⇒ Pathname
This returns the path to the source of this plugin.
Class Method Details
.init_i18n ⇒ Object
12 13 14 15 |
# File 'lib/vagrant-arubacloud.rb', line 12 def self.init_i18n I18n.load_path << File.('locales/en.yml', source_root) I18n.reload! end |
.init_logging ⇒ Object
This initializes the logging so that our logs are outputted at the same level as Vagrant core logs.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/vagrant-arubacloud.rb', line 19 def self.init_logging # Initialize logging level = nil begin level = Log4r.const_get(ENV['VAGRANT_LOG'].upcase) rescue NameError # This means that the logging constant wasn't found, # which is fine. We just keep `level` as `nil`. But # we tell the user. level = nil end # Some constants, such as "true" resolve to booleans, so the # above error checking doesn't catch it. This will check to make # sure that the log level is an integer, as Log4r requires. level = nil unless level.is_a?(Integer) # Set the logging level on all "vagrant" namespaced # logs as long as we have a valid level. if level logger = Log4r::Logger.new('vagrant_arubacloud') logger.outputters = Log4r::Outputter.stderr logger.level = level logger = nil end end |
.source_root ⇒ Pathname
This returns the path to the source of this plugin.
49 50 51 |
# File 'lib/vagrant-arubacloud.rb', line 49 def self.source_root @source_root ||= Pathname.new(File.('../../', __FILE__)) end |