You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2021/10/04 11:21:45 UTC

[brooklyn-server] 09/14: add who installs a bundle

This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git

commit f344d9b2a529cae68d82637cad370e1b31ec7e8f
Author: Alex Heneveld <al...@cloudsoftcorp.com>
AuthorDate: Fri Oct 1 19:26:48 2021 +0100

    add who installs a bundle
---
 .../apache/brooklyn/core/typereg/BrooklynCatalogBundleResolvers.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/core/src/main/java/org/apache/brooklyn/core/typereg/BrooklynCatalogBundleResolvers.java b/core/src/main/java/org/apache/brooklyn/core/typereg/BrooklynCatalogBundleResolvers.java
index cee224c..5632bca 100644
--- a/core/src/main/java/org/apache/brooklyn/core/typereg/BrooklynCatalogBundleResolvers.java
+++ b/core/src/main/java/org/apache/brooklyn/core/typereg/BrooklynCatalogBundleResolvers.java
@@ -31,6 +31,7 @@ import org.apache.brooklyn.api.framework.FrameworkLookup;
 import org.apache.brooklyn.api.mgmt.ManagementContext;
 import org.apache.brooklyn.api.typereg.RegisteredType;
 import org.apache.brooklyn.api.typereg.RegisteredTypeLoadingContext;
+import org.apache.brooklyn.core.mgmt.entitlement.Entitlements;
 import org.apache.brooklyn.core.mgmt.ha.BrooklynBomOsgiArchiveInstaller;
 import org.apache.brooklyn.core.mgmt.ha.BrooklynBomOsgiArchiveInstaller.PrepareInstallResult;
 import org.apache.brooklyn.core.mgmt.ha.OsgiBundleInstallationResult;
@@ -109,7 +110,7 @@ public class BrooklynCatalogBundleResolvers {
 
     public static ReferenceWithError<OsgiBundleInstallationResult> install(ManagementContext mgmt, Supplier<InputStream> input,
                                                                            BundleInstallationOptions options) {
-        LOG.debug("Installing bundle {} / {}", input, (options==null ? null : options.knownBundleMetadata));
+        LOG.debug("Installing bundle {} / {} for {}", input, (options==null ? null : options.knownBundleMetadata), Entitlements.getEntitlementContextUser());
         File fileToDelete = null;
         if (input==null && options.knownBundleMetadata==null) {
             return ReferenceWithError.newInstanceThrowingError(null, new IllegalArgumentException("Bundle contents or reference must be supplied"));
@@ -152,7 +153,7 @@ public class BrooklynCatalogBundleResolvers {
                         firstResult = result.getWithoutError();
                     }
                     result.get();  // assert there is no error
-                    LOG.debug("Installed bundle {} / {}: {}: {}", input, (options==null ? null : options.knownBundleMetadata), result.get().getCode(), result.get().getMessage());
+                    LOG.debug("Installed bundle {} / {} for {}: {}: {}", input, (options==null ? null : options.knownBundleMetadata), Entitlements.getEntitlementContextUser(), result.get().getCode(), result.get().getMessage());
                     return result;
                 } catch (@SuppressWarnings("deprecation") UnsupportedCatalogBundleException e) {
                     resolversWhoDontSupport.add(t.getFormatCode() +