[GitHub] brooklyn-library issue #34: Fix sed command that update the MySQL configurat...
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-library/pull/34 @aledsage I encountered issues in all environments, any cloud. Even though the password is changed at the MySQL level, it never updates the `mymysql.cnf` file, probably because of absence of the `-i` option. As a result, the entity goes on fire because the `checkRunning` command uses the credentials specified within this file. We have a "[live test](https://github.com/brooklyncentral/brooklyn-mysql-node/blob/master/catalog.tests.bom)", that's how I noticed this issue. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-library pull request #34: Fix sed command that update the MySQL con...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-library/pull/34#discussion_r67155972 --- Diff: software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlNodeEffectors.java --- @@ -75,7 +75,7 @@ public Void call(ConfigBag parameters) { DynamicTasks.queue( SshTasks.newSshExecTaskFactory(machine, "cd "+entity().getAttribute(MySqlNode.RUN_DIR), -"sed -i'' -e 's@^\\(\\s*password\\s*=\\s*\\).*$@\\1" + newPass.replace("\\", "") + "@g' mymysql.cnf") +"sed -i.bak 's/\\(password.*\\)=.*/\\1= " + newPass.replace("\\", "") + "/' mymysql.cnf") --- End diff -- You are right for the 2 mentioned cases @neykov, I didn't think this through. I'll need to go back to the drawing board. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-brooklyn pull request: Generate config/effector descript...
Github user tbouron commented on the pull request: https://github.com/apache/incubator-brooklyn/pull/1176#issuecomment-176809380 @bostko Didn't notice that. Let's not reintroduce a slow process then. However, I quite like the @iyovcheva's idea of generate the `JS` **and** ` JSON` file. That will be much more safer and easier for the community catalog :) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-brooklyn pull request: Generate config/effector descript...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/incubator-brooklyn/pull/1176#discussion_r50992238 --- Diff: brooklyn-server/server-cli/src/main/java/org/apache/brooklyn/cli/ItemLister.java --- @@ -98,88 +115,150 @@ public Void call() throws Exception { List urls = getUrls(); LOG.info("Retrieving objects from "+urls); -// TODO Remove duplication from separate ListPolicyCommand etc -List<Class> entityTypes = getTypes(urls, Entity.class); -List<Class> policyTypes = getTypes(urls, Policy.class); -List<Class> enricherTypes = getTypes(urls, Enricher.class); -List<Class> locationTypes = getTypes(urls, Location.class, Boolean.FALSE); +Map<String, Object> result = MutableMap.of(); +List jsonList = new ArrayList<>(); -Map<String, Object> result = ImmutableMap.<String, Object>builder() -.put("entities", ItemDescriptors.toItemDescriptors(entityTypes, headingsOnly, "name")) -.put("policies", ItemDescriptors.toItemDescriptors(policyTypes, headingsOnly, "name")) -.put("enrichers", ItemDescriptors.toItemDescriptors(enricherTypes, headingsOnly, "name")) -.put("locations", ItemDescriptors.toItemDescriptors(locationTypes, headingsOnly, "type")) -.put("locationResolvers", ItemDescriptors.toItemDescriptors(ImmutableList.copyOf(ServiceLoader.load(LocationResolver.class)), true)) -.build(); +if (!jars.isEmpty()) { +// TODO Remove duplication from separate ListPolicyCommand etc +List<Class> entityTypes = getTypes(urls, Entity.class); +List<Class> policyTypes = getTypes(urls, Policy.class); +List<Class> enricherTypes = getTypes(urls, Enricher.class); +List<Class> locationTypes = getTypes(urls, Location.class, Boolean.FALSE); -String json = toJson(result); +result = ImmutableMap.<String, Object>builder() +.put("entities", ItemDescriptors.toItemDescriptors(entityTypes, headingsOnly, "name")) +.put("policies", ItemDescriptors.toItemDescriptors(policyTypes, headingsOnly, "name")) +.put("enrichers", ItemDescriptors.toItemDescriptors(enricherTypes, headingsOnly, "name")) +.put("locations", ItemDescriptors.toItemDescriptors(locationTypes, headingsOnly, "type")) +.put("locationResolvers", ItemDescriptors.toItemDescriptors(ImmutableList.copyOf(ServiceLoader.load(LocationResolver.class)), true)) +.build(); +jsonList.add(toJson(result)); +} else if (!yaml.isEmpty()) { +LocalManagementContext lmgmt = new LocalManagementContext(); +BrooklynCampPlatform platform = new BrooklynCampPlatform( +PlatformRootSummary.builder().name("Brooklyn CAMP Platform").build(),lmgmt) +.setConfigKeyAtManagmentContext(); +BrooklynCatalog catalog = lmgmt.getCatalog(); -if (outputFolder == null) { -System.out.println(json); -} else { -LOG.info("Outputting item list (size "+itemCount+") to " + outputFolder); -String outputPath = Os.mergePaths(outputFolder, "index.html"); -String parentDir = (new File(outputPath).getParentFile()).getAbsolutePath(); -mkdir(parentDir, "entities"); -mkdir(parentDir, "policies"); -mkdir(parentDir, "enrichers"); -mkdir(parentDir, "locations"); -mkdir(parentDir, "locationResolvers"); //TODO nothing written here yet... - -mkdir(parentDir, "style"); -mkdir(Os.mergePaths(parentDir, "style"), "js"); -mkdir(Os.mergePaths(parentDir, "style", "js"), "catalog"); - -Files.write("var items = " + json, new File(Os.mergePaths(outputFolder, "items.js")), Charsets.UTF_8); -
[GitHub] brooklyn-docs pull request: Add mention of location wizard into th...
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-docs/pull/30 Add mention of location wizard into the documentation Related to https://github.com/apache/brooklyn-ui/pull/17 You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-docs master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-docs/pull/30.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 #30 commit 6f654082143b9aae801542e2a5c325a33455b882 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-03-16T16:37:16Z Add mention of location wizard into the documentation --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Fix typo
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-ui/pull/19 Fix typo You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-ui master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-ui/pull/19.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 #19 commit 2e051f4a7a67788cda9698cb72635ccffec86878 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-03-18T11:32:04Z Fix typo --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-docs pull request: Add mention of location wizard into th...
Github user tbouron commented on the pull request: https://github.com/apache/brooklyn-docs/pull/30#issuecomment-197415838 To be merged **after** https://github.com/apache/brooklyn-ui/pull/17 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-dist pull request: Add UI library reference for licensing...
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-dist/pull/22 Add UI library reference for licensing purposes To be merged **after** https://github.com/apache/brooklyn-ui/pull/17 You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-dist master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-dist/pull/22.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 #22 commit a282e7730ab37036716abef81488f875bc29ff04 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-03-17T12:51:52Z Add UI library reference for licensing purposes --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Location wizard
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-ui/pull/17 Location wizard Add a location wizard: ![wizard](https://cloud.githubusercontent.com/assets/2082759/13812320/77100e60-eb73-11e5-9587-fbe901d599e3.png) This will be display on: 1. the home page if there is no locations defined. The location number becomes a button to add a location. The wizard will be displayed as a modal in this case ![home](https://cloud.githubusercontent.com/assets/2082759/13812301/513220b6-eb73-11e5-9f4c-a16ab787291b.png) 2. the catalog page, when clicking on the add location button ![catalog](https://cloud.githubusercontent.com/assets/2082759/13812359/9e4aaeea-eb73-11e5-99a1-6cd20432c471.png) 3. the YAML editor page if there is no locations defined. The wizard will be displayed as a modal in this case ![editor](https://cloud.githubusercontent.com/assets/2082759/13812380/b9047dc4-eb73-11e5-84ff-8f34d5d2e33f.png) You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-ui location-wizard Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-ui/pull/17.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 #17 commit b500293c5f55f093c8c441255aa3edcef68ec184 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-03-10T15:24:53Z WIP commit e9409d5f46ca8542baaa61ceccadfc0f8ec64022 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-03-11T12:10:51Z WIP - Better form validation, code structure and style commit 6d927b47906793583dd63a53155c28f90742af62 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-03-11T16:09:18Z WIP - Added location wizard within the catalog commit 1286d8299209908dfec858fdf972d8b4ddca3de0 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-03-15T16:05:15Z Add auto-complete for provisioning properties commit 603119c52f69fbdf915c8d4289c1f27ae0bfa814 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-03-16T12:30:01Z Add location wizard into the YAML editor --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Location wizard
Github user tbouron commented on the pull request: https://github.com/apache/brooklyn-ui/pull/17#issuecomment-197405281 Related PR: https://github.com/apache/brooklyn-server/pull/62 => To be merge atfer this one. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Location wizard
Github user tbouron commented on the pull request: https://github.com/apache/brooklyn-ui/pull/17#issuecomment-198286661 @ahgittin Pushed latest changes. Hopefully it includes everything now. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Location wizard
Github user tbouron commented on the pull request: https://github.com/apache/brooklyn-ui/pull/17#issuecomment-197965666 @ahgittin autocomplete => the screenshot I have taken is one Chrome... Would be better if other people could test it then. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Hotfix: Removing contains method from th...
Github user tbouron commented on the pull request: https://github.com/apache/brooklyn-ui/pull/25#issuecomment-206855774 > The code causing the problem is called only when loggerEnabled is true. Suggest disabling logging instead. Even though, not removing the `contains` is really a big issue. I feel more confortable removing it as it affect every JS arrays. Again, this is just a temporary fix, I'll look for another autocomplete library after 0.9.0 > Also can't believe they pollyfilled contains just to use it a single time on the line following it. And yet, it is sadly true... But it's half of my mistake, I choose this library :( --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Hotfix: Removing contains method from th...
Github user tbouron commented on the pull request: https://github.com/apache/brooklyn-ui/pull/25#issuecomment-206866563 > My point is that with loggerEnabled=false the Array prototype will not be patched with contains, so no need to delete it. My bad, I get what you are saying now. I'll update the PR --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Hotfix: Removing contains method from th...
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-ui/pull/25 Hotfix: Removing contains method from the Array prototype This avoids breaking other parts of the UI You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-ui hotfix/location-wizard Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-ui/pull/25.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 #25 commit eee48e1b8e7b2b88164c2df15a8166b4c48fc2cd Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-04-07T12:13:47Z Hotfix: Removing contains method from the Array prototype to avoid breaking other parts of the UI --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Hotfix: Skip the creation of the contain...
Github user tbouron commented on the pull request: https://github.com/apache/brooklyn-ui/pull/25#issuecomment-206872102 @neykov Done --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: BROOKLYN-244: Fix blueprint composer loa...
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-ui/pull/23 BROOKLYN-244: Fix blueprint composer loading issue This load straight away CodeMirror when launching the composer for the composer tab, removing the requirement on loading the full list of applications contained within the catalog. When coming from the catalog (editing a catalog item YAML), it will temporarily disable the editor, add an overlay displaying `Loading item...` until the item is full loaded from the REST server and added to the editor. At that point, the overlay will fade out and the editor enable again. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-ui fix/brooklyn-244 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-ui/pull/23.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 #23 commit 38e89a53f9335994cff9293b57d5164c380f1d6e Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-04-06T11:01:32Z BROOKLYN-244: Fix blueprint composer loading issue --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server pull request: pull displayName from flags in Locat...
Github user tbouron commented on the pull request: https://github.com/apache/brooklyn-server/pull/111#issuecomment-208343949 Tested, LGTM --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Update editor placeholder
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-ui/pull/24 Update editor placeholder The text now makes it clear that users can use drag & drop to add text files' content into the editor ![brooklyn js rest client](https://cloud.githubusercontent.com/assets/2082759/14321019/5cc569c2-fc0f-11e5-9205-3d819f90e002.png) You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-ui feature/drag-and-drop Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-ui/pull/24.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 #24 commit fc4e814a99925966c5b85e92d8d821176b64c36b Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-04-06T14:49:40Z Update placeholder text to make clear that users can use drag & drop to add text files' content into the editor --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: BROOKLYN-244: Fix blueprint composer loa...
Github user tbouron commented on the pull request: https://github.com/apache/brooklyn-ui/pull/23#issuecomment-206419817 Great, thank @aledsage! If it gets into 0.9.0, you might also want #24 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Update editor placeholder
Github user tbouron commented on the pull request: https://github.com/apache/brooklyn-ui/pull/24#issuecomment-206447871 The drag & drop feature is provided by CodeMirror. I'm not sure it can be customised, I'll need to check that. That being said, the content of the file is inserted where your cursor / mouse cursor drop the file, so having a classic overlay "drop file here" won't work here. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Update editor placeholder
Github user tbouron commented on the pull request: https://github.com/apache/brooklyn-ui/pull/24#issuecomment-206456324 We will probably have to cheat as the textarea is hidden by CodeMirror. AFAIK, we can still bound to those events but from the CodeMirror container rather than the textarea. I'll investigate more tomorrow --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-docs pull request: Add mention of location wizard into th...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-docs/pull/30#discussion_r56475766 --- Diff: guide/ops/locations/index.md --- @@ -17,7 +17,8 @@ Brooklyn supports a wide range of locations: specifying already-existing hosts to use * And many others, including object stores and online services -Configuration can be set in `~/.brooklyn/brooklyn.properties` +Configuration can be set in `~/.brooklyn/brooklyn.properties`, through the +location wizard tool available within the web console or or directly in YAML when specifying a location. --- End diff -- Good catch! I'll fix that, thanks --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Location wizard
Github user tbouron commented on the pull request: https://github.com/apache/brooklyn-ui/pull/17#issuecomment-197946011 > maybe it's a huge time delay or my machine. for me it only popped up once and then vanished. other times i couldn't get anything to show. > > is it possible to have ctrl-space also trigger it, and put a hint that this is supported? that at least makes it consistent with composer and obvious that it is possible. ctrl + space to display the autocomplete? It does not work for me. The suggestions are displayed as soon a I type something in the field. If a type a `i`, it display this instantly ![screen shot 2016-03-17 at 15 53 15](https://cloud.githubusercontent.com/assets/2082759/13852072/83775fba-ec58-11e5-8378-d901d07a8a7c.png) I think that's an issue with your build. > i find button enablement a subtle clue not an obvious one. (disablement is an obvious indicator that i cannot proceed but if i'm taken to a screen i assume i'm supposed to do something there. the obvious button in this screen is Add configuration which is intimidating.) > > additionally i'd like us to more user-friendly less techie/jargony. the phrase provisioning information about your location whether optional or not isn't clear to me. also it's too general in many cases (because the previous screen gave a bunch of provisioning information) and wrong in others (specifying a loginUser is not provisioning information, it's information to connect to a provisioned machine). > > how about text such as: In many target locations, additional configuration may be supported. Enter any such options here. Autocomplete for some config options is available using Ctrl-Space. For information on available options consult the [LINK]Brooklyn docs. Alternatively you can skip this step. I'll change for your text. > the docs have evolved, and 5 years ago pre-vagrant even localhost was common. they should be updated, not this based on that. the menu options in the docs are better, with "named locations" as the second choice. > > localhost is useful for techies and debugging but not a casual user who increasingly we want to target, who is trying to deploy community blueprints for use. it is something that an advanced user who is comfortable with ssh localhost might do max once. clouds, byon, and named/extending otoh are things people do routinely. > > (incidentally i think because localhost is available as a resolver you can specify it as a location in a yaml even if it isn't defined as a type. so i'm not even sure that most users would want to click that ever!) I then need to know what to do in details. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Improve catalog locations info and edita...
Github user tbouron commented on the pull request: https://github.com/apache/brooklyn-ui/pull/18#issuecomment-198308800 The code looks good but - I cannot edit any locations I manually added. - properties don't show up for locations I manually added. It that normal @ahgittin ? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Improve catalog locations info and edita...
Github user tbouron commented on the pull request: https://github.com/apache/brooklyn-ui/pull/18#issuecomment-198309051 Oh wait, do I need to run the server with https://github.com/apache/brooklyn-server/pull/70? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Location wizard
Github user tbouron commented on the pull request: https://github.com/apache/brooklyn-ui/pull/17#issuecomment-197866956 Added the reference to `easy-autocomplete`, see my last commit --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Location wizard
Github user tbouron commented on the pull request: https://github.com/apache/brooklyn-ui/pull/17#issuecomment-197925582 Technical: - What is the issue with the autocomplete? Works ok after at least one character for me. Cosmetic: - Will change for all words in initial caps, acronyms all caps - Will provide helper texts - Same as above - Will remove the text - Buttons are enabled on this screen which makes it obvious that you don't need to do anything else. But I can change the subtitle from `Provisioning information about your location` to `Optional provisioning information about your location` Conceptual: - I disagree with that. Those 3 top level location types are taken from the [Brooklyn docs](https://brooklyn.apache.org/v/latest/ops/locations/index.html) to be consistent! --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Show error message on top of the YAML ed...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-ui/pull/21#discussion_r57142670 --- Diff: src/main/webapp/assets/tpl/editor/page.html --- @@ -47,12 +47,12 @@ Blueprint Composer + +ERROR + + - --- End diff -- No need for the `style="display:none;"` as the `hide` class already does it Also I would remove the `label-message` class as the style of it does not match the current look & feel of the editor. Instead, you can customise the `error-message` class like so: ```css .error-message { background-color: #e2e2e2; padding: 15px 10px 15px 10px; border-left: 1px solid #d3d3d3; border-right: 1px solid #d3d3d3; } ``` --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Show error message on top of the YAML ed...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-ui/pull/21#discussion_r57298808 --- Diff: src/main/webapp/assets/tpl/editor/page.html --- @@ -47,12 +47,12 @@ Blueprint Composer + +ERROR + + - --- End diff -- @bostko It should be part of this PR in my opinion as this is a specific style, not a global one. You just need to add the code I mentioned to the `base.css` file :) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Move jQuery code inside a closure manage...
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-ui/pull/20 Move jQuery code inside a closure managed by require This is mainly to prevent javascript errors with jQuery not available when running Brooklyn from `BrooklynJavascriptGuiLauncher` You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-ui master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-ui/pull/20.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 #20 commit c8308f00325f4ad36c41d0b46055b09c143b Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-03-18T14:17:43Z Move jQuery code inside a closure managed by require --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Update style of editor's error message
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-ui/pull/22 Update style of editor's error message Follow up of my comment on #21 You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-ui update-pr-21 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-ui/pull/22.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 #22 commit f67b9d276f9c3eb728af912465ea281cbd280cb2 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-03-30T10:47:48Z Update style of editor's error message --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-library pull request: Allow creating roles for PostgreSQL
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-library/pull/33#discussion_r62216594 --- Diff: software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSshDriver.java --- @@ -328,9 +340,39 @@ private void initializeNewDatabase() { " --command="+ createUserCommand), sudoAsUser("postgres", getInstallDir() + "/bin/psql -p " + entity.getAttribute(PostgreSqlNode.POSTGRESQL_PORT) + " --command="+ createDatabaseCommand), +createRolesAdditionalCommand, callPgctl("stop", true)) .failOnNonZeroResultCode().execute(); } + +private String buildCreateRolesQuery() { +Map<String, Map> roles = entity.getConfig(PostgreSqlNode.ROLES); +String createRolesQuery = "\""; + +for (Map.Entry role: roles.entrySet()) { +createRolesQuery = createRolesQuery.concat(String.format("CREATE ROLE %s", role.getKey())); +if (((Map) role.getValue()).containsKey(PostgreSqlNode.ROLE_PROPERTIES_KEY)) { +createRolesQuery = createRolesQuery.concat(String.format(" WITH %s; ", ((Map) role.getValue()).get("properties"))); +} else { +createRolesQuery = createRolesQuery.concat(";"); +} + +if (((Map) role.getValue()).containsKey(PostgreSqlNode.ROLE_PRIVILEGES_KEY)) { +if ( ((Map) role.getValue()).get(PostgreSqlNode.ROLE_PRIVILEGES_KEY) instanceof List) { +for (Object privilage: (List) ((Map) role.getValue()).get(PostgreSqlNode.ROLE_PRIVILEGES_KEY)) { +createRolesQuery = createRolesQuery.concat(String.format("GRANT %s TO %s; ", privilage, role.getKey())); --- End diff -- s/privilage/privilege --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-library pull request: Allow creating roles for PostgreSQL
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-library/pull/33#discussion_r62215974 --- Diff: software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNode.java --- @@ -90,6 +95,17 @@ String.class, "postgresql.username", "Username of the database user"); String DEFAULT_USERNAME = "postgresqluser"; + +@SetFromFlag("roles") +ConfigKey<Map<String, Map>> ROLES = new MapConfigKey(Map.class, "postgresql.roles", +"Set roles with properties and permissions. Shoud be a map with keys equal to role names and values a map of the type:" + + "key equal to `properties` and value - the role properties that should be in the query after `WITH` statement" + +"key equal to `privileges` and value - the `GRANT` query value between the `GRANT` and `TO` statements" +); --- End diff -- Maybe worth to add an actual example within the description of what the map should look like? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-library pull request: Allow creating roles for PostgreSQL
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-library/pull/33#discussion_r62216578 --- Diff: software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSshDriver.java --- @@ -328,9 +340,39 @@ private void initializeNewDatabase() { " --command="+ createUserCommand), sudoAsUser("postgres", getInstallDir() + "/bin/psql -p " + entity.getAttribute(PostgreSqlNode.POSTGRESQL_PORT) + " --command="+ createDatabaseCommand), +createRolesAdditionalCommand, callPgctl("stop", true)) .failOnNonZeroResultCode().execute(); } + +private String buildCreateRolesQuery() { +Map<String, Map> roles = entity.getConfig(PostgreSqlNode.ROLES); +String createRolesQuery = "\""; + +for (Map.Entry role: roles.entrySet()) { +createRolesQuery = createRolesQuery.concat(String.format("CREATE ROLE %s", role.getKey())); +if (((Map) role.getValue()).containsKey(PostgreSqlNode.ROLE_PROPERTIES_KEY)) { +createRolesQuery = createRolesQuery.concat(String.format(" WITH %s; ", ((Map) role.getValue()).get("properties"))); +} else { +createRolesQuery = createRolesQuery.concat(";"); +} + +if (((Map) role.getValue()).containsKey(PostgreSqlNode.ROLE_PRIVILEGES_KEY)) { +if ( ((Map) role.getValue()).get(PostgreSqlNode.ROLE_PRIVILEGES_KEY) instanceof List) { +for (Object privilage: (List) ((Map) role.getValue()).get(PostgreSqlNode.ROLE_PRIVILEGES_KEY)) { --- End diff -- s/privilage/privilege --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-docs pull request: Update server-cli-reference.md
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-docs/pull/54 Update server-cli-reference.md Fix a small typo within the `nohup` command You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-docs patch-1 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-docs/pull/54.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 #54 commit a72f538073baa220f4aae3c2553bc4c662885ad3 Author: Thomas Bouron <tbou...@gmail.com> Date: 2016-05-05T14:43:27Z Update server-cli-reference.md Fix a small typo within the `nohup` command --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-library pull request: Allow creating roles for PostgreSQL
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-library/pull/33#discussion_r62295255 --- Diff: software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSshDriver.java --- @@ -328,9 +340,39 @@ private void initializeNewDatabase() { " --command="+ createUserCommand), sudoAsUser("postgres", getInstallDir() + "/bin/psql -p " + entity.getAttribute(PostgreSqlNode.POSTGRESQL_PORT) + " --command="+ createDatabaseCommand), +createRolesAdditionalCommand, callPgctl("stop", true)) .failOnNonZeroResultCode().execute(); } + +private String buildCreateRolesQuery() { +Map<String, Map> roles = entity.getConfig(PostgreSqlNode.ROLES); +String createRolesQuery = "\""; + +for (Map.Entry role: roles.entrySet()) { +createRolesQuery = createRolesQuery.concat(String.format("CREATE ROLE %s", role.getKey())); --- End diff -- +1, always validate and escape input from the user, especially for SQL queries. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-library pull request: Allow creating roles for PostgreSQL
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-library/pull/33#discussion_r62302857 --- Diff: software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSshDriver.java --- @@ -328,9 +340,39 @@ private void initializeNewDatabase() { " --command="+ createUserCommand), sudoAsUser("postgres", getInstallDir() + "/bin/psql -p " + entity.getAttribute(PostgreSqlNode.POSTGRESQL_PORT) + " --command="+ createDatabaseCommand), +createRolesAdditionalCommand, callPgctl("stop", true)) .failOnNonZeroResultCode().execute(); } + +private String buildCreateRolesQuery() { +Map<String, Map> roles = entity.getConfig(PostgreSqlNode.ROLES); +String createRolesQuery = "\""; + +for (Map.Entry role: roles.entrySet()) { +createRolesQuery = createRolesQuery.concat(String.format("CREATE ROLE %s", role.getKey())); --- End diff -- Ease of use I guess? Also, you could imagine to call this from an effector to create users and roles on the fly --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-docs pull request: Update the tests documentation
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-docs/pull/55 Update the tests documentation It explicitly says that the target for a test can be omitted if wrapped into a TestCase that already defines the target. Here is how it looks like: ![test-entities](https://cloud.githubusercontent.com/assets/2082759/15069394/3292dfea-1375-11e6-8a72-dc24992d0d97.png) You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-docs fix/test-docs Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-docs/pull/55.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 #55 commit e32ae081735057b658b042ebf67e134e32d6ef82 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-05-06T09:23:09Z Update the tests documentation to explicitly say that the target can be omitted if wrapped into a TestCase that already defines the target --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-docs pull request: Update the tests documentation
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-docs/pull/55#discussion_r62547620 --- Diff: guide/yaml/test/test-entities.md --- @@ -89,6 +93,10 @@ The `TestEffector` entity invokes the specified effector on a target entity. If - `params` - parameters to pass to the effector, these will depend on the entity and effector being tested. The example above shows the `url` and `targetName` parameters being passed to Tomcats `deploy` effector. - `assert` - assertion to perform on the returned result. See section on assertions below. + --- End diff -- The `include` seems nice but the line will become quite long depending on the text to pass right? As for using HTML over md, I didn't know I could use markdown inside HTML so quite happy to change if you prefer. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: Show config values when jumping from App...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-ui/pull/27#discussion_r64540792 --- Diff: src/main/webapp/assets/js/view/application-add-wizard.js --- @@ -303,6 +303,7 @@ define([ }, previewStep:function () { // no need for validation if going to composer +this.currentView.model.spec.set("config", this.currentView.getConfigMap()); --- End diff -- Could you just add a comment stating what this does please? Will be useful for the future --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: BROOKLYN-270: Location wizard generates ...
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-ui/pull/28 BROOKLYN-270: Location wizard generates valid YAML for multiline fields This update the field `privateKeyFile` to `privateKeyData`. It also checks if a configuration key contains line breaks. In that case, it will generate a valid multiline YAML. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-ui fix/brooklyn-270 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-ui/pull/28.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 #28 commit f8db0de7c81dc7718068449c2013a571fab2d8fd Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-05-25T10:54:46Z Location wizard generates valid YAML for multiline fields --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: BROOKLYN-275: Location wizard generates ...
Github user tbouron closed the pull request at: https://github.com/apache/brooklyn-ui/pull/28 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: BROOKLYN-275: Location wizard generates ...
Github user tbouron closed the pull request at: https://github.com/apache/brooklyn-ui/pull/28 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: BROOKLYN-275: Location wizard generates ...
GitHub user tbouron reopened a pull request: https://github.com/apache/brooklyn-ui/pull/28 BROOKLYN-275: Location wizard generates valid YAML for multiline fields This update the field `privateKeyFile` to `privateKeyData`. It also checks if a configuration key contains line breaks. In that case, it will generate a valid multiline YAML. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-ui fix/brooklyn-270 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-ui/pull/28.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 #28 commit f8db0de7c81dc7718068449c2013a571fab2d8fd Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-05-25T10:54:46Z Location wizard generates valid YAML for multiline fields --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request: BROOKLYN-275: Location wizard generates ...
GitHub user tbouron reopened a pull request: https://github.com/apache/brooklyn-ui/pull/28 BROOKLYN-275: Location wizard generates valid YAML for multiline fields This update the field `privateKeyFile` to `privateKeyData`. It also checks if a configuration key contains line breaks. In that case, it will generate a valid multiline YAML. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-ui fix/brooklyn-270 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-ui/pull/28.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 #28 commit f8db0de7c81dc7718068449c2013a571fab2d8fd Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-05-25T10:54:46Z Location wizard generates valid YAML for multiline fields --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server issue #144: Allows for multiple deserialization class rename...
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-server/pull/144 Hey @nakomis, overloading the class deserialisation has been addressed in #492 but for **karaf edition** only. Do you also need it for the classic edition? In this case, could you rebase on the latest master + add tests? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server pull request #535: Add jclouds AzureComputeRateLimitModule t...
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-server/pull/535 Add jclouds AzureComputeRateLimitModule to support provisioning retry for Azure ARM You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-server fix/azure-arm-retry Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-server/pull/535.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 #535 commit 1bfb8eb9e569e94388dd617d07ac705e0b30b0b1 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2017-01-25T15:30:44Z Add jclouds AzureComputeRateLimitModule to support provisioning retry for Azure ARM --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server issue #535: Add jclouds AzureComputeRateLimitModule to suppo...
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-server/pull/535 @aledsage done --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-docs pull request #147: Added known issues section to azure arm
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-docs/pull/147#discussion_r98206142 --- Diff: guide/ops/locations/_azure-ARM.md --- @@ -94,3 +94,9 @@ The loginUser can be anything, as long as it's specified. The `overrideAuthenticateSudo: true` key tells Apache Brooklyn that default on Azure images do not have passwordless sudo configured by default. + + Known issues +There are currently two know issues with Azure ARM: + +* It can take a long time for VMs to be provisioned +* Azure ARM appears to have some fairly strict rate limiting --- End diff -- I would also mention that the rate limit is shared between classic and ARM --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request #42: Use the "itemType" to redirect the user to the...
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-ui/pull/42 Use the "itemType" to redirect the user to the right page after a catalog import As for today, when a user submit catalog item(s), the UI redirects to the catalog page, not to the newly created catalog item. This is due to the fact that the UI does not know what type of catalog item has been created and therefore cannot redirect the user properly. This corrects this behaviours. _Note: This requires https://github.com/apache/brooklyn-server/pull/567 **to be merged first**_ You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-ui fix/catalog-editor Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-ui/pull/42.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 #42 commit e0e02e04a0f3b720808a4e3b2984b3289595117b Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2017-02-21T17:46:35Z Use the "itemType" to redirect the user to the right page after a catalog import --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server issue #559: Activity api include background
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-server/pull/559 Thanks @ahgittin! Tested works great, LGTM. PS: Jenkins failure looks unrelated: ``` testCleanedCopiedPersistedState(org.apache.brooklyn.launcher.CleanOrphanedLocationsIntegrationTest) Time elapsed: 0.11 sec <<< FAILURE! java.lang.AssertionError at org.apache.brooklyn.launcher.CleanOrphanedLocationsIntegrationTest.testCleanedCopiedPersistedState(CleanOrphanedLocationsIntegrationTest.java:167) testSelectionWithOrphanedLocationsInData(org.apache.brooklyn.launcher.CleanOrphanedLocationsIntegrationTest) Time elapsed: 0.025 sec <<< FAILURE! java.lang.AssertionError: expected [true] but found [false] at org.apache.brooklyn.launcher.CleanOrphanedLocationsIntegrationTest.testSelectionWithOrphanedLocationsInData(CleanOrphanedLocationsIntegrationTest.java:136) 2017-02-15 12:21:30,290 INFO Brooklyn shutdown: stopping entities [Application[wi9i9uod], Application[3pl879q6], BasicApplicationImpl{id=qqh8wj4nom}, Application[ymh6lc97], Application[n1o06am3]] ``` --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server issue #558: BROOKLYN-433: regex/obj config key constraint in...
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-server/pull/558 @aledsage In that case, LGTM ð Would be great to follow up after this PR is merged to make the REST API return more information about the constraint (and modify the UI to react to it) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request #41: [BROOKLYN-408] Add CSRF header on the swagger ...
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-ui/pull/41 [BROOKLYN-408] Add CSRF header on the swagger page Since Brooklyn checks for CSRF header for every POST/PUT requests, the relevant methods didn't work anymore on the swagger UI page. This fixes it by setting the header manually into the swagger configuration You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-ui fix/swagger-ui Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-ui/pull/41.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 #41 commit 2df4678f7307c9a1bc352253f73ad45c597da9db Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2017-02-09T13:47:53Z Add CSRF header on the swagger page --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server pull request #521: fix unexpected AddChildrenEffector behavi...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/521#discussion_r100310679 --- Diff: camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/DslDeferredFunctionCall.java --- @@ -99,48 +99,81 @@ public Object call() throws Exception { } protected static Maybe invokeOn(Object obj, String fnName, List args) { -Object instance = obj; -List instanceArgs = args; -Maybe method = Reflections.getMethodFromArgs(instance, fnName, instanceArgs); - -if (method.isAbsent()) { +return new Invoker(obj, fnName, args).invoke(); +} + +protected static class Invoker { +final Object obj; +final String fnName; +final List args; + +Maybe method; +Object instance; +List instanceArgs; + +protected Invoker(Object obj, String fnName, List args) { +this.fnName = fnName; +this.obj = obj; +this.args = args; +} + +protected Maybe invoke() { +findMethod(); + +if (method.isPresent()) { +Method m = method.get(); + +checkCallAllowed(m); + +try { +// Value is most likely another BrooklynDslDeferredSupplier - let the caller handle it, +return Maybe.of(Reflections.invokeMethodFromArgs(instance, m, instanceArgs)); +} catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException e) { +// If the method is there but not executable for whatever reason fail with a fatal error, don't return an absent. +throw Exceptions.propagate(new InvocationTargetException(e, "Error invoking '"+fnName+instanceArgs+"' on '"+instance+"'")); --- End diff -- Miss `(` and `)` around `instanceArgs` Unless you can you your `DslToStringHelpers.fn()` ? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server pull request #521: fix unexpected AddChildrenEffector behavi...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/521#discussion_r100310271 --- Diff: camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/DslDeferredFunctionCall.java --- @@ -80,14 +80,14 @@ public Object call() throws Exception { Object instance = resolvedMaybe.get(); if (instance == null) { -throw new IllegalArgumentException("Deferred function call, " + object + -" evaluates to null (when calling " + fnName + "(" + toString(args) + "))"); +throw new IllegalArgumentException("Deferred function call not found: " + +object + " evaluates to null (wanting to call " + fnName + args + "))"); --- End diff -- Miss a `(` before the `args`: ```java object + " evaluates to null (wanting to call " + fnName + "(" + args + "))"); ``` Unless you can you your `DslToStringHelpers.fn()` ? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server pull request #521: fix unexpected AddChildrenEffector behavi...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/521#discussion_r100310194 --- Diff: camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/DslDeferredFunctionCall.java --- @@ -62,7 +62,7 @@ public DslDeferredFunctionCall(Object o, String fn, List args) { @Override public Task newTask() { return Tasks.builder() -.displayName("Deferred function call " + object + "." + fnName + "(" + toString(args) + ")") +.displayName("Deferred function call " + object + "." + fnName + args + ")") --- End diff -- Miss a `(` before the `args`: ```java .displayName("Deferred function call " + object + "." + fnName + "(" + args + ")") ``` Unless you can you your `DslToStringHelpers.fn()` ? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server issue #521: fix unexpected AddChildrenEffector behaviour and...
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-server/pull/521 @aledsage Did you try the blueprint I posted above? I couldn't make it work, I'm guessing I missed something obvious --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server pull request #561: better presentation for sensor publishing...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/561#discussion_r101533579 --- Diff: core/src/main/java/org/apache/brooklyn/core/mgmt/internal/LocalSubscriptionManager.java --- @@ -111,7 +115,7 @@ public long getTotalEventsDelivered() { s.subscriberExecutionManagerTagSupplied = true; } else { s.subscriberExecutionManagerTag = -s.subscriber instanceof Entity ? "subscription-delivery-entity-"+((Entity)s.subscriber).getId()+"["+s.subscriber+"]" : +s.subscriber instanceof Entity ? "subscription-delivery-entity-"+((Entity)s.subscriber).getId() : --- End diff -- Do we want to remove the subscriber name here? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server pull request #561: better presentation for sensor publishing...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/561#discussion_r101534376 --- Diff: core/src/main/java/org/apache/brooklyn/core/mgmt/internal/LocalSubscriptionManager.java --- @@ -237,42 +212,85 @@ public synchronized boolean unsubscribe(SubscriptionHandle sh) { if (groovyTruth(subs)) { if (LOG.isTraceEnabled()) LOG.trace("sending {}, {} to {}", new Object[] {event.getSensor().getName(), event, join(subs, ",")}); for (Subscription s : subs) { -if (s.eventFilter!=null && !s.eventFilter.apply(event)) -continue; -final Subscription sAtClosureCreation = s; - -List tags = MutableList.builder() -.addAll(s.subscriberExtraExecTags == null ? ImmutableList.of() : s.subscriberExtraExecTags) -.add(s.subscriberExecutionManagerTag) -.build() -.asUnmodifiable(); -Map<String, ?> execFlags = MutableMap.of("tags", tags); - -em.submit(execFlags, new Runnable() { -@Override -public String toString() { -return "LSM.publish("+event+")"; -} -@Override -public void run() { -try { -int count = sAtClosureCreation.eventCount.incrementAndGet(); -if (count > 0 && count % 1000 == 0) LOG.debug("{} events for subscriber {}", count, sAtClosureCreation); - -sAtClosureCreation.listener.onEvent(event); -} catch (Throwable t) { -if (event!=null && event.getSource()!=null && Entities.isNoLongerManaged(event.getSource())) { -LOG.debug("Error processing subscriptions to "+this+", after entity unmanaged: "+t, t); -} else { -LOG.warn("Error processing subscriptions to "+this+": "+t, t); -} -} -}}); +submitPublishEvent(s, event, false); +// excludes initial so only do it here totalEventsDeliveredCount.incrementAndGet(); } } } +@SuppressWarnings({ "unchecked", "rawtypes" }) +private void submitPublishEvent(final Subscription s, final SensorEvent event, final boolean isInitial) { +if (s.eventFilter!=null && !s.eventFilter.apply(event)) +return; + +List tags = MutableList.builder() +.addAll(s.subscriberExtraExecTags == null ? ImmutableList.of() : s.subscriberExtraExecTags) +.add(s.subscriberExecutionManagerTag) +.add(BrooklynTaskTags.SENSOR_TAG) +.build() +.asUnmodifiable(); + +StringBuilder name = new StringBuilder("sensor "); +StringBuilder description = new StringBuilder("Sensor "); +String sensorName = s.sensor==null ? null : s.sensor.getName(); +String sourceName = event.getSource()==null ? null : event.getSource().getId(); +name.append(sourceName); +name.append(":"); --- End diff -- Should the `:` be appended **only** if the sourceName is different than `null`? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server pull request #561: better presentation for sensor publishing...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/561#discussion_r101534679 --- Diff: core/src/main/java/org/apache/brooklyn/core/mgmt/internal/LocalSubscriptionManager.java --- @@ -237,42 +212,85 @@ public synchronized boolean unsubscribe(SubscriptionHandle sh) { if (groovyTruth(subs)) { if (LOG.isTraceEnabled()) LOG.trace("sending {}, {} to {}", new Object[] {event.getSensor().getName(), event, join(subs, ",")}); for (Subscription s : subs) { -if (s.eventFilter!=null && !s.eventFilter.apply(event)) -continue; -final Subscription sAtClosureCreation = s; - -List tags = MutableList.builder() -.addAll(s.subscriberExtraExecTags == null ? ImmutableList.of() : s.subscriberExtraExecTags) -.add(s.subscriberExecutionManagerTag) -.build() -.asUnmodifiable(); -Map<String, ?> execFlags = MutableMap.of("tags", tags); - -em.submit(execFlags, new Runnable() { -@Override -public String toString() { -return "LSM.publish("+event+")"; -} -@Override -public void run() { -try { -int count = sAtClosureCreation.eventCount.incrementAndGet(); -if (count > 0 && count % 1000 == 0) LOG.debug("{} events for subscriber {}", count, sAtClosureCreation); - -sAtClosureCreation.listener.onEvent(event); -} catch (Throwable t) { -if (event!=null && event.getSource()!=null && Entities.isNoLongerManaged(event.getSource())) { -LOG.debug("Error processing subscriptions to "+this+", after entity unmanaged: "+t, t); -} else { -LOG.warn("Error processing subscriptions to "+this+": "+t, t); -} -} -}}); +submitPublishEvent(s, event, false); +// excludes initial so only do it here totalEventsDeliveredCount.incrementAndGet(); } } } +@SuppressWarnings({ "unchecked", "rawtypes" }) +private void submitPublishEvent(final Subscription s, final SensorEvent event, final boolean isInitial) { +if (s.eventFilter!=null && !s.eventFilter.apply(event)) +return; + +List tags = MutableList.builder() +.addAll(s.subscriberExtraExecTags == null ? ImmutableList.of() : s.subscriberExtraExecTags) +.add(s.subscriberExecutionManagerTag) +.add(BrooklynTaskTags.SENSOR_TAG) +.build() +.asUnmodifiable(); + +StringBuilder name = new StringBuilder("sensor "); +StringBuilder description = new StringBuilder("Sensor "); +String sensorName = s.sensor==null ? null : s.sensor.getName(); +String sourceName = event.getSource()==null ? null : event.getSource().getId(); +name.append(sourceName); +name.append(":"); +name.append(sensorName); + +description.append(sensorName); +description.append(" on "); --- End diff -- Should the `on` be appended only if the `sensorName` is different than null? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server pull request #561: better presentation for sensor publishing...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/561#discussion_r101535119 --- Diff: core/src/main/java/org/apache/brooklyn/core/mgmt/internal/LocalSubscriptionManager.java --- @@ -237,42 +212,85 @@ public synchronized boolean unsubscribe(SubscriptionHandle sh) { if (groovyTruth(subs)) { if (LOG.isTraceEnabled()) LOG.trace("sending {}, {} to {}", new Object[] {event.getSensor().getName(), event, join(subs, ",")}); for (Subscription s : subs) { -if (s.eventFilter!=null && !s.eventFilter.apply(event)) -continue; -final Subscription sAtClosureCreation = s; - -List tags = MutableList.builder() -.addAll(s.subscriberExtraExecTags == null ? ImmutableList.of() : s.subscriberExtraExecTags) -.add(s.subscriberExecutionManagerTag) -.build() -.asUnmodifiable(); -Map<String, ?> execFlags = MutableMap.of("tags", tags); - -em.submit(execFlags, new Runnable() { -@Override -public String toString() { -return "LSM.publish("+event+")"; -} -@Override -public void run() { -try { -int count = sAtClosureCreation.eventCount.incrementAndGet(); -if (count > 0 && count % 1000 == 0) LOG.debug("{} events for subscriber {}", count, sAtClosureCreation); - -sAtClosureCreation.listener.onEvent(event); -} catch (Throwable t) { -if (event!=null && event.getSource()!=null && Entities.isNoLongerManaged(event.getSource())) { -LOG.debug("Error processing subscriptions to "+this+", after entity unmanaged: "+t, t); -} else { -LOG.warn("Error processing subscriptions to "+this+": "+t, t); -} -} -}}); +submitPublishEvent(s, event, false); +// excludes initial so only do it here totalEventsDeliveredCount.incrementAndGet(); } } } +@SuppressWarnings({ "unchecked", "rawtypes" }) +private void submitPublishEvent(final Subscription s, final SensorEvent event, final boolean isInitial) { +if (s.eventFilter!=null && !s.eventFilter.apply(event)) +return; + +List tags = MutableList.builder() +.addAll(s.subscriberExtraExecTags == null ? ImmutableList.of() : s.subscriberExtraExecTags) +.add(s.subscriberExecutionManagerTag) +.add(BrooklynTaskTags.SENSOR_TAG) +.build() +.asUnmodifiable(); + +StringBuilder name = new StringBuilder("sensor "); +StringBuilder description = new StringBuilder("Sensor "); +String sensorName = s.sensor==null ? null : s.sensor.getName(); +String sourceName = event.getSource()==null ? null : event.getSource().getId(); +name.append(sourceName); +name.append(":"); +name.append(sensorName); + +description.append(sensorName); +description.append(" on "); +description.append(sourceName); +description.append(" publishing to "); +description.append(s.subscriber instanceof Entity ? ((Entity)s.subscriber).getId() : s.subscriber); + +if (includeDescriptionForSensorTask(event)) { +name.append(" "); +name.append(event.getValue()); --- End diff -- Not sure we need the value in the name as we already have it in the description --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server issue #561: better presentation for sensor publishing tasks
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-server/pull/561 Also great to have a `SENSOR` tag, this will allows us to do filtering more easily. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server issue #562: Provide a scratchpad area per management context
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-server/pull/562 @neykov Agree, having this warning within the docs seems to be the way to go. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-docs issue #150: Add deprecated functionality which can't be commun...
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-docs/pull/150 LGTM --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-library pull request #34: Fix sed command that update the MySQL con...
Github user tbouron closed the pull request at: https://github.com/apache/brooklyn-library/pull/34 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-library issue #34: Fix sed command that update the MySQL configurat...
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-library/pull/34 Close in favor or #76 (my PR wasn't really working anyway) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server issue #558: BROOKLYN-433: regex/obj config key constraint in...
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-server/pull/558 @neykov Depends how that is currently implemented: are we doing this validation client or server side? Although in this particular case, doing this validation client side would require the REST API to return the pattern but I think it currently returns only the type of constraint, i.e. `required` or `regex`. But I'm definitely ð to add it to the UI: better to fail fast --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server issue #525: openstack-swift support
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-server/pull/525 @aledsage Jenkins is happy now ð --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server pull request #525: openstack-swift support
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/525#discussion_r96591689 --- Diff: locations/jclouds/src/main/java/org/apache/brooklyn/core/mgmt/persist/jclouds/JcloudsBlobStoreBasedObjectStore.java --- @@ -36,6 +36,7 @@ import org.jclouds.blobstore.options.ListContainerOptions; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.apache.brooklyn.location.jclouds.BlobStoreContextFactoryImpl; --- End diff -- You have some unused imports in the class since you delete fews lines --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server pull request #519: Add experimental CORS server support
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/519#discussion_r96604796 --- Diff: rest/rest-server/src/test/java/org/apache/brooklyn/rest/CorsFilterLauncherTest.java --- @@ -0,0 +1,168 @@ +/* + * 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. + */ +package org.apache.brooklyn.rest; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import org.apache.brooklyn.api.mgmt.ManagementContext; +import org.apache.brooklyn.core.BrooklynFeatureEnablement; +import org.apache.brooklyn.core.test.entity.LocalManagementContextForTests; +import org.apache.brooklyn.rest.filter.CorsImplSupplierFilter; +import org.apache.brooklyn.util.http.HttpTool; +import org.apache.brooklyn.util.http.HttpToolResponse; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpUriRequest; +import org.apache.http.client.methods.RequestBuilder; +import org.apache.http.impl.client.HttpClients; +import org.testng.annotations.Test; + +import javax.ws.rs.core.HttpHeaders; +import java.io.IOException; +import java.net.URI; +import java.util.List; + +import static org.apache.brooklyn.rest.CsrfTokenFilterLauncherTest.assertOkayResponse; +import static org.apache.cxf.rs.security.cors.CorsHeaderConstants.*; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNull; + +/** + * If brooklyn.experimental.feature.corsCxfFeature.allowedOrigins is not supplied then allowedOrigins will be all domains. + */ +public class CorsFilterLauncherTest extends BrooklynRestApiLauncherTestFixture { +@Test +public void testEnabledCorsSendsBasicAllowResponse() throws IOException { + BrooklynFeatureEnablement.enable(BrooklynFeatureEnablement.FEATURE_CORS_CXF_PROPERTY); +final String shouldAllowOrigin = "http://foo.bar.com;; +BrooklynRestApiLauncher apiLauncher = baseLauncher() +.withoutJsgui(); +ManagementContext mgmt = LocalManagementContextForTests.builder(true) +.useAdditionalProperties(ImmutableMap.<String, Object>of( + BrooklynFeatureEnablement.FEATURE_CORS_CXF_PROPERTY, true, +CorsImplSupplierFilter.ALLOWED_ORIGINS.getName(), ImmutableList.of(shouldAllowOrigin)) +).build(); +apiLauncher.managementContext(mgmt); +useServerForTest(apiLauncher.start()); + +// preflight request +HttpClient client = client(); +HttpToolResponse response = HttpTool.execAndConsume(client, httpOptionsRequest("server/status", "GET", shouldAllowOrigin)); +assertAcAllowOrigin(response, shouldAllowOrigin, "GET"); +assertOkayResponse(response, ""); + +HttpUriRequest httpRequest = RequestBuilder.get(getBaseUriRest() + "server/status") +.addHeader("Origin", shouldAllowOrigin) +.addHeader(HEADER_AC_REQUEST_METHOD, "GET") +.build(); +response = HttpTool.execAndConsume(client, httpRequest); +assertAcAllowOrigin(response, shouldAllowOrigin, "GET", false); +assertOkayResponse(response, "MASTER"); + +// preflight request +response = HttpTool.execAndConsume(client, httpOptionsRequest("script/groovy", "POST", shouldAllowOrigin)); +assertAcAllowOrigin(response, shouldAllowOrigin, "POST"); +assertOkayResponse(response, ""); + +response = HttpTool.httpPost( +client, URI.create(getBaseUriRest() + "script/groovy"), +ImmutableMap.<String,String>of( +"Origin&qu
[GitHub] brooklyn-server pull request #519: Add experimental CORS server support
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/519#discussion_r96604513 --- Diff: rest/rest-server/src/test/java/org/apache/brooklyn/rest/CorsFilterLauncherTest.java --- @@ -0,0 +1,168 @@ +/* + * 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. + */ +package org.apache.brooklyn.rest; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import org.apache.brooklyn.api.mgmt.ManagementContext; +import org.apache.brooklyn.core.BrooklynFeatureEnablement; +import org.apache.brooklyn.core.test.entity.LocalManagementContextForTests; +import org.apache.brooklyn.rest.filter.CorsImplSupplierFilter; +import org.apache.brooklyn.util.http.HttpTool; +import org.apache.brooklyn.util.http.HttpToolResponse; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpUriRequest; +import org.apache.http.client.methods.RequestBuilder; +import org.apache.http.impl.client.HttpClients; +import org.testng.annotations.Test; + +import javax.ws.rs.core.HttpHeaders; +import java.io.IOException; +import java.net.URI; +import java.util.List; + +import static org.apache.brooklyn.rest.CsrfTokenFilterLauncherTest.assertOkayResponse; +import static org.apache.cxf.rs.security.cors.CorsHeaderConstants.*; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNull; + +/** + * If brooklyn.experimental.feature.corsCxfFeature.allowedOrigins is not supplied then allowedOrigins will be all domains. + */ +public class CorsFilterLauncherTest extends BrooklynRestApiLauncherTestFixture { +@Test +public void testEnabledCorsSendsBasicAllowResponse() throws IOException { + BrooklynFeatureEnablement.enable(BrooklynFeatureEnablement.FEATURE_CORS_CXF_PROPERTY); +final String shouldAllowOrigin = "http://foo.bar.com;; +BrooklynRestApiLauncher apiLauncher = baseLauncher() +.withoutJsgui(); +ManagementContext mgmt = LocalManagementContextForTests.builder(true) +.useAdditionalProperties(ImmutableMap.<String, Object>of( + BrooklynFeatureEnablement.FEATURE_CORS_CXF_PROPERTY, true, +CorsImplSupplierFilter.ALLOWED_ORIGINS.getName(), ImmutableList.of(shouldAllowOrigin)) +).build(); +apiLauncher.managementContext(mgmt); +useServerForTest(apiLauncher.start()); + +// preflight request +HttpClient client = client(); +HttpToolResponse response = HttpTool.execAndConsume(client, httpOptionsRequest("server/status", "GET", shouldAllowOrigin)); +assertAcAllowOrigin(response, shouldAllowOrigin, "GET"); +assertOkayResponse(response, ""); + +HttpUriRequest httpRequest = RequestBuilder.get(getBaseUriRest() + "server/status") +.addHeader("Origin", shouldAllowOrigin) +.addHeader(HEADER_AC_REQUEST_METHOD, "GET") +.build(); +response = HttpTool.execAndConsume(client, httpRequest); +assertAcAllowOrigin(response, shouldAllowOrigin, "GET", false); +assertOkayResponse(response, "MASTER"); + +// preflight request +response = HttpTool.execAndConsume(client, httpOptionsRequest("script/groovy", "POST", shouldAllowOrigin)); +assertAcAllowOrigin(response, shouldAllowOrigin, "POST"); +assertOkayResponse(response, ""); + +response = HttpTool.httpPost( +client, URI.create(getBaseUriRest() + "script/groovy"), +ImmutableMap.<String,String>of( +"Origin&qu
[GitHub] brooklyn-server pull request #519: Add experimental CORS server support
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/519#discussion_r96604766 --- Diff: rest/rest-server/src/test/java/org/apache/brooklyn/rest/CorsFilterLauncherTest.java --- @@ -0,0 +1,168 @@ +/* + * 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. + */ +package org.apache.brooklyn.rest; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import org.apache.brooklyn.api.mgmt.ManagementContext; +import org.apache.brooklyn.core.BrooklynFeatureEnablement; +import org.apache.brooklyn.core.test.entity.LocalManagementContextForTests; +import org.apache.brooklyn.rest.filter.CorsImplSupplierFilter; +import org.apache.brooklyn.util.http.HttpTool; +import org.apache.brooklyn.util.http.HttpToolResponse; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpUriRequest; +import org.apache.http.client.methods.RequestBuilder; +import org.apache.http.impl.client.HttpClients; +import org.testng.annotations.Test; + +import javax.ws.rs.core.HttpHeaders; +import java.io.IOException; +import java.net.URI; +import java.util.List; + +import static org.apache.brooklyn.rest.CsrfTokenFilterLauncherTest.assertOkayResponse; +import static org.apache.cxf.rs.security.cors.CorsHeaderConstants.*; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNull; + +/** + * If brooklyn.experimental.feature.corsCxfFeature.allowedOrigins is not supplied then allowedOrigins will be all domains. + */ +public class CorsFilterLauncherTest extends BrooklynRestApiLauncherTestFixture { +@Test +public void testEnabledCorsSendsBasicAllowResponse() throws IOException { + BrooklynFeatureEnablement.enable(BrooklynFeatureEnablement.FEATURE_CORS_CXF_PROPERTY); --- End diff -- I would break down all tests into single unit test. Will be simpler to see and check what has been tested or not --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-docs issue #138: Use full configkey name in docs rather than the sh...
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-docs/pull/138 This follow [the proposal of deprecating the `@SetFromFlag` annotation](http://mail-archives.apache.org/mod_mbox/brooklyn-dev/201611.mbox/browser) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-library pull request #86: Fix non valid CSS rule for example WAR
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-library/pull/86 Fix non valid CSS rule for example WAR Signed-off-by: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-library fix/example-war-css Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-library/pull/86.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 #86 commit f6e5a6f1ab214864a8197d901af720587785ff0a Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2017-01-17T08:58:48Z Fix non valid CSS rule for example WAR Signed-off-by: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-docs pull request #138: Use full configkey name in docs rather than...
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-docs/pull/138 Use full configkey name in docs rather than the shorter version Signed-off-by: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-docs fix/old-memberspec-syntax Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-docs/pull/138.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 #138 commit f7ec519d70766882f795a0da24d290f283e3 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2017-01-17T09:06:21Z Use full configkey name in docs rather than the shorter version Signed-off-by: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server pull request #519: Add experimental CORS server support
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/519#discussion_r96644208 --- Diff: rest/rest-server/src/test/java/org/apache/brooklyn/rest/CorsFilterLauncherTest.java --- @@ -0,0 +1,168 @@ +/* + * 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. + */ +package org.apache.brooklyn.rest; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import org.apache.brooklyn.api.mgmt.ManagementContext; +import org.apache.brooklyn.core.BrooklynFeatureEnablement; +import org.apache.brooklyn.core.test.entity.LocalManagementContextForTests; +import org.apache.brooklyn.rest.filter.CorsImplSupplierFilter; +import org.apache.brooklyn.util.http.HttpTool; +import org.apache.brooklyn.util.http.HttpToolResponse; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpUriRequest; +import org.apache.http.client.methods.RequestBuilder; +import org.apache.http.impl.client.HttpClients; +import org.testng.annotations.Test; + +import javax.ws.rs.core.HttpHeaders; +import java.io.IOException; +import java.net.URI; +import java.util.List; + +import static org.apache.brooklyn.rest.CsrfTokenFilterLauncherTest.assertOkayResponse; +import static org.apache.cxf.rs.security.cors.CorsHeaderConstants.*; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNull; + +/** + * If brooklyn.experimental.feature.corsCxfFeature.allowedOrigins is not supplied then allowedOrigins will be all domains. + */ +public class CorsFilterLauncherTest extends BrooklynRestApiLauncherTestFixture { +@Test +public void testEnabledCorsSendsBasicAllowResponse() throws IOException { + BrooklynFeatureEnablement.enable(BrooklynFeatureEnablement.FEATURE_CORS_CXF_PROPERTY); --- End diff -- I meant, the current test function contains 4 separate tests. I would break those 4 down into their own test function to be more readable. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui issue #32: Make absolute paths relative
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-ui/pull/32 @m4rkmckenna Cannot see the changes --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server issue #567: Add catalog "itemType" to the CatalogItemSummary...
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-server/pull/567 @drigodwin Tests pass on Jenkins now --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server issue #567: Add catalog "itemType" to the CatalogItemSummary...
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-server/pull/567 @drigodwin Tried 2 times locally, the tests pass. I'll trigger another jenkins build to make sure it was not a false-positive --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server issue #358: Allow REST API to return the config key's constr...
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-server/pull/358 @neykov Comment addressed --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server issue #354: Config keys and parameters can now be marked as ...
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-server/pull/354 Close this in favor of #358 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server pull request #354: Config keys and parameters can now be mar...
Github user tbouron closed the pull request at: https://github.com/apache/brooklyn-server/pull/354 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-library issue #65: Implements new constraint API
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-library/pull/65 Not valid anymore as https://github.com/apache/brooklyn-server/pull/358 does not change the internal API anymore --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-library pull request #65: Implements new constraint API
Github user tbouron closed the pull request at: https://github.com/apache/brooklyn-library/pull/65 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server pull request #358: Allow REST API to return the pinned confi...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/358#discussion_r81173978 --- Diff: camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/catalog/SpecParameterParsingTest.java --- @@ -66,19 +66,20 @@ public void testYamlInputsParsed() { "- simple", "- name: explicit_name", "- name: third_input", -" type: integer"); +" type: integer", +" pinned: true"); EntitySpec item = mgmt().getTypeRegistry().createSpec(mgmt().getTypeRegistry().get(itemId), null, EntitySpec.class); List<SpecParameter> inputs = item.getParameters(); assertEquals(inputs.size(), 6); SpecParameter firstInput = inputs.get(0); assertEquals(firstInput.getLabel(), "simple"); -assertEquals(firstInput.isPinned(), true); +assertEquals(firstInput.isPinned(), false); --- End diff -- I changed the annotation `@CatalogConfig`, forgot about the YAML parsing... Updating now --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server pull request #358: Allow REST API to return the pinned confi...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/358#discussion_r81181965 --- Diff: camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/catalog/SpecParameterParsingTest.java --- @@ -66,19 +66,20 @@ public void testYamlInputsParsed() { "- simple", "- name: explicit_name", "- name: third_input", -" type: integer"); +" type: integer", +" pinned: true"); EntitySpec item = mgmt().getTypeRegistry().createSpec(mgmt().getTypeRegistry().get(itemId), null, EntitySpec.class); List<SpecParameter> inputs = item.getParameters(); assertEquals(inputs.size(), 6); SpecParameter firstInput = inputs.get(0); assertEquals(firstInput.getLabel(), "simple"); -assertEquals(firstInput.isPinned(), true); +assertEquals(firstInput.isPinned(), false); --- End diff -- @neykov addressed --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server pull request #358: Allow REST API to return the pinned confi...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/358#discussion_r81188720 --- Diff: core/src/main/java/org/apache/brooklyn/core/config/BasicConfigKey.java --- @@ -184,7 +192,7 @@ public String getDescription() { protected boolean reconfigurable; protected ConfigInheritance typeInheritance; protected ConfigInheritance runtimeInheritance; -protected Predicate constraint; +protected List<Predicate> constraints; --- End diff -- But this is the whole point of this change, expose the constraints as a list of string on the REST API. I thought about doing the change you are suggesting @neykov (looking into the `Predicates.and()`) but there is no way to get back the underlying predicates. Reverting would mean to support only one predicate at a time which is a contradiction with the current YAML implementation (can specify more than one) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server pull request #358: Allow REST API to return the pinned confi...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/358#discussion_r8119 --- Diff: rest/rest-api/src/main/java/org/apache/brooklyn/rest/domain/EntityConfigSummary.java --- @@ -18,43 +18,82 @@ */ package org.apache.brooklyn.rest.domain; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.google.common.collect.ImmutableMap; - -import org.apache.brooklyn.config.ConfigKey; - import java.net.URI; import java.util.List; import java.util.Map; import java.util.Objects; +import javax.annotation.Nullable; + +import org.apache.brooklyn.config.ConfigKey; +import org.apache.brooklyn.util.text.StringPredicates; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.google.common.base.Function; +import com.google.common.base.Predicate; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Iterables; + public class EntityConfigSummary extends ConfigSummary { private static final long serialVersionUID = -1336134336883426030L; @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) +private final Boolean pinned; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) +private final List constraints; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) private final Map<String, URI> links; public EntityConfigSummary( @JsonProperty("name") String name, @JsonProperty("type") String type, @JsonProperty("description") String description, @JsonProperty("defaultValue") Object defaultValue, -@JsonProperty("reconfigurable") boolean reconfigurable, +@JsonProperty("reconfigurable") Boolean reconfigurable, --- End diff -- That's a mistake, I'll revert back --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server issue #358: Allow REST API to return the pinned config key a...
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-server/pull/358 @neykov You can do it from the [Github UI directly](https://help.github.com/articles/merging-a-pull-request/#merging-a-pull-request-using-the-github-web-interface) ;) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server issue #358: Allow REST API to return the pinned config key a...
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-server/pull/358 @neykov Comments addressed --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-docs pull request #112: Add documentation about pinned field for Br...
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-docs/pull/112 Add documentation about pinned field for Brooklyn parameters This depends on https://github.com/apache/brooklyn-server/pull/354 You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-docs fix/priority-vs-pinned Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-docs/pull/112.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 #112 commit d12e619252dc087cf5e8b3c7c4ee53d5f246f7a1 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-09-27T11:19:16Z Add documentation about pinned field for Brooklyn parameters --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server pull request #354: Config keys and parameters can now be mar...
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-server/pull/354 Config keys and parameters can now be marked as "pinned" The new behaviour is as follow: - By default, config keys and parameters are `pinned = false` - A blueprint can specify a config key or parameter as pinned by using `@CatalogConfig(pinned = true)` or in yaml `pinned: true` - In case of config keys or parameters pinned in YAML, the priority is auto incremented to keep the order (code lost in [this commit](https://github.com/apache/brooklyn-server/commit/6f624c78b1e7fe72c6df1ecd297b922721b2c023#diff-5310fbeb1f42a3a4cf0508ea441440baL82)) Tests have been updated. Changes in docs and JSGUI coming soon. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-server fix/priority-vs-pinned Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-server/pull/354.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 #354 commit d02e73ea87c60d517ac146c3888a7796ee74f7a3 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-09-27T11:06:32Z Config keys and parameters can now be marked as "pinned" regardless of their priority --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request #34: Use new pinned and constraints flag returned b...
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-ui/pull/34 Use new pinned and constraints flag returned by the REST API This allows the UI to work out which parameters need to be displayed on the app wizard, following this convention: - if a parameter if marked as `pinned`, it is always displayed - if a parameter has a `required` constraint and empty `defaultValue`, it is displayed Everything is sorted by the priority You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-ui fix/parameter-contraints Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-ui/pull/34.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 #34 commit b507049801f45b8a3fa353045ef6eac678761786 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-09-28T11:41:54Z Use new pinned and constraints flag to work out which parameter need to be displayed on the app wizard --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server pull request #358: Allow REST API to return the config key's...
GitHub user tbouron opened a pull request: https://github.com/apache/brooklyn-server/pull/358 Allow REST API to return the config key's constraints for catalog apps Based on https://github.com/apache/brooklyn-server/pull/354 (needs to be merged first) This changes the underlying structure of how the constraints are stored for the config keys. Instead of a single field `Predicates.and(Predicates...)`, there is a `Map<String, Predicate>` to store the keys and predicates to use. This allows the REST API to returns what constraint (keys) a config key is using. The validation still do a `AND` to validate the value. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tbouron/brooklyn-server fix/parameter-contraints Alternatively you can review and apply these changes as the patch at: https://github.com/apache/brooklyn-server/pull/358.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 #358 commit d02e73ea87c60d517ac146c3888a7796ee74f7a3 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-09-27T11:06:32Z Config keys and parameters can now be marked as "pinned" regardless of their priority commit bdd1f726cf4af3bfc9e3f66191cbf4b77520f243 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> Date: 2016-09-28T11:38:12Z Expose config keys constraints on the REST API --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-library issue #65: Implements new constraint API
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-library/pull/65 Failure expected, needs https://github.com/apache/brooklyn-server/pull/354 and https://github.com/apache/brooklyn-server/pull/358 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-server issue #358: Allow REST API to return the config key's constr...
Github user tbouron commented on the issue: https://github.com/apache/brooklyn-server/pull/358 FYI, I tested before pushing. I also just retested locally and all tests pass. Not sure what is going on here --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request #34: Use new pinned and constraints flag returned b...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-ui/pull/34#discussion_r81367055 --- Diff: src/main/webapp/assets/js/view/application-add-wizard.js --- @@ -680,10 +680,12 @@ define([ this.$('.required-config-loading').hide() if (catalogEntryItem!=null && catalogEntryItem.config!=null) { var that = this -_.each(catalogEntryItem.config, function (cfg) { -if (cfg.priority !== undefined) { +_.chain(catalogEntryItem.config).sortBy(function (cfg){ +return !isNaN(cfg.priority) ? cfg.priority : 9; +}).each(function (cfg) { +if (cfg.pinned === true || (cfg.contraints.indexOf('required') > -1 && typeof cfg.defaultValue === 'string' && cfg.defaultValue === '')) { --- End diff -- > This doesn't handle defaultValue == null (or is null converted to '' somethere?). Could do This would never happens as the REST API returns the `Predicate.toString()` --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request #34: Use new pinned and constraints flag returned b...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-ui/pull/34#discussion_r81367589 --- Diff: src/main/webapp/assets/js/view/application-add-wizard.js --- @@ -680,10 +680,12 @@ define([ this.$('.required-config-loading').hide() if (catalogEntryItem!=null && catalogEntryItem.config!=null) { var that = this -_.each(catalogEntryItem.config, function (cfg) { -if (cfg.priority !== undefined) { +_.chain(catalogEntryItem.config).sortBy(function (cfg){ +return !isNaN(cfg.priority) ? cfg.priority : 9; +}).each(function (cfg) { +if (cfg.pinned === true || (cfg.contraints.indexOf('required') > -1 && typeof cfg.defaultValue === 'string' && cfg.defaultValue === '')) { --- End diff -- > Would be weird to have a defaultValue the empty string and required at the same time, but you never know :) That's the point of this check, what if as a blueprint author I want to ensure that one of my parameter has be filled without giving it a default? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-ui pull request #34: Use new pinned and constraints flag returned b...
Github user tbouron commented on a diff in the pull request: https://github.com/apache/brooklyn-ui/pull/34#discussion_r81368420 --- Diff: src/main/webapp/assets/js/view/application-add-wizard.js --- @@ -680,10 +680,12 @@ define([ this.$('.required-config-loading').hide() if (catalogEntryItem!=null && catalogEntryItem.config!=null) { var that = this -_.each(catalogEntryItem.config, function (cfg) { -if (cfg.priority !== undefined) { +_.chain(catalogEntryItem.config).sortBy(function (cfg){ +return !isNaN(cfg.priority) ? cfg.priority : 9; --- End diff -- Do you really want me to change it again? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---