[GitHub] brooklyn-server pull request #1004: BROOKLYN-602: fix config key order for y...

2018-10-02 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/brooklyn-server/pull/1004


---


[GitHub] brooklyn-server pull request #1004: BROOKLYN-602: fix config key order for y...

2018-10-01 Thread geomacy
Github user geomacy commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/1004#discussion_r221763463
  
--- Diff: 
camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/ConfigParametersYamlTest.java
 ---
@@ -1194,6 +1199,66 @@ public String toString() {
 }
 }
 
+@Test
+public void testConfigParameterPinnedOrder() throws Exception {
+addCatalogItems(
+"brooklyn.catalog:",
+"  version: " + TEST_VERSION,
+"  itemType: entity",
+"  items:",
+"- id: entity-without-keys",
+"  item:",
+"type: 
"+TestEntityWithPinnedConfig.class.getName(),
+"- id: entity-with-keys-redeclared",
+"  item:",
+"type: 
"+TestEntityWithPinnedConfig.class.getName(),
+"brooklyn.parameters:",
+"  - name: pinned2",
+"  - name: unpinned2");
+
+for (String symbolicName : ImmutableList.of("entity-without-keys", 
"entity-with-keys-redeclared")) {
+// Mimicking the code in REST api's TypeResource, for getting 
the config keys
+RegisteredType item = 
mgmt().getTypeRegistry().get(symbolicName, TEST_VERSION);
+AbstractBrooklynObjectSpec spec = 
mgmt().getTypeRegistry().createSpec(item, null, null);
+List> params = spec.getParameters();
+SpecParameter pinned1 = Iterables.find(params, (p) -> 
p.getConfigKey().getName().equals("pinned2"));
--- End diff --

variable should really be called `pinned2` to match the name


---


[GitHub] brooklyn-server pull request #1004: BROOKLYN-602: fix config key order for y...

2018-10-01 Thread aledsage
GitHub user aledsage opened a pull request:

https://github.com/apache/brooklyn-server/pull/1004

BROOKLYN-602: fix config key order for yaml overrides



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/aledsage/brooklyn-server fix-BROOKYLN-602

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/brooklyn-server/pull/1004.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1004


commit 1a410be58602d063161fdf746c7aa048b6da9be5
Author: Aled Sage 
Date:   2018-10-01T14:49:20Z

BROOKLYN-602: fix config key order for yaml overrides




---