summaryrefslogtreecommitdiff
path: root/scripts/edit-morph
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/edit-morph')
-rwxr-xr-xscripts/edit-morph12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/edit-morph b/scripts/edit-morph
index d0b793a4..9f576f74 100755
--- a/scripts/edit-morph
+++ b/scripts/edit-morph
@@ -249,6 +249,12 @@ class EditMorph(cliapp.Application):
with self._open_yaml(file_path) as d:
d['products'] = yaml.load(match_rules)
+ def cmd_edit_chunk_spec(self, (spec_name, stratum_file, key, value)):
+ with self._open_yaml(stratum_file) as stratum:
+ for spec in stratum['chunks']:
+ if spec['name'] == spec_name:
+ spec[key] = value
+
@classmethod
def _splice_cluster_system(cls, syslist, syspath):
sysname = syspath[0]
@@ -327,4 +333,10 @@ class EditMorph(cliapp.Application):
system = self._find_cluster_system(d['systems'], syspath)
system['deploy'][syspath[-1]][key] = val
+ def cmd_chunk_add_install_command(self, (chunk_file, command)):
+ with self._open_yaml(chunk_file) as chunk:
+ if not 'install-commands' in chunk:
+ chunk['install-commands'] = []
+ chunk['install-commands'].append(command)
+
EditMorph().run()