From ea89065dabf92c2684e55c4b37c7be9b667cfa1e Mon Sep 17 00:00:00 2001 From: Dongcan Ye Date: Thu, 22 Feb 2018 09:25:32 +0000 Subject: [PATCH] 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 --- .../cli/command-objects/ip-floating-pool.rst | 16 --- .../cli/command-objects/ip-floating.rst | 129 ------------------ openstackclient/network/v2/floating_ip.py | 98 ------------- .../network/v2/floating_ip_pool.py | 25 ---- ...ip-floating-commands-d5363f313e09249a.yaml | 4 + setup.cfg | 7 - 6 files changed, 4 insertions(+), 275 deletions(-) delete mode 100644 doc/source/cli/command-objects/ip-floating-pool.rst delete mode 100644 doc/source/cli/command-objects/ip-floating.rst create mode 100644 releasenotes/notes/remove-ip-floating-commands-d5363f313e09249a.yaml diff --git a/doc/source/cli/command-objects/ip-floating-pool.rst b/doc/source/cli/command-objects/ip-floating-pool.rst deleted file mode 100644 index 6d00355ab4..0000000000 --- a/doc/source/cli/command-objects/ip-floating-pool.rst +++ /dev/null @@ -1,16 +0,0 @@ -================ -ip floating pool -================ - -Compute v2 - -ip floating pool list ---------------------- - -List pools of floating IP addresses -(Deprecated, please use ``floating ip pool list`` instead) - -.. program:: ip floating pool list -.. code:: bash - - openstack ip floating pool list diff --git a/doc/source/cli/command-objects/ip-floating.rst b/doc/source/cli/command-objects/ip-floating.rst deleted file mode 100644 index 4e5f7b008a..0000000000 --- a/doc/source/cli/command-objects/ip-floating.rst +++ /dev/null @@ -1,129 +0,0 @@ -=========== -ip floating -=========== - -Compute v2, Network v2 - -ip floating add ---------------- - -Add floating IP address to server -(Deprecated, please use ``server add floating ip`` instead) - -.. program:: ip floating add -.. code:: bash - - openstack ip floating add - - - -.. describe:: - - IP address to add to server (name only) - -.. describe:: - - Server to receive the IP address (name or ID) - -ip floating create ------------------- - -Create new floating IP address -(Deprecated, please use ``floating ip create`` instead) - -.. program:: ip floating create -.. code:: bash - - openstack ip floating create - [--subnet ] - [--port ] - [--floating-ip-address ] - [--fixed-ip-address ] - - -.. option:: --subnet - - Subnet on which you want to create the floating IP (name or ID) - (Network v2 only) - -.. option:: --port - - Port to be associated with the floating IP (name or ID) - (Network v2 only) - -.. option:: --floating-ip-address - - Floating IP address - (Network v2 only) - -.. option:: --fixed-ip-address - - Fixed IP address mapped to the floating IP - (Network v2 only) - -.. describe:: - - Network to allocate floating IP from (name or ID) - -ip floating delete ------------------- - -Delete floating IP(s) -(Deprecated, please use ``floating ip delete`` instead) - -.. program:: ip floating delete -.. code:: bash - - openstack ip floating delete - [ ...] - -.. describe:: - - Floating IP(s) to delete (IP address or ID) - -ip floating list ----------------- - -List floating IP addresses -(Deprecated, please use ``floating ip list`` instead) - -.. program:: ip floating list -.. code:: bash - - openstack ip floating list - -ip floating remove ------------------- - -Remove floating IP address from server -(Deprecated, please use ``server remove floating ip`` instead) - -.. program:: ip floating remove -.. code:: bash - - openstack ip floating remove - - - -.. describe:: - - IP address to remove from server (name only) - -.. describe:: - - Server to remove the IP address from (name or ID) - -ip floating show ----------------- - -Display floating IP details -(Deprecated, please use ``floating ip show`` instead) - -.. program:: ip floating show -.. code:: bash - - openstack ip floating show - -.. describe:: - - Floating IP to display (IP address or ID) diff --git a/openstackclient/network/v2/floating_ip.py b/openstackclient/network/v2/floating_ip.py index a6f0340466..6de138c150 100644 --- a/openstackclient/network/v2/floating_ip.py +++ b/openstackclient/network/v2/floating_ip.py @@ -13,8 +13,6 @@ """IP Floating action implementations""" -import logging - from osc_lib.command import command from osc_lib import utils @@ -155,30 +153,6 @@ class CreateFloatingIP(common.NetworkAndComputeShowOne): return (columns, data) -class CreateIPFloating(CreateFloatingIP): - _description = _("Create floating IP") - - # TODO(tangchen): Remove this class and ``ip floating create`` command - # two cycles after Mitaka. - - # This notifies cliff to not display the help for this command - deprecated = True - - log = logging.getLogger('deprecated') - - def take_action_network(self, client, parsed_args): - self.log.warning(_('This command has been deprecated. ' - 'Please use "floating ip create" instead.')) - return super(CreateIPFloating, self).take_action_network( - client, parsed_args) - - def take_action_compute(self, client, parsed_args): - self.log.warning(_('This command has been deprecated. ' - 'Please use "floating ip create" instead.')) - return super(CreateIPFloating, self).take_action_compute( - client, parsed_args) - - class DeleteFloatingIP(common.NetworkAndComputeDelete): _description = _("Delete floating IP(s)") @@ -206,30 +180,6 @@ class DeleteFloatingIP(common.NetworkAndComputeDelete): client.api.floating_ip_delete(self.r) -class DeleteIPFloating(DeleteFloatingIP): - _description = _("Delete floating IP(s)") - - # TODO(tangchen): Remove this class and ``ip floating delete`` command - # two cycles after Mitaka. - - # This notifies cliff to not display the help for this command - deprecated = True - - log = logging.getLogger('deprecated') - - def take_action_network(self, client, parsed_args): - self.log.warning(_('This command has been deprecated. ' - 'Please use "floating ip delete" instead.')) - return super(DeleteIPFloating, self).take_action_network( - client, parsed_args) - - def take_action_compute(self, client, parsed_args): - self.log.warning(_('This command has been deprecated. ' - 'Please use "floating ip delete" instead.')) - return super(DeleteIPFloating, self).take_action_compute( - client, parsed_args) - - class ListFloatingIP(common.NetworkAndComputeLister): # TODO(songminglong): Use SDK resource mapped attribute names once # the OSC minimum requirements include SDK 1.0 @@ -375,30 +325,6 @@ class ListFloatingIP(common.NetworkAndComputeLister): ) for s in data)) -class ListIPFloating(ListFloatingIP): - _description = _("List floating IP(s)") - - # TODO(tangchen): Remove this class and ``ip floating list`` command - # two cycles after Mitaka. - - # This notifies cliff to not display the help for this command - deprecated = True - - log = logging.getLogger('deprecated') - - def take_action_network(self, client, parsed_args): - self.log.warning(_('This command has been deprecated. ' - 'Please use "floating ip list" instead.')) - return super(ListIPFloating, self).take_action_network( - client, parsed_args) - - def take_action_compute(self, client, parsed_args): - self.log.warning(_('This command has been deprecated. ' - 'Please use "floating ip list" instead.')) - return super(ListIPFloating, self).take_action_compute( - client, parsed_args) - - class SetFloatingIP(command.Command): _description = _("Set floating IP Properties") @@ -483,30 +409,6 @@ class ShowFloatingIP(common.NetworkAndComputeShowOne): return (columns, data) -class ShowIPFloating(ShowFloatingIP): - _description = _("Display floating IP details") - - # TODO(tangchen): Remove this class and ``ip floating show`` command - # two cycles after Mitaka. - - # This notifies cliff to not display the help for this command - deprecated = True - - log = logging.getLogger('deprecated') - - def take_action_network(self, client, parsed_args): - self.log.warning(_('This command has been deprecated. ' - 'Please use "floating ip show" instead.')) - return super(ShowIPFloating, self).take_action_network( - client, parsed_args) - - def take_action_compute(self, client, parsed_args): - self.log.warning(_('This command has been deprecated. ' - 'Please use "floating ip show" instead.')) - return super(ShowIPFloating, self).take_action_compute( - client, parsed_args) - - class UnsetFloatingIP(command.Command): _description = _("Unset floating IP Properties") diff --git a/openstackclient/network/v2/floating_ip_pool.py b/openstackclient/network/v2/floating_ip_pool.py index ebb15da8d7..32852004c5 100644 --- a/openstackclient/network/v2/floating_ip_pool.py +++ b/openstackclient/network/v2/floating_ip_pool.py @@ -13,7 +13,6 @@ """Floating IP Pool action implementations""" -import logging from osc_lib import exceptions from osc_lib import utils @@ -40,27 +39,3 @@ class ListFloatingIPPool(common.NetworkAndComputeLister): (utils.get_dict_properties( s, columns, ) for s in data)) - - -class ListIPFloatingPool(ListFloatingIPPool): - _description = _("List pools of floating IP addresses") - - # TODO(tangchen): Remove this class and ``ip floating pool list`` command - # two cycles after Mitaka. - - # This notifies cliff to not display the help for this command - deprecated = True - - log = logging.getLogger('deprecated') - - def take_action_network(self, client, parsed_args): - self.log.warning(_('This command has been deprecated. ' - 'Please use "floating ip pool list" instead.')) - return super(ListIPFloatingPool, self).take_action_network( - client, parsed_args) - - def take_action_compute(self, client, parsed_args): - self.log.warning(_('This command has been deprecated. ' - 'Please use "floating ip pool list" instead.')) - return super(ListIPFloatingPool, self).take_action_compute( - client, parsed_args) diff --git a/releasenotes/notes/remove-ip-floating-commands-d5363f313e09249a.yaml b/releasenotes/notes/remove-ip-floating-commands-d5363f313e09249a.yaml new file mode 100644 index 0000000000..9e223a412a --- /dev/null +++ b/releasenotes/notes/remove-ip-floating-commands-d5363f313e09249a.yaml @@ -0,0 +1,4 @@ +--- +other: + - | + Remove deprecated ``ip floating`` and ``ip floating pool`` commands. diff --git a/setup.cfg b/setup.cfg index 63bfdafb13..71a3dee524 100644 --- a/setup.cfg +++ b/setup.cfg @@ -365,13 +365,6 @@ openstack.network.v2 = ip_availability_list = openstackclient.network.v2.ip_availability:ListIPAvailability ip_availability_show = openstackclient.network.v2.ip_availability:ShowIPAvailability - ip_floating_create = openstackclient.network.v2.floating_ip:CreateIPFloating - ip_floating_delete = openstackclient.network.v2.floating_ip:DeleteIPFloating - ip_floating_list = openstackclient.network.v2.floating_ip:ListIPFloating - ip_floating_show = openstackclient.network.v2.floating_ip:ShowIPFloating - - ip_floating_pool_list = openstackclient.network.v2.floating_ip_pool:ListIPFloatingPool - network_agent_add_network = openstackclient.network.v2.network_agent:AddNetworkToAgent network_agent_add_router = openstackclient.network.v2.network_agent:AddRouterToAgent network_agent_delete = openstackclient.network.v2.network_agent:DeleteNetworkAgent