Class: StackMate::NoOpResource
- Inherits:
-
Ruote::Participant
- Object
- Ruote::Participant
- StackMate::NoOpResource
show all
- Includes:
- Logging
- Defined in:
- lib/stackmate/participants/common.rb
Instance Method Summary
collapse
Methods included from Logging
configure_logger_for, #logger, logger_for
Instance Method Details
#create ⇒ Object
129
130
131
132
133
134
135
136
137
138
139
140
141
|
# File 'lib/stackmate/participants/common.rb', line 129
def create
logger.debug "Creating #{participant_name} wfid=#{workitem.fei.wfid} fei=#{workitem.fei.to_h}"
workitem[participant_name] = {}
stackname = workitem.fields['ResolvedNames']['AWS::StackName']
logger.debug "physical id is #{stackname}-#{participant_name} "
workitem[participant_name][:physical_id] = stackname + '-' + participant_name
typ = workitem['Resources'][participant_name]['Type']
if AWS_FAKE_ATTRIB_VALUES[typ]
AWS_FAKE_ATTRIB_VALUES[typ].each do |k,v|
workitem[participant_name][k] = v
end
end
end
|
#delete ⇒ Object
143
144
145
|
# File 'lib/stackmate/participants/common.rb', line 143
def delete
logger.debug "Deleting #{participant_name} wfid=#{workitem.fei.wfid} fei=#{workitem.fei.to_h}"
end
|
#on_workitem ⇒ Object
147
148
149
150
151
152
153
154
155
|
# File 'lib/stackmate/participants/common.rb', line 147
def on_workitem
@stackname = workitem['StackName']
if workitem['params']['operation'] == 'create'
create
else
delete
end
reply
end
|