cloudstack/plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers
Donal Lafferty 1601498bd7 Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better
to be on v2 namespace.
2013-11-04 18:48:54 +05:30
..
Properties A plugin for Hyper-V control is available for CloudStack. The plugin implements basic VM control; however, its 2013-11-04 18:48:53 +05:30
ROOT.CIMV2.Win32_OperatingSystem.cs A plugin for Hyper-V control is available for CloudStack. The plugin implements basic VM control; however, its 2013-11-04 18:48:53 +05:30
ROOT.CIMV2.Win32_Processor.cs A plugin for Hyper-V control is available for CloudStack. The plugin implements basic VM control; however, its 2013-11-04 18:48:53 +05:30
ROOT.virtualization.v2.Msvm_ComputerSystem.cs Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
ROOT.virtualization.v2.Msvm_ConcreteJob.cs A plugin for Hyper-V control is available for CloudStack. The plugin implements basic VM control; however, its 2013-11-04 18:48:53 +05:30
ROOT.virtualization.v2.Msvm_EthernetPortAllocationSettingData.cs Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
ROOT.virtualization.v2.Msvm_EthernetSwitchPort.cs Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
ROOT.virtualization.v2.Msvm_EthernetSwitchPortVlanSettingData.cs Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
ROOT.virtualization.v2.Msvm_ExternalEthernetPort.cs Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
ROOT.virtualization.v2.Msvm_ImageManagementService.cs Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
ROOT.virtualization.v2.Msvm_KvpExchangeComponent.cs Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
ROOT.virtualization.v2.Msvm_KvpExchangeComponentSettingData.cs A plugin for Hyper-V control is available for CloudStack. The plugin implements basic VM control; however, its 2013-11-04 18:48:53 +05:30
ROOT.virtualization.v2.Msvm_KvpExchangeDataItem.cs A plugin for Hyper-V control is available for CloudStack. The plugin implements basic VM control; however, its 2013-11-04 18:48:53 +05:30
ROOT.virtualization.v2.Msvm_LANEndpoint.cs Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
ROOT.virtualization.v2.Msvm_MemorySettingData.cs Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
ROOT.virtualization.v2.Msvm_ProcessorSettingData.cs Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
ROOT.virtualization.v2.Msvm_ResourceAllocationSettingData.cs Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
ROOT.virtualization.v2.Msvm_StorageAllocationSettingData.cs Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
ROOT.virtualization.v2.Msvm_SummaryInformation.cs Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
ROOT.virtualization.v2.Msvm_SyntheticEthernetPortSettingData.cs Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
ROOT.virtualization.v2.Msvm_VirtualEthernetSwitch.cs Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
ROOT.virtualization.v2.Msvm_VirtualEthernetSwitchManagementService.cs Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
ROOT.virtualization.v2.Msvm_VirtualHardDiskSettingData.cs Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
ROOT.virtualization.v2.Msvm_VirtualSystemManagementService.cs Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
ROOT.virtualization.v2.Msvm_VirtualSystemManagementServiceSettingData.cs Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
ROOT.virtualization.v2.Msvm_VirtualSystemSettingData.cs A plugin for Hyper-V control is available for CloudStack. The plugin implements basic VM control; however, its 2013-11-04 18:48:53 +05:30
Readme.txt A plugin for Hyper-V control is available for CloudStack. The plugin implements basic VM control; however, its 2013-11-04 18:48:53 +05:30
WmiWrappers.csproj Changes for switching all wmi calls to V2 namespace. V1 namespace is deprecated so it is better 2013-11-04 18:48:54 +05:30
root.CIMV2.Win32_PerfFormattedData_Counters_ProcessorInformation.cs A plugin for Hyper-V control is available for CloudStack. The plugin implements basic VM control; however, its 2013-11-04 18:48:53 +05:30

Readme.txt

Classes were generated on a hyper-v server using the Visual Studio GUI, but you can do the same using
mgmtclassgen.exe.  Below are some examples:

mgmtclassgen.exe Msvm_ComputerSystem /N root\virtualization /L CS /O CloudStack.Plugin.WmiWrappers /P ComputerSystem.cs
mgmtclassgen.exe Msvm_VirtualSystemManagementService /N root\virtualization /L CS /O CloudStack.Plugin.WmiWrappers /P VirtualSystemManagementService.cs
mgmtclassgen.exe Msvm_VirtualSystemGlobalSettingData /N root\virtualization /L CS /O CloudStack.Plugin.WmiWrappers /P VirtualSystemGlobalSettingData.cs


BUT, you have to tweak the generated code, because it does not deal with NULL method parameters properly.
E.g. when a method completes immediately, the returned out parameters include a "Job" property that has a NULL value.
The generated code will attempt to call ToString() on this NULL value.

ALSO, you have to tweak the generated code to expose useful details such as the WMI name for the class.
E.g. the generated code creates a wrapper called class ComputerSystem for WMI objects of class Msvm_ComputerSystem.
Thus, there is a mismatch in the class name and the corresponding WMI class, and the WMI class name is a private
constant static member.  The tweak involves making this member public.