Remove deprecated floating_ip_pools API

These were deprecated in Newton in change:

aaebeb05a0

Change-Id: I9ec33231bbf060e7daae8f3567a38c71e52f5c42
This commit is contained in:
Matt Riedemann 2017-03-20 17:28:28 -04:00
parent ab3315b46f
commit 31a12984b3
5 changed files with 1 additions and 89 deletions

View File

@ -45,21 +45,3 @@ class FloatingFixture(base.Fixture):
self.requests_mock.post(self.url(),
json=post_os_floating_ips,
headers=self.json_headers)
class PoolsFixture(base.Fixture):
base_url = 'os-floating-ip-pools'
def setUp(self):
super(PoolsFixture, self).setUp()
get_os_floating_ip_pools = {
'floating_ip_pools': [
{'name': 'foo'},
{'name': 'bar'}
]
}
self.requests_mock.get(self.url(),
json=get_os_floating_ip_pools,
headers=self.json_headers)

View File

@ -1,34 +0,0 @@
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
#
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from novaclient.tests.unit.fixture_data import client
from novaclient.tests.unit.fixture_data import floatingips as data
from novaclient.tests.unit import utils
from novaclient.tests.unit.v2 import fakes
from novaclient.v2 import floating_ip_pools
class TestFloatingIPPools(utils.FixturedTestCase):
client_fixture_class = client.V1
data_fixture_class = data.PoolsFixture
def test_list_floating_ips(self):
fl = self.cs.floating_ip_pools.list()
self.assert_request_id(fl, fakes.FAKE_REQUEST_ID_LIST)
self.assert_called('GET', '/os-floating-ip-pools')
for f in fl:
self.assertIsInstance(f, floating_ip_pools.FloatingIPPool)

View File

@ -31,7 +31,6 @@ from novaclient.v2 import contrib
from novaclient.v2 import fixed_ips
from novaclient.v2 import flavor_access
from novaclient.v2 import flavors
from novaclient.v2 import floating_ip_pools
from novaclient.v2 import floating_ips
from novaclient.v2 import fping
from novaclient.v2 import hosts
@ -161,7 +160,6 @@ class Client(object):
self.cloudpipe = cloudpipe.CloudpipeManager(self)
self.certs = certs.CertificateManager(self)
self.floating_ips = floating_ips.FloatingIPManager(self)
self.floating_ip_pools = floating_ip_pools.FloatingIPPoolManager(self)
self.fping = fping.FpingManager(self)
self.volumes = volumes.VolumeManager(self)
self.keypairs = keypairs.KeypairManager(self)

View File

@ -1,35 +0,0 @@
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
#
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from novaclient import api_versions
from novaclient import base
class FloatingIPPool(base.Resource):
"""DEPRECATED"""
def __repr__(self):
return "<FloatingIPPool: name=%s>" % self.name
class FloatingIPPoolManager(base.ManagerWithFind):
"""DEPRECATED"""
resource_class = FloatingIPPool
@api_versions.deprecated_after('2.35')
def list(self):
"""DEPRECATED: Retrieve a list of all floating ip pools."""
return self._list('/os-floating-ip-pools', 'floating_ip_pools')

View File

@ -56,6 +56,7 @@ upgrade:
* novaclient.v2.contrib.tenant_networks
* novaclient.v2.floating_ip_dns
* novaclient.v2.floating_ip_pools
* novaclient.v2.floating_ips_bulk
deprecations: