More hoverdocs for nested/nested props of instance_groups
This commit is contained in:
@@ -61,6 +61,9 @@ public class BoshDeploymentManifestSchema implements YamlSchema {
|
||||
"To achieve similar safety make sure to give unique deployment names across environments."
|
||||
);
|
||||
|
||||
YAtomicType t_ip_address = f.yatomic("IPAddress"); //TODO: some kind of checking?
|
||||
t_ip_address.parseWith(ValueParsers.NE_STRING);
|
||||
|
||||
YAtomicType t_network_name = f.yatomic("NetworkName"); //TODO: resolve from 'cloud config' https://www.pivotaltracker.com/story/show/148712155
|
||||
t_network_name.parseWith(ValueParsers.NE_STRING);
|
||||
|
||||
@@ -81,9 +84,11 @@ public class BoshDeploymentManifestSchema implements YamlSchema {
|
||||
|
||||
YBeanType t_network = f.ybean("Network");
|
||||
addProp(t_network, "name", t_network_name).isRequired(true);
|
||||
addProp(t_network, "static_ips", f.yseq(t_ip_address));
|
||||
addProp(t_network, "default", f.yseq(t_ne_string)); //TODO: Can we determine the set of valid values? How?
|
||||
|
||||
YBeanType t_instance_group_env = f.ybean("InstanceGroupEnv");
|
||||
addProp(t_instance_group_env, "npsh", t_params);
|
||||
addProp(t_instance_group_env, "bosh", t_params);
|
||||
addProp(t_instance_group_env, "password", t_ne_string);
|
||||
|
||||
YAtomicType t_version = f.yatomic("Version");
|
||||
@@ -107,7 +112,7 @@ public class BoshDeploymentManifestSchema implements YamlSchema {
|
||||
addProp(TOPLEVEL_TYPE, "update", t_update).isRequired(true);
|
||||
|
||||
YBeanType t_job = f.ybean("Job");
|
||||
addProp(t_job, "name", t_ne_string).isPrimary(true);
|
||||
addProp(t_job, "name", t_ne_string).isRequired(true);
|
||||
addProp(t_job, "release", t_ne_string).isRequired(true);
|
||||
addProp(t_job, "consumes", t_params);
|
||||
addProp(t_job, "provides", t_params);
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. Crypted password for `vcap/root` user (will be placed into `/etc/shadow` on Linux).
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. Links consumed by the job. [Read more about link configuration](https://bosh.io/docs/links.html#deployment)
|
||||
@@ -0,0 +1 @@
|
||||
*Required*. The job name.
|
||||
@@ -0,0 +1 @@
|
||||
*Required*. Specifies job properties. Properties allow BOSH to configure jobs to a specific environment. `properties` defined in a Job block are accessible only to that job. Only properties specified here will be provided to the job.
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. Links provided by the job. [Read more about link configuration](https://bosh.io/docs/links.html#deployment)
|
||||
@@ -0,0 +1 @@
|
||||
*Required*. The release where the job exists
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. Specifies which network components (DNS, Gateway) BOSH populates by default from this network. This property is required if more than one network is specified.
|
||||
@@ -0,0 +1 @@
|
||||
*Required*. A valid network name from the cloud config.
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. Array of IP addresses reserved for the instances on the network.
|
||||
@@ -240,20 +240,6 @@ public class BoshEditorTest {
|
||||
editor.assertCompletionLabels("latest");
|
||||
}
|
||||
|
||||
@Test public void temp_instanceGroupsCompletions() throws Exception {
|
||||
Editor editor = harness.newEditor(
|
||||
"instance_groups:\n" +
|
||||
"- name: foo-group\n" +
|
||||
" job<*>"
|
||||
);
|
||||
editor.assertCompletions(
|
||||
"instance_groups:\n" +
|
||||
"- name: foo-group\n" +
|
||||
" jobs:\n" +
|
||||
" - name: <*>"
|
||||
);
|
||||
}
|
||||
|
||||
@Test public void instanceGroupsCompletions() throws Exception {
|
||||
Editor editor = harness.newEditor(
|
||||
"instance_groups:\n" +
|
||||
@@ -287,7 +273,7 @@ public class BoshEditorTest {
|
||||
"instance_groups:\n" +
|
||||
"- name: foo-group\n" +
|
||||
" jobs:\n" +
|
||||
" - name: <*>"
|
||||
" - <*>"
|
||||
, // =============
|
||||
"instance_groups:\n" +
|
||||
"- name: foo-group\n" +
|
||||
@@ -386,18 +372,55 @@ public class BoshEditorTest {
|
||||
editor.assertHoverContains("env", "Specifies advanced BOSH Agent configuration");
|
||||
}
|
||||
|
||||
@Ignore @Test public void instanceGroups_job_hovers() throws Exception {
|
||||
//For the nested properties of instance_groups.jobs
|
||||
throw new IllegalStateException("Implement a test please!");
|
||||
@Test public void instanceGroups_job_hovers() throws Exception {
|
||||
Editor editor = harness.newEditor(
|
||||
"name: foo\n" +
|
||||
"instance_groups:\n" +
|
||||
"- name: foo\n" +
|
||||
" jobs:\n" +
|
||||
" - name: the-job\n" +
|
||||
" release: the-jobs-release\n" +
|
||||
" properties:\n" +
|
||||
" blah: blah\n" +
|
||||
" consumes:\n" +
|
||||
" blah: blah \n" +
|
||||
" provides:\n" +
|
||||
" blah: blah\n"
|
||||
);
|
||||
|
||||
editor.assertHoverContains("name", 3, "The job name");
|
||||
editor.assertHoverContains("release", "The release where the job exists");
|
||||
editor.assertHoverContains("consumes", "Links consumed by the job");
|
||||
editor.assertHoverContains("provides", "Links provided by the job");
|
||||
editor.assertHoverContains("properties", "Specifies job properties");
|
||||
}
|
||||
|
||||
@Ignore @Test public void instanceGroups_network_hovers() throws Exception {
|
||||
//For the nested properties of instance_groups.networks
|
||||
throw new IllegalStateException("Implement a test please!");
|
||||
@Test public void instanceGroups_network_hovers() throws Exception {
|
||||
Editor editor = harness.newEditor(
|
||||
"name: foo\n" +
|
||||
"instance_groups:\n" +
|
||||
"- name: foo\n" +
|
||||
" networks:\n" +
|
||||
" - name: the-network\n" +
|
||||
" static_ips: []\n" +
|
||||
" default: []\n"
|
||||
);
|
||||
editor.assertHoverContains("name", 3, "A valid network name from the cloud config");
|
||||
editor.assertHoverContains("static_ips", "Array of IP addresses");
|
||||
editor.assertHoverContains("default", "Specifies which network components");
|
||||
}
|
||||
|
||||
@Ignore @Test public void instanceGroups_env_hovers() throws Exception {
|
||||
throw new IllegalStateException("Implement a test please!");
|
||||
@Test public void instanceGroups_env_hovers() throws Exception {
|
||||
Editor editor = harness.newEditor(
|
||||
"name: foo\n" +
|
||||
"instance_groups:\n" +
|
||||
"- name: foo\n" +
|
||||
" env:\n" +
|
||||
" bosh: {}\n" +
|
||||
" password: []\n"
|
||||
);
|
||||
editor.assertHoverContains("bosh", "no description");
|
||||
editor.assertHoverContains("password", "Crypted password");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user