DaanHoogland commented on a change in pull request #3350: Get Diagnostics:
Download logs and diagnostics data from SSVM, CPVM, Router
URL: https://github.com/apache/cloudstack/pull/3350#discussion_r357229159
##########
File path:
plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
##########
@@ -5604,4 +5607,67 @@ public boolean attachConfigDriveToMigratedVm(Connection
conn, String vmName, Str
}
+ /**
+ * Get Diagnostics Data API
+ * Copy zip file from system vm and copy file directly to secondary storage
+ */
+ public Answer copyDiagnosticsFileToSecondaryStorage(Connection conn,
CopyToSecondaryStorageCommand cmd) {
+ String secondaryStorageUrl = cmd.getSecondaryStorageUrl();
+ String vmIP = cmd.getSystemVmIp();
+ String diagnosticsZipFile = cmd.getFileName();
+
+ String localDir = null;
+ boolean success;
+
+ // Mount Secondary storage
+ String secondaryStorageMountPath = null;
+ try {
+ URI uri = new URI(secondaryStorageUrl);
+ secondaryStorageMountPath = uri.getHost() + ":" + uri.getPath();
+ localDir = "/var/cloud_mount/" +
UUID.nameUUIDFromBytes(secondaryStorageMountPath.getBytes());
Review comment:
if there is really no other way!??! and i know there is, this is c&p i know,
but still.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services