Skip to content

Commit ec40841

Browse files
author
Carlos Konstanski
committed
Create servicedependency objects based on tags
When a resource has a tag with the form 'parent:', create a servicedependency object. Issue: CIRRUS-4265
1 parent ab00392 commit ec40841

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

puppetdb_stencil.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ def render_resources(database, resource_type, localsite, template_names):
8686
dto = {}
8787
dto['object_name'] = 'servicedependency'
8888
dto['parameters'] = [{
89-
'host_name': child.parameters['host_name'],
90-
'service_description': child.parameters['service_description'],
91-
'dependent_host_name': parent.parameters['host_name'],
92-
'dependent_service_description': parent.parameters['service_description']
89+
'host_name': parent.parameters['host_name'],
90+
'service_description': parent.parameters['service_description'],
91+
'dependent_host_name': child.parameters['host_name'],
92+
'dependent_service_description': child.parameters['service_description']
9393
}]
9494
icinga_config += template.render(dto=dto) + '\n'
9595
return icinga_config

0 commit comments

Comments
 (0)