Remove deprecated compute commands
The following were deprecated over two years ago and can now be removed: * ``ip fixed add|remove`` in favor of ``server add|remove fixed ip`` * ``ip floating add|remove`` in favor of ``server add|remove floating ip`` These are backwards incompatible changes and will require a major version bump after they are merged. Change-Id: I10c4d32a3c0b55ad41a02afd3b14249bafcb55a9 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com> Signed-off-by: Dean Troyer <dtroyer@gmail.com>
This commit is contained in:
parent
91bc0f35de
commit
b7742b5937
@ -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.
|
||||
|
@ -2,7 +2,7 @@
|
||||
floating ip pool
|
||||
================
|
||||
|
||||
Compute v2, Network v2
|
||||
Network v2
|
||||
|
||||
floating ip pool list
|
||||
---------------------
|
||||
|
@ -2,7 +2,7 @@
|
||||
floating ip
|
||||
===========
|
||||
|
||||
Compute v2, Network v2
|
||||
Network v2
|
||||
|
||||
floating ip create
|
||||
------------------
|
||||
|
@ -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)
|
@ -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
|
||||
|
@ -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)
|
@ -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)
|
8
releasenotes/notes/osc4-compute-09246008eff260cb.yaml
Normal file
8
releasenotes/notes/osc4-compute-09246008eff260cb.yaml
Normal file
@ -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.
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user