mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 01:32:18 +02:00
pre-commit: enforce mixed-line-ending for all files (#11667)
This commit is contained in:
parent
e27528f8b2
commit
cdb0604e7b
@ -71,7 +71,6 @@ repos:
|
|||||||
- id: fix-byte-order-marker
|
- id: fix-byte-order-marker
|
||||||
- id: forbid-submodules
|
- id: forbid-submodules
|
||||||
- id: mixed-line-ending
|
- id: mixed-line-ending
|
||||||
exclude: \.cs$
|
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
files: \.(bat|cfg|cs|css|gitignore|header|in|install|java|md|properties|py|rb|rc|sh|sql|te|template|txt|ucls|vue|xml|xsl|yaml|yml)$|^cloud-cli/bindir/cloud-tool$|^debian/changelog$
|
files: \.(bat|cfg|cs|css|gitignore|header|in|install|java|md|properties|py|rb|rc|sh|sql|te|template|txt|ucls|vue|xml|xsl|yaml|yml)$|^cloud-cli/bindir/cloud-tool$|^debian/changelog$
|
||||||
args: [--markdown-linebreak-ext=md]
|
args: [--markdown-linebreak-ext=md]
|
||||||
|
|||||||
@ -1,350 +1,350 @@
|
|||||||
// Licensed to the Apache Software Foundation (ASF) under one
|
// Licensed to the Apache Software Foundation (ASF) under one
|
||||||
// or more contributor license agreements. See the NOTICE file
|
// or more contributor license agreements. See the NOTICE file
|
||||||
// distributed with this work for additional information
|
// distributed with this work for additional information
|
||||||
// regarding copyright ownership. The ASF licenses this file
|
// regarding copyright ownership. The ASF licenses this file
|
||||||
// to you under the Apache License, Version 2.0 (the
|
// to you under the Apache License, Version 2.0 (the
|
||||||
// "License"); you may not use this file except in compliance
|
// "License"); you may not use this file except in compliance
|
||||||
// with the License. You may obtain a copy of the License at
|
// with the License. You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
//
|
//
|
||||||
// Unless required by applicable law or agreed to in writing,
|
// Unless required by applicable law or agreed to in writing,
|
||||||
// software distributed under the License is distributed on an
|
// software distributed under the License is distributed on an
|
||||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
// KIND, either express or implied. See the License for the
|
// KIND, either express or implied. See the License for the
|
||||||
// specific language governing permissions and limitations
|
// specific language governing permissions and limitations
|
||||||
// under the License.
|
// under the License.
|
||||||
using System;
|
using System;
|
||||||
using CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2;
|
using CloudStack.Plugin.WmiWrappers.ROOT.VIRTUALIZATION.V2;
|
||||||
using System.Management;
|
using System.Management;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using log4net;
|
using log4net;
|
||||||
using HypervResource;
|
using HypervResource;
|
||||||
using CloudStack.Plugin.AgentShell;
|
using CloudStack.Plugin.AgentShell;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using NSubstitute;
|
using NSubstitute;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace ServerResource.Tests
|
namespace ServerResource.Tests
|
||||||
{
|
{
|
||||||
public class HypervResourceController1Test
|
public class HypervResourceController1Test
|
||||||
{
|
{
|
||||||
protected static string testCifsUrl = AgentSettings.Default.testCifsUrl;
|
protected static string testCifsUrl = AgentSettings.Default.testCifsUrl;
|
||||||
protected static string testCifsPath = AgentSettings.Default.testCifsPath;
|
protected static string testCifsPath = AgentSettings.Default.testCifsPath;
|
||||||
protected static String testPrimaryDataStoreHost = HypervResourceController.config.StorageIpAddress;
|
protected static String testPrimaryDataStoreHost = HypervResourceController.config.StorageIpAddress;
|
||||||
protected static String testS3TemplateName = AgentSettings.Default.testS3TemplateName;
|
protected static String testS3TemplateName = AgentSettings.Default.testS3TemplateName;
|
||||||
protected static String testCifsTemplateName = AgentSettings.Default.testS3TemplateName;
|
protected static String testCifsTemplateName = AgentSettings.Default.testS3TemplateName;
|
||||||
protected static String testSystemVMTemplateName = AgentSettings.Default.testSystemVMTemplateName;
|
protected static String testSystemVMTemplateName = AgentSettings.Default.testSystemVMTemplateName;
|
||||||
protected static String testSystemVMTemplateNameNoExt = AgentSettings.Default.testSystemVMTemplateNameNoExt;
|
protected static String testSystemVMTemplateNameNoExt = AgentSettings.Default.testSystemVMTemplateNameNoExt;
|
||||||
protected static String testLocalStoreUUID = "5fe2bad3-d785-394e-9949-89786b8a63d2";
|
protected static String testLocalStoreUUID = "5fe2bad3-d785-394e-9949-89786b8a63d2";
|
||||||
protected static String testLocalStorePath = Path.Combine(AgentSettings.Default.hyperv_plugin_root, "var", "test", "storagepool");
|
protected static String testLocalStorePath = Path.Combine(AgentSettings.Default.hyperv_plugin_root, "var", "test", "storagepool");
|
||||||
protected static String testSecondaryStoreLocalPath = Path.Combine(AgentSettings.Default.hyperv_plugin_root, "var", "test", "secondary");
|
protected static String testSecondaryStoreLocalPath = Path.Combine(AgentSettings.Default.hyperv_plugin_root, "var", "test", "secondary");
|
||||||
|
|
||||||
// TODO: differentiate between NFS and HTTP template URLs.
|
// TODO: differentiate between NFS and HTTP template URLs.
|
||||||
protected static String testSampleTemplateUUID = "TestCopiedLocalTemplate.vhdx";
|
protected static String testSampleTemplateUUID = "TestCopiedLocalTemplate.vhdx";
|
||||||
protected static String testSampleTemplateURL = testSampleTemplateUUID;
|
protected static String testSampleTemplateURL = testSampleTemplateUUID;
|
||||||
|
|
||||||
// test volumes are both a minimal size vhdx. Changing the extension to .vhd makes on corrupt.
|
// test volumes are both a minimal size vhdx. Changing the extension to .vhd makes on corrupt.
|
||||||
protected static String testSampleVolumeWorkingUUID = "TestVolumeLegit.vhdx";
|
protected static String testSampleVolumeWorkingUUID = "TestVolumeLegit.vhdx";
|
||||||
protected static String testSampleVolumeCorruptUUID = "TestVolumeCorrupt.vhd";
|
protected static String testSampleVolumeCorruptUUID = "TestVolumeCorrupt.vhd";
|
||||||
protected static String testSampleVolumeTempUUID = "TestVolumeTemp.vhdx";
|
protected static String testSampleVolumeTempUUID = "TestVolumeTemp.vhdx";
|
||||||
protected static String testSampleVolumeTempUUIDNoExt = "TestVolumeTemp";
|
protected static String testSampleVolumeTempUUIDNoExt = "TestVolumeTemp";
|
||||||
protected static String testSampleVolumeWorkingURIJSON;
|
protected static String testSampleVolumeWorkingURIJSON;
|
||||||
protected static String testSampleVolumeCorruptURIJSON;
|
protected static String testSampleVolumeCorruptURIJSON;
|
||||||
protected static String testSampleVolumeTempURIJSON;
|
protected static String testSampleVolumeTempURIJSON;
|
||||||
|
|
||||||
protected static String testSampleTemplateURLJSON;
|
protected static String testSampleTemplateURLJSON;
|
||||||
protected static String testLocalStorePathJSON;
|
protected static String testLocalStorePathJSON;
|
||||||
|
|
||||||
protected static IWmiCallsV2 wmiCallsV2;
|
protected static IWmiCallsV2 wmiCallsV2;
|
||||||
|
|
||||||
|
|
||||||
private static ILog s_logger = LogManager.GetLogger(typeof(HypervResourceController1Test));
|
private static ILog s_logger = LogManager.GetLogger(typeof(HypervResourceController1Test));
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test WmiCalls to which incoming HTTP POST requests are dispatched.
|
/// Test WmiCalls to which incoming HTTP POST requests are dispatched.
|
||||||
///
|
///
|
||||||
/// TODO: revise beyond first approximation
|
/// TODO: revise beyond first approximation
|
||||||
/// First approximation is a quick port of the existing Java tests for Hyper-V server resource.
|
/// First approximation is a quick port of the existing Java tests for Hyper-V server resource.
|
||||||
/// A second approximation would use the AgentShell settings files directly.
|
/// A second approximation would use the AgentShell settings files directly.
|
||||||
/// A third approximation would look to invoke ServerResource methods via an HTTP request
|
/// A third approximation would look to invoke ServerResource methods via an HTTP request
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public HypervResourceController1Test()
|
public HypervResourceController1Test()
|
||||||
{
|
{
|
||||||
wmiCallsV2 = Substitute.For<IWmiCallsV2>();
|
wmiCallsV2 = Substitute.For<IWmiCallsV2>();
|
||||||
//AgentService.ConfigServerResource();
|
//AgentService.ConfigServerResource();
|
||||||
HypervResourceController.config.PrivateMacAddress = AgentSettings.Default.private_mac_address;
|
HypervResourceController.config.PrivateMacAddress = AgentSettings.Default.private_mac_address;
|
||||||
HypervResourceController.config.PrivateNetmask = AgentSettings.Default.private_ip_netmask;
|
HypervResourceController.config.PrivateNetmask = AgentSettings.Default.private_ip_netmask;
|
||||||
HypervResourceController.config.StorageIpAddress = HypervResourceController.config.PrivateIpAddress;
|
HypervResourceController.config.StorageIpAddress = HypervResourceController.config.PrivateIpAddress;
|
||||||
HypervResourceController.config.StorageMacAddress = HypervResourceController.config.PrivateMacAddress;
|
HypervResourceController.config.StorageMacAddress = HypervResourceController.config.PrivateMacAddress;
|
||||||
HypervResourceController.config.StorageNetmask = HypervResourceController.config.PrivateNetmask;
|
HypervResourceController.config.StorageNetmask = HypervResourceController.config.PrivateNetmask;
|
||||||
|
|
||||||
|
|
||||||
// Used to create existing StoragePool in preparation for the ModifyStoragePool
|
// Used to create existing StoragePool in preparation for the ModifyStoragePool
|
||||||
testLocalStoreUUID = AgentSettings.Default.local_storage_uuid.ToString();
|
testLocalStoreUUID = AgentSettings.Default.local_storage_uuid.ToString();
|
||||||
|
|
||||||
// Make sure secondary store is available.
|
// Make sure secondary store is available.
|
||||||
string fullPath = Path.GetFullPath(testSecondaryStoreLocalPath);
|
string fullPath = Path.GetFullPath(testSecondaryStoreLocalPath);
|
||||||
s_logger.Info("Test secondary storage in " + fullPath);
|
s_logger.Info("Test secondary storage in " + fullPath);
|
||||||
DirectoryInfo testSecondarStoreDir = new DirectoryInfo(fullPath);
|
DirectoryInfo testSecondarStoreDir = new DirectoryInfo(fullPath);
|
||||||
if (!testSecondarStoreDir.Exists)
|
if (!testSecondarStoreDir.Exists)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
testSecondarStoreDir.Create();
|
testSecondarStoreDir.Create();
|
||||||
}
|
}
|
||||||
catch (System.IO.IOException ex)
|
catch (System.IO.IOException ex)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException("Need to be able to create the folder " + testSecondarStoreDir.FullName + " failed due to " + ex.Message);
|
throw new NotImplementedException("Need to be able to create the folder " + testSecondarStoreDir.FullName + " failed due to " + ex.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert to secondary storage string to canonical path
|
// Convert to secondary storage string to canonical path
|
||||||
testSecondaryStoreLocalPath = testSecondarStoreDir.FullName;
|
testSecondaryStoreLocalPath = testSecondarStoreDir.FullName;
|
||||||
AgentSettings.Default.local_secondary_storage_path = testSecondaryStoreLocalPath;
|
AgentSettings.Default.local_secondary_storage_path = testSecondaryStoreLocalPath;
|
||||||
|
|
||||||
// Make sure local primary storage is available
|
// Make sure local primary storage is available
|
||||||
DirectoryInfo testPoolDir = new DirectoryInfo(testLocalStorePath);
|
DirectoryInfo testPoolDir = new DirectoryInfo(testLocalStorePath);
|
||||||
//Assert.True(testPoolDir.Exists, "To simulate local file system Storage Pool, you need folder at " + testPoolDir.FullName);
|
//Assert.True(testPoolDir.Exists, "To simulate local file system Storage Pool, you need folder at " + testPoolDir.FullName);
|
||||||
|
|
||||||
// Convert to local primary storage string to canonical path
|
// Convert to local primary storage string to canonical path
|
||||||
testLocalStorePath = testPoolDir.FullName;
|
testLocalStorePath = testPoolDir.FullName;
|
||||||
AgentSettings.Default.local_storage_path = testLocalStorePath;
|
AgentSettings.Default.local_storage_path = testLocalStorePath;
|
||||||
|
|
||||||
// Clean up old test files in local storage folder
|
// Clean up old test files in local storage folder
|
||||||
FileInfo testVolWorks = new FileInfo(Path.Combine(testLocalStorePath, testSampleVolumeWorkingUUID));
|
FileInfo testVolWorks = new FileInfo(Path.Combine(testLocalStorePath, testSampleVolumeWorkingUUID));
|
||||||
// Assert.True(testVolWorks.Exists, "Create a working virtual disk at " + testVolWorks.FullName);
|
// Assert.True(testVolWorks.Exists, "Create a working virtual disk at " + testVolWorks.FullName);
|
||||||
|
|
||||||
testSampleTemplateURLJSON = JsonConvert.SerializeObject(testSampleTemplateUUID);
|
testSampleTemplateURLJSON = JsonConvert.SerializeObject(testSampleTemplateUUID);
|
||||||
s_logger.Info("Created " + testSampleTemplateURLJSON + " in local storage.");
|
s_logger.Info("Created " + testSampleTemplateURLJSON + " in local storage.");
|
||||||
|
|
||||||
|
|
||||||
// Capture other JSON encoded paths
|
// Capture other JSON encoded paths
|
||||||
testSampleVolumeWorkingURIJSON = Newtonsoft.Json.JsonConvert.SerializeObject(testVolWorks.FullName);
|
testSampleVolumeWorkingURIJSON = Newtonsoft.Json.JsonConvert.SerializeObject(testVolWorks.FullName);
|
||||||
testLocalStorePathJSON = JsonConvert.SerializeObject(testLocalStorePath);
|
testLocalStorePathJSON = JsonConvert.SerializeObject(testLocalStorePath);
|
||||||
|
|
||||||
// TODO: may need to initialise the server resource in future.
|
// TODO: may need to initialise the server resource in future.
|
||||||
// s_hypervresource.initialize();
|
// s_hypervresource.initialize();
|
||||||
|
|
||||||
// Verify sample template is in place storage pool
|
// Verify sample template is in place storage pool
|
||||||
s_logger.Info("setUp complete, sample StoragePool at " + testLocalStorePathJSON
|
s_logger.Info("setUp complete, sample StoragePool at " + testLocalStorePathJSON
|
||||||
+ " sample template at " + testSampleTemplateURLJSON);
|
+ " sample template at " + testSampleTemplateURLJSON);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String CreateTestDiskImageFromExistingImage(FileInfo srcFile,
|
private String CreateTestDiskImageFromExistingImage(FileInfo srcFile,
|
||||||
String dstPath,
|
String dstPath,
|
||||||
String dstFileName)
|
String dstFileName)
|
||||||
{
|
{
|
||||||
var newFullname = Path.Combine(dstPath, dstFileName);
|
var newFullname = Path.Combine(dstPath, dstFileName);
|
||||||
var newFileInfo = new FileInfo(newFullname);
|
var newFileInfo = new FileInfo(newFullname);
|
||||||
if (!newFileInfo.Exists)
|
if (!newFileInfo.Exists)
|
||||||
{
|
{
|
||||||
newFileInfo = srcFile.CopyTo(newFullname);
|
newFileInfo = srcFile.CopyTo(newFullname);
|
||||||
}
|
}
|
||||||
newFileInfo.Refresh();
|
newFileInfo.Refresh();
|
||||||
Assert.True(newFileInfo.Exists, "Attempted to create " + newFullname + " from " + newFileInfo.FullName);
|
Assert.True(newFileInfo.Exists, "Attempted to create " + newFullname + " from " + newFileInfo.FullName);
|
||||||
|
|
||||||
return JsonConvert.SerializeObject(newFileInfo.FullName);
|
return JsonConvert.SerializeObject(newFileInfo.FullName);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void TestCreateCommand()
|
public void TestCreateCommand()
|
||||||
{
|
{
|
||||||
DirectoryInfo localStorePath = new DirectoryInfo(testLocalStorePath);
|
DirectoryInfo localStorePath = new DirectoryInfo(testLocalStorePath);
|
||||||
if (!localStorePath.Exists)
|
if (!localStorePath.Exists)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
localStorePath.Create();
|
localStorePath.Create();
|
||||||
}
|
}
|
||||||
catch (System.IO.IOException ex)
|
catch (System.IO.IOException ex)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException("Need to be able to create the folder " + localStorePath.FullName + " failed due to " + ex.Message);
|
throw new NotImplementedException("Need to be able to create the folder " + localStorePath.FullName + " failed due to " + ex.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FileInfo sampleTemplateFile = new FileInfo(Path.Combine(testLocalStorePath, testSampleTemplateUUID));
|
FileInfo sampleTemplateFile = new FileInfo(Path.Combine(testLocalStorePath, testSampleTemplateUUID));
|
||||||
if (!sampleTemplateFile.Exists)
|
if (!sampleTemplateFile.Exists)
|
||||||
{
|
{
|
||||||
//Create a file to write to.
|
//Create a file to write to.
|
||||||
using (StreamWriter sw = sampleTemplateFile.CreateText())
|
using (StreamWriter sw = sampleTemplateFile.CreateText())
|
||||||
{
|
{
|
||||||
sw.WriteLine("This is fake template file for test");
|
sw.WriteLine("This is fake template file for test");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var counter = 0;
|
var counter = 0;
|
||||||
wmiCallsV2.When(x => x.CreateDynamicVirtualHardDisk(Arg.Any<ulong>(), Arg.Any<String>())).Do(x => counter++);
|
wmiCallsV2.When(x => x.CreateDynamicVirtualHardDisk(Arg.Any<ulong>(), Arg.Any<String>())).Do(x => counter++);
|
||||||
// TODO: Need sample to update the test.
|
// TODO: Need sample to update the test.
|
||||||
// Arrange
|
// Arrange
|
||||||
String createCmd = "{\"volId\":10,\"pool\":{\"id\":201,\"uuid\":\"" + testLocalStoreUUID + "\",\"host\":\"" + HypervResourceController.config.StorageIpAddress + "\"" +
|
String createCmd = "{\"volId\":10,\"pool\":{\"id\":201,\"uuid\":\"" + testLocalStoreUUID + "\",\"host\":\"" + HypervResourceController.config.StorageIpAddress + "\"" +
|
||||||
",\"path\":" + testLocalStorePathJSON + ",\"port\":0,\"type\":\"Filesystem\"},\"diskCharacteristics\":{\"size\":0," +
|
",\"path\":" + testLocalStorePathJSON + ",\"port\":0,\"type\":\"Filesystem\"},\"diskCharacteristics\":{\"size\":0," +
|
||||||
"\"tags\":[],\"type\":\"ROOT\",\"name\":\"ROOT-9\",\"useLocalStorage\":true,\"recreatable\":true,\"diskOfferingId\":11," +
|
"\"tags\":[],\"type\":\"ROOT\",\"name\":\"ROOT-9\",\"useLocalStorage\":true,\"recreatable\":true,\"diskOfferingId\":11," +
|
||||||
"\"volumeId\":10,\"hyperType\":\"Hyperv\"},\"templateUrl\":" + testSampleTemplateURLJSON + ",\"contextMap\":{},\"wait\":0}";
|
"\"volumeId\":10,\"hyperType\":\"Hyperv\"},\"templateUrl\":" + testSampleTemplateURLJSON + ",\"contextMap\":{},\"wait\":0}";
|
||||||
dynamic jsonCreateCmd = JsonConvert.DeserializeObject(createCmd);
|
dynamic jsonCreateCmd = JsonConvert.DeserializeObject(createCmd);
|
||||||
HypervResourceController rsrcServer = new HypervResourceController();
|
HypervResourceController rsrcServer = new HypervResourceController();
|
||||||
HypervResourceController.wmiCallsV2 = wmiCallsV2;
|
HypervResourceController.wmiCallsV2 = wmiCallsV2;
|
||||||
|
|
||||||
Assert.True(Directory.Exists(testLocalStorePath), testLocalStorePath + " does not exist ");
|
Assert.True(Directory.Exists(testLocalStorePath), testLocalStorePath + " does not exist ");
|
||||||
string filePath = Path.Combine(testLocalStorePath, (string)JsonConvert.DeserializeObject(testSampleTemplateURLJSON));
|
string filePath = Path.Combine(testLocalStorePath, (string)JsonConvert.DeserializeObject(testSampleTemplateURLJSON));
|
||||||
Assert.True(File.Exists(filePath), "The template we make volumes from is missing from path " + filePath);
|
Assert.True(File.Exists(filePath), "The template we make volumes from is missing from path " + filePath);
|
||||||
int fileCount = Directory.GetFiles(testLocalStorePath).Length;
|
int fileCount = Directory.GetFiles(testLocalStorePath).Length;
|
||||||
s_logger.Debug(" test local store has " + fileCount + "files");
|
s_logger.Debug(" test local store has " + fileCount + "files");
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
// Test requires there to be a template at the tempalteUrl, which is its location in the local file system.
|
// Test requires there to be a template at the tempalteUrl, which is its location in the local file system.
|
||||||
dynamic jsonResult = rsrcServer.CreateCommand(jsonCreateCmd);
|
dynamic jsonResult = rsrcServer.CreateCommand(jsonCreateCmd);
|
||||||
s_logger.Debug("CreateDynamicVirtualHardDisk method is called " + counter + " times");
|
s_logger.Debug("CreateDynamicVirtualHardDisk method is called " + counter + " times");
|
||||||
|
|
||||||
//Assert.Equal(counter, 1);
|
//Assert.Equal(counter, 1);
|
||||||
|
|
||||||
JObject ansAsProperty2 = jsonResult[0];
|
JObject ansAsProperty2 = jsonResult[0];
|
||||||
dynamic ans = ansAsProperty2.GetValue(CloudStackTypes.CreateAnswer);
|
dynamic ans = ansAsProperty2.GetValue(CloudStackTypes.CreateAnswer);
|
||||||
Assert.NotNull(ans);
|
Assert.NotNull(ans);
|
||||||
Assert.True((bool)ans.result, "Failed to CreateCommand due to " + (string)ans.result);
|
Assert.True((bool)ans.result, "Failed to CreateCommand due to " + (string)ans.result);
|
||||||
Assert.Equal(Directory.GetFiles(testLocalStorePath).Length, fileCount + 1);
|
Assert.Equal(Directory.GetFiles(testLocalStorePath).Length, fileCount + 1);
|
||||||
FileInfo newFile = new FileInfo((string)ans.volume.path);
|
FileInfo newFile = new FileInfo((string)ans.volume.path);
|
||||||
Assert.True(newFile.Length > 0, "The new file should have a size greater than zero");
|
Assert.True(newFile.Length > 0, "The new file should have a size greater than zero");
|
||||||
newFile.Delete();
|
newFile.Delete();
|
||||||
sampleTemplateFile.Delete();
|
sampleTemplateFile.Delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void TestDestroyCommand()
|
public void TestDestroyCommand()
|
||||||
{
|
{
|
||||||
testSampleVolumeTempURIJSON = "\"storagepool\"";
|
testSampleVolumeTempURIJSON = "\"storagepool\"";
|
||||||
// Arrange
|
// Arrange
|
||||||
String destroyCmd = //"{\"volume\":" + getSampleVolumeObjectTO() + "}";
|
String destroyCmd = //"{\"volume\":" + getSampleVolumeObjectTO() + "}";
|
||||||
"{\"volume\":{\"name\":\"" + testSampleVolumeTempUUIDNoExt
|
"{\"volume\":{\"name\":\"" + testSampleVolumeTempUUIDNoExt
|
||||||
+ "\",\"storagePoolType\":\"Filesystem\","
|
+ "\",\"storagePoolType\":\"Filesystem\","
|
||||||
+ "\"mountPoint\":"
|
+ "\"mountPoint\":"
|
||||||
+ testLocalStorePathJSON
|
+ testLocalStorePathJSON
|
||||||
+ ",\"path\":" + testSampleVolumeTempURIJSON
|
+ ",\"path\":" + testSampleVolumeTempURIJSON
|
||||||
+ ",\"storagePoolUuid\":\"" + testLocalStoreUUID
|
+ ",\"storagePoolUuid\":\"" + testLocalStoreUUID
|
||||||
+ "\","
|
+ "\","
|
||||||
+ "\"type\":\"ROOT\",\"id\":9,\"size\":0}}";
|
+ "\"type\":\"ROOT\",\"id\":9,\"size\":0}}";
|
||||||
|
|
||||||
ImageManagementService imgmgr = new ImageManagementService();
|
ImageManagementService imgmgr = new ImageManagementService();
|
||||||
wmiCallsV2.GetImageManagementService().Returns(imgmgr);
|
wmiCallsV2.GetImageManagementService().Returns(imgmgr);
|
||||||
|
|
||||||
HypervResourceController rsrcServer = new HypervResourceController();
|
HypervResourceController rsrcServer = new HypervResourceController();
|
||||||
HypervResourceController.wmiCallsV2 = wmiCallsV2;
|
HypervResourceController.wmiCallsV2 = wmiCallsV2;
|
||||||
|
|
||||||
dynamic jsonDestroyCmd = JsonConvert.DeserializeObject(destroyCmd);
|
dynamic jsonDestroyCmd = JsonConvert.DeserializeObject(destroyCmd);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
dynamic destroyAns = rsrcServer.DestroyCommand(jsonDestroyCmd);
|
dynamic destroyAns = rsrcServer.DestroyCommand(jsonDestroyCmd);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
JObject ansAsProperty2 = destroyAns[0];
|
JObject ansAsProperty2 = destroyAns[0];
|
||||||
dynamic ans = ansAsProperty2.GetValue(CloudStackTypes.Answer);
|
dynamic ans = ansAsProperty2.GetValue(CloudStackTypes.Answer);
|
||||||
String path = jsonDestroyCmd.volume.path;
|
String path = jsonDestroyCmd.volume.path;
|
||||||
Assert.True((bool)ans.result, "DestroyCommand did not succeed " + ans.details);
|
Assert.True((bool)ans.result, "DestroyCommand did not succeed " + ans.details);
|
||||||
Assert.True(!File.Exists(path), "Failed to delete file " + path);
|
Assert.True(!File.Exists(path), "Failed to delete file " + path);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void TestStartCommand()
|
public void TestStartCommand()
|
||||||
{
|
{
|
||||||
ComputerSystem system = new ComputerSystem();
|
ComputerSystem system = new ComputerSystem();
|
||||||
wmiCallsV2.DeployVirtualMachine(Arg.Any<Object>(), Arg.Any<string>()).Returns(system);
|
wmiCallsV2.DeployVirtualMachine(Arg.Any<Object>(), Arg.Any<string>()).Returns(system);
|
||||||
|
|
||||||
// Arrange
|
// Arrange
|
||||||
HypervResourceController rsrcServer = new HypervResourceController();
|
HypervResourceController rsrcServer = new HypervResourceController();
|
||||||
HypervResourceController.wmiCallsV2 = wmiCallsV2;
|
HypervResourceController.wmiCallsV2 = wmiCallsV2;
|
||||||
String sample = getSampleStartCommand();
|
String sample = getSampleStartCommand();
|
||||||
|
|
||||||
|
|
||||||
dynamic jsonStartCmd = JsonConvert.DeserializeObject(sample);
|
dynamic jsonStartCmd = JsonConvert.DeserializeObject(sample);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
dynamic startAns = rsrcServer.StartCommand(jsonStartCmd);
|
dynamic startAns = rsrcServer.StartCommand(jsonStartCmd);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Assert.NotNull(startAns[0][CloudStackTypes.StartAnswer]);
|
Assert.NotNull(startAns[0][CloudStackTypes.StartAnswer]);
|
||||||
Assert.True((bool)startAns[0][CloudStackTypes.StartAnswer].result, "StartCommand did not succeed " + startAns[0][CloudStackTypes.StartAnswer].details);
|
Assert.True((bool)startAns[0][CloudStackTypes.StartAnswer].result, "StartCommand did not succeed " + startAns[0][CloudStackTypes.StartAnswer].details);
|
||||||
|
|
||||||
Assert.Null((string)startAns[0][CloudStackTypes.StartAnswer].details);
|
Assert.Null((string)startAns[0][CloudStackTypes.StartAnswer].details);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void TestStopCommand()
|
public void TestStopCommand()
|
||||||
{
|
{
|
||||||
//string vmName = "Test VM";
|
//string vmName = "Test VM";
|
||||||
var counter = 0;
|
var counter = 0;
|
||||||
wmiCallsV2.When(x => x.DestroyVm(Arg.Any<Object>())).Do(x => counter++);
|
wmiCallsV2.When(x => x.DestroyVm(Arg.Any<Object>())).Do(x => counter++);
|
||||||
|
|
||||||
// Arrange
|
// Arrange
|
||||||
HypervResourceController rsrcServer = new HypervResourceController();
|
HypervResourceController rsrcServer = new HypervResourceController();
|
||||||
HypervResourceController.wmiCallsV2 = wmiCallsV2;
|
HypervResourceController.wmiCallsV2 = wmiCallsV2;
|
||||||
|
|
||||||
String sampleStop = "{\"isProxy\":false,\"vmName\":\"i-2-17-VM\",\"contextMap\":{},\"checkBeforeCleanup\":false,\"wait\":0}";
|
String sampleStop = "{\"isProxy\":false,\"vmName\":\"i-2-17-VM\",\"contextMap\":{},\"checkBeforeCleanup\":false,\"wait\":0}";
|
||||||
dynamic jsonStopCmd = JsonConvert.DeserializeObject(sampleStop);
|
dynamic jsonStopCmd = JsonConvert.DeserializeObject(sampleStop);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
dynamic stopAns = rsrcServer.StopCommand(jsonStopCmd);
|
dynamic stopAns = rsrcServer.StopCommand(jsonStopCmd);
|
||||||
|
|
||||||
// Assert VM is gone!
|
// Assert VM is gone!
|
||||||
Assert.NotNull(stopAns[0][CloudStackTypes.StopAnswer]);
|
Assert.NotNull(stopAns[0][CloudStackTypes.StopAnswer]);
|
||||||
Assert.True((bool)stopAns[0][CloudStackTypes.StopAnswer].result, "StopCommand did not succeed " + stopAns[0][CloudStackTypes.StopAnswer].details);
|
Assert.True((bool)stopAns[0][CloudStackTypes.StopAnswer].result, "StopCommand did not succeed " + stopAns[0][CloudStackTypes.StopAnswer].details);
|
||||||
|
|
||||||
Assert.Null((string)stopAns[0][CloudStackTypes.StopAnswer].details);
|
Assert.Null((string)stopAns[0][CloudStackTypes.StopAnswer].details);
|
||||||
Assert.Equal<int>(counter, 1);
|
Assert.Equal<int>(counter, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getSamplePrimaryDataStoreInfo()
|
public static String getSamplePrimaryDataStoreInfo()
|
||||||
{
|
{
|
||||||
String samplePrimaryDataStoreInfo =
|
String samplePrimaryDataStoreInfo =
|
||||||
"{\"org.apache.cloudstack.storage.to.PrimaryDataStoreTO\":" +
|
"{\"org.apache.cloudstack.storage.to.PrimaryDataStoreTO\":" +
|
||||||
"{\"uuid\":\"" + testLocalStoreUUID + "\"," +
|
"{\"uuid\":\"" + testLocalStoreUUID + "\"," +
|
||||||
"\"id\":201," +
|
"\"id\":201," +
|
||||||
"\"host\":\"" + testPrimaryDataStoreHost + "\"," +
|
"\"host\":\"" + testPrimaryDataStoreHost + "\"," +
|
||||||
"\"type\":\"Filesystem\"," + // Not used in PrimaryDataStoreTO
|
"\"type\":\"Filesystem\"," + // Not used in PrimaryDataStoreTO
|
||||||
"\"poolType\":\"Filesystem\"," + // Not used in PrimaryDataStoreTO
|
"\"poolType\":\"Filesystem\"," + // Not used in PrimaryDataStoreTO
|
||||||
"\"path\":" + testLocalStorePathJSON + "," +
|
"\"path\":" + testLocalStorePathJSON + "," +
|
||||||
"\"port\":0}" +
|
"\"port\":0}" +
|
||||||
"}";
|
"}";
|
||||||
return samplePrimaryDataStoreInfo;
|
return samplePrimaryDataStoreInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getSampleVolumeObjectTO()
|
public static String getSampleVolumeObjectTO()
|
||||||
{
|
{
|
||||||
String sampleVolumeObjectTO =
|
String sampleVolumeObjectTO =
|
||||||
"{\"org.apache.cloudstack.storage.to.VolumeObjectTO\":" +
|
"{\"org.apache.cloudstack.storage.to.VolumeObjectTO\":" +
|
||||||
"{\"uuid\":\"19ae8e67-cb2c-4ab4-901e-e0b864272b59\"," +
|
"{\"uuid\":\"19ae8e67-cb2c-4ab4-901e-e0b864272b59\"," +
|
||||||
"\"volumeType\":\"ROOT\"," +
|
"\"volumeType\":\"ROOT\"," +
|
||||||
"\"format\":\"VHDX\"," +
|
"\"format\":\"VHDX\"," +
|
||||||
"\"dataStore\":" + getSamplePrimaryDataStoreInfo() + "," +
|
"\"dataStore\":" + getSamplePrimaryDataStoreInfo() + "," +
|
||||||
"\"name\":\"" + testSampleVolumeTempUUIDNoExt + "\"," +
|
"\"name\":\"" + testSampleVolumeTempUUIDNoExt + "\"," +
|
||||||
"\"size\":52428800," +
|
"\"size\":52428800," +
|
||||||
"\"volumeId\":10," +
|
"\"volumeId\":10," +
|
||||||
// "\"vmName\":\"i-3-5-VM\"," + // TODO: do we have to fill in the vmName?
|
// "\"vmName\":\"i-3-5-VM\"," + // TODO: do we have to fill in the vmName?
|
||||||
"\"accountId\":3,\"id\":10}" +
|
"\"accountId\":3,\"id\":10}" +
|
||||||
"}"; // end of destTO
|
"}"; // end of destTO
|
||||||
return sampleVolumeObjectTO;
|
return sampleVolumeObjectTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getSampleStartCommand()
|
public static String getSampleStartCommand()
|
||||||
{
|
{
|
||||||
String sample = "{\"vm\":{\"id\":17,\"name\":\"i-2-17-VM\",\"type\":\"User\",\"cpus\":1,\"speed\":500," +
|
String sample = "{\"vm\":{\"id\":17,\"name\":\"i-2-17-VM\",\"type\":\"User\",\"cpus\":1,\"speed\":500," +
|
||||||
"\"minRam\":536870912,\"maxRam\":536870912,\"arch\":\"x86_64\"," +
|
"\"minRam\":536870912,\"maxRam\":536870912,\"arch\":\"x86_64\"," +
|
||||||
"\"os\":\"CentOS 6.0 (64-bit)\",\"bootArgs\":\"\",\"rebootOnCrash\":false," +
|
"\"os\":\"CentOS 6.0 (64-bit)\",\"bootArgs\":\"\",\"rebootOnCrash\":false," +
|
||||||
"\"enableHA\":false,\"limitCpuUse\":false,\"vncPassword\":\"31f82f29aff646eb\"," +
|
"\"enableHA\":false,\"limitCpuUse\":false,\"vncPassword\":\"31f82f29aff646eb\"," +
|
||||||
"\"params\":{},\"uuid\":\"8b030b6a-0243-440a-8cc5-45d08815ca11\"" +
|
"\"params\":{},\"uuid\":\"8b030b6a-0243-440a-8cc5-45d08815ca11\"" +
|
||||||
",\"disks\":[" +
|
",\"disks\":[" +
|
||||||
"{\"data\":" + getSampleVolumeObjectTO() + ",\"diskSeq\":0,\"type\":\"ROOT\"}," +
|
"{\"data\":" + getSampleVolumeObjectTO() + ",\"diskSeq\":0,\"type\":\"ROOT\"}," +
|
||||||
"{\"diskSeq\":1,\"type\":\"ISO\"}" +
|
"{\"diskSeq\":1,\"type\":\"ISO\"}" +
|
||||||
"]," +
|
"]," +
|
||||||
"\"nics\":[" +
|
"\"nics\":[" +
|
||||||
"{\"deviceId\":0,\"networkRateMbps\":100,\"defaultNic\":true,\"uuid\":\"99cb4813-23af-428c-a87a-2d1899be4f4b\"," +
|
"{\"deviceId\":0,\"networkRateMbps\":100,\"defaultNic\":true,\"uuid\":\"99cb4813-23af-428c-a87a-2d1899be4f4b\"," +
|
||||||
"\"ip\":\"10.1.1.67\",\"netmask\":\"255.255.255.0\",\"gateway\":\"10.1.1.1\"," +
|
"\"ip\":\"10.1.1.67\",\"netmask\":\"255.255.255.0\",\"gateway\":\"10.1.1.1\"," +
|
||||||
"\"mac\":\"02:00:51:2c:00:0e\",\"dns1\":\"4.4.4.4\",\"broadcastType\":\"Vlan\",\"type\":\"Guest\"," +
|
"\"mac\":\"02:00:51:2c:00:0e\",\"dns1\":\"4.4.4.4\",\"broadcastType\":\"Vlan\",\"type\":\"Guest\"," +
|
||||||
"\"broadcastUri\":\"vlan://261\",\"isolationUri\":\"vlan://261\",\"isSecurityGroupEnabled\":false}" +
|
"\"broadcastUri\":\"vlan://261\",\"isolationUri\":\"vlan://261\",\"isSecurityGroupEnabled\":false}" +
|
||||||
"]},\"contextMap\":{},\"wait\":0}";
|
"]},\"contextMap\":{},\"wait\":0}";
|
||||||
return sample;
|
return sample;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,83 +1,83 @@
|
|||||||
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||||
license agreements. See the NOTICE file distributed with this work for additional
|
license agreements. See the NOTICE file distributed with this work for additional
|
||||||
information regarding copyright ownership. The ASF licenses this file to
|
information regarding copyright ownership. The ASF licenses this file to
|
||||||
you under the Apache License, Version 2.0 (the "License"); you may not use
|
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
|
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
|
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
|
by applicable law or agreed to in writing, software distributed under the
|
||||||
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
|
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
|
OF ANY KIND, either express or implied. See the License for the specific
|
||||||
language governing permissions and limitations under the License. -->
|
language governing permissions and limitations under the License. -->
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
|
||||||
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"
|
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||||
http://www.springframework.org/schema/tx
|
http://www.springframework.org/schema/tx
|
||||||
http://www.springframework.org/schema/tx/spring-tx.xsd
|
http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||||
http://www.springframework.org/schema/aop
|
http://www.springframework.org/schema/aop
|
||||||
http://www.springframework.org/schema/aop/spring-aop.xsd
|
http://www.springframework.org/schema/aop/spring-aop.xsd
|
||||||
http://www.springframework.org/schema/context
|
http://www.springframework.org/schema/context
|
||||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||||
|
|
||||||
<context:annotation-config />
|
<context:annotation-config />
|
||||||
|
|
||||||
<!-- @DB support -->
|
<!-- @DB support -->
|
||||||
|
|
||||||
<bean id="componentContext" class="com.cloud.utils.component.ComponentContext" />
|
<bean id="componentContext" class="com.cloud.utils.component.ComponentContext" />
|
||||||
|
|
||||||
<bean id="transactionContextBuilder" class="com.cloud.utils.db.TransactionContextBuilder" />
|
<bean id="transactionContextBuilder" class="com.cloud.utils.db.TransactionContextBuilder" />
|
||||||
<bean id="actionEventInterceptor" class="com.cloud.event.ActionEventInterceptor" />
|
<bean id="actionEventInterceptor" class="com.cloud.event.ActionEventInterceptor" />
|
||||||
<bean id="instantiatePostProcessor" class="com.cloud.utils.component.ComponentInstantiationPostProcessor">
|
<bean id="instantiatePostProcessor" class="com.cloud.utils.component.ComponentInstantiationPostProcessor">
|
||||||
<property name="Interceptors">
|
<property name="Interceptors">
|
||||||
<list>
|
<list>
|
||||||
<ref bean="transactionContextBuilder" />
|
<ref bean="transactionContextBuilder" />
|
||||||
<ref bean="actionEventInterceptor" />
|
<ref bean="actionEventInterceptor" />
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="nicIpAliasDaoImpl" class="com.cloud.vm.dao.NicIpAliasDaoImpl" />
|
<bean id="nicIpAliasDaoImpl" class="com.cloud.vm.dao.NicIpAliasDaoImpl" />
|
||||||
<bean id="ConfigurationManager" class="com.cloud.configuration.ConfigurationManagerImpl">
|
<bean id="ConfigurationManager" class="com.cloud.configuration.ConfigurationManagerImpl">
|
||||||
<property name="name" value="ConfigurationManager"/>
|
<property name="name" value="ConfigurationManager"/>
|
||||||
</bean>
|
</bean>
|
||||||
<bean id="dataCenterGuestIpv6PrefixDaoImpl" class="com.cloud.dc.dao.DataCenterGuestIpv6PrefixDaoImpl" />
|
<bean id="dataCenterGuestIpv6PrefixDaoImpl" class="com.cloud.dc.dao.DataCenterGuestIpv6PrefixDaoImpl" />
|
||||||
<bean id="ipv6GuestPrefixSubnetNetworkMapDaoImpl" class="com.cloud.network.dao.Ipv6GuestPrefixSubnetNetworkMapDaoImpl" />
|
<bean id="ipv6GuestPrefixSubnetNetworkMapDaoImpl" class="com.cloud.network.dao.Ipv6GuestPrefixSubnetNetworkMapDaoImpl" />
|
||||||
<bean id="networkDetailsDaoImpl" class="com.cloud.network.dao.NetworkDetailsDaoImpl" />
|
<bean id="networkDetailsDaoImpl" class="com.cloud.network.dao.NetworkDetailsDaoImpl" />
|
||||||
<bean id="domainRouterDaoImpl" class="com.cloud.vm.dao.DomainRouterDaoImpl" />
|
<bean id="domainRouterDaoImpl" class="com.cloud.vm.dao.DomainRouterDaoImpl" />
|
||||||
<bean id="routerNetworkDaoImpl" class="com.cloud.network.dao.RouterNetworkDaoImpl" />
|
<bean id="routerNetworkDaoImpl" class="com.cloud.network.dao.RouterNetworkDaoImpl" />
|
||||||
<bean id="userStatisticsDaoImpl" class="com.cloud.user.dao.UserStatisticsDaoImpl" />
|
<bean id="userStatisticsDaoImpl" class="com.cloud.user.dao.UserStatisticsDaoImpl" />
|
||||||
<bean id="ipv6ServiceImpl" class="com.cloud.network.Ipv6ServiceImpl" />
|
<bean id="ipv6ServiceImpl" class="com.cloud.network.Ipv6ServiceImpl" />
|
||||||
<bean id="managementServiceConfigurationImpl" class="com.cloud.configuration.ManagementServiceConfigurationImpl" />
|
<bean id="managementServiceConfigurationImpl" class="com.cloud.configuration.ManagementServiceConfigurationImpl" />
|
||||||
<bean class="org.apache.cloudstack.networkoffering.ChildTestConfiguration" />
|
<bean class="org.apache.cloudstack.networkoffering.ChildTestConfiguration" />
|
||||||
<bean id="UservmDetailsDaoImpl" class="com.cloud.vm.dao.VMInstanceDetailsDaoImpl" />
|
<bean id="UservmDetailsDaoImpl" class="com.cloud.vm.dao.VMInstanceDetailsDaoImpl" />
|
||||||
<bean id="hostGpuGroupsDaoImpl" class="com.cloud.gpu.dao.HostGpuGroupsDaoImpl" />
|
<bean id="hostGpuGroupsDaoImpl" class="com.cloud.gpu.dao.HostGpuGroupsDaoImpl" />
|
||||||
<bean id="vGPUTypesDaoImpl" class="com.cloud.gpu.dao.VGPUTypesDaoImpl" />
|
<bean id="vGPUTypesDaoImpl" class="com.cloud.gpu.dao.VGPUTypesDaoImpl" />
|
||||||
<bean id="usageEventDaoImpl" class="com.cloud.event.dao.UsageEventDaoImpl" />
|
<bean id="usageEventDaoImpl" class="com.cloud.event.dao.UsageEventDaoImpl" />
|
||||||
<bean id="usageEventDetailsDaoImpl" class="com.cloud.event.dao.UsageEventDetailsDaoImpl" />
|
<bean id="usageEventDetailsDaoImpl" class="com.cloud.event.dao.UsageEventDetailsDaoImpl" />
|
||||||
<bean id="storagePoolHostDaoImpl" class="com.cloud.storage.dao.StoragePoolHostDaoImpl" />
|
<bean id="storagePoolHostDaoImpl" class="com.cloud.storage.dao.StoragePoolHostDaoImpl" />
|
||||||
<bean id="storagePoolTagsDaoImpl" class="com.cloud.storage.dao.StoragePoolTagsDaoImpl" />
|
<bean id="storagePoolTagsDaoImpl" class="com.cloud.storage.dao.StoragePoolTagsDaoImpl" />
|
||||||
<bean id="storagePoolAndAccessGroupMapDaoImpl" class="com.cloud.storage.dao.StoragePoolAndAccessGroupMapDaoImpl" />
|
<bean id="storagePoolAndAccessGroupMapDaoImpl" class="com.cloud.storage.dao.StoragePoolAndAccessGroupMapDaoImpl" />
|
||||||
<bean id="primaryDataStoreDaoImpl" class="org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDaoImpl" />
|
<bean id="primaryDataStoreDaoImpl" class="org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDaoImpl" />
|
||||||
<bean id="userIpAddressDetailsDao" class="org.apache.cloudstack.resourcedetail.dao.UserIpAddressDetailsDaoImpl" />
|
<bean id="userIpAddressDetailsDao" class="org.apache.cloudstack.resourcedetail.dao.UserIpAddressDetailsDaoImpl" />
|
||||||
<bean id="loadBalancerVMMapDaoImpl" class="com.cloud.network.dao.LoadBalancerVMMapDaoImpl" />
|
<bean id="loadBalancerVMMapDaoImpl" class="com.cloud.network.dao.LoadBalancerVMMapDaoImpl" />
|
||||||
<bean id="imageStoreDaoImpl" class="org.apache.cloudstack.storage.datastore.db.ImageStoreDaoImpl" />
|
<bean id="imageStoreDaoImpl" class="org.apache.cloudstack.storage.datastore.db.ImageStoreDaoImpl" />
|
||||||
<bean id="messageBus" class="org.apache.cloudstack.framework.messagebus.MessageBusBase" />
|
<bean id="messageBus" class="org.apache.cloudstack.framework.messagebus.MessageBusBase" />
|
||||||
<bean id="DiskOfferingDetailsDaoImpl" class="org.apache.cloudstack.resourcedetail.dao.DiskOfferingDetailsDaoImpl" />
|
<bean id="DiskOfferingDetailsDaoImpl" class="org.apache.cloudstack.resourcedetail.dao.DiskOfferingDetailsDaoImpl" />
|
||||||
<bean id="networkOfferingJoinDaoImpl" class="com.cloud.api.query.dao.NetworkOfferingJoinDaoImpl" />
|
<bean id="networkOfferingJoinDaoImpl" class="com.cloud.api.query.dao.NetworkOfferingJoinDaoImpl" />
|
||||||
<bean id="networkOfferingDetailsDaoImpl" class="com.cloud.offerings.dao.NetworkOfferingDetailsDaoImpl" />
|
<bean id="networkOfferingDetailsDaoImpl" class="com.cloud.offerings.dao.NetworkOfferingDetailsDaoImpl" />
|
||||||
<bean id="vMTemplateZoneDaoImpl" class="com.cloud.storage.dao.VMTemplateZoneDaoImpl" />
|
<bean id="vMTemplateZoneDaoImpl" class="com.cloud.storage.dao.VMTemplateZoneDaoImpl" />
|
||||||
<bean id="indirectAgentLBImpl" class="org.apache.cloudstack.agent.lb.IndirectAgentLBServiceImpl" />
|
<bean id="indirectAgentLBImpl" class="org.apache.cloudstack.agent.lb.IndirectAgentLBServiceImpl" />
|
||||||
<bean id="VsphereStoragePolicyDaoImpl" class="com.cloud.dc.dao.VsphereStoragePolicyDaoImpl" />
|
<bean id="VsphereStoragePolicyDaoImpl" class="com.cloud.dc.dao.VsphereStoragePolicyDaoImpl" />
|
||||||
<bean id="annotationDaoImpl" class="org.apache.cloudstack.annotation.dao.AnnotationDaoImpl" />
|
<bean id="annotationDaoImpl" class="org.apache.cloudstack.annotation.dao.AnnotationDaoImpl" />
|
||||||
<bean id="PassphraseDaoImpl" class="org.apache.cloudstack.secret.dao.PassphraseDaoImpl" />
|
<bean id="PassphraseDaoImpl" class="org.apache.cloudstack.secret.dao.PassphraseDaoImpl" />
|
||||||
<bean id="configurationGroupDaoImpl" class="org.apache.cloudstack.framework.config.dao.ConfigurationGroupDaoImpl" />
|
<bean id="configurationGroupDaoImpl" class="org.apache.cloudstack.framework.config.dao.ConfigurationGroupDaoImpl" />
|
||||||
<bean id="configurationSubGroupDaoImpl" class="org.apache.cloudstack.framework.config.dao.ConfigurationSubGroupDaoImpl" />
|
<bean id="configurationSubGroupDaoImpl" class="org.apache.cloudstack.framework.config.dao.ConfigurationSubGroupDaoImpl" />
|
||||||
<bean id="nsxControllerDaoImpl" class="com.cloud.network.dao.NsxProviderDaoImpl" />
|
<bean id="nsxControllerDaoImpl" class="com.cloud.network.dao.NsxProviderDaoImpl" />
|
||||||
<bean id="netrisProviderDaoImpl" class="com.cloud.network.dao.NetrisProviderDaoImpl" />
|
<bean id="netrisProviderDaoImpl" class="com.cloud.network.dao.NetrisProviderDaoImpl" />
|
||||||
<bean id="netrisServiceMock" class="org.apache.cloudstack.service.NetrisServiceMockTest" />
|
<bean id="netrisServiceMock" class="org.apache.cloudstack.service.NetrisServiceMockTest" />
|
||||||
<bean id="vlanDetailsDao" class="com.cloud.dc.dao.VlanDetailsDaoImpl" />
|
<bean id="vlanDetailsDao" class="com.cloud.dc.dao.VlanDetailsDaoImpl" />
|
||||||
<bean id="publicIpQuarantineDaoImpl" class="com.cloud.network.dao.PublicIpQuarantineDaoImpl" />
|
<bean id="publicIpQuarantineDaoImpl" class="com.cloud.network.dao.PublicIpQuarantineDaoImpl" />
|
||||||
<bean id="reservationDao" class="org.apache.cloudstack.reservation.dao.ReservationDaoImpl" />
|
<bean id="reservationDao" class="org.apache.cloudstack.reservation.dao.ReservationDaoImpl" />
|
||||||
<bean id="managementServerHostDao" class="com.cloud.cluster.dao.ManagementServerHostDaoImpl" />
|
<bean id="managementServerHostDao" class="com.cloud.cluster.dao.ManagementServerHostDaoImpl" />
|
||||||
</beans>
|
</beans>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user