From 12a789a4608049824edbc66376c6366ccdc401e5 Mon Sep 17 00:00:00 2001 From: VincentZurczak Date: Fri, 20 Feb 2015 14:10:08 +0100 Subject: Support Roboconf's DSL --- tests/examplefiles/roboconf.graph | 40 +++++++++++++++++++++++++++++++++++ tests/examplefiles/roboconf.instances | 24 +++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 tests/examplefiles/roboconf.graph create mode 100644 tests/examplefiles/roboconf.instances (limited to 'tests') diff --git a/tests/examplefiles/roboconf.graph b/tests/examplefiles/roboconf.graph new file mode 100644 index 00000000..e5fdedff --- /dev/null +++ b/tests/examplefiles/roboconf.graph @@ -0,0 +1,40 @@ +################## +# A sample graph +################## + +import some-definition.graph; +import another-definition.graph; + +VM { + installer : target; + children: deployable; +} + +facet deployable { + # nothing +} + +# Sample deployables +mysql { + insTaller: puppet; + facets: deployable; + exports: ip, port = 3306; +} + +tomcat { + installer: bash; + facets: deployable; + exports: ip; + children: web-application; +} + +facet web-application { + exports: full-path = undefined; +} + +my-war-1 { + facets: web-application; + installer: file; + exports: full-path = apps/my-war-1; # the relative path + imports: mysql.*; +} diff --git a/tests/examplefiles/roboconf.instances b/tests/examplefiles/roboconf.instances new file mode 100644 index 00000000..c69a2ab0 --- /dev/null +++ b/tests/examplefiles/roboconf.instances @@ -0,0 +1,24 @@ + +# Deal with imports +import others.instances; + +instance of VM { + name: VM-mysql; + instance of mysql { + name: MySQL; + } +} + +instance of VM { + name: VM ; + count: 5; + + INSTANCE of tomcat { + name: Tomcat; + + instance of my-war-1 { + name: my-war-1; + full-path: apps/my-war; + } + } +} -- cgit v1.2.1