You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by de...@apache.org on 2013/10/28 07:05:05 UTC

[39/54] git commit: updated refs/heads/hyperv to a27899a

Rearrange code to make it clearer what .NET objects are being used.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1edd3009
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1edd3009
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1edd3009

Branch: refs/heads/hyperv
Commit: 1edd300966ce11e1d59e4b1ff9feaaa77f531f5b
Parents: 53fd4e8
Author: Donal Lafferty <do...@citrix.com>
Authored: Thu Oct 10 18:13:52 2013 +0530
Committer: Devdeep Singh <de...@gmail.com>
Committed: Thu Oct 10 18:16:16 2013 +0530

----------------------------------------------------------------------
 .../hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1edd3009/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
index 3f2761f..7557320 100755
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
@@ -56,11 +56,10 @@ namespace HypervResource
             kvpItem.LateBoundObject["Source"] = 0;
             logger.Debug("VM " + vm.Name + " gets userdata " + userData);
 
-            String kvpStr = kvpItem.LateBoundObject.GetText(TextFormat.CimDtd20);
-
             // Update the resource settings for the VM.
-            ManagementPath jobPath;
-
+            System.Management.ManagementBaseObject kvpMgmtObj = kvpItem.LateBoundObject;
+            System.Management.ManagementPath jobPath;
+            String kvpStr = kvpMgmtObj.GetText(System.Management.TextFormat.CimDtd20);
             uint ret_val = vmMgmtSvc.AddKvpItems(new String[] { kvpStr }, vm.Path, out jobPath);
 
             // If the Job is done asynchronously