Class: Conjur::Policy::Executor::CreateHostFactory

Inherits:
CreateRecord show all
Defined in:
lib/conjur/policy/executor/create.rb

Overview

When creating a host factory, the roleid and layer are required.

Instance Attribute Summary

Attributes inherited from Base

#actions, #api, #statement

Instance Method Summary collapse

Methods inherited from CreateRecord

#annotate_record, #attribute_names, #create_path, #execute, #kind_path

Methods included from Annotate

#annotate, #update_annotation_path

Methods inherited from Create

#record

Methods inherited from Base

#action, #execute, #initialize, #resource_path, #role_path

Methods included from Logger

included

Constructor Details

This class inherits a constructor from Conjur::Policy::Executor::Base

Instance Method Details

#create_parametersObject



76
77
78
79
80
81
# File 'lib/conjur/policy/executor/create.rb', line 76

def create_parameters
  super.tap do |params|
    params['roleid'] = record.role.roleid
    params['layers'] =  Array(record.layers).map(&:id)
  end
end