Greg Padgett has uploaded a new change for review.

Change subject: core: show iqn in audit log when SD partially inaccessible
......................................................................

core: show iqn in audit log when SD partially inaccessible

In addition to showing the LUN id (commit 551b26cd), also log the iqn.

Change-Id: If6f4f4c5e176e06cceeda7a7fed29565eead369b
Bug-Url: https://bugzilla.redhat.com/854214
Signed-off-by: Greg Padgett <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHelperBase.java
1 file changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/98/8598/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHelperBase.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHelperBase.java
index fdd0907..d35814f 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHelperBase.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHelperBase.java
@@ -134,7 +134,7 @@
             List<storage_server_connections> connections, LUNs lun) {
         AuditLogableBase logable = new AuditLogableBase();
 
-        String connectionField = getConnectionField(connections, connection) +
+        String connectionField = getConnectionDescription(connections, 
connection) +
                 (lun == null ? "" : " (LUN " + lun.getphysical_volume_id() + 
")");
         logable.AddCustomValue("Connection", connectionField);
 
@@ -175,14 +175,18 @@
         return translatedError;
     }
 
-    private String getConnectionField(List<storage_server_connections> 
connections, String connectionId) {
+    private String getConnectionDescription(List<storage_server_connections> 
connections, String connectionId) {
         // Using Guid in order to handle nulls. This can happened when we 
trying
         // to import an existing domain
         Guid connectionIdGuid = Guid.createGuidFromString(connectionId);
         for (storage_server_connections connection : connections) {
             Guid connectionGuid = 
Guid.createGuidFromString(connection.getid());
             if (connectionGuid.equals(connectionIdGuid)) {
-                return connection.getconnection();
+                String desc = connection.getconnection();
+                if (connection.getiqn() != null) {
+                    desc = desc + " " + connection.getiqn();
+                }
+                return desc;
             }
         }
         return "";


--
To view, visit http://gerrit.ovirt.org/8598
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If6f4f4c5e176e06cceeda7a7fed29565eead369b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to