Added routes property to manifest yaml schema
This commit is contained in:
@@ -139,6 +139,7 @@ public class ManifestYmlSchema implements YamlSchema {
|
||||
f.yprop("no-route", t_boolean),
|
||||
f.yprop("path", t_path),
|
||||
f.yprop("random-route", t_boolean),
|
||||
f.yprop("routes", t_strings),
|
||||
f.yprop("services", t_services),
|
||||
f.yprop("stack", t_string),
|
||||
f.yprop("timeout", t_pos_integer),
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<p>Use the <code>routes</code> attribute to provide multiple HTTP and TCP routes. Each route for this app is created if it does not already exist.</p>
|
||||
<p>This attribute is a combination of <code>push</code> options that include <code>--hostname</code>, <code>-d</code>, and <code>--route-path</code>.</p>
|
||||
<pre>
|
||||
---
|
||||
...
|
||||
routes:
|
||||
- route: example.com
|
||||
- route: www.example.com/foo
|
||||
- route: tcp-example.com:1234
|
||||
</pre>
|
||||
|
||||
<p>The <code>routes</code> attribute cannot be used in conjunction with the following attributes: <code>host</code>, <code>hosts</code>, <code>domain</code>, <code>domains</code>, and <code>no-hostname</code>. An error will result.</p>
|
||||
@@ -0,0 +1,14 @@
|
||||
Use the `routes` attribute to provide multiple HTTP and TCP routes. Each route for this app is created if it does not already exist.
|
||||
|
||||
This attribute is a combination of `push` options that include `--hostname`, `-d`, and `--route-path`.
|
||||
|
||||
```
|
||||
---
|
||||
...
|
||||
routes:
|
||||
- route: example.com
|
||||
- route: www.example.com/foo
|
||||
- route: tcp-example.com:1234
|
||||
```
|
||||
|
||||
The `routes` attribute cannot be used in conjunction with the following attributes: `host`, `hosts`, `domain`, `domains`, and `no-hostname`. An error will result.
|
||||
@@ -279,6 +279,9 @@ public class ManifestYamlEditorTest {
|
||||
// ---------------
|
||||
"random-route: <*>",
|
||||
// ---------------
|
||||
"routes:\n"+
|
||||
"- <*>",
|
||||
// ---------------
|
||||
"services:\n"+
|
||||
"- <*>",
|
||||
// ---------------
|
||||
@@ -354,6 +357,10 @@ public class ManifestYamlEditorTest {
|
||||
"- random-route: <*>",
|
||||
// ---------------
|
||||
"applications:\n" +
|
||||
"- routes:\n"+
|
||||
" - <*>",
|
||||
// ---------------
|
||||
"applications:\n" +
|
||||
"- services:\n"+
|
||||
" - <*>",
|
||||
// ---------------
|
||||
@@ -432,6 +439,8 @@ public class ManifestYamlEditorTest {
|
||||
" no-route: true\n" +
|
||||
" path: somepath/app.jar\n" +
|
||||
" random-route: true\n" +
|
||||
" routes:\n" +
|
||||
" - tcp-example.com:1234\n" +
|
||||
" services:\n" +
|
||||
" - instance_ABC\n" +
|
||||
" - instance_XYZ\n" +
|
||||
@@ -457,6 +466,7 @@ public class ManifestYamlEditorTest {
|
||||
editor.assertIsHoverRegion("no-route");
|
||||
editor.assertIsHoverRegion("path");
|
||||
editor.assertIsHoverRegion("random-route");
|
||||
editor.assertIsHoverRegion("routes");
|
||||
editor.assertIsHoverRegion("services");
|
||||
editor.assertIsHoverRegion("stack");
|
||||
editor.assertIsHoverRegion("timeout");
|
||||
@@ -479,6 +489,7 @@ public class ManifestYamlEditorTest {
|
||||
editor.assertHoverContains("no-route", "You can use the `no-route` attribute with a value of `true` to prevent a route from being created for your application");
|
||||
editor.assertHoverContains("path", "You can use the `path` attribute to tell Cloud Foundry where to find your application");
|
||||
editor.assertHoverContains("random-route", "Use the `random-route` attribute to create a URL that includes the app name and random words");
|
||||
editor.assertHoverContains("routes", "Each route for this app is created if it does not already exist");
|
||||
editor.assertHoverContains("services", "The `services` block consists of a heading, then one or more service instance names");
|
||||
editor.assertHoverContains("stack", "Use the `stack` attribute to specify which stack to deploy your application to.");
|
||||
editor.assertHoverContains("timeout", "The `timeout` attribute defines the number of seconds Cloud Foundry allocates for starting your application");
|
||||
@@ -596,6 +607,10 @@ public class ManifestYamlEditorTest {
|
||||
"- random-route: <*>",
|
||||
// ---------------
|
||||
"applications:\n" +
|
||||
"- routes:\n"+
|
||||
" - <*>",
|
||||
// ---------------
|
||||
"applications:\n" +
|
||||
"- services:\n"+
|
||||
" - <*>",
|
||||
// ---------------
|
||||
@@ -680,6 +695,11 @@ public class ManifestYamlEditorTest {
|
||||
"- name: test"
|
||||
, // ---------------------
|
||||
"applications:\n" +
|
||||
"- routes:\n" +
|
||||
" - <*>\n" +
|
||||
"- name: test"
|
||||
,// ---------------------
|
||||
"applications:\n" +
|
||||
"- services:\n" +
|
||||
" - <*>\n" +
|
||||
"- name: test"
|
||||
|
||||
@@ -55,6 +55,7 @@ public class ManifestYmlSchemaTest {
|
||||
"no-route",
|
||||
"path",
|
||||
"random-route",
|
||||
"routes",
|
||||
"services",
|
||||
"stack",
|
||||
"timeout"
|
||||
@@ -79,6 +80,7 @@ public class ManifestYmlSchemaTest {
|
||||
"no-route",
|
||||
"path",
|
||||
"random-route",
|
||||
"routes",
|
||||
"services",
|
||||
"stack",
|
||||
"timeout"
|
||||
|
||||
Reference in New Issue
Block a user