blob: c87a8de824c787a2d527c6a01c4d549ef27bc9b8 [file] [log] [blame]
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Creates an application with the following structure, with each entity (including the application) having
# references to all other entities (including itself and the app) via config keys
#
# app
# |
# -----|-----
# | |
# entity1 entity2
# |
# -----|-----
# | |
# child1 child2
# |
# -----|-----
# | |
# gchild1 gchild2
name: test-referencing-entities
description: Test multi-layer application with each entity referencing all other entities
origin: https://github.com/apache/incubator-brooklyn
id: app1
brooklyn.config:
test.reference.root: $brooklyn:root()
test.reference.scope_root: $brooklyn:scopeRoot()
test.reference.app: $brooklyn:component("app1")
test.reference.entity1: $brooklyn:entity("e1")
test.reference.entity1a: $brooklyn:config("test.reference.entity1")
test.reference.entity2: $brooklyn:component("e2")
test.reference.child1: $brooklyn:component("c1")
test.reference.child2: $brooklyn:component("c2")
test.reference.grandchild1: $brooklyn:component("gc1")
test.reference.grandchild2: $brooklyn:component("gc2")
test.reference.bogus: $brooklyn:child("c1")
services:
- serviceType: org.apache.brooklyn.camp.brooklyn.ReferencingYamlTestEntity
id: e1
name: entity 1
brooklyn.config:
test.reference.root: $brooklyn:root()
test.reference.scope_root: $brooklyn:scopeRoot()
test.reference.app: $brooklyn:component("parent", "ignored")
test.reference.entity1: $brooklyn:component("this", "ignored")
test.reference.entity1a: $brooklyn:ancestor("app1").child("e1")
test.reference.entity2: $brooklyn:component("e2")
test.reference.child1: $brooklyn:component("child", "c1")
test.reference.child2: $brooklyn:component("c2")
test.reference.grandchild1: $brooklyn:component("gc1")
test.reference.grandchild2: $brooklyn:component("gc2")
test.reference.bogus: $brooklyn:descendant("app1")
brooklyn.children:
- serviceType: org.apache.brooklyn.camp.brooklyn.ReferencingYamlTestEntity
id: c1
name: child 1
brooklyn.config:
self: $brooklyn:entity("c1")
test.reference.root: $brooklyn:root()
test.reference.scope_root: $brooklyn:scopeRoot()
test.reference.app: $brooklyn:parent().parent()
test.reference.entity1: $brooklyn:parent()
test.reference.entity1a: $brooklyn:entity("e1").parent().child("e1")
test.reference.entity2: $brooklyn:component("e2")
test.reference.child1: $brooklyn:config("self")
test.reference.child2: $brooklyn:component("c2")
test.reference.grandchild1: $brooklyn:component("gc1")
test.reference.grandchild2: $brooklyn:component("gc2")
test.reference.bogus: $brooklyn:component("bogus")
brooklyn.children:
- serviceType: org.apache.brooklyn.camp.brooklyn.ReferencingYamlTestEntity
id: gc1
name: grandchild 1
brooklyn.config:
test.reference.root: $brooklyn:root()
test.reference.scope_root: $brooklyn:scopeRoot()
test.reference.app: $brooklyn:component("app1")
test.reference.entity1: $brooklyn:component("e1")
test.reference.entity2: $brooklyn:component("e2")
test.reference.child1: $brooklyn:component("c1")
test.reference.child2: $brooklyn:component("c2")
test.reference.grandchild1: $brooklyn:component("gc1")
test.reference.grandchild2: $brooklyn:component("gc2")
- serviceType: org.apache.brooklyn.camp.brooklyn.ReferencingYamlTestEntity
id: gc2
name: grandchild 2
brooklyn.config:
test.reference.root: $brooklyn:root()
test.reference.scope_root: $brooklyn:scopeRoot()
test.reference.app: $brooklyn:component("app1")
test.reference.entity1: $brooklyn:component("e1")
test.reference.entity2: $brooklyn:component("e2")
test.reference.child1: $brooklyn:component("c1")
test.reference.child2: $brooklyn:component("c2")
test.reference.grandchild1: $brooklyn:component("gc1")
test.reference.grandchild2: $brooklyn:component("gc2")
- serviceType: org.apache.brooklyn.camp.brooklyn.ReferencingYamlTestEntity
id: c2
name: child 2
brooklyn.config:
test.reference.root: $brooklyn:root()
test.reference.scope_root: $brooklyn:scopeRoot()
test.reference.app: $brooklyn:parent().parent().descendant("app1")
test.reference.entity1: $brooklyn:component("e1")
test.reference.entity2: $brooklyn:component("e2")
test.reference.child1: $brooklyn:component("c1")
test.reference.child2: $brooklyn:component("c2")
test.reference.grandchild1: $brooklyn:component("gc1")
test.reference.grandchild2: $brooklyn:component("gc2")
- serviceType: org.apache.brooklyn.camp.brooklyn.ReferencingYamlTestEntity
id: e2
name: entity 2
brooklyn.config:
test.reference.root: $brooklyn:root()
test.reference.scope_root: $brooklyn:scopeRoot()
test.reference.app: $brooklyn:component("app1")
test.reference.entity1: $brooklyn:component("e1")
test.reference.entity2: $brooklyn:component("e2")
test.reference.child1: $brooklyn:component("c1")
test.reference.child2: $brooklyn:component("c2")
test.reference.grandchild1: $brooklyn:component("gc1")
test.reference.grandchild2: $brooklyn:component("gc2")