Add update property to schema

This commit is contained in:
Kris De Volder
2017-07-10 15:38:49 -07:00
parent 4fa7299585
commit fd7efb2aba
3 changed files with 22 additions and 1 deletions

View File

@@ -65,6 +65,8 @@ public class BoshDeploymentManifestSchema implements YamlSchema {
YType t_stemcell = t_params; //TODO: https://www.pivotaltracker.com/story/show/148627093
addProp(TOPLEVEL_TYPE, "stemcells", f.yseq(t_stemcell)).isRequired(true);
YType t_update = t_params; //TODO: https://www.pivotaltracker.com/story/show/148627121
addProp(TOPLEVEL_TYPE, "update", t_update).isRequired(true);
}

View File

@@ -0,0 +1,11 @@
*Required*. This specifies instance update properties. These properties control how BOSH updates instances during the deployment.
See job [lifecycle](https://bosh.io/docs/job-lifecycle.html) for more details on startup/shutdown procedure within each VM.
Example:
update:
canaries: 1
max_in_flight: 10
canary_watch_time: 1000-30000
update_watch_time: 1000-30000

View File

@@ -43,6 +43,11 @@ public class BoshEditorTest {
"- alias: default\n" +
" os: ubuntu-trusty\n" +
" version: 3421.11\n" +
"update:\n" +
" canaries: 1\n" +
" max_in_flight: 10\n" +
" canary_watch_time: 1000-30000\n" +
" update_watch_time: 1000-30000\n" +
"blah: hoooo\n"
);
editor.assertProblems(
@@ -53,6 +58,8 @@ public class BoshEditorTest {
editor.assertHoverContains("director_uuid", "This string must match the UUID of the currently targeted Director");
editor.assertHoverContains("releases", "The name and version of each release in the deployment");
editor.assertHoverContains("stemcells", "The name and version of each stemcell");
editor.assertHoverContains("update", "This specifies instance update properties");
}
@Test public void toplevelV2PropertyCompletions() throws Exception {
@@ -63,7 +70,8 @@ public class BoshEditorTest {
"director_uuid: <*>",
"name: <*>",
"releases:\n- <*>",
"stemcells:\n- <*>"
"stemcells:\n- <*>",
"update:\n <*>"
);
}