Tentative implementation of dynamic vm_type CA and reconcile
It is functional but still need to address caching issues
This commit is contained in:
@@ -146,7 +146,7 @@ public class BoshDeploymentManifestSchema implements YamlSchema {
|
||||
YAtomicType t_vm_extension = f.yatomic("VMExtension"); //TODO: resolve dynamically from 'cloud config' ? https://www.pivotaltracker.com/story/show/148703877
|
||||
t_vm_extension.parseWith(ValueParsers.NE_STRING);
|
||||
|
||||
YAtomicType t_vm_type = f.yatomic("VMType"); //TODO: resolve dynamically from 'cloud config' ? https://www.pivotaltracker.com/story/show/148686169
|
||||
YAtomicType t_vm_type = f.yenumFromDynamicValues("VMType", (dc) -> cloudConfigProvider.getCloudConfig(dc).getVMTypes());
|
||||
t_vm_type.parseWith(ValueParsers.NE_STRING);
|
||||
|
||||
YAtomicType t_az = f.yatomic("AvailabilityZone"); //TODO: resolve dynamically from 'cloud config': https://www.pivotaltracker.com/story/show/148704481
|
||||
|
||||
@@ -14,7 +14,6 @@ import static org.springframework.ide.vscode.languageserver.testharness.Editor.P
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.ide.vscode.bosh.BoshLanguageServer;
|
||||
import org.springframework.ide.vscode.commons.util.text.LanguageId;
|
||||
import org.springframework.ide.vscode.commons.yaml.reconcile.YamlSchemaProblems;
|
||||
import org.springframework.ide.vscode.languageserver.testharness.Editor;
|
||||
@@ -828,4 +827,19 @@ public class BoshEditorTest {
|
||||
);
|
||||
}
|
||||
|
||||
@Test public void contentAssistVMtype() throws Exception {
|
||||
Editor editor = harness.newEditor(
|
||||
"name: foo\n" +
|
||||
"instance_groups: \n" +
|
||||
"- name: some-server\n" +
|
||||
" stemcell: windoze\n" +
|
||||
" vm_type: <*>"
|
||||
);
|
||||
editor.assertContextualCompletions(
|
||||
"<*>"
|
||||
, // ==>
|
||||
"default<*>",
|
||||
"large<*>"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user