diff --git a/headless-services/bosh-language-server/src/main/resources/cloud-config/CloudConfig/vm_types.md b/headless-services/bosh-language-server/src/main/resources/cloud-config/CloudConfig/vm_types.md index bfca544c6..f44d4d553 100644 --- a/headless-services/bosh-language-server/src/main/resources/cloud-config/CloudConfig/vm_types.md +++ b/headless-services/bosh-language-server/src/main/resources/cloud-config/CloudConfig/vm_types.md @@ -6,13 +6,3 @@ Example: - name: default cloud_properties: instance_type: m1.small - -CPI Specific `cloud_properties` - -- See [AWS CPI VM types cloud properties](https://bosh.io/docs/aws-cpi.html#resource-pools) -- See [Azure CPI VM types cloud properties](https://bosh.io/docs/azure-cpi.html#resource-pools) -- See [OpenStack CPI VM types cloud properties](https://bosh.io/docs/openstack-cpi.html#resource-pools) -- See [Softlayer CPI VM types cloud properties](https://bosh.io/docs/softlayer-cpi.html#resource-pools) -- See [Google Cloud Platform CPI VM types cloud properties](https://bosh.io/docs/google-cpi.html#resource-pools) -- See [vSphere CPI VM types cloud properties](https://bosh.io/docs/vsphere-cpi.html#resource-pools) -- See [vCloud CPI VM types cloud properties](https://bosh.io/docs/vcloud-cpi.html#resource-pools) diff --git a/headless-services/bosh-language-server/src/main/resources/cloud-config/VMType/cloud_properties.md b/headless-services/bosh-language-server/src/main/resources/cloud-config/VMType/cloud_properties.md new file mode 100644 index 000000000..11e293a51 --- /dev/null +++ b/headless-services/bosh-language-server/src/main/resources/cloud-config/VMType/cloud_properties.md @@ -0,0 +1,11 @@ +*Optional*. Describes any IaaS-specific properties needed to create VMs; for most IaaSes, some data here is actually required. + +CPI Specific `cloud_properties` + +- See [AWS CPI VM types cloud properties](https://bosh.io/docs/aws-cpi.html#resource-pools) +- See [Azure CPI VM types cloud properties](https://bosh.io/docs/azure-cpi.html#resource-pools) +- See [OpenStack CPI VM types cloud properties](https://bosh.io/docs/openstack-cpi.html#resource-pools) +- See [Softlayer CPI VM types cloud properties](https://bosh.io/docs/softlayer-cpi.html#resource-pools) +- See [Google Cloud Platform CPI VM types cloud properties](https://bosh.io/docs/google-cpi.html#resource-pools) +- See [vSphere CPI VM types cloud properties](https://bosh.io/docs/vsphere-cpi.html#resource-pools) +- See [vCloud CPI VM types cloud properties](https://bosh.io/docs/vcloud-cpi.html#resource-pools) diff --git a/headless-services/bosh-language-server/src/main/resources/cloud-config/VMType/name.md b/headless-services/bosh-language-server/src/main/resources/cloud-config/VMType/name.md new file mode 100644 index 000000000..54e3b5d81 --- /dev/null +++ b/headless-services/bosh-language-server/src/main/resources/cloud-config/VMType/name.md @@ -0,0 +1 @@ +*Required*. A unique name used to identify and reference the VM type. \ No newline at end of file diff --git a/headless-services/bosh-language-server/src/test/java/org/springframework/ide/vscode/bosh/BoshEditorTest.java b/headless-services/bosh-language-server/src/test/java/org/springframework/ide/vscode/bosh/BoshEditorTest.java index 07bb956c1..d9c9f59aa 100644 --- a/headless-services/bosh-language-server/src/test/java/org/springframework/ide/vscode/bosh/BoshEditorTest.java +++ b/headless-services/bosh-language-server/src/test/java/org/springframework/ide/vscode/bosh/BoshEditorTest.java @@ -1957,6 +1957,14 @@ public class BoshEditorTest { @Test public void cloudconfig_vm_types_subproperties() throws Exception { Editor editor; + editor = harness.newEditor(LanguageId.BOSH_CLOUD_CONFIG, + "vm_types:\n" + + "- <*>" + ); + editor.assertContextualCompletions("<*>", + "name: <*>" + ); + editor = harness.newEditor(LanguageId.BOSH_CLOUD_CONFIG, "vm_types:\n" + "- name: nice-vm\n" + @@ -1966,14 +1974,6 @@ public class BoshEditorTest { "cloud_properties:\n <*>" ); - editor = harness.newEditor(LanguageId.BOSH_CLOUD_CONFIG, - "vm_types:\n" + - "- <*>" - ); - editor.assertContextualCompletions("<*>", - "name: <*>" - ); - editor = harness.newEditor(LanguageId.BOSH_CLOUD_CONFIG, "vm_types:\n" + "- name: nice-vm\n" + @@ -1985,6 +1985,15 @@ public class BoshEditorTest { "dup|Duplicate 'VMTypeName'", "dup|Duplicate 'VMTypeName'" ); + + editor = harness.newEditor(LanguageId.BOSH_CLOUD_CONFIG, + "vm_types:\n" + + "- name: default\n" + + " cloud_properties:\n" + + " instance_type: m1.small\n" + ); + editor.assertHoverContains("name", "A unique name used to identify and reference the VM type"); + editor.assertHoverContains("cloud_properties", "Describes any IaaS-specific properties needed to create VMs"); } }