本文整理汇总了C#中net.openstack.Providers.Rackspace.ComputeProvider.UpdateServerMetadata方法的典型用法代码示例。如果您正苦于以下问题:C# ComputeProvider.UpdateServerMetadata方法的具体用法?C# ComputeProvider.UpdateServerMetadata怎么用?C# ComputeProvider.UpdateServerMetadata使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.openstack.Providers.Rackspace.ComputeProvider
的用法示例。
在下文中一共展示了ComputeProvider.UpdateServerMetadata方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Test011_Should_Set_Update_All_Server_Metadata_Items
public void Test011_Should_Set_Update_All_Server_Metadata_Items()
{
var provider = new net.openstack.Providers.Rackspace.ComputeProvider();
var metadata = new Metadata() { { "Metadata_Key_3", "My_Value_3_Updated" }, { "Metadata_Key_4", "My_Value_4_Updated" } };
var response = provider.UpdateServerMetadata(_testIdentity, _testServer.Id, metadata);
Thread.Sleep(10000); // Sleep a few seconds because there is an edge case that the system does not reflect the new metadata changes quick enough
Assert.IsTrue(response);
}
示例2: Test021_Should_Set_Update_Two_Of_The_Three_Server_Metadata_Items
public void Test021_Should_Set_Update_Two_Of_The_Three_Server_Metadata_Items()
{
var provider = new net.openstack.Providers.Rackspace.ComputeProvider();
var metadata = new Metadata() { { "Metadata_Key_4", "My_Value_4" }, { "Metadata_Key_5", "My_Value_5_Updated_Again" } };
var response = provider.UpdateServerMetadata(_testIdentity, _testServer.Id, metadata);
Assert.IsTrue(response);
}
示例3: Test015_Should_Set_Update_Two_Of_The_Three_Server_Metadata_Items
public void Test015_Should_Set_Update_Two_Of_The_Three_Server_Metadata_Items()
{
var provider = new ComputeProvider(_testIdentity);
var metadata = new Metadata() { { "Metadata_Key_3", "My_Value_3_Updated_Again" }, { "Metadata_Key_5", "My_Value_5_Updated" } };
var response = provider.UpdateServerMetadata(_testServer.Id, metadata);
Assert.IsTrue(response);
}