當前位置: 首頁>>代碼示例>>C#>>正文


C# ComputeProvider.ListServerMetadata方法代碼示例

本文整理匯總了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");
        }
開發者ID:EdLeafe,項目名稱:openstack.net,代碼行數:14,代碼來源:ComputeTests.cs

示例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);
        }
開發者ID:EdLeafe,項目名稱:openstack.net,代碼行數:8,代碼來源:ComputeTests.cs

示例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");
        }
開發者ID:EdLeafe,項目名稱:openstack.net,代碼行數:12,代碼來源:ComputeTests.cs

示例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);
        }
開發者ID:jmeridth,項目名稱:openstack.net,代碼行數:12,代碼來源:ComputeTests.cs

示例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);
        }
開發者ID:jmeridth,項目名稱:openstack.net,代碼行數:12,代碼來源:ComputeTests.cs

示例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);
        }
開發者ID:bretmcg,項目名稱:openstack.net,代碼行數:14,代碼來源:ComputeTests.cs

示例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);
        }
開發者ID:bretmcg,項目名稱:openstack.net,代碼行數:12,代碼來源:ComputeTests.cs

示例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);
        }
開發者ID:bretmcg,項目名稱:openstack.net,代碼行數:8,代碼來源:ComputeTests.cs


注:本文中的net.openstack.Providers.Rackspace.ComputeProvider.ListServerMetadata方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。