Repository: brooklyn-server Updated Branches: refs/heads/master 5adbbca1c -> ce1192f9f
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindCatalogItemTest.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindCatalogItemTest.java b/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindCatalogItemTest.java index d6bfc68..26e1a93 100644 --- a/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindCatalogItemTest.java +++ b/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindCatalogItemTest.java @@ -53,7 +53,6 @@ import org.testng.annotations.Test; import com.google.common.base.Joiner; import com.google.common.base.Throwables; -import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; public class RebindCatalogItemTest extends RebindTestFixtureWithApp { @@ -112,6 +111,27 @@ public class RebindCatalogItemTest extends RebindTestFixtureWithApp { @Test public void testAddAndRebindEntity() throws Exception { String symbolicName = "rebind-yaml-catalog-item-test"; + String yaml = Joiner.on("\n").join( + "brooklyn.catalog:", + " items:", + " - id: " + symbolicName, + " version: " + TEST_VERSION, + " itemType: entity", + " item:", + " type: io.camp.mock:AppServer"); + CatalogEntityItemDto item = + CatalogItemBuilder.newEntity(symbolicName, TEST_VERSION) + .displayName(symbolicName) + .plan(yaml) + .build(); + origManagementContext.getCatalog().addItem(item); + LOG.info("Added item to catalog: {}, id={}", item, item.getId()); + rebindAndAssertCatalogsAreEqual(); + } + + @Test + public void testAddAndRebindEntityLegacyFormat() throws Exception { + String symbolicName = "rebind-yaml-catalog-item-test"; String yaml = "name: " + symbolicName + "\n" + "brooklyn.catalog:\n" + @@ -138,16 +158,17 @@ public class RebindCatalogItemTest extends RebindTestFixtureWithApp { public void testAddAndRebindPolicy() { // Doesn't matter that SamplePolicy doesn't exist String symbolicName = "Test Policy"; - String yaml = - "name: " + symbolicName + "\n" + - "brooklyn.catalog:\n" + - " id: sample_policy\n" + - " version: " + TEST_VERSION + "\n" + - "brooklyn.policies: \n" + - "- type: org.apache.brooklyn.core.mgmt.rebind.RebindCatalogItemTest$MyPolicy\n" + - " brooklyn.config:\n" + - " cfg1: 111\n" + - " cfg2: 222"; + String yaml = Joiner.on("\n").join( + "brooklyn.catalog:", + " items:", + " - id: " + symbolicName, + " version: " + TEST_VERSION, + " itemType: policy", + " item:", + " type: org.apache.brooklyn.core.mgmt.rebind.RebindCatalogItemTest$MyPolicy", + " brooklyn.config:", + " cfg1: 111", + " cfg2: 222"); CatalogPolicyItemDto item = CatalogItemBuilder.newPolicy(symbolicName, TEST_VERSION) .displayName(symbolicName) @@ -170,16 +191,17 @@ public class RebindCatalogItemTest extends RebindTestFixtureWithApp { private void doTestAddAndRebindAndDeleteLocation(boolean suppressPeriodicCheckpointing) throws Exception { String symbolicName = "sample_location"; - String yaml = Joiner.on("\n").join(ImmutableList.of( - "name: Test Location", + String yaml = Joiner.on("\n").join( "brooklyn.catalog:", - " id: " + symbolicName, - " version: " + TEST_VERSION, - "brooklyn.locations:", - "- type: "+LocalhostMachineProvisioningLocation.class.getName(), - " brooklyn.config:", - " cfg1: 111", - " cfg2: 222")); + " items:", + " - id: " + symbolicName, + " version: " + TEST_VERSION, + " itemType: location", + " item:", + " type: "+LocalhostMachineProvisioningLocation.class.getName(), + " brooklyn.config:", + " cfg1: 111", + " cfg2: 222"); CatalogLocationItemDto item = CatalogItemBuilder.newLocation(symbolicName, TEST_VERSION) .displayName(symbolicName) @@ -245,12 +267,14 @@ public class RebindCatalogItemTest extends RebindTestFixtureWithApp { //the store is unable to delete still locked files so the bug doesn't manifest. //TODO investigate if locked files not caused by unclosed streams! String symbolicName = "rebind-yaml-catalog-item-test"; - String yaml = - "name: " + symbolicName + "\n" + - "brooklyn.catalog:\n" + - " version: " + TEST_VERSION + "\n" + - "services:\n" + - "- type: io.camp.mock:AppServer"; + String yaml = Joiner.on("\n").join( + "brooklyn.catalog:", + " items:", + " - id: " + symbolicName, + " version: " + TEST_VERSION, + " itemType: entity", + " item:", + " type: io.camp.mock:AppServer"); BasicBrooklynCatalog catalog = (BasicBrooklynCatalog) origManagementContext.getCatalog(); CatalogEntityItemDto item = CatalogItemBuilder.newEntity(symbolicName, TEST_VERSION) @@ -266,12 +290,14 @@ public class RebindCatalogItemTest extends RebindTestFixtureWithApp { @Test public void testRebindAfterItemDeprecated() { String symbolicName = "rebind-yaml-catalog-item-test"; - String yaml = - "name: " + symbolicName + "\n" + - "brooklyn.catalog:\n" + - " version: " + TEST_VERSION + "\n" + - "services:\n" + - "- type: io.camp.mock:AppServer"; + String yaml = Joiner.on("\n").join( + "brooklyn.catalog:", + " items:", + " - id: " + symbolicName, + " version: " + TEST_VERSION, + " itemType: entity", + " item:", + " type: io.camp.mock:AppServer"); CatalogEntityItemDto item = CatalogItemBuilder.newEntity(symbolicName, TEST_VERSION) .displayName(symbolicName) http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/karaf/apache-brooklyn/src/main/resources/etc/default.catalog.bom ---------------------------------------------------------------------- diff --git a/karaf/apache-brooklyn/src/main/resources/etc/default.catalog.bom b/karaf/apache-brooklyn/src/main/resources/etc/default.catalog.bom index 4cc4522..6902a1f 100644 --- a/karaf/apache-brooklyn/src/main/resources/etc/default.catalog.bom +++ b/karaf/apache-brooklyn/src/main/resources/etc/default.catalog.bom @@ -17,7 +17,7 @@ brooklyn.catalog: - version: 0.10.0-SNAPSHOT # BROOKLYN_VERSION + version: "0.10.0-SNAPSHOT" # BROOKLYN_VERSION items: - id: server-template itemType: template http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/launcher/src/test/resources/7zip-catalog.yaml ---------------------------------------------------------------------- diff --git a/launcher/src/test/resources/7zip-catalog.yaml b/launcher/src/test/resources/7zip-catalog.yaml index 55c4389..06e751b 100644 --- a/launcher/src/test/resources/7zip-catalog.yaml +++ b/launcher/src/test/resources/7zip-catalog.yaml @@ -18,11 +18,11 @@ # brooklyn.catalog: id: org.apache.brooklyn.windows.7zip - version: 1.0 + version: "1.0" + itemType: template description: A Windows Server, with 7Zip installed displayName: 7Zip iconUrl: http://www.7-zip.org/7ziplogo.png - itemType: template item: services: http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/launcher/src/test/resources/rebind-test-catalog-additions.bom ---------------------------------------------------------------------- diff --git a/launcher/src/test/resources/rebind-test-catalog-additions.bom b/launcher/src/test/resources/rebind-test-catalog-additions.bom index f4fa777..c0f2a47 100644 --- a/launcher/src/test/resources/rebind-test-catalog-additions.bom +++ b/launcher/src/test/resources/rebind-test-catalog-additions.bom @@ -17,7 +17,8 @@ # under the License. # brooklyn.catalog: - version: test-version + version: "test-version" + itemType: entity items: # Do not scan classpath with for classes with a @Catalog annotation http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/launcher/src/test/resources/rebind-test-catalog.bom ---------------------------------------------------------------------- diff --git a/launcher/src/test/resources/rebind-test-catalog.bom b/launcher/src/test/resources/rebind-test-catalog.bom index f19e4c4..8096f16 100644 --- a/launcher/src/test/resources/rebind-test-catalog.bom +++ b/launcher/src/test/resources/rebind-test-catalog.bom @@ -17,7 +17,8 @@ # under the License. # brooklyn.catalog: - version: test-version + version: "test-version" + itemType: entity items: # Do not scan classpath with for classes with a @Catalog annotation http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/policy/src/main/resources/catalog.bom ---------------------------------------------------------------------- diff --git a/policy/src/main/resources/catalog.bom b/policy/src/main/resources/catalog.bom index d8c7d79..bfa81dd 100644 --- a/policy/src/main/resources/catalog.bom +++ b/policy/src/main/resources/catalog.bom @@ -16,7 +16,8 @@ # under the License. brooklyn.catalog: - version: 0.10.0-SNAPSHOT # BROOKLYN_VERSION + version: "0.10.0-SNAPSHOT" # BROOKLYN_VERSION + itemType: policy items: - id: org.apache.brooklyn.policy.ha.ConnectionFailureDetector item: http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/LocationResource.java ---------------------------------------------------------------------- diff --git a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/LocationResource.java b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/LocationResource.java index 8f4251c..f5cf487 100644 --- a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/LocationResource.java +++ b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/LocationResource.java @@ -147,16 +147,17 @@ public class LocationResource extends AbstractBrooklynRestResource implements Lo @Override public Response create(LocationSpec locationSpec) { String name = locationSpec.getName(); + ImmutableList.Builder<String> yaml = ImmutableList.<String>builder().add( "brooklyn.catalog:", - " symbolicName: "+name, - "", - "brooklyn.locations:", - "- type: "+locationSpec.getSpec()); + " id: " + name, + " itemType: location", + " item:", + " type: "+locationSpec.getSpec()); if (locationSpec.getConfig().size() > 0) { - yaml.add(" brooklyn.config:"); + yaml.add(" brooklyn.config:"); for (Map.Entry<String, ?> entry : locationSpec.getConfig().entrySet()) { - yaml.add(" " + entry.getKey() + ": " + entry.getValue()); + yaml.add(" " + entry.getKey() + ": " + entry.getValue()); } } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/ApplicationResourceTest.java ---------------------------------------------------------------------- diff --git a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/ApplicationResourceTest.java b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/ApplicationResourceTest.java index ea49b47..bcf8d25 100644 --- a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/ApplicationResourceTest.java +++ b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/ApplicationResourceTest.java @@ -18,6 +18,7 @@ */ package org.apache.brooklyn.rest.resources; +import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.Iterables.find; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; @@ -78,6 +79,7 @@ import org.slf4j.LoggerFactory; import org.testng.Assert; import org.testng.annotations.Test; +import com.google.common.base.Joiner; import com.google.common.base.Predicate; import com.google.common.base.Predicates; import com.google.common.collect.ImmutableMap; @@ -698,17 +700,21 @@ public class ApplicationResourceTest extends BrooklynRestResourceTest { } private void addTestCatalogItem(String catalogItemId, String itemType, String version, String service) { - String yaml = - "brooklyn.catalog:\n"+ - " id: " + catalogItemId + "\n"+ - " name: My Catalog App\n"+ - (itemType!=null ? " item_type: "+itemType+"\n" : "")+ - " description: My description\n"+ - " icon_url: classpath:///redis-logo.png\n"+ - " version: " + version + "\n"+ - "\n"+ - "services:\n"+ - "- type: " + service + "\n"; + String yaml = Joiner.on("\n").join( + "brooklyn.catalog:", + " id: " + catalogItemId, + " version: " + version, + " itemType: " + checkNotNull(itemType, "itemType"), + " name: My Catalog App", + " description: My description", + " icon_url: classpath:///redis-logo.png", + " item:", + (itemType.equals("template") + ? + " services:\n" + + " - type: " + service + : + " type: " + service)); client().path("/catalog").post(yaml); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/CatalogResourceTest.java ---------------------------------------------------------------------- diff --git a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/CatalogResourceTest.java b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/CatalogResourceTest.java index 1eda124..af5d705 100644 --- a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/CatalogResourceTest.java +++ b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/CatalogResourceTest.java @@ -18,6 +18,7 @@ */ package org.apache.brooklyn.rest.resources; +import static com.google.common.base.Preconditions.checkNotNull; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; @@ -81,18 +82,18 @@ public class CatalogResourceTest extends BrooklynRestResourceTest { String symbolicName = "my.catalog.entity.id"; String bundleUrl = OsgiStandaloneTest.BROOKLYN_TEST_OSGI_ENTITIES_URL; - String yaml = - "brooklyn.catalog:\n"+ - " id: " + symbolicName + "\n"+ - " name: My Catalog App\n"+ - " description: My description\n"+ - " icon_url: classpath:/org/apache/brooklyn/test/osgi/entities/icon.gif\n"+ - " version: " + TEST_VERSION + "\n"+ - " libraries:\n"+ - " - url: " + bundleUrl + "\n"+ - "\n"+ - "services:\n"+ - "- type: org.apache.brooklyn.core.test.entity.TestEntity\n"; + String yaml = Joiner.on("\n").join( + "brooklyn.catalog:", + " id: " + symbolicName, + " version: " + TEST_VERSION, + " itemType: entity", + " name: My Catalog App", + " description: My description", + " icon_url: classpath:/org/apache/brooklyn/test/osgi/entities/icon.gif", + " libraries:", + " - url: " + bundleUrl, + " item:", + " type: org.apache.brooklyn.core.test.entity.TestEntity"); Response response = client().path("/catalog") .post(yaml); @@ -139,7 +140,7 @@ public class CatalogResourceTest extends BrooklynRestResourceTest { } @Test - // osgi may fail in IDE, typically works on CLI though + // osgi may fail in IDE, typically works on mvn CLI though public void testRegisterOsgiPolicyTopLevelSyntax() { TestResourceUnavailableException.throwIfResourceUnavailable(getClass(), OsgiStandaloneTest.BROOKLYN_TEST_OSGI_ENTITIES_PATH); @@ -147,17 +148,17 @@ public class CatalogResourceTest extends BrooklynRestResourceTest { String policyType = "org.apache.brooklyn.test.osgi.entities.SimplePolicy"; String bundleUrl = OsgiStandaloneTest.BROOKLYN_TEST_OSGI_ENTITIES_URL; - String yaml = - "brooklyn.catalog:\n"+ - " id: " + symbolicName + "\n"+ - " name: My Catalog App\n"+ - " description: My description\n"+ - " version: " + TEST_VERSION + "\n" + - " libraries:\n"+ - " - url: " + bundleUrl + "\n"+ - "\n"+ - "brooklyn.policies:\n"+ - "- type: " + policyType; + String yaml = Joiner.on("\n").join( + "brooklyn.catalog:", + " id: " + symbolicName, + " version: " + TEST_VERSION, + " itemType: policy", + " name: My Catalog App", + " description: My description", + " libraries:", + " - url: " + bundleUrl, + " item:", + " type: " + policyType); CatalogPolicySummary entityItem = Iterables.getOnlyElement( client().path("/catalog") .post(yaml, new GenericType<Map<String,CatalogPolicySummary>>() {}).values() ); @@ -248,21 +249,21 @@ public class CatalogResourceTest extends BrooklynRestResourceTest { } private void addTestCatalogItemAsEntity(String catalogItemId) { - addTestCatalogItem(catalogItemId, null, TEST_VERSION, "org.apache.brooklyn.rest.resources.DummyIconEntity"); + addTestCatalogItem(catalogItemId, "entity", TEST_VERSION, "org.apache.brooklyn.rest.resources.DummyIconEntity"); } private void addTestCatalogItem(String catalogItemId, String itemType, String version, String service) { - String yaml = - "brooklyn.catalog:\n"+ - " id: " + catalogItemId + "\n"+ - " name: My Catalog App\n"+ - (itemType!=null ? " item_type: "+itemType+"\n" : "")+ - " description: My description\n"+ - " icon_url: classpath:///bridge-small.png\n"+ - " version: " + version + "\n"+ - "\n"+ - "services:\n"+ - "- type: " + service + "\n"; + String yaml = Joiner.on("\n").join( + "brooklyn.catalog:", + " id: " + catalogItemId, + " version: " + TEST_VERSION, + " itemType: " + checkNotNull(itemType), + " name: My Catalog App", + " description: My description", + " icon_url: classpath:///bridge-small.png", + " version: " + version, + " item:", + " type: " + service); client().path("/catalog").post(yaml); } @@ -314,12 +315,12 @@ public class CatalogResourceTest extends BrooklynRestResourceTest { String yaml = Joiner.on("\n").join( "brooklyn.catalog:", " id: " + symbolicName, + " version: " + TEST_VERSION, + " itemType: location", " name: My Catalog Location", " description: My description", - " version: " + TEST_VERSION, - "", - "brooklyn.locations:", - "- type: " + locationType); + " item:", + " type: " + locationType); // Create location item Map<String, CatalogLocationSummary> items = client().path("/catalog") @@ -362,17 +363,15 @@ public class CatalogResourceTest extends BrooklynRestResourceTest { @Test public void testDeleteCustomEntityFromCatalog() { String symbolicName = "my.catalog.app.id.to.subsequently.delete"; - String yaml = - "name: "+symbolicName+"\n"+ - // FIXME name above should be unnecessary when brooklyn.catalog below is working - "brooklyn.catalog:\n"+ - " id: " + symbolicName + "\n"+ - " name: My Catalog App To Be Deleted\n"+ - " description: My description\n"+ - " version: " + TEST_VERSION + "\n"+ - "\n"+ - "services:\n"+ - "- type: org.apache.brooklyn.core.test.entity.TestEntity\n"; + String yaml = Joiner.on("\n").join( + "brooklyn.catalog:", + " id: " + symbolicName, + " version: " + TEST_VERSION, + " itemType: entity", + " name: My Catalog App To Be Deleted", + " description: My description", + " item:", + " type: org.apache.brooklyn.core.test.entity.TestEntity"); client().path("/catalog") .post(yaml); @@ -474,35 +473,35 @@ public class CatalogResourceTest extends BrooklynRestResourceTest { @Test public void testAddUnreachableItem() { - addInvalidCatalogItem("http://0.0.0.0/can-not-connect"); + addAddCatalogItemWithInvalidBundleUrl("http://0.0.0.0/can-not-connect"); } @Test public void testAddInvalidItem() { //equivalent to HTTP response 200 text/html - addInvalidCatalogItem("classpath://not-a-jar-file.txt"); + addAddCatalogItemWithInvalidBundleUrl("classpath://not-a-jar-file.txt"); } @Test public void testAddMissingItem() { //equivalent to HTTP response 404 text/html - addInvalidCatalogItem("classpath://missing-jar-file.txt"); + addAddCatalogItemWithInvalidBundleUrl("classpath://missing-jar-file.txt"); } - private void addInvalidCatalogItem(String bundleUrl) { + private void addAddCatalogItemWithInvalidBundleUrl(String bundleUrl) { String symbolicName = "my.catalog.entity.id"; - String yaml = - "brooklyn.catalog:\n"+ - " id: " + symbolicName + "\n"+ - " name: My Catalog App\n"+ - " description: My description\n"+ - " icon_url: classpath:/org/apache/brooklyn/test/osgi/entities/icon.gif\n"+ - " version: " + TEST_VERSION + "\n"+ - " libraries:\n"+ - " - url: " + bundleUrl + "\n"+ - "\n"+ - "services:\n"+ - "- type: org.apache.brooklyn.core.test.entity.TestEntity\n"; + String yaml = Joiner.on("\n").join( + "brooklyn.catalog:", + " id: " + symbolicName, + " version: " + TEST_VERSION, + " itemType: entity", + " name: My Catalog App", + " description: My description", + " icon_url: classpath:/org/apache/brooklyn/test/osgi/entities/icon.gif", + " libraries:", + " - url: " + bundleUrl, + " item:", + " type: org.apache.brooklyn.core.test.entity.TestEntity"); Response response = client().path("/catalog") .post(yaml); http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/LocationResourceTest.java ---------------------------------------------------------------------- diff --git a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/LocationResourceTest.java b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/LocationResourceTest.java index 2a00215..c0131b2 100644 --- a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/LocationResourceTest.java +++ b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/LocationResourceTest.java @@ -99,12 +99,12 @@ public class LocationResourceTest extends BrooklynRestResourceTest { "brooklyn.catalog:", " symbolicName: "+locationName, " version: " + locationVersion, - "", - "brooklyn.locations:", - "- type: "+"aws-ec2:us-east-1", - " brooklyn.config:", - " identity: bob", - " credential: CR3dential")); + " itemType: location", + " item:", + " type: "+"aws-ec2:us-east-1", + " brooklyn.config:", + " identity: bob", + " credential: CR3dential")); Response response = client().path("/catalog") http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/rest/rest-server/src/test/resources/vanilla-software-process-with-resource.yaml ---------------------------------------------------------------------- diff --git a/rest/rest-server/src/test/resources/vanilla-software-process-with-resource.yaml b/rest/rest-server/src/test/resources/vanilla-software-process-with-resource.yaml index c0ce54f..26faa40 100644 --- a/rest/rest-server/src/test/resources/vanilla-software-process-with-resource.yaml +++ b/rest/rest-server/src/test/resources/vanilla-software-process-with-resource.yaml @@ -22,7 +22,10 @@ brooklyn.catalog: id: vanilla-software-resource-test - version: 1.0 + version: "1.0" + itemType: tempalte + libraries: + - classpath://brooklyn/osgi/brooklyn-test-osgi-entities.jar item: services: - type: org.apache.brooklyn.entity.stock.BasicApplication @@ -34,6 +37,3 @@ brooklyn.catalog: # Contained in library jar. runtimeFiles: classpath://org/apache/brooklyn/test/osgi/resources/message.txt: message.txt - - libraries: - - classpath://brooklyn/osgi/brooklyn-test-osgi-entities.jar http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/server-cli/src/main/resources/brooklyn/default.catalog.bom ---------------------------------------------------------------------- diff --git a/server-cli/src/main/resources/brooklyn/default.catalog.bom b/server-cli/src/main/resources/brooklyn/default.catalog.bom index f5bc2a5..b5b687d 100644 --- a/server-cli/src/main/resources/brooklyn/default.catalog.bom +++ b/server-cli/src/main/resources/brooklyn/default.catalog.bom @@ -3,13 +3,14 @@ # and templates to get started using Brooklyn brooklyn.catalog: - version: 0.10.0-SNAPSHOT # BROOKLYN_VERSION + version: "0.10.0-SNAPSHOT" # BROOKLYN_VERSION items: # load everything in the classpath with a @Catalog annotation - scanJavaAnnotations: true - id: server + itemType: entity description: | Provision a server, with customizable provisioning.properties and credentials installed, but no other special software process or scripts executed. @@ -18,6 +19,7 @@ brooklyn.catalog: name: Server - id: vanilla-bash-server + itemType: entity description: | Provision a server, with customizable provisioning.properties and credentials installed, but no other special software process or scripts executed. @@ -28,6 +30,7 @@ brooklyn.catalog: name: Server with Launch Script (bash) - id: load-balancer + itemType: entity description: | Create a load balancer which will point at members in the group entity referred to by the config key "serverPool". @@ -38,6 +41,7 @@ brooklyn.catalog: name: Load Balancer (nginx) - id: cluster + itemType: entity description: | Create a cluster of entities, resizable, with starting size "initialSize", and using a spec supplied in the "memberSpec" key. http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/server-cli/src/main/resources/catalog.bom ---------------------------------------------------------------------- diff --git a/server-cli/src/main/resources/catalog.bom b/server-cli/src/main/resources/catalog.bom index ec9e3d1..6bfb7a4 100644 --- a/server-cli/src/main/resources/catalog.bom +++ b/server-cli/src/main/resources/catalog.bom @@ -3,12 +3,13 @@ # and templates to get started using Brooklyn brooklyn.catalog: - version: 0.10.0-SNAPSHOT # BROOKLYN_VERSION + version: "0.10.0-SNAPSHOT" # BROOKLYN_VERSION items: # load everything in the classpath with a @Catalog annotation - id: server + itemType: entity description: | Provision a server, with customizable provisioning.properties and credentials installed, but no other special software process or scripts executed. @@ -17,6 +18,7 @@ brooklyn.catalog: name: Server - id: vanilla-bash-server + itemType: entity description: | Provision a server, with customizable provisioning.properties and credentials installed, but no other special software process or scripts executed. @@ -27,6 +29,7 @@ brooklyn.catalog: name: Server with Launch Script (bash) - id: load-balancer + itemType: entity description: | Create a load balancer which will point at members in the group entity referred to by the config key "serverPool". @@ -37,6 +40,7 @@ brooklyn.catalog: name: Load Balancer (nginx) - id: cluster + itemType: entity description: | Create a cluster of entities, resizable, with starting size "initialSize", and using a spec supplied in the "memberSpec" key. http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/server-cli/src/test/java/org/apache/brooklyn/cli/CliTest.java ---------------------------------------------------------------------- diff --git a/server-cli/src/test/java/org/apache/brooklyn/cli/CliTest.java b/server-cli/src/test/java/org/apache/brooklyn/cli/CliTest.java index 947c541..c069f9e 100644 --- a/server-cli/src/test/java/org/apache/brooklyn/cli/CliTest.java +++ b/server-cli/src/test/java/org/apache/brooklyn/cli/CliTest.java @@ -465,6 +465,7 @@ public class CliTest { "brooklyn.catalog:", " id: "+itemName, " version: "+itemVersion, + " itemType: entity", " item:", " services:", " - type: org.apache.brooklyn.entity.stock.BasicApplication"); http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/software/base/src/main/resources/catalog.bom ---------------------------------------------------------------------- diff --git a/software/base/src/main/resources/catalog.bom b/software/base/src/main/resources/catalog.bom index 39367eb..99211ac 100644 --- a/software/base/src/main/resources/catalog.bom +++ b/software/base/src/main/resources/catalog.bom @@ -16,7 +16,8 @@ # under the License. brooklyn.catalog: - version: 0.10.0-SNAPSHOT # BROOKLYN_VERSION + version: "0.10.0-SNAPSHOT" # BROOKLYN_VERSION + itemType: entity items: - id: org.apache.brooklyn.entity.machine.MachineEntity item: http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/software/base/src/test/java/org/apache/brooklyn/entity/brooklynnode/BrooklynNodeIntegrationTest.java ---------------------------------------------------------------------- diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/brooklynnode/BrooklynNodeIntegrationTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/brooklynnode/BrooklynNodeIntegrationTest.java index 773a492..4d4c92e 100644 --- a/software/base/src/test/java/org/apache/brooklyn/entity/brooklynnode/BrooklynNodeIntegrationTest.java +++ b/software/base/src/test/java/org/apache/brooklyn/entity/brooklynnode/BrooklynNodeIntegrationTest.java @@ -260,9 +260,9 @@ services: "brooklyn.catalog:", " id: BrooklynNodeIntegrationTest.mycatalog", " version: 1.0", + " itemType: entity", " item:", - " services:", - " - type: org.apache.brooklyn.entity.stock.BasicApplication"); + " type: org.apache.brooklyn.entity.stock.BasicApplication"); EntitySpec<BrooklynNode> spec = newBrooklynNodeSpecForTest() .configure(BrooklynNode.BROOKLYN_CATALOG_INITIAL_BOM_REMOTE_PATH, pseudoBrooklynCatalogFile.getAbsolutePath()) http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/test-framework/src/main/resources/catalog.bom ---------------------------------------------------------------------- diff --git a/test-framework/src/main/resources/catalog.bom b/test-framework/src/main/resources/catalog.bom index f912b4f..1b4db38 100644 --- a/test-framework/src/main/resources/catalog.bom +++ b/test-framework/src/main/resources/catalog.bom @@ -16,8 +16,12 @@ # under the License. brooklyn.catalog: - version: 0.10.0-SNAPSHOT # BROOKLYN_VERSION + version: "0.10.0-SNAPSHOT" # BROOKLYN_VERSION + itemType: entity items: + - id: org.apache.brooklyn.test.framework.TestSshCommand + item: + type: org.apache.brooklyn.test.framework.TestSshCommand - id: org.apache.brooklyn.test.framework.SimpleShellCommandTest item: type: org.apache.brooklyn.test.framework.SimpleShellCommandTest http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/utils/common/dependencies/osgi/entities/src/main/resources/catalog.bom ---------------------------------------------------------------------- diff --git a/utils/common/dependencies/osgi/entities/src/main/resources/catalog.bom b/utils/common/dependencies/osgi/entities/src/main/resources/catalog.bom index 3531e4c..d1e0f12 100644 --- a/utils/common/dependencies/osgi/entities/src/main/resources/catalog.bom +++ b/utils/common/dependencies/osgi/entities/src/main/resources/catalog.bom @@ -17,7 +17,8 @@ brooklyn.catalog: - version: 0.10.0-SNAPSHOT # BROOKLYN_VERSION + version: "0.10.0-SNAPSHOT" # BROOKLYN_VERSION + itemType: entity description: For testing loading catalog.bom with catalog scan displayName: I Haz Catalog items: http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/utils/common/dependencies/osgi/entities/src/main/resources/yaml-ref-back-catalog.bom ---------------------------------------------------------------------- diff --git a/utils/common/dependencies/osgi/entities/src/main/resources/yaml-ref-back-catalog.bom b/utils/common/dependencies/osgi/entities/src/main/resources/yaml-ref-back-catalog.bom index d41663b..8752870 100644 --- a/utils/common/dependencies/osgi/entities/src/main/resources/yaml-ref-back-catalog.bom +++ b/utils/common/dependencies/osgi/entities/src/main/resources/yaml-ref-back-catalog.bom @@ -18,6 +18,7 @@ brooklyn.catalog: version: 0.1.2 + itemType: entity displayName: I Haz Catalog libraries: # References a bundle which doesn't contain SimpleEntity on purpose http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/utils/common/dependencies/osgi/entities/src/main/resources/yaml-ref-parent-catalog.bom ---------------------------------------------------------------------- diff --git a/utils/common/dependencies/osgi/entities/src/main/resources/yaml-ref-parent-catalog.bom b/utils/common/dependencies/osgi/entities/src/main/resources/yaml-ref-parent-catalog.bom index c19e305..e7c1983 100644 --- a/utils/common/dependencies/osgi/entities/src/main/resources/yaml-ref-parent-catalog.bom +++ b/utils/common/dependencies/osgi/entities/src/main/resources/yaml-ref-parent-catalog.bom @@ -18,6 +18,7 @@ brooklyn.catalog: version: 0.1.2 + itemType: entity displayName: I Haz Catalog libraries: # References a bundle which doesn't contain SimpleEntity on purpose http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/utils/common/dependencies/osgi/more-entities-v1/src/main/resources/catalog.bom ---------------------------------------------------------------------- diff --git a/utils/common/dependencies/osgi/more-entities-v1/src/main/resources/catalog.bom b/utils/common/dependencies/osgi/more-entities-v1/src/main/resources/catalog.bom index ee9ce03..1998110 100644 --- a/utils/common/dependencies/osgi/more-entities-v1/src/main/resources/catalog.bom +++ b/utils/common/dependencies/osgi/more-entities-v1/src/main/resources/catalog.bom @@ -16,7 +16,8 @@ # under the License. brooklyn.catalog: - version: 0.10.0-SNAPSHOT # BROOKLYN_VERSION + version: "0.10.0-SNAPSHOT" # BROOKLYN_VERSION + itemType: entity items: - id: org.apache.brooklyn.test.osgi.entities.more.MoreEntity item: http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/utils/common/dependencies/osgi/more-entities-v2-evil-twin/src/main/resources/catalog.bom ---------------------------------------------------------------------- diff --git a/utils/common/dependencies/osgi/more-entities-v2-evil-twin/src/main/resources/catalog.bom b/utils/common/dependencies/osgi/more-entities-v2-evil-twin/src/main/resources/catalog.bom index ee9ce03..1998110 100644 --- a/utils/common/dependencies/osgi/more-entities-v2-evil-twin/src/main/resources/catalog.bom +++ b/utils/common/dependencies/osgi/more-entities-v2-evil-twin/src/main/resources/catalog.bom @@ -16,7 +16,8 @@ # under the License. brooklyn.catalog: - version: 0.10.0-SNAPSHOT # BROOKLYN_VERSION + version: "0.10.0-SNAPSHOT" # BROOKLYN_VERSION + itemType: entity items: - id: org.apache.brooklyn.test.osgi.entities.more.MoreEntity item: http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/057760ee/utils/common/dependencies/osgi/more-entities-v2/src/main/resources/catalog.bom ---------------------------------------------------------------------- diff --git a/utils/common/dependencies/osgi/more-entities-v2/src/main/resources/catalog.bom b/utils/common/dependencies/osgi/more-entities-v2/src/main/resources/catalog.bom index 40a860f..7813046 100644 --- a/utils/common/dependencies/osgi/more-entities-v2/src/main/resources/catalog.bom +++ b/utils/common/dependencies/osgi/more-entities-v2/src/main/resources/catalog.bom @@ -16,23 +16,27 @@ # under the License. brooklyn.catalog: - version: 0.10.0-SNAPSHOT # BROOKLYN_VERSION + version: "0.10.0-SNAPSHOT" # BROOKLYN_VERSION items: - id: org.apache.brooklyn.test.osgi.entities.more.MorePolicy + itemType: policy item: type: org.apache.brooklyn.test.osgi.entities.more.MorePolicy name: More Policy description: Cataliog item OSGi test policy - id: org.apache.brooklyn.test.osgi.entities.more.MoreLocation + itemType: location item: type: org.apache.brooklyn.test.osgi.entities.more.MoreLocation name: More Location description: Cataliog item OSGi test location - id: org.apache.brooklyn.test.osgi.entities.more.MoreEntity + itemType: entity item: type: org.apache.brooklyn.test.osgi.entities.more.MoreEntity name: More Entity v2 - id: org.apache.brooklyn.test.osgi.entities.more.MoreTemplate + itemType: template item: type: org.apache.brooklyn.test.osgi.entities.more.MoreTemplate name: More Template
