本文整理汇总了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);
}