You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by GitBox <gi...@apache.org> on 2021/06/10 11:11:03 UTC
[GitHub] [brooklyn-server] iuliana opened a new pull request #1187: Added support for tagged bundles
iuliana opened a new pull request #1187:
URL: https://github.com/apache/brooklyn-server/pull/1187
Tags added to the blueprint in composer, are set on the bundle when added to the catalog.
This PR should be merged together with this one: https://github.com/apache/brooklyn-ui/pull/219
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [brooklyn-server] iuliana commented on a change in pull request #1187: Added support for tagged bundles
Posted by GitBox <gi...@apache.org>.
iuliana commented on a change in pull request #1187:
URL: https://github.com/apache/brooklyn-server/pull/1187#discussion_r650174343
##########
File path: core/src/main/java/org/apache/brooklyn/core/typereg/BrooklynBomYamlCatalogBundleResolver.java
##########
@@ -115,10 +115,16 @@ protected double scoreForNullFormat(Supplier<InputStream> f) {
OsgiBundleInstallationResult result;
try {
+
+ BasicManagedBundle basicManagedBundle = new BasicManagedBundle(vn.getSymbolicName(), vn.getVersionString(),
+ null, BrooklynBomBundleCatalogBundleResolver.FORMAT,
+ null, null);
+ // if the submitted blueprint contains tags, we set them on the bundle, so they can be picked up and used to tag the plan.
+ if( cm.containsKey("tags")) {
+ basicManagedBundle.tags().addTags((Iterable<?>)cm.get("tags"));
Review comment:
Nope.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [brooklyn-server] iuliana commented on a change in pull request #1187: Added support for tagged bundles
Posted by GitBox <gi...@apache.org>.
iuliana commented on a change in pull request #1187:
URL: https://github.com/apache/brooklyn-server/pull/1187#discussion_r650722425
##########
File path: core/src/main/java/org/apache/brooklyn/core/typereg/BrooklynBomYamlCatalogBundleResolver.java
##########
@@ -115,10 +115,16 @@ protected double scoreForNullFormat(Supplier<InputStream> f) {
OsgiBundleInstallationResult result;
try {
+
+ BasicManagedBundle basicManagedBundle = new BasicManagedBundle(vn.getSymbolicName(), vn.getVersionString(),
+ null, BrooklynBomBundleCatalogBundleResolver.FORMAT,
+ null, null);
+ // if the submitted blueprint contains tags, we set them on the bundle, so they can be picked up and used to tag the plan.
+ if( cm.containsKey("tags")) {
+ basicManagedBundle.tags().addTags((Iterable<?>)cm.get("tags"));
Review comment:
@algairim Tags should not be anything else but `Iterable`, but just in case somebody has made a mistake and put something else, we do not want to prevent the bundle from deploying. Tags are not really that important after all. So I added a condition for the tags to be added only when `Iterable`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [brooklyn-server] algairim commented on a change in pull request #1187: Added support for tagged bundles
Posted by GitBox <gi...@apache.org>.
algairim commented on a change in pull request #1187:
URL: https://github.com/apache/brooklyn-server/pull/1187#discussion_r650734508
##########
File path: core/src/main/java/org/apache/brooklyn/core/typereg/BrooklynBomYamlCatalogBundleResolver.java
##########
@@ -115,10 +115,16 @@ protected double scoreForNullFormat(Supplier<InputStream> f) {
OsgiBundleInstallationResult result;
try {
+
+ BasicManagedBundle basicManagedBundle = new BasicManagedBundle(vn.getSymbolicName(), vn.getVersionString(),
+ null, BrooklynBomBundleCatalogBundleResolver.FORMAT,
+ null, null);
+ // if the submitted blueprint contains tags, we set them on the bundle, so they can be picked up and used to tag the plan.
+ if( cm.containsKey("tags")) {
+ basicManagedBundle.tags().addTags((Iterable<?>)cm.get("tags"));
Review comment:
Ok, convinced.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [brooklyn-server] algairim commented on a change in pull request #1187: Added support for tagged bundles
Posted by GitBox <gi...@apache.org>.
algairim commented on a change in pull request #1187:
URL: https://github.com/apache/brooklyn-server/pull/1187#discussion_r650041444
##########
File path: core/src/main/java/org/apache/brooklyn/core/typereg/BrooklynBomYamlCatalogBundleResolver.java
##########
@@ -115,10 +115,16 @@ protected double scoreForNullFormat(Supplier<InputStream> f) {
OsgiBundleInstallationResult result;
try {
+
+ BasicManagedBundle basicManagedBundle = new BasicManagedBundle(vn.getSymbolicName(), vn.getVersionString(),
+ null, BrooklynBomBundleCatalogBundleResolver.FORMAT,
+ null, null);
+ // if the submitted blueprint contains tags, we set them on the bundle, so they can be picked up and used to tag the plan.
+ if( cm.containsKey("tags")) {
+ basicManagedBundle.tags().addTags((Iterable<?>)cm.get("tags"));
Review comment:
Can `tags` value be a non-Iterable?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [brooklyn-server] iuliana merged pull request #1187: Added support for tagged bundles
Posted by GitBox <gi...@apache.org>.
iuliana merged pull request #1187:
URL: https://github.com/apache/brooklyn-server/pull/1187
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org