Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 88aeb7e

Browse filesBrowse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Remove nova-network support"
2 parents 1eb8c24 + 70a4da2 commit 88aeb7e
Copy full SHA for 88aeb7e

27 files changed

+410-3,269Lines changed: 410 additions & 3269 deletions
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/source/cli/backwards-incompatible.rst‎

Copy file name to clipboardExpand all lines: doc/source/cli/backwards-incompatible.rst
+12Lines changed: 12 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ from this backwards incompatible change handling.
1616
Backwards Incompatible Changes
1717
==============================
1818

19+
Release 10.0
20+
------------
21+
22+
1. Nova network support was removed from the networking commands.
23+
24+
As Neutron has been the preferred networking solution in
25+
Openstack for close to ten years, the old Nova network
26+
code was finally removed. All networking API calls are still
27+
supported, but they will only use the Neutron API endpoint.
28+
29+
* Commit: https://review.opendev.org/981613
30+
1931
Release 4.0
2032
-----------
2133

Collapse file

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

Copy file name to clipboardExpand all lines: doc/source/cli/command-objects/floating-ip-pool.rst
-8Lines changed: 0 additions & 8 deletions
This file was deleted.
Collapse file

‎doc/source/cli/commands.rst‎

Copy file name to clipboardExpand all lines: doc/source/cli/commands.rst
-1Lines changed: 0 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ referring to both Compute and Volume quotas.
9999
* ``flavor``: (**Compute**) predefined server configurations: ram, root disk and so on
100100
* ``fixed ip``: (**Compute**) - an internal IP address assigned to a server
101101
* ``floating ip``: (**Network**) - a public IP address that can be mapped to a server
102-
* ``floating ip pool``: (**Network**) - a pool of public IP addresses
103102
* ``group``: (**Identity**) a grouping of users
104103
* ``host``: (**Compute**) - the physical computer running compute services
105104
* ``hypervisor``: (**Compute**) the virtual machine manager
Collapse file

‎doc/source/contributor/command-errors.rst‎

Copy file name to clipboardExpand all lines: doc/source/contributor/command-errors.rst
+7-19Lines changed: 7 additions & 19 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,11 @@ multiple ``delete_network()`` calls.
172172

173173
.. code-block:: python
174174
175-
class DeleteNetwork(common.NetworkAndComputeCommand):
175+
class DeleteNetwork(common.NetworkDelete):
176176
"""Delete network(s)"""
177177
178-
def update_parser_common(self, parser):
178+
def get_parser(self, prog_name):
179+
parser = super().get_parser(prog_name)
179180
parser.add_argument(
180181
'network',
181182
metavar="<network>",
@@ -184,20 +185,7 @@ multiple ``delete_network()`` calls.
184185
)
185186
return parser
186187
187-
def take_action(self, client, parsed_args):
188-
ret = 0
189-
190-
for network in parsed_args.network:
191-
try:
192-
obj = client.find_network(network, ignore_missing=False)
193-
client.delete_network(obj)
194-
except Exception:
195-
LOG.error(_("Failed to delete network with name "
196-
"or ID %s."), network)
197-
ret += 1
198-
199-
if ret > 0:
200-
total = len(parsed_args.network)
201-
msg = (_("Failed to delete %(ret)s of %(total)s networks.")
202-
% {"ret": ret, "total": total})
203-
raise exceptions.CommandError(msg)
188+
def take_action_delete(self, parsed_args):
189+
client = self.app.client_manager.network
190+
obj = client.find_network(network, ignore_missing=False)
191+
client.delete_network(obj)
Collapse file

‎openstackclient/common/quota.py‎

Copy file name to clipboardExpand all lines: openstackclient/common/quota.py
+3-38Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828

2929
from openstackclient import command
3030
from openstackclient.i18n import _
31-
from openstackclient.network import common
3231

3332
LOG = logging.getLogger(__name__)
3433

@@ -63,13 +62,6 @@
6362
'volumes',
6463
]
6564

66-
NOVA_NETWORK_QUOTAS = {
67-
'fixed_ips': 'fixed-ips',
68-
'floating_ips': 'floating-ips',
69-
'security_group_rules': 'secgroup-rules',
70-
'security_groups': 'secgroups',
71-
}
72-
7365
NETWORK_QUOTAS = {
7466
'floatingip': 'floating-ips',
7567
'security_group_rule': 'secgroup-rules',
@@ -490,41 +482,20 @@ def take_action(
490482
return ((), ())
491483

492484

493-
class SetQuota(common.NetDetectionMixin, command.Command):
485+
class SetQuota(command.Command):
494486
_description = _("Set quotas for project or class")
495487

496488
def _build_options_list(self) -> list[tuple[str, str, str]]:
497489
help_fmt = _('New value for the %s quota')
498-
# Compute and volume quota options are always the same
490+
# Compute volume and network quota options are always the same
499491
rets = [
500492
(k, v, help_fmt % v)
501493
for k, v in itertools.chain(
502494
COMPUTE_QUOTAS.items(),
503495
VOLUME_QUOTAS.items(),
496+
NETWORK_QUOTAS.items(),
504497
)
505498
]
506-
# For docs build, we want to produce helps for both neutron and
507-
# nova-network options. They overlap, so we have to figure out which
508-
# need to be tagged as specific to one network type or the other.
509-
if self.is_docs_build:
510-
# NOTE(efried): This takes advantage of the fact that we know the
511-
# nova-net options are a subset of the neutron options. If that
512-
# ever changes, this algorithm will need to be adjusted accordingly
513-
inv_compute = set(NOVA_NETWORK_QUOTAS.values())
514-
for k, v in NETWORK_QUOTAS.items():
515-
_help = help_fmt % v
516-
if v not in inv_compute:
517-
# This one is unique to neutron
518-
_help = self.enhance_help_neutron(_help)
519-
rets.append((k, v, _help))
520-
elif self.is_neutron:
521-
rets.extend(
522-
[(k, v, help_fmt % v) for k, v in NETWORK_QUOTAS.items()]
523-
)
524-
elif self.is_nova_network:
525-
rets.extend(
526-
[(k, v, help_fmt % v) for k, v in NOVA_NETWORK_QUOTAS.items()]
527-
)
528499
return rets
529500

530501
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
@@ -654,11 +625,6 @@ def take_action(self, parsed_args: argparse.Namespace) -> None:
654625
value = getattr(parsed_args, k, None)
655626
if value is not None:
656627
network_kwargs[k] = value
657-
elif self.app.client_manager.is_compute_endpoint_enabled():
658-
for k, v in NOVA_NETWORK_QUOTAS.items():
659-
value = getattr(parsed_args, k, None)
660-
if value is not None:
661-
compute_kwargs[k] = value
662628

663629
if network_kwargs:
664630
if parsed_args.force is True:
@@ -843,7 +809,6 @@ def _normalize_names(section: dict[str, Any]) -> None:
843809
# in nova will be replaced by neutron's.
844810
for k, v in itertools.chain(
845811
COMPUTE_QUOTAS.items(),
846-
NOVA_NETWORK_QUOTAS.items(),
847812
VOLUME_QUOTAS.items(),
848813
NETWORK_QUOTAS.items(),
849814
):
Collapse file

‎openstackclient/compute/v2/server.py‎

Copy file name to clipboardExpand all lines: openstackclient/compute/v2/server.py
+10-31Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
from openstackclient.common import pagination
4040
from openstackclient.i18n import _
4141
from openstackclient.identity import common as identity_common
42-
from openstackclient.network import common as network_common
4342

4443
LOG = logging.getLogger(__name__)
4544

@@ -461,12 +460,11 @@ def take_action(
461460
)
462461

463462

464-
class AddFloatingIP(network_common.NetworkAndComputeCommand):
463+
class AddFloatingIP(command.Command):
465464
_description = _("Add floating IP address to server")
466465

467-
def update_parser_common(
468-
self, parser: argparse.ArgumentParser
469-
) -> argparse.ArgumentParser:
466+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
467+
parser = super().get_parser(prog_name)
470468
parser.add_argument(
471469
"server",
472470
metavar="<server>",
@@ -491,9 +489,8 @@ def update_parser_common(
491489
)
492490
return parser
493491

494-
def take_action_network(
495-
self, client: Any, parsed_args: argparse.Namespace
496-
) -> None:
492+
def take_action(self, parsed_args: argparse.Namespace) -> None:
493+
client = self.app.client_manager.network
497494
compute_client = self.app.client_manager.compute
498495

499496
attrs = {}
@@ -552,16 +549,6 @@ def take_action_network(
552549
if error:
553550
raise error
554551

555-
def take_action_compute(
556-
self, client: Any, parsed_args: argparse.Namespace
557-
) -> None:
558-
server = client.find_server(parsed_args.server, ignore_missing=False)
559-
client.add_floating_ip_to_server(
560-
server,
561-
parsed_args.ip_address,
562-
fixed_address=parsed_args.fixed_ip_address,
563-
)
564-
565552

566553
class AddPort(command.Command):
567554
_description = _("Add port to server")
@@ -4068,12 +4055,11 @@ def take_action(self, parsed_args: argparse.Namespace) -> None:
40684055
)
40694056

40704057

4071-
class RemoveFloatingIP(network_common.NetworkAndComputeCommand):
4058+
class RemoveFloatingIP(command.Command):
40724059
_description = _("Remove floating IP address from server")
40734060

4074-
def update_parser_common(
4075-
self, parser: argparse.ArgumentParser
4076-
) -> argparse.ArgumentParser:
4061+
def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
4062+
parser = super().get_parser(prog_name)
40774063
parser.add_argument(
40784064
"server",
40794065
metavar="<server>",
@@ -4088,22 +4074,15 @@ def update_parser_common(
40884074
)
40894075
return parser
40904076

4091-
def take_action_network(
4092-
self, client: Any, parsed_args: argparse.Namespace
4093-
) -> None:
4077+
def take_action(self, parsed_args: argparse.Namespace) -> None:
4078+
client = self.app.client_manager.network
40944079
obj = client.find_ip(
40954080
parsed_args.ip_address,
40964081
ignore_missing=False,
40974082
)
40984083

40994084
client.update_ip(obj, port_id=None)
41004085

4101-
def take_action_compute(
4102-
self, client: Any, parsed_args: argparse.Namespace
4103-
) -> None:
4104-
server = client.find_server(parsed_args.server, ignore_missing=False)
4105-
client.remove_floating_ip_from_server(server, parsed_args.ip_address)
4106-
41074086

41084087
class RemovePort(command.Command):
41094088
_description = _("Remove port from server")
Collapse file

‎openstackclient/identity/common.py‎

Copy file name to clipboardExpand all lines: openstackclient/identity/common.py
+4-7Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -437,17 +437,14 @@ def add_group_domain_option_to_parser(parser: argparse.ArgumentParser) -> None:
437437

438438
def add_project_domain_option_to_parser(
439439
parser: argparse.ArgumentParser,
440-
enhance_help: Callable[[str], str] = lambda _h: _h,
441440
) -> None:
442441
parser.add_argument(
443442
'--project-domain',
444443
metavar='<project-domain>',
445-
help=enhance_help(
446-
_(
447-
'Domain the project belongs to (name or ID). This '
448-
'can be used in case collisions between project '
449-
'names exist.'
450-
)
444+
help=_(
445+
'Domain the project belongs to (name or ID). This '
446+
'can be used in case collisions between project '
447+
'names exist.'
451448
),
452449
)
453450

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.