Skip to content

Commit ea89065

Browse files
committed
Remove deprecated ip floating commands
We had already implemented floating ip(pool) commands more than two cycles, we can remove those deprecated commands. Change-Id: Ib98a7403a63bb0c48c03de4c79795737de2aa84c
1 parent 7505831 commit ea89065

6 files changed

Lines changed: 4 additions & 275 deletions

File tree

doc/source/cli/command-objects/ip-floating-pool.rst

Lines changed: 0 additions & 16 deletions
This file was deleted.

doc/source/cli/command-objects/ip-floating.rst

Lines changed: 0 additions & 129 deletions
This file was deleted.

openstackclient/network/v2/floating_ip.py

Lines changed: 0 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
"""IP Floating action implementations"""
1515

16-
import logging
17-
1816
from osc_lib.command import command
1917
from osc_lib import utils
2018

@@ -155,30 +153,6 @@ def take_action_compute(self, client, parsed_args):
155153
return (columns, data)
156154

157155

158-
class CreateIPFloating(CreateFloatingIP):
159-
_description = _("Create floating IP")
160-
161-
# TODO(tangchen): Remove this class and ``ip floating create`` command
162-
# two cycles after Mitaka.
163-
164-
# This notifies cliff to not display the help for this command
165-
deprecated = True
166-
167-
log = logging.getLogger('deprecated')
168-
169-
def take_action_network(self, client, parsed_args):
170-
self.log.warning(_('This command has been deprecated. '
171-
'Please use "floating ip create" instead.'))
172-
return super(CreateIPFloating, self).take_action_network(
173-
client, parsed_args)
174-
175-
def take_action_compute(self, client, parsed_args):
176-
self.log.warning(_('This command has been deprecated. '
177-
'Please use "floating ip create" instead.'))
178-
return super(CreateIPFloating, self).take_action_compute(
179-
client, parsed_args)
180-
181-
182156
class DeleteFloatingIP(common.NetworkAndComputeDelete):
183157
_description = _("Delete floating IP(s)")
184158

@@ -206,30 +180,6 @@ def take_action_compute(self, client, parsed_args):
206180
client.api.floating_ip_delete(self.r)
207181

208182

209-
class DeleteIPFloating(DeleteFloatingIP):
210-
_description = _("Delete floating IP(s)")
211-
212-
# TODO(tangchen): Remove this class and ``ip floating delete`` command
213-
# two cycles after Mitaka.
214-
215-
# This notifies cliff to not display the help for this command
216-
deprecated = True
217-
218-
log = logging.getLogger('deprecated')
219-
220-
def take_action_network(self, client, parsed_args):
221-
self.log.warning(_('This command has been deprecated. '
222-
'Please use "floating ip delete" instead.'))
223-
return super(DeleteIPFloating, self).take_action_network(
224-
client, parsed_args)
225-
226-
def take_action_compute(self, client, parsed_args):
227-
self.log.warning(_('This command has been deprecated. '
228-
'Please use "floating ip delete" instead.'))
229-
return super(DeleteIPFloating, self).take_action_compute(
230-
client, parsed_args)
231-
232-
233183
class ListFloatingIP(common.NetworkAndComputeLister):
234184
# TODO(songminglong): Use SDK resource mapped attribute names once
235185
# the OSC minimum requirements include SDK 1.0
@@ -375,30 +325,6 @@ def take_action_compute(self, client, parsed_args):
375325
) for s in data))
376326

377327

378-
class ListIPFloating(ListFloatingIP):
379-
_description = _("List floating IP(s)")
380-
381-
# TODO(tangchen): Remove this class and ``ip floating list`` command
382-
# two cycles after Mitaka.
383-
384-
# This notifies cliff to not display the help for this command
385-
deprecated = True
386-
387-
log = logging.getLogger('deprecated')
388-
389-
def take_action_network(self, client, parsed_args):
390-
self.log.warning(_('This command has been deprecated. '
391-
'Please use "floating ip list" instead.'))
392-
return super(ListIPFloating, self).take_action_network(
393-
client, parsed_args)
394-
395-
def take_action_compute(self, client, parsed_args):
396-
self.log.warning(_('This command has been deprecated. '
397-
'Please use "floating ip list" instead.'))
398-
return super(ListIPFloating, self).take_action_compute(
399-
client, parsed_args)
400-
401-
402328
class SetFloatingIP(command.Command):
403329
_description = _("Set floating IP Properties")
404330

@@ -483,30 +409,6 @@ def take_action_compute(self, client, parsed_args):
483409
return (columns, data)
484410

485411

486-
class ShowIPFloating(ShowFloatingIP):
487-
_description = _("Display floating IP details")
488-
489-
# TODO(tangchen): Remove this class and ``ip floating show`` command
490-
# two cycles after Mitaka.
491-
492-
# This notifies cliff to not display the help for this command
493-
deprecated = True
494-
495-
log = logging.getLogger('deprecated')
496-
497-
def take_action_network(self, client, parsed_args):
498-
self.log.warning(_('This command has been deprecated. '
499-
'Please use "floating ip show" instead.'))
500-
return super(ShowIPFloating, self).take_action_network(
501-
client, parsed_args)
502-
503-
def take_action_compute(self, client, parsed_args):
504-
self.log.warning(_('This command has been deprecated. '
505-
'Please use "floating ip show" instead.'))
506-
return super(ShowIPFloating, self).take_action_compute(
507-
client, parsed_args)
508-
509-
510412
class UnsetFloatingIP(command.Command):
511413
_description = _("Unset floating IP Properties")
512414

openstackclient/network/v2/floating_ip_pool.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
"""Floating IP Pool action implementations"""
1515

16-
import logging
1716

1817
from osc_lib import exceptions
1918
from osc_lib import utils
@@ -40,27 +39,3 @@ def take_action_compute(self, client, parsed_args):
4039
(utils.get_dict_properties(
4140
s, columns,
4241
) for s in data))
43-
44-
45-
class ListIPFloatingPool(ListFloatingIPPool):
46-
_description = _("List pools of floating IP addresses")
47-
48-
# TODO(tangchen): Remove this class and ``ip floating pool list`` command
49-
# two cycles after Mitaka.
50-
51-
# This notifies cliff to not display the help for this command
52-
deprecated = True
53-
54-
log = logging.getLogger('deprecated')
55-
56-
def take_action_network(self, client, parsed_args):
57-
self.log.warning(_('This command has been deprecated. '
58-
'Please use "floating ip pool list" instead.'))
59-
return super(ListIPFloatingPool, self).take_action_network(
60-
client, parsed_args)
61-
62-
def take_action_compute(self, client, parsed_args):
63-
self.log.warning(_('This command has been deprecated. '
64-
'Please use "floating ip pool list" instead.'))
65-
return super(ListIPFloatingPool, self).take_action_compute(
66-
client, parsed_args)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
other:
3+
- |
4+
Remove deprecated ``ip floating`` and ``ip floating pool`` commands.

setup.cfg

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -365,13 +365,6 @@ openstack.network.v2 =
365365
ip_availability_list = openstackclient.network.v2.ip_availability:ListIPAvailability
366366
ip_availability_show = openstackclient.network.v2.ip_availability:ShowIPAvailability
367367

368-
ip_floating_create = openstackclient.network.v2.floating_ip:CreateIPFloating
369-
ip_floating_delete = openstackclient.network.v2.floating_ip:DeleteIPFloating
370-
ip_floating_list = openstackclient.network.v2.floating_ip:ListIPFloating
371-
ip_floating_show = openstackclient.network.v2.floating_ip:ShowIPFloating
372-
373-
ip_floating_pool_list = openstackclient.network.v2.floating_ip_pool:ListIPFloatingPool
374-
375368
network_agent_add_network = openstackclient.network.v2.network_agent:AddNetworkToAgent
376369
network_agent_add_router = openstackclient.network.v2.network_agent:AddRouterToAgent
377370
network_agent_delete = openstackclient.network.v2.network_agent:DeleteNetworkAgent

0 commit comments

Comments
 (0)