module Dopv::Infrastructure

Constants

PROVIDER_BASE
PROVIDER_CLASSES
TMP

Public Class Methods

bootstrap_node(plan, state_store) click to toggle source
# File lib/dopv/infrastructure.rb, line 24
def self.bootstrap_node(plan, state_store)
  provider = load_provider(plan.infrastructure.provider)
  provider.bootstrap_node(plan, state_store)
end
destroy_node(plan, state_store, destroy_data_volumes=false) click to toggle source
# File lib/dopv/infrastructure.rb, line 29
def self.destroy_node(plan, state_store, destroy_data_volumes=false)
  provider = load_provider(plan.infrastructure.provider)
  provider.destroy_node(plan, state_store, destroy_data_volumes)
end
load_provider(provider) click to toggle source
# File lib/dopv/infrastructure.rb, line 18
def self.load_provider(provider)
  require "#{PROVIDER_BASE}/#{PROVIDER_CLASSES[provider].downcase}"
  klass_name = "Dopv::Infrastructure::#{PROVIDER_CLASSES[provider]}"
  klass_name.split('::').inject(Object) { |res, i| res.const_get(i) }
end
refresh_node(plan, state_store) click to toggle source
# File lib/dopv/infrastructure.rb, line 34
def self.refresh_node(plan, state_store)
  provider = load_provider(plan.infrastructure.provider)
  provider.refresh_node(plan, state_store)
end