Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions crowbar_framework/app/models/neutron_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -446,4 +446,22 @@ def apply_role_pre_chef_call(old_role, role, all_nodes)
end
@logger.debug("Neutron apply_role_pre_chef_call: leaving")
end

def event_hook(role, event, details)
case event
when :node_changed
# we only care about non-HA here, so no need to look at elements_expanded
server_nodes = role.override_attributes["neutron"]["elements"]["neutron-server"]
if details["attributes"].include?("public_name") && server_nodes.include?(details["node"])
# trigger chef-client asynchronously
end
when :proposal_applied
# FIXME: don't hardcode deps we know about; also for these ones, we need
# to check that the instance matches too
# we include nova here as some of the neutron config depends on nova
if ["database", "rabbitmq", "keystone", "nova"].include?(details["barclamp"])
# trigger chef-client asynchronously
end
end
end
end