diff --git a/XenModel/Messages.Designer.cs b/XenModel/Messages.Designer.cs
index baacf9352..6c5ae74d5 100644
--- a/XenModel/Messages.Designer.cs
+++ b/XenModel/Messages.Designer.cs
@@ -1096,7 +1096,7 @@ namespace XenAdmin {
}
///
- /// Looks up a localized string similar to Preparing Storage Repositories.
+ /// Looks up a localized string similar to Storage Repositories prepared.
///
public static string ACTION_MULTIPLE_DR_TASK_CREATE_END {
get {
@@ -1105,7 +1105,7 @@ namespace XenAdmin {
}
///
- /// Looks up a localized string similar to Storage Repositories prepared.
+ /// Looks up a localized string similar to Preparing Storage Repositories.
///
public static string ACTION_MULTIPLE_DR_TASK_CREATE_START {
get {
diff --git a/XenModel/Messages.resx b/XenModel/Messages.resx
index da359450f..aa1d5d207 100644
--- a/XenModel/Messages.resx
+++ b/XenModel/Messages.resx
@@ -463,10 +463,10 @@
Moving {0} virtual disks to {1}
- Preparing Storage Repositories
+ Storage Repositories prepared
- Storage Repositories prepared
+ Preparing Storage Repositories
Prepare Storage Repositories
diff --git a/XenModel/Utils/Helpers.cs b/XenModel/Utils/Helpers.cs
index b4a065c08..25d5106b9 100644
--- a/XenModel/Utils/Helpers.cs
+++ b/XenModel/Utils/Helpers.cs
@@ -1836,5 +1836,17 @@ namespace XenAdmin.Core
return connection.Cache.Hosts.Any(h => h.enabled);
}
+
+ ///
+ /// Returns true if given method exists already; false otherwise
+ ///
+ ///
+ ///
+ ///
+ public static bool MethodExists(Session session, string methodName)
+ {
+ string[] methods = session.proxy.SystemListMethods();
+ return methods.Contains(methodName);
+ }
}
}
diff --git a/XenModel/XenAPI-Extensions/VM.cs b/XenModel/XenAPI-Extensions/VM.cs
index 56f058ef5..e6129c3e4 100644
--- a/XenModel/XenAPI-Extensions/VM.cs
+++ b/XenModel/XenAPI-Extensions/VM.cs
@@ -1423,7 +1423,9 @@ namespace XenAPI
public static List> GetDRMissingSRs(Session session, string vm, string sessionTo)
{
- return VM.get_SRs_required_for_recovery(session, vm, sessionTo);
+ return Helpers.MethodExists(session, "VM.get_SRs_required_for_recovery")
+ ? VM.get_SRs_required_for_recovery(session, vm, sessionTo)
+ : null;
}
}
diff --git a/XenModel/XenAPI-Extensions/VM_appliance.cs b/XenModel/XenAPI-Extensions/VM_appliance.cs
index 1416adca3..40ad8a1a4 100644
--- a/XenModel/XenAPI-Extensions/VM_appliance.cs
+++ b/XenModel/XenAPI-Extensions/VM_appliance.cs
@@ -31,6 +31,7 @@
using System.Collections.Generic;
using System.Linq;
+using XenAdmin.Core;
namespace XenAPI
{
@@ -92,7 +93,9 @@ namespace XenAPI
public static List> GetDRMissingSRs(Session session, string vm, string sessionTo)
{
- return VM_appliance.get_SRs_required_for_recovery(session, vm, sessionTo);
+ return Helpers.MethodExists(session, "VM_appliance.get_SRs_required_for_recovery")
+ ? VM_appliance.get_SRs_required_for_recovery(session, vm, sessionTo)
+ : null;
}
}
}