本文整理匯總了C#中net.openstack.Providers.Rackspace.ComputeProvider.ListServerMetadata方法的典型用法代碼示例。如果您正苦於以下問題:C# ComputeProvider.ListServerMetadata方法的具體用法?C# ComputeProvider.ListServerMetadata怎麽用?C# ComputeProvider.ListServerMetadata使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.openstack.Providers.Rackspace.ComputeProvider
的用法示例。
在下文中一共展示了ComputeProvider.ListServerMetadata方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Test022_Should_Get_The_Updated_Test_Server_Metadata
public void Test022_Should_Get_The_Updated_Test_Server_Metadata()
{
var provider = new net.openstack.Providers.Rackspace.ComputeProvider();
var metadata = provider.ListServerMetadata(_testIdentity, _testServer.Id);
Assert.IsNotNull(metadata);
Assert.IsTrue(metadata.Count == 3);
Assert.IsTrue(metadata.Any(md => md.Key == "Metadata_Key_3"));
Assert.IsTrue(metadata.First(md => md.Key == "Metadata_Key_3").Value == "My_Value_3_Updated_Again");
Assert.IsTrue(metadata.Any(md => md.Key == "Metadata_Key_4"));
Assert.IsTrue(metadata.First(md => md.Key == "Metadata_Key_4").Value == "My_Value_4");
Assert.IsTrue(metadata.Any(md => md.Key == "Metadata_Key_5"));
Assert.IsTrue(metadata.First(md => md.Key == "Metadata_Key_5").Value == "My_Value_5_Updated_Again");
}
示例2: Test006_Should_Get_Empty_Server_Metadata_List
public void Test006_Should_Get_Empty_Server_Metadata_List()
{
var provider = new net.openstack.Providers.Rackspace.ComputeProvider();
var metadata = provider.ListServerMetadata(_testIdentity, _testServer.Id);
Assert.IsNotNull(metadata);
Assert.IsTrue(metadata.Count == 0);
}
示例3: Test008_Should_Get_The_Initial_Test_Server_Metadata
public void Test008_Should_Get_The_Initial_Test_Server_Metadata()
{
var provider = new net.openstack.Providers.Rackspace.ComputeProvider();
var metadata = provider.ListServerMetadata(_testIdentity, _testServer.Id);
Assert.IsNotNull(metadata);
Assert.IsTrue(metadata.Count == 2);
Assert.IsTrue(metadata.Any(md => md.Key == "Metadata_Key_1"));
Assert.IsTrue(metadata.First(md => md.Key == "Metadata_Key_1").Value == "My_Value_1");
Assert.IsTrue(metadata.Any(md => md.Key == "Metadata_Key_2"));
Assert.IsTrue(metadata.First(md => md.Key == "Metadata_Key_2").Value == "My_Value_2");
}
示例4: Test020_Should_Get_The_Updated_Test_Server_Metadata_Excluding_The_Deleted_Item
public void Test020_Should_Get_The_Updated_Test_Server_Metadata_Excluding_The_Deleted_Item()
{
var provider = new net.openstack.Providers.Rackspace.ComputeProvider();
var metadata = provider.ListServerMetadata(_testIdentity, _testServer.Id);
Assert.IsNotNull(metadata);
Assert.IsTrue(metadata.Count == 2);
Assert.IsTrue(metadata.Any(md => md.Key == "Metadata_Key_3"));
Assert.AreEqual("My_Value_3_Updated_Again", metadata.First(md => md.Key == "Metadata_Key_3").Value);
Assert.IsTrue(metadata.Any(md => md.Key == "Metadata_Key_5"));
Assert.AreEqual("My_Value_5_Updated", metadata.First(md => md.Key == "Metadata_Key_5").Value);
}
示例5: Test010_Should_Get_The_Update_Reset_Test_Server_Metadata
public void Test010_Should_Get_The_Update_Reset_Test_Server_Metadata()
{
var provider = new net.openstack.Providers.Rackspace.ComputeProvider();
var metadata = provider.ListServerMetadata(_testIdentity, _testServer.Id);
Assert.IsNotNull(metadata);
Assert.IsTrue(metadata.Count == 2);
Assert.IsTrue(metadata.Any(md => md.Key == "Metadata_Key_3"));
Assert.AreEqual("My_Value_3", metadata.First(md => md.Key == "Metadata_Key_3").Value);
Assert.IsTrue(metadata.Any(md => md.Key == "Metadata_Key_4"));
Assert.AreEqual("My_Value_4", metadata.First(md => md.Key == "Metadata_Key_4").Value);
}
示例6: Test022_Should_Get_The_Updated_Test_Server_Metadata
public void Test022_Should_Get_The_Updated_Test_Server_Metadata()
{
var provider = new ComputeProvider(_testIdentity);
var metadata = provider.ListServerMetadata(_testServer.Id);
Assert.IsNotNull(metadata);
Assert.IsTrue(metadata.Count == 3);
Assert.IsTrue(metadata.Any(md => md.Key == "Metadata_Key_3"));
Assert.AreEqual("My_Value_3_Updated_Again", metadata.First(md => md.Key == "Metadata_Key_3").Value);
Assert.IsTrue(metadata.Any(md => md.Key == "Metadata_Key_4"));
Assert.AreEqual("My_Value_4", metadata.First(md => md.Key == "Metadata_Key_4").Value);
Assert.IsTrue(metadata.Any(md => md.Key == "Metadata_Key_5"));
Assert.AreEqual("My_Value_5_Updated_Again", metadata.First(md => md.Key == "Metadata_Key_5").Value);
}
示例7: Test008_Should_Get_The_Initial_Test_Server_Metadata
public void Test008_Should_Get_The_Initial_Test_Server_Metadata()
{
var provider = new ComputeProvider(_testIdentity);
var metadata = provider.ListServerMetadata(_testServer.Id);
Assert.IsNotNull(metadata);
Assert.IsTrue(metadata.Count == 2);
Assert.IsTrue(metadata.Any(md => md.Key == "Metadata_Key_1"));
Assert.AreEqual("My_Value_1", metadata.First(md => md.Key == "Metadata_Key_1").Value);
Assert.IsTrue(metadata.Any(md => md.Key == "Metadata_Key_2"));
Assert.AreEqual("My_Value_2", metadata.First(md => md.Key == "Metadata_Key_2").Value);
}
示例8: Test006_Should_Get_Empty_Server_Metadata_List
public void Test006_Should_Get_Empty_Server_Metadata_List()
{
var provider = new ComputeProvider(_testIdentity);
var metadata = provider.ListServerMetadata(_testServer.Id);
Assert.IsNotNull(metadata);
Assert.IsTrue(metadata.Count == 0);
}