class DTK::State::ExecutableAction
Attributes
attribute_type_info[R]
bash_script[R]
entrypoint[R]
name[R]
type[R]
Public Class Methods
get(crd_assembly_namespace, crd_assembly_name, component_name, action_name, opts = {})
click to toggle source
# File lib/state/executable_action.rb, line 15 def self.get(crd_assembly_namespace, crd_assembly_name, component_name, action_name, opts = {}) component_obj = Component.get(crd_assembly_namespace, crd_assembly_name, component_name, opts) actions = component_obj.component_def.executable_actions action = actions[action_name] raise Error.new("Unable to find action '#{action_name}'") unless action ExecutableAction.new( { name: action_name, entrypoint: action[:entrypoint] || '', type: action[:type] || '', bash_script: action[:bash_script] || '', attributes: action[:attributes] || {} } ) end
new(params)
click to toggle source
# File lib/state/executable_action.rb, line 7 def initialize(params) @name = params[:name] @entrypoint = params[:entrypoint] @type = params[:type] @bash_script = params[:bash_script] @attribute_type_info = AttributeTypeInfo.create_from_kube_hash(params[:attributes] || {}) end