本文整理汇总了C#中net.openstack.Providers.Rackspace.ComputeProvider.GetDetails方法的典型用法代码示例。如果您正苦于以下问题:C# ComputeProvider.GetDetails方法的具体用法?C# ComputeProvider.GetDetails怎么用?C# ComputeProvider.GetDetails使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.openstack.Providers.Rackspace.ComputeProvider
的用法示例。
在下文中一共展示了ComputeProvider.GetDetails方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Test002_Should_Get_Details_For_Newly_Created_Server_In_DFW
public void Test002_Should_Get_Details_For_Newly_Created_Server_In_DFW()
{
var provider = new net.openstack.Providers.Rackspace.ComputeProvider();
var serverDetails = provider.GetDetails(_testIdentity, _testServer.Id);
Assert.IsNotNull(serverDetails);
Assert.AreEqual("net-sdk-test-server", serverDetails.Name);
Assert.AreEqual("d531a2dd-7ae9-4407-bb5a-e5ea03303d98", serverDetails.Image.Id);
Assert.AreEqual("2", serverDetails.Flavor.Id);
}
示例2: Test003_Should_Wait_Until_Server_Becomes_Active_Or_A_Maximum_Of_10_Minutes
public void Test003_Should_Wait_Until_Server_Becomes_Active_Or_A_Maximum_Of_10_Minutes()
{
var provider = new net.openstack.Providers.Rackspace.ComputeProvider();
var serverDetails = provider.GetDetails(_testIdentity, _testServer.Id);
Assert.IsNotNull(serverDetails);
int count = 0;
while (!serverDetails.Status.Equals("ACTIVE") && !serverDetails.Status.Equals("ERROR") && !serverDetails.Status.Equals("UNKNOWN") && !serverDetails.Status.Equals("SUSPENDED") && count < 600)
{
Thread.Sleep(2400);
serverDetails = provider.GetDetails(_testIdentity, _testServer.Id);
count++;
}
Assert.IsNotNull(serverDetails);
Assert.AreEqual("ACTIVE", serverDetails.Status);
}
示例3: Test025_Should_Successfully_To_And_Login_With_New_Password
public void Test025_Should_Successfully_To_And_Login_With_New_Password()
{
var provider = new net.openstack.Providers.Rackspace.ComputeProvider();
var serverDetails = provider.GetDetails(_testIdentity, _testServer.Id);
using(var client = new Renci.SshNet.SshClient(serverDetails.AccessIPv4, "root", NewPassword))
{
client.Connect();
Assert.IsTrue(client.IsConnected);
}
}
示例4: while
public void Test101_Should_Wait_A_Max_Of_10_Minutes_For_The_Server_Is_Deleted_Indicated_By_A_Null_Return_Value_For_Details()
{
var provider = new net.openstack.Providers.Rackspace.ComputeProvider();
var details = provider.GetDetails(_testIdentity, _testServer.Id);
Assert.IsNotNull(details);
while (details != null && (!details.Status.Equals("DELETED") && !details.Status.Equals("ERROR") && !details.Status.Equals("UNKNOWN") && !details.Status.Equals("SUSPENDED")))
{
Thread.Sleep(1000);
details = provider.GetDetails(_testIdentity, _testServer.Id);
}
if(details != null)
Assert.AreEqual("DELETED", details.Status);
}
示例5: Should_Get_Details_For_Newly_Created_Complex_Server_In_DFW
public void Should_Get_Details_For_Newly_Created_Complex_Server_In_DFW()
{
var provider = new ComputeProvider(_testIdentity);
var serverDetails = provider.GetDetails(_testServer2.Id);
Assert.IsNotNull(serverDetails);
Assert.AreEqual("net-sdk-test-server2", serverDetails.Name);
Assert.AreEqual("d531a2dd-7ae9-4407-bb5a-e5ea03303d98", serverDetails.Image.Id);
Assert.AreEqual("2", serverDetails.Flavor.Id);
}
示例6: Test025_Should_Successfully_To_And_Login_With_New_Password
public void Test025_Should_Successfully_To_And_Login_With_New_Password()
{
var provider = new net.openstack.Providers.Rackspace.ComputeProvider();
var serverDetails = provider.GetDetails(_testIdentity, _testServer.Id);
bool sucess = false;
for (int i = 0; i < 10; i++ )
{
using (var client = new Renci.SshNet.SshClient(serverDetails.AccessIPv4, "root", NewPassword))
{
client.Connect();
sucess = client.IsConnected;
if (sucess)
break;
}
Thread.Sleep(1000);
}
Assert.IsTrue(sucess);
}
示例7: Should_Rebuild_Server
public void Should_Rebuild_Server()
{
var provider = new ComputeProvider(_testIdentity);
_preBuildDetails = provider.GetDetails(_testServer.Id);
var image = provider.ListImages().First(i => i.Name.Contains("CentOS") && i.Id != _preBuildDetails.Image.Id);
var flavor = int.Parse(_preBuildDetails.Flavor.Id) + 1;
_rebuildServer = provider.RebuildServer(_testServer.Id, string.Format("{0}_REBUILD", _preBuildDetails.Name), image.Id, flavor.ToString(), _testServer.AdminPassword);
Assert.IsNotNull(_rebuildServer);
}
示例8: Should_Resize_Server_Back
public void Should_Resize_Server_Back()
{
Assert.IsTrue(_resizeSuccess);
var provider = new ComputeProvider(_testIdentity);
var details = provider.GetDetails(_testServer.Id);
var flavor = int.Parse(details.Flavor.Id) - 1;
_resizeSuccess = provider.ResizeServer(_testServer.Id, string.Format("{0}_RESIZED_BACK", details.Name), flavor.ToString());
Assert.IsTrue(_resizeSuccess);
}
示例9: Should_Match_AccessIPv6_and_Public_Network_IP
public void Should_Match_AccessIPv6_and_Public_Network_IP()
{
var provider = new ComputeProvider(_testIdentity);
var server = provider.GetDetails(_testServer2.Id);
Assert.AreEqual(server.AccessIPv6, server.Addresses.Public.First(a => a.Version.Equals("6")).Address);
}
示例10: Should_Contain_Network_Addresses_For_Server2
public void Should_Contain_Network_Addresses_For_Server2()
{
var provider = new ComputeProvider(_testIdentity);
var server = provider.GetDetails(_testServer2.Id);
Assert.IsTrue(server.Addresses.Public.Any());
Assert.IsTrue(server.Addresses.Private.Any());
}
示例11: Should_Contain_AccessIP_v6_Address_For_Server2
public void Should_Contain_AccessIP_v6_Address_For_Server2()
{
var provider = new ComputeProvider(_testIdentity);
var server = provider.GetDetails(_testServer2.Id);
Assert.IsTrue(!string.IsNullOrWhiteSpace(server.AccessIPv6));
}
示例12: Should_Create_Image_From_Server
public void Should_Create_Image_From_Server()
{
var provider = new ComputeProvider(_testIdentity);
var detail = provider.GetDetails(_testServer.Id);
_testImageName = "Image_of_" + detail.Id;
var sucess = provider.CreateImage(detail.Id, _testImageName);
Assert.IsTrue(sucess);
}
示例13: Test023_Should_Successfully_To_And_Login_With_Old_Password
public void Test023_Should_Successfully_To_And_Login_With_Old_Password()
{
var provider = new ComputeProvider(_testIdentity);
var serverDetails = provider.GetDetails(_testServer.Id);
using(var client = new Renci.SshNet.SshClient(serverDetails.AccessIPv4, "root", _testServer.AdminPassword))
{
client.Connect();
Assert.IsTrue(client.IsConnected);
}
}