summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2019-06-21 22:58:17 +0000
committerGerrit Code Review <review@openstack.org>2019-06-21 22:58:17 +0000
commitd103b3dc88635866dc3debe968d4f104777ba6e4 (patch)
tree41c6b3090d1d6ba1928f69690ce68c71f0ada05a
parent17611a72c501ca2096c4a7f7cd98590ac8bc973c (diff)
parentb7742b59371b9e0b2e417547eb2cdaa80954b50d (diff)
downloadpython-openstackclient-d103b3dc88635866dc3debe968d4f104777ba6e4.tar.gz
Merge "Remove deprecated compute commands"
-rw-r--r--doc/source/cli/backwards-incompatible.rst17
-rw-r--r--doc/source/cli/command-objects/floating-ip-pool.rst2
-rw-r--r--doc/source/cli/command-objects/floating-ip.rst2
-rw-r--r--doc/source/cli/command-objects/ip-fixed.rst47
-rw-r--r--doc/source/cli/commands.rst9
-rw-r--r--openstackclient/compute/v2/fixedip.py100
-rw-r--r--openstackclient/compute/v2/floatingip.py97
-rw-r--r--releasenotes/notes/osc4-compute-09246008eff260cb.yaml8
-rw-r--r--setup.cfg6
9 files changed, 27 insertions, 261 deletions
diff --git a/doc/source/cli/backwards-incompatible.rst b/doc/source/cli/backwards-incompatible.rst
index 51c1d134..5e2796fc 100644
--- a/doc/source/cli/backwards-incompatible.rst
+++ b/doc/source/cli/backwards-incompatible.rst
@@ -16,9 +16,20 @@ from this backwards incompatible change handling.
Backwards Incompatible Changes
==============================
-.. Carry this section as comments until 4.0 release
-.. Release 4.0
-.. -----------
+Release 4.0
+-----------
+
+1. Remove ``ip fixed add|remove`` commands.
+ Use ``server add|remove fixed ip`` commands instead.
+
+ * Removed in: 4.0
+ * Commit: https://review.opendev.org/612781
+
+2. Remove ``ip floating add|remove`` commands.
+ Use ``server add|remove floating ip`` commands instead.
+
+ * Removed in: 4.0
+ * Commit: https://review.opendev.org/612781
.. 1. Change ``volume transfer request accept`` to use new option ``--auth-key``
.. rather than a second positional argument.
diff --git a/doc/source/cli/command-objects/floating-ip-pool.rst b/doc/source/cli/command-objects/floating-ip-pool.rst
index 9213b86d..5c8f3aa1 100644
--- a/doc/source/cli/command-objects/floating-ip-pool.rst
+++ b/doc/source/cli/command-objects/floating-ip-pool.rst
@@ -2,7 +2,7 @@
floating ip pool
================
-Compute v2, Network v2
+Network v2
floating ip pool list
---------------------
diff --git a/doc/source/cli/command-objects/floating-ip.rst b/doc/source/cli/command-objects/floating-ip.rst
index 749c32d6..d122ccbe 100644
--- a/doc/source/cli/command-objects/floating-ip.rst
+++ b/doc/source/cli/command-objects/floating-ip.rst
@@ -2,7 +2,7 @@
floating ip
===========
-Compute v2, Network v2
+Network v2
floating ip create
------------------
diff --git a/doc/source/cli/command-objects/ip-fixed.rst b/doc/source/cli/command-objects/ip-fixed.rst
deleted file mode 100644
index f5b11dc6..00000000
--- a/doc/source/cli/command-objects/ip-fixed.rst
+++ /dev/null
@@ -1,47 +0,0 @@
-========
-ip fixed
-========
-
-Compute v2
-
-ip fixed add
-------------
-
-Add fixed IP address to server
-(Deprecated, please use ``server add fixed ip`` instead)
-
-.. program:: ip fixed add
-.. code:: bash
-
- openstack ip fixed add
- <network>
- <server>
-
-.. describe:: <network>
-
- Network to fetch an IP address from (name or ID)
-
-.. describe:: <server>
-
- Server to receive the IP address (name or ID)
-
-ip fixed remove
----------------
-
-Remove fixed IP address from server
-(Deprecated, please use ``server remove fixed ip`` instead)
-
-.. program:: ip fixed remove
-.. code:: bash
-
- openstack ip fixed remove
- <ip-address>
- <server>
-
-.. describe:: <ip-address>
-
- IP address to remove from server (name only)
-
-.. describe:: <server>
-
- Server to remove the IP address from (name or ID)
diff --git a/doc/source/cli/commands.rst b/doc/source/cli/commands.rst
index e302fdad..7c38aa5b 100644
--- a/doc/source/cli/commands.rst
+++ b/doc/source/cli/commands.rst
@@ -95,9 +95,9 @@ referring to both Compute and Volume quotas.
* ``extension``: (**Compute**, **Identity**, **Network**, **Volume**) OpenStack server API extensions
* ``federation protocol``: (**Identity**) the underlying protocol used while federating identities
* ``flavor``: (**Compute**) predefined server configurations: ram, root disk and so on
-* ``fixed ip``: (**Compute**, **Network**) - an internal IP address assigned to a server
-* ``floating ip``: (**Compute**, **Network**) - a public IP address that can be mapped to a server
-* ``floating ip pool``: (**Compute**, **Network**) - a pool of public IP addresses
+* ``fixed ip``: (**Compute**) - an internal IP address assigned to a server
+* ``floating ip``: (**Network**) - a public IP address that can be mapped to a server
+* ``floating ip pool``: (**Network**) - a pool of public IP addresses
* ``group``: (**Identity**) a grouping of users
* ``host``: (**Compute**) - the physical computer running compute services
* ``hypervisor``: (**Compute**) the virtual machine manager
@@ -106,9 +106,6 @@ referring to both Compute and Volume quotas.
* ``image``: (**Image**) a disk image
* ``image member``: (**Image**) a project that is a member of an Image
* ``ip availability``: (**Network**) - details of IP usage of a network
-* ``ip fixed``: (**Compute**, **Network**) - an internal IP address assigned to a server
-* ``ip floating``: (**Compute**, **Network**) - a public IP address that can be mapped to a server
-* ``ip floating pool``: (**Compute**, **Network**) - a pool of public IP addresses
* ``keypair``: (**Compute**) an SSH public key
* ``limits``: (**Compute**, **Volume**) resource usage limits
* ``mapping``: (**Identity**) a definition to translate identity provider attributes to Identity concepts
diff --git a/openstackclient/compute/v2/fixedip.py b/openstackclient/compute/v2/fixedip.py
deleted file mode 100644
index 0c0b619e..00000000
--- a/openstackclient/compute/v2/fixedip.py
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright 2013 OpenStack Foundation
-#
-# 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.
-#
-
-"""Fixed IP action implementations"""
-
-import logging
-
-from osc_lib.command import command
-from osc_lib import utils
-
-from openstackclient.i18n import _
-
-
-class AddFixedIP(command.Command):
- _description = _("Add fixed IP address to server")
-
- # TODO(tangchen): Remove this class and ``ip fixed add`` command
- # two cycles after Mitaka.
-
- # This notifies cliff to not display the help for this command
- deprecated = True
-
- log = logging.getLogger('deprecated')
-
- def get_parser(self, prog_name):
- parser = super(AddFixedIP, self).get_parser(prog_name)
- parser.add_argument(
- "network",
- metavar="<network>",
- help=_("Network to fetch an IP address from (name or ID)"),
- )
- parser.add_argument(
- "server",
- metavar="<server>",
- help=_("Server to receive the IP address (name or ID)"),
- )
- return parser
-
- def take_action(self, parsed_args):
- self.log.warning(_('This command has been deprecated. '
- 'Please use "server add fixed ip" instead.'))
-
- compute_client = self.app.client_manager.compute
-
- network = utils.find_resource(
- compute_client.networks, parsed_args.network)
-
- server = utils.find_resource(
- compute_client.servers, parsed_args.server)
-
- server.add_fixed_ip(network.id)
-
-
-class RemoveFixedIP(command.Command):
- _description = _("Remove fixed IP address from server")
-
- # TODO(tangchen): Remove this class and ``ip fixed remove`` command
- # two cycles after Mitaka.
-
- # This notifies cliff to not display the help for this command
- deprecated = True
-
- log = logging.getLogger('deprecated')
-
- def get_parser(self, prog_name):
- parser = super(RemoveFixedIP, self).get_parser(prog_name)
- parser.add_argument(
- "ip_address",
- metavar="<ip-address>",
- help=_("IP address to remove from server (name only)"),
- )
- parser.add_argument(
- "server",
- metavar="<server>",
- help=_("Server to remove the IP address from (name or ID)"),
- )
- return parser
-
- def take_action(self, parsed_args):
- self.log.warning(_('This command has been deprecated. '
- 'Please use "server remove fixed ip" instead.'))
-
- compute_client = self.app.client_manager.compute
-
- server = utils.find_resource(
- compute_client.servers, parsed_args.server)
-
- server.remove_fixed_ip(parsed_args.ip_address)
diff --git a/openstackclient/compute/v2/floatingip.py b/openstackclient/compute/v2/floatingip.py
deleted file mode 100644
index 69595bed..00000000
--- a/openstackclient/compute/v2/floatingip.py
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright 2013 OpenStack Foundation
-#
-# 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.
-#
-
-"""Floating IP action implementations"""
-
-import logging
-
-from osc_lib.command import command
-from osc_lib import utils
-
-from openstackclient.i18n import _
-
-
-class AddFloatingIP(command.Command):
- _description = _("Add floating IP address to server")
-
- # TODO(tangchen): Remove this class and ``ip floating add`` command
- # two cycles after Mitaka.
-
- # This notifies cliff to not display the help for this command
- deprecated = True
-
- log = logging.getLogger('deprecated')
-
- def get_parser(self, prog_name):
- parser = super(AddFloatingIP, self).get_parser(prog_name)
- parser.add_argument(
- "ip_address",
- metavar="<ip-address>",
- help=_("IP address to add to server (name only)"),
- )
- parser.add_argument(
- "server",
- metavar="<server>",
- help=_("Server to receive the IP address (name or ID)"),
- )
- return parser
-
- def take_action(self, parsed_args):
- self.log.warning(_('This command has been deprecated. '
- 'Please use "server add floating ip" instead.'))
-
- compute_client = self.app.client_manager.compute
-
- server = utils.find_resource(
- compute_client.servers, parsed_args.server)
-
- server.add_floating_ip(parsed_args.ip_address)
-
-
-class RemoveFloatingIP(command.Command):
- _description = _("Remove floating IP address from server")
-
- # TODO(tangchen): Remove this class and ``ip floating remove`` command
- # two cycles after Mitaka.
-
- # This notifies cliff to not display the help for this command
- deprecated = True
-
- log = logging.getLogger('deprecated')
-
- def get_parser(self, prog_name):
- parser = super(RemoveFloatingIP, self).get_parser(prog_name)
- parser.add_argument(
- "ip_address",
- metavar="<ip-address>",
- help=_("IP address to remove from server (name only)"),
- )
- parser.add_argument(
- "server",
- metavar="<server>",
- help=_("Server to remove the IP address from (name or ID)"),
- )
- return parser
-
- def take_action(self, parsed_args):
- self.log.warning(_('This command has been deprecated. '
- 'Please use "server remove floating ip" instead.'))
-
- compute_client = self.app.client_manager.compute
-
- server = utils.find_resource(
- compute_client.servers, parsed_args.server)
-
- server.remove_floating_ip(parsed_args.ip_address)
diff --git a/releasenotes/notes/osc4-compute-09246008eff260cb.yaml b/releasenotes/notes/osc4-compute-09246008eff260cb.yaml
new file mode 100644
index 00000000..ab7baa67
--- /dev/null
+++ b/releasenotes/notes/osc4-compute-09246008eff260cb.yaml
@@ -0,0 +1,8 @@
+---
+upgrade:
+ - |
+ Remove deprecated ``ip fixed add|remove`` commands.
+ Use ``server add|remove fixed ip`` commands instead.
+ - |
+ Remove deprecated ``ip floating add|remove`` commands.
+ Use ``server add|remove floating ip`` commands instead.
diff --git a/setup.cfg b/setup.cfg
index db03c484..031776a9 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -91,12 +91,6 @@ openstack.compute.v2 =
hypervisor_stats_show = openstackclient.compute.v2.hypervisor_stats:ShowHypervisorStats
- ip_fixed_add = openstackclient.compute.v2.fixedip:AddFixedIP
- ip_fixed_remove = openstackclient.compute.v2.fixedip:RemoveFixedIP
-
- ip_floating_add = openstackclient.compute.v2.floatingip:AddFloatingIP
- ip_floating_remove = openstackclient.compute.v2.floatingip:RemoveFloatingIP
-
keypair_create = openstackclient.compute.v2.keypair:CreateKeypair
keypair_delete = openstackclient.compute.v2.keypair:DeleteKeypair
keypair_list = openstackclient.compute.v2.keypair:ListKeypair