Merge "Remove deprecated floating_ip_pools API"
This commit is contained in:
commit
06abf1fd21
novaclient
releasenotes/notes
@ -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)
|
||||
|
@ -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)
|
@ -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)
|
||||
|
@ -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')
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user