summaryrefslogtreecommitdiff
path: root/scripts/build-command-op-templates
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build-command-op-templates')
-rwxr-xr-xscripts/build-command-op-templates7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/build-command-op-templates b/scripts/build-command-op-templates
index b008596dc..46ad634b9 100755
--- a/scripts/build-command-op-templates
+++ b/scripts/build-command-op-templates
@@ -100,6 +100,7 @@ def get_properties(p):
scripts = c.findall("script")
paths = c.findall("path")
lists = c.findall("list")
+ comptype = c.find("imagePath")
# Current backend doesn't support multiple allowed: tags
# so we get to emulate it
@@ -110,8 +111,12 @@ def get_properties(p):
comp_exprs.append("/bin/cli-shell-api listActiveNodes {0} | sed -e \"s/'//g\" && echo".format(i.text))
for i in scripts:
comp_exprs.append("{0}".format(i.text))
+ if comptype is not None:
+ props["comp_type"] = "imagefiles"
+ comp_exprs.append("echo -n \"<imagefiles>\"")
comp_help = " && ".join(comp_exprs)
props["comp_help"] = comp_help
+
except:
props["comp_help"] = []
@@ -127,6 +132,8 @@ def make_node_def(props, command):
help = props["help"]
help = fill(help, width=64, subsequent_indent='\t\t\t')
node_def += f'help: {help}\n'
+ if "comp_type" in props:
+ node_def += f'comptype: {props["comp_type"]}\n'
if "comp_help" in props:
node_def += f'allowed: {props["comp_help"]}\n'
if command is not None: