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
127
128
129
130
131
132
133
134
135
136
137
138
139
|
# File 'lib/stackmate/participants/common.rb', line 127
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
141
142
143
|
# File 'lib/stackmate/participants/common.rb', line 141
def delete
logger.debug "Deleting #{participant_name} wfid=#{workitem.fei.wfid} fei=#{workitem.fei.to_h}"
end
|
#on_workitem ⇒ Object
145
146
147
148
149
150
151
152
153
|
# File 'lib/stackmate/participants/common.rb', line 145
def on_workitem
@stackname = workitem['StackName']
if workitem['params']['operation'] == 'create'
create
else
delete
end
reply
end
|