ConoHaNet.OpenStackMember.DeletePool C# (CSharp) Method

DeletePool() public method

public DeletePool ( string poolId ) : bool
poolId string
return bool
        public bool DeletePool(string poolId)
        {
            return NetworksProvider.DeletePool(poolId, this.DefaultRegion, this.Identity);
        }

Usage Example

        public void UpdatePoolTest()
        {
            var os = new OpenStackMember(UserName, Password, TenantName, TenantId);
            // string tenantId = os.IdentityProvider.GetToken(os.Identity).Tenant.Id;

            // create pool
            string pool_name = GetTesterNameByEnv();
            string TokyoLBaas_subnetId = GetSubnetIdByRegion(region: null);
            string[] lbMethods = { "ROUND_ROBIN", "LEAST_CONNECTIONS" };
            string protocol = "TCP";

            foreach (var lbMethod in lbMethods)
            {
                var p = os.CreatePool(pool_name, TokyoLBaas_subnetId, lbMethod, protocol);
                Trace.WriteLine(string.Format("pool Status : {0}", p.Status));
                System.Threading.Thread.Sleep(1000 * 10);
                Trace.WriteLine(string.Format("pool Status : {0}", p.Status));
                try
                {
                    foreach (var newLbMethod in lbMethods)
                    {
                        os.UpdatePool(p.Id, "newName", newLbMethod);

                        // not tested yet.
                        //os.UpdatePool(p.Id, "日本語", lbMethod);
                        //os.UpdatePool(p.Id, "//", lbMethod);
                    }
                }
                finally
                {
                    Assert.IsTrue(os.DeletePool(p.Id));
                }
            }
        }
All Usage Examples Of ConoHaNet.OpenStackMember::DeletePool
OpenStackMember