当前位置: 首页>>代码示例>>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;未经允许,请勿转载。