Skip to content

Commit

Permalink
Rename include_pan option into include_pan_core_templates
Browse files Browse the repository at this point in the history
- Change implemented for host, cluster and metacluster

Change-Id: I216423a06fa49b259d2b3bb3240e2241a9f16f4b
  • Loading branch information
Aquilon main user authored and jouvin committed May 23, 2018
1 parent fea8f5b commit 73fabe7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion etc/aqd.conf.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,8 @@ gzip_output = false
# only used if gzip_output = true
transparent_gzip = true
template_extension = .tpl
include_pan = True
# Control include of pan/units and pan/functions in plenary templates
include_pan_core_templates = True

[tool_timeout]
# If set to True, timeout will be set to 'default_value' for any tools run via subprocess
Expand Down
4 changes: 2 additions & 2 deletions lib/aquilon/worker/templates/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def body(self, lines):
pan_assign(lines, "/",
StructureTemplate(path,
{"metadata": PanValue("/metadata")}))
pan_include(lines, "archetype/base")
pan_include_if_exists(lines, "archetype/base")

for servinst in sorted(self.dbobj.services_used,
key=attrgetter('service.name', 'name')):
Expand All @@ -217,7 +217,7 @@ def body(self, lines):

path = PlenaryPersonalityBase.template_name(self.dbobj.personality_stage)
pan_include(lines, path)
pan_include(lines, "archetype/final")
pan_include_if_exists(lines, "archetype/final")


class PlenaryClusterClient(Plenary):
Expand Down
2 changes: 1 addition & 1 deletion lib/aquilon/worker/templates/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def body(self, lines):
lines.append("")

# Load units and functions that may be used by hostdata
if self.config.getboolean("panc", "include_pan"):
if self.config.getboolean("panc", "include_pan_core_templates"):
pan_include(lines, ["pan/units", "pan/functions"])
lines.append("")

Expand Down
4 changes: 2 additions & 2 deletions lib/aquilon/worker/templates/metacluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@ def body(self, lines):
pan_assign(lines, "/",
StructureTemplate("clusterdata/%s" % self.dbobj.name,
{"metadata": PanValue("/metadata")}))
pan_include(lines, "archetype/base")
pan_include_if_exists(lines, "archetype/base")

for servinst in sorted(self.dbobj.services_used):
path = PlenaryServiceInstanceClientDefault.template_name(servinst)
pan_include(lines, path)

path = PlenaryPersonalityBase.template_name(self.dbobj.personality_stage)
pan_include(lines, path)
pan_include(lines, "archetype/final")
pan_include_if_exists(lines, "archetype/final")


Plenary.handlers[MetaCluster] = PlenaryMetaCluster

0 comments on commit 73fabe7

Please sign in to comment.