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 <[email protected]>
Authored: Thu Oct 10 18:13:52 2013 +0530
Committer: Devdeep Singh <[email protected]>
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

Reply via email to