Class: Elevage::New
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Elevage::New
- Includes:
- Thor::Actions
- Defined in:
- lib/elevage/new.rb
Overview
Create new platform definition files and environments folder structure
Class Method Summary collapse
Instance Method Summary collapse
-
#already_exists? ⇒ Boolean
Confirm command is not being run in folder with existing platform definition.
-
#create_infrastructure_files ⇒ Object
Create the infrastructure definition files.
-
#create_platform_file ⇒ Object
Create the platform definition file.
Class Method Details
.source_root ⇒ Object
10 11 12 |
# File 'lib/elevage/new.rb', line 10 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#already_exists? ⇒ Boolean
Confirm command is not being run in folder with existing platform definition
16 17 18 |
# File 'lib/elevage/new.rb', line 16 def already_exists? File.file?(YML_PLATFORM) && fail(IOError, ERR[:platform_exists]) end |
#create_infrastructure_files ⇒ Object
Create the infrastructure definition files
26 27 28 29 30 |
# 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 ⇒ Object
Create the platform definition file
21 22 23 |
# File 'lib/elevage/new.rb', line 21 def create_platform_file template(TEMPLATE_PLATFORM, YML_PLATFORM) end |