class Elevage::New

Create new platform definition files and environments folder structure

Public Class Methods

source_root() click to toggle source
# File lib/elevage/new.rb, line 10
def self.source_root
  File.dirname(__FILE__)
end

Public Instance Methods

already_exists?() click to toggle source

Confirm command is not being run in folder with existing platform definition

# File lib/elevage/new.rb, line 16
def already_exists?
  File.file?(YML_PLATFORM) && fail(IOError, ERR[:platform_exists])
end
create_infrastructure_files() click to toggle source

Create the infrastructure definition files

# File lib/elevage/new.rb, line 26
def create_infrastructure_files
  template(TEMPLATE_VCENTER, YML_VCENTER)
  template(TEMPLATE_NETWORK, YML_NETWORK)
  template(TEMPLATE_COMPUTE, YML_COMPUTE)
end
create_platform_file() click to toggle source

Create the platform definition file

# File lib/elevage/new.rb, line 21
def create_platform_file
  template(TEMPLATE_PLATFORM, YML_PLATFORM)
end