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