mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Make sure only unit tests are run during build time and not functional tests.
Fixing rebase issues after integrating with wmi v2 implementation. Removing the executable attribute from some files. Remove the unused wmi v1 interface file. Unit test for DestroyCommand implementation in hyperv agent. Fixed VM state changes w.r.t wmi version 2 changes If a VM is already running, deploy virtual machine shouldn't fail and throw an exception. Don't run vhd-util on templates which are present on CIFS. Hyperv uses cifs as secondary storage Add a SCSI controller by default. This is needed so that data volumes can be added/removed on a running vm. Remove the hard coded path in the agent code. Rat fixes for hyper agent. Added the missing headers in files where it was missing.
This commit is contained in:
parent
1601498bd7
commit
d14592fe93
@ -1,6 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
license agreements. See the NOTICE file distributed with this work for additional
|
||||
information regarding copyright ownership. The ASF licenses this file to you under
|
||||
the Apache License, Version 2.0 (the "License"); you may not use this file except
|
||||
in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software distributed under
|
||||
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
|
||||
OF ANY KIND, either express or implied. See the License for the specific language
|
||||
governing permissions and limitations under the License. -->
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<solution>
|
||||
<add key="disableSourceControlIntegration" value="true" />
|
||||
</solution>
|
||||
</configuration>
|
||||
</configuration>
|
||||
|
||||
@ -1,12 +1,19 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.AgentShell {
|
||||
|
||||
|
||||
@ -1,4 +1,23 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="CloudStack.Plugin.AgentShell" GeneratedClassName="AgentSettings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
|
||||
@ -1,4 +1,21 @@
|
||||
using System.Reflection;
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
@ -36,4 +53,4 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
||||
|
||||
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
|
||||
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
|
||||
|
||||
@ -196,10 +196,6 @@ namespace HypervResource
|
||||
try
|
||||
{
|
||||
string vmName = (string)cmd.vmName;
|
||||
// TODO: remove absolute path
|
||||
string isoPath = "\\\\10.102.192.150\\SMB-Share\\202-2-305ed1f7-1be8-345e-86c3-a976f7f57f10.iso";
|
||||
wmiCallsV2.AttachIso(vmName, isoPath);
|
||||
|
||||
result = true;
|
||||
}
|
||||
catch (Exception sysEx)
|
||||
@ -986,7 +982,7 @@ namespace HypervResource
|
||||
}
|
||||
}
|
||||
|
||||
// POST api/HypervResource/StartupCommand
|
||||
// POST api/HypervResource/CopyCommand
|
||||
[HttpPost]
|
||||
[ActionName(CloudStackTypes.CopyCommand)]
|
||||
public JContainer CopyCommand(dynamic cmd)
|
||||
|
||||
@ -1,44 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION;
|
||||
using System.Management;
|
||||
|
||||
namespace HypervResource
|
||||
{
|
||||
public interface IWmiCalls
|
||||
{
|
||||
ComputerSystem CreateVM(string name, long memory_mb, int vcpus);
|
||||
void DestroyVm(string displayName);
|
||||
void DestroyVm(dynamic jsonObj);
|
||||
void patchSystemVmIso(String vmName, String systemVmIso);
|
||||
void AttachIso(string displayName, string iso);
|
||||
void GetProcessorResources(out uint cores, out uint mhz);
|
||||
void GetMemoryResources(out ulong physicalRamKBs, out ulong freeMemoryKBs);
|
||||
string GetDefaultVirtualDiskFolder();
|
||||
ComputerSystem DeployVirtualMachine(dynamic jsonObj, string systemVmIso);
|
||||
ComputerSystem GetComputerSystem(string displayName);
|
||||
void GetProcessorUsageInfo(out double cpuUtilization);
|
||||
SyntheticEthernetPortSettingData CreateNICforVm(ComputerSystem vm, string mac, string vlan);
|
||||
ManagementPath AddDiskDriveToVm(ComputerSystem vm, string vhdfile, string cntrllerAddr, string driveResourceType);
|
||||
void SetState(ComputerSystem vm, ushort requiredState);
|
||||
bool DeleteSwitchPort(string elementName);
|
||||
VLANEndpointSettingData GetVlanEndpointSettings(VirtualSwitchManagementService vmNetMgmtSvc, ManagementPath newSwitchPath);
|
||||
VirtualSwitch GetExternalVirtSwitch();
|
||||
VirtualSwitchManagementService GetVirtualSwitchManagementService();
|
||||
void CreateDynamicVirtualHardDisk(ulong MaxInternalSize, string Path);
|
||||
ImageManagementService GetImageManagementService();
|
||||
VirtualSystemManagementService GetVirtualisationSystemManagementService();
|
||||
List<string> GetVmElementNames();
|
||||
ProcessorSettingData GetProcSettings(VirtualSystemSettingData vmSettings);
|
||||
MemorySettingData GetMemSettings(VirtualSystemSettingData vmSettings);
|
||||
ResourceAllocationSettingData GetIDEControllerSettings(VirtualSystemSettingData vmSettings, string cntrllerAddr);
|
||||
ResourceAllocationSettingData.ResourceAllocationSettingDataCollection GetResourceAllocationSettings(VirtualSystemSettingData vmSettings);
|
||||
SwitchPort[] GetSwitchPorts(ComputerSystem vm);
|
||||
SwitchPort GetSwitchPort(SyntheticEthernetPort nic);
|
||||
SyntheticEthernetPortSettingData[] GetEthernetPorts(ComputerSystem vm);
|
||||
VirtualSystemSettingData GetVmSettings(ComputerSystem vm);
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,21 @@
|
||||
using System;
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,4 +1,21 @@
|
||||
using System.Reflection;
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
||||
110
plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
Executable file → Normal file
110
plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
Executable file → Normal file
@ -27,6 +27,8 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using CloudStack.Plugin.WmiWrappers.ROOT.CIMV2;
|
||||
using System.IO;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Net;
|
||||
|
||||
namespace HypervResource
|
||||
{
|
||||
@ -186,6 +188,7 @@ namespace HypervResource
|
||||
}
|
||||
|
||||
public const string IDE_HARDDISK_CONTROLLER = "Microsoft:Hyper-V:Emulated IDE Controller";
|
||||
public const string SCSI_CONTROLLER = "Microsoft:Hyper-V:Synthetic SCSI Controller";
|
||||
public const string IDE_HARDDISK_DRIVE = "Microsoft:Hyper-V:Synthetic Disk Drive";
|
||||
public const string IDE_ISO_DRIVE = "Microsoft:Hyper-V:Synthetic DVD Drive";
|
||||
|
||||
@ -233,10 +236,17 @@ namespace HypervResource
|
||||
logger.InfoFormat("Deleting existing VM with name {0}, before we go on to create a VM with the same name", vmName);
|
||||
DestroyVm(vmName);
|
||||
}
|
||||
else if (vmWmiObj.EnabledState == EnabledState.Enabled)
|
||||
{
|
||||
string infoMsg = string.Format("Create VM discovered there exists a VM with name {0}, state {1}",
|
||||
vmName,
|
||||
EnabledState.ToString(vmWmiObj.EnabledState));
|
||||
logger.Info(infoMsg);
|
||||
return vmWmiObj;
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: revise exception type
|
||||
errMsg = string.Format("Create VM failing, because there exists a VM with name {0}, state {1}",
|
||||
errMsg = string.Format("Create VM failing, because there exists a VM with name {0}, state {1}",
|
||||
vmName,
|
||||
EnabledState.ToString(vmWmiObj.EnabledState));
|
||||
var ex = new WmiException(errMsg);
|
||||
@ -249,6 +259,9 @@ namespace HypervResource
|
||||
logger.DebugFormat("Going ahead with create VM {0}, {1} vcpus, {2}MB RAM", vmName, vcpus, memSize);
|
||||
var newVm = CreateVM(vmName, memSize, vcpus);
|
||||
|
||||
// Add a SCSI controller for attaching/detaching data volumes.
|
||||
AddScsiControllerToVm(newVm);
|
||||
|
||||
foreach (var diskDrive in diskDrives)
|
||||
{
|
||||
string vhdFile = null;
|
||||
@ -322,6 +335,7 @@ namespace HypervResource
|
||||
AddDiskDriveToVm(newVm, vhdFile, ideCtrllr, driveResourceType);
|
||||
}
|
||||
|
||||
String publicIpAddress = "";
|
||||
// Add the Nics to the VM in the deviceId order.
|
||||
for (int i = 0; i <= 2; i++)
|
||||
{
|
||||
@ -345,7 +359,12 @@ namespace HypervResource
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (i == 2)
|
||||
{
|
||||
publicIpAddress = nic.ip;
|
||||
}
|
||||
|
||||
if (nicid == i)
|
||||
{
|
||||
// Create network adapter
|
||||
@ -391,7 +410,7 @@ namespace HypervResource
|
||||
|
||||
}
|
||||
// call patch systemvm iso only for systemvms
|
||||
if (vmName.StartsWith("r-"))
|
||||
if (vmName.StartsWith("r-") || vmName.StartsWith("s-") || vmName.StartsWith("v-"))
|
||||
{
|
||||
patchSystemVmIso(vmName, systemVmIso);
|
||||
}
|
||||
@ -400,16 +419,44 @@ namespace HypervResource
|
||||
SetState(newVm, RequiredState.Enabled);
|
||||
|
||||
// we need to reboot to get the hv kvp daemon get started vr gets configured.
|
||||
if (vmName.StartsWith("r-"))
|
||||
if (vmName.StartsWith("r-") || vmName.StartsWith("s-") || vmName.StartsWith("v-"))
|
||||
{
|
||||
System.Threading.Thread.Sleep(90000);
|
||||
SetState(newVm, RequiredState.Reboot);
|
||||
// wait for the second boot and then return with suces
|
||||
System.Threading.Thread.Sleep(50000);
|
||||
SetState(newVm, RequiredState.Reset);
|
||||
// wait for the second boot and then return with sucesss
|
||||
pingResource(publicIpAddress);
|
||||
}
|
||||
logger.InfoFormat("Started VM {0}", vmName);
|
||||
return newVm;
|
||||
}
|
||||
}
|
||||
|
||||
public static Boolean pingResource(String ip)
|
||||
{
|
||||
PingOptions pingOptions = null;
|
||||
PingReply pingReply = null;
|
||||
IPAddress ipAddress = null;
|
||||
Ping pingSender = new Ping();
|
||||
int numberOfPings = 4;
|
||||
int pingTimeout = 1000;
|
||||
int byteSize = 32;
|
||||
byte[] buffer = new byte[byteSize];
|
||||
ipAddress = IPAddress.Parse(ip);
|
||||
pingOptions = new PingOptions();
|
||||
for (int i = 0; i < numberOfPings; i++)
|
||||
{
|
||||
pingReply = pingSender.Send(ipAddress, pingTimeout, buffer, pingOptions);
|
||||
if (pingReply.Status == IPStatus.Success)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// wait for the second boot and then return with suces
|
||||
System.Threading.Thread.Sleep(30000);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private EthernetPortAllocationSettingData AttachNicToPort(ComputerSystem newVm, SyntheticEthernetPortSettingData newAdapter)
|
||||
{
|
||||
@ -614,6 +661,38 @@ namespace HypervResource
|
||||
return newDrivePaths[0];
|
||||
}
|
||||
|
||||
private ManagementPath AddScsiControllerToVm(ComputerSystem vm)
|
||||
{
|
||||
// A description of the controller is created by modifying a clone of the default ResourceAllocationSettingData for scsi controller
|
||||
string scsiQuery = String.Format("ResourceSubType LIKE \"{0}\" AND InstanceID LIKE \"%Default\"", SCSI_CONTROLLER);
|
||||
var scsiSettings = CloneResourceAllocationSetting(scsiQuery);
|
||||
|
||||
scsiSettings.LateBoundObject["ElementName"] = "SCSI Controller";
|
||||
scsiSettings.CommitObject();
|
||||
|
||||
// Insert SCSI controller into vm
|
||||
string[] newResources = new string[] { scsiSettings.LateBoundObject.GetText(System.Management.TextFormat.CimDtd20) };
|
||||
ManagementPath[] newResourcePaths = AddVirtualResource(newResources, vm);
|
||||
|
||||
// assert
|
||||
if (newResourcePaths.Length != 1)
|
||||
{
|
||||
var errMsg = string.Format(
|
||||
"Failed to add scsi controller to VM {0} (GUID {1}): number of resource created {2}",
|
||||
vm.ElementName,
|
||||
vm.Name,
|
||||
newResourcePaths.Length);
|
||||
var ex = new WmiException(errMsg);
|
||||
logger.Error(errMsg, ex);
|
||||
throw ex;
|
||||
}
|
||||
|
||||
logger.DebugFormat("New controller type {0} WMI path is {1}s",
|
||||
scsiSettings.ResourceSubType,
|
||||
newResourcePaths[0].Path);
|
||||
return newResourcePaths[0];
|
||||
}
|
||||
|
||||
|
||||
private void InsertDiskImage(ComputerSystem vm, string diskImagePath, string diskResourceSubType, ManagementPath drivePath)
|
||||
{
|
||||
@ -1911,13 +1990,13 @@ namespace HypervResource
|
||||
public const UInt16 Disabled = 3; // Turns the VM off.
|
||||
public const UInt16 ShutDown = 4;
|
||||
public const UInt16 Offline = 6;
|
||||
public const UInt16 Test = 7;
|
||||
//public const UInt16 Test = 7;
|
||||
public const UInt16 Defer = 8;
|
||||
public const UInt16 Quiesce = 9;
|
||||
public const UInt16 Reboot = 10; // A hard reset of the VM.
|
||||
// public const UInt16 Quiesce = 9;
|
||||
// public const UInt16 Reboot = 10; // A hard reset of the VM.
|
||||
public const UInt16 Reset = 11; // For future use.
|
||||
public const UInt16 Paused = 32768; // Pauses the VM.
|
||||
public const UInt16 Suspended = 32769; // Saves the state of the VM.
|
||||
public const UInt16 Paused = 9; // Pauses the VM.
|
||||
public const UInt16 Suspended = 32779; // Saves the state of the VM.
|
||||
|
||||
public static string ToString(UInt16 value)
|
||||
{
|
||||
@ -1928,10 +2007,7 @@ namespace HypervResource
|
||||
case Disabled: result = "Disabled"; break;
|
||||
case ShutDown: result = "ShutDown"; break;
|
||||
case Offline: result = "Offline"; break;
|
||||
case Test: result = "Test"; break;
|
||||
case Defer: result = "Defer"; break;
|
||||
case Quiesce: result = "Quiesce"; break;
|
||||
case Reboot: result = "Reboot"; break;
|
||||
case Reset: result = "Reset"; break;
|
||||
}
|
||||
return result;
|
||||
|
||||
@ -212,9 +212,39 @@ namespace ServerResource.Tests
|
||||
sampleTemplateFile.Delete();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Possible additional tests: place an ISO in the drive
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestDestroyCommand()
|
||||
{
|
||||
testSampleVolumeTempURIJSON = "\"storagepool\"";
|
||||
// Arrange
|
||||
String destoryCmd = //"{\"volume\":" + getSampleVolumeObjectTO() + "}";
|
||||
"{\"volume\":{\"name\":\"" + testSampleVolumeTempUUIDNoExt
|
||||
+ "\",\"storagePoolType\":\"Filesystem\","
|
||||
+ "\"mountPoint\":"
|
||||
+ testLocalStorePathJSON
|
||||
+ ",\"path\":" + testSampleVolumeTempURIJSON
|
||||
+ ",\"storagePoolUuid\":\"" + testLocalStoreUUID
|
||||
+ "\","
|
||||
+ "\"type\":\"ROOT\",\"id\":9,\"size\":0}}";
|
||||
|
||||
ImageManagementService imgmgr = new ImageManagementService();
|
||||
wmiCallsV2.GetImageManagementService().Returns(imgmgr);
|
||||
|
||||
HypervResourceController rsrcServer = new HypervResourceController();
|
||||
HypervResourceController.wmiCallsV2 = wmiCallsV2;
|
||||
|
||||
dynamic jsonDestoryCmd = JsonConvert.DeserializeObject(destoryCmd);
|
||||
|
||||
// Act
|
||||
dynamic destoryAns = rsrcServer.DestroyCommand(jsonDestoryCmd);
|
||||
|
||||
// Assert
|
||||
JObject ansAsProperty2 = destoryAns[0];
|
||||
dynamic ans = ansAsProperty2.GetValue(CloudStackTypes.Answer);
|
||||
String path = jsonDestoryCmd.volume.path;
|
||||
Assert.True((bool)ans.result, "DestroyCommand did not succeed " + ans.details);
|
||||
Assert.True(!File.Exists(path), "Failed to delete file " + path);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestStartCommand()
|
||||
|
||||
@ -1,4 +1,21 @@
|
||||
using System.Reflection;
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
||||
@ -92,7 +92,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="HypervResourceController1Test.cs" />
|
||||
<Compile Include="HypervResourceControllerTest.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<!--<Compile Include="HypervResourceControllerTest.cs" /> -->
|
||||
</ItemGroup>
|
||||
@ -133,4 +132,4 @@
|
||||
<Target Name="AfterBuild">
|
||||
<Xunit.Runner.MSBuild.xunit Assembly="..\ServerResource.Tests\bin\Debug\ServerResource.Tests.dll" />
|
||||
</Target>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@ -1,4 +1,21 @@
|
||||
using System.Reflection;
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
||||
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.CIMV2 {
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.CIMV2 {
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Management;
|
||||
|
||||
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.CIMV2
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.CIMV2
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ComputerSystem.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ComputerSystem.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Management;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ConcreteJob.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ConcreteJob.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Management;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetPortAllocationSettingData.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetPortAllocationSettingData.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Management;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetSwitchPort.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetSwitchPort.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Management;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetSwitchPortVlanSettingData.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_EthernetSwitchPortVlanSettingData.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Management;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ExternalEthernetPort.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ExternalEthernetPort.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Management;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ImageManagementService.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ImageManagementService.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Management;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_KvpExchangeComponent.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_KvpExchangeComponent.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_KvpExchangeComponentSettingData.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_KvpExchangeComponentSettingData.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_KvpExchangeDataItem.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_KvpExchangeDataItem.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_LANEndpoint.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_LANEndpoint.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Management;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_MemorySettingData.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_MemorySettingData.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Management;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ProcessorSettingData.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ProcessorSettingData.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Management;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ResourceAllocationSettingData.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_ResourceAllocationSettingData.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_StorageAllocationSettingData.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_StorageAllocationSettingData.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Management;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_SummaryInformation.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_SummaryInformation.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Management;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_SyntheticEthernetPortSettingData.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_SyntheticEthernetPortSettingData.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Management;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualEthernetSwitch.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualEthernetSwitch.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Management;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualEthernetSwitchManagementService.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualEthernetSwitchManagementService.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Management;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualHardDiskSettingData.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualHardDiskSettingData.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Management;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemManagementService.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemManagementService.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemSettingData.cs
Executable file → Normal file
19
plugins/hypervisors/hyperv/DotNet/ServerResource/WmiWrappers/ROOT.virtualization.v2.Msvm_VirtualSystemSettingData.cs
Executable file → Normal file
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2 {
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Management;
|
||||
|
||||
@ -1,4 +1,21 @@
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.CIMV2 {
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
namespace CloudStack.Plugin.WmiWrappers.ROOT.CIMV2 {
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Management;
|
||||
|
||||
@ -22,7 +22,6 @@ chmod a+x ./DotNet/ServerResource/.nuget/NuGet.exe
|
||||
if [ "$1" == "true" ] ; then
|
||||
echo " skipping tests"
|
||||
xbuild /p:Configuration="NoUnitTests" /p:BuildWithMono="true" ./DotNet/ServerResource/ServerResource.sln
|
||||
|
||||
else
|
||||
echo " running tests "
|
||||
xbuild /p:BuildWithMono="true" ./DotNet/ServerResource/ServerResource.sln
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
mvn -P developer -pl developer -Ddeploydb
|
||||
cp client/target/cloud-client-ui-4.2.0-SNAPSHOT/WEB-INF/classes/log4j{-cloud,}.xml
|
||||
mysql --user=root --password="" cloud -e "update configuration set value='false' where name='developer';"
|
||||
mysql --user=root --password="" cloud -e "INSERT INTO configuration (instance, name,value) VALUE('DEFAULT','system.vm.use.local.storage', 'true');"
|
||||
update template_view set url='http://10.70.176.29/pub/systemvmtemplate-2013-07-04-master-hyperv.vhd' where name='SystemVM Template (HyperV)';
|
||||
export MAVEN_OPTS="-XX:MaxPermSize=256m -Xmx1g"
|
||||
mvn -pl :cloud-client-ui jetty:run
|
||||
9
pom.xml
9
pom.xml
@ -566,6 +566,15 @@
|
||||
<exclude>deps/XenServerJava/BSD</exclude>
|
||||
<exclude>deps/XenServerJava/Makefile</exclude>
|
||||
<exclude>dist/console-proxy/js/jquery.js</exclude>
|
||||
<exclude>plugins/hypervisors/hyperv/DotNet/ServerResource/ServerResource.sln</exclude>
|
||||
<exclude>plugins/hypervisors/hyperv/DotNet/ServerResource/packages/**</exclude>
|
||||
<exclude>plugins/hypervisors/hyperv/DotNet/ServerResource/.nuget/**</exclude>
|
||||
<exclude>plugins/hypervisors/hyperv/DotNet/ServerResource/**/obj/**</exclude>
|
||||
<exclude>plugins/hypervisors/hyperv/DotNet/ServerResource/**/bin/**</exclude>
|
||||
<exclude>plugins/hypervisors/hyperv/DotNet/ServerResource/**/packages.config</exclude>
|
||||
<exclude>plugins/hypervisors/hyperv/DotNet/ServerResource/**/App.config</exclude>
|
||||
<exclude>plugins/hypervisors/hyperv/DotNet/ServerResource/**/*.csproj</exclude>
|
||||
<exclude>plugins/hypervisors/hyperv/conf/agent.properties</exclude>
|
||||
<exclude>scripts/vm/systemvm/id_rsa.cloud</exclude>
|
||||
<exclude>services/console-proxy/server/conf/agent.properties</exclude>
|
||||
<exclude>services/console-proxy/server/conf/environment.properties</exclude>
|
||||
|
||||
@ -169,6 +169,14 @@ do
|
||||
esac
|
||||
done
|
||||
|
||||
isCifs() {
|
||||
#TO:DO incase of multiple zone where cifs and nfs exists,
|
||||
#then check if the template file is from cifs using df -P filename
|
||||
#Currently only cifs is supported in hyperv zone.
|
||||
mount | grep "type cifs" > /dev/null
|
||||
return $?
|
||||
}
|
||||
|
||||
if [ "$tflag$nflag$fflag$sflag" != "1111" ]
|
||||
then
|
||||
usage
|
||||
@ -196,12 +204,15 @@ rollback_if_needed $tmpltfs $? "tar archives not supported\n"
|
||||
|
||||
if [ ${tmpltname%.vhd} != ${tmpltname} ]
|
||||
then
|
||||
if which vhd-util &>/dev/null
|
||||
then
|
||||
vhd-util read -p -n ${tmpltimg2} > /dev/null
|
||||
rollback_if_needed $tmpltfs $? "vhd check of $tmpltimg2 failed\n"
|
||||
vhd-util set -n ${tmpltimg2} -f "hidden" -v "0" > /dev/null
|
||||
rollback_if_needed $tmpltfs $? "vhd remove $tmpltimg2 hidden failed\n"
|
||||
if [ isCifs -ne 0 ] ;
|
||||
then
|
||||
if which vhd-util &>/dev/null
|
||||
then
|
||||
vhd-util read -p -n ${tmpltimg2} > /dev/null
|
||||
rollback_if_needed $tmpltfs $? "vhd check of $tmpltimg2 failed\n"
|
||||
vhd-util set -n ${tmpltimg2} -f "hidden" -v "0" > /dev/null
|
||||
rollback_if_needed $tmpltfs $? "vhd remove $tmpltimg2 hidden failed\n"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user