Class: Nucleon::Action::Cloud::Create

Inherits:
Object
  • Object
show all
Includes:
Mixin::Action::Project
Defined in:
lib/nucleon/action/cloud/create.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.describeObject


Info



12
13
14
# File 'lib/nucleon/action/cloud/create.rb', line 12

def self.describe
  super(:cloud, :create, 1000)
end

Instance Method Details

#argumentsObject




28
29
30
# File 'lib/nucleon/action/cloud/create.rb', line 28

def arguments
  [ :project_reference ]
end

#configureObject


Settings



19
20
21
22
23
24
# File 'lib/nucleon/action/cloud/create.rb', line 19

def configure
  super do    
    config.defaults(CORL.action_config(:project_create))      
    config[:project_reference].default = 'github:::coralnexus/network-template'
  end
end

#executeObject


Operations



35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/nucleon/action/cloud/create.rb', line 35

def execute
  super(false) do
    info('nucleon.action.cloud.create.start')
    
    project       = project_load(settings[:path], true, true)
    myself.status = code.project_failure unless project
    
    if project.remote(:origin) =~ /coralnexus\/network\-template/
      project.delete_remote(:origin)
      project.delete_remote(:edit)
    end
  end
end