Browse Source

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
Dongcan Ye 1 year ago
parent
commit
ea89065dab

+ 0
- 16
doc/source/cli/command-objects/ip-floating-pool.rst View File

@@ -1,16 +0,0 @@
1
-================
2
-ip floating pool
3
-================
4
-
5
-Compute v2
6
-
7
-ip floating pool list
8
----------------------
9
-
10
-List pools of floating IP addresses
11
-(Deprecated, please use ``floating ip pool list`` instead)
12
-
13
-.. program:: ip floating pool list
14
-.. code:: bash
15
-
16
-    openstack ip floating pool list

+ 0
- 129
doc/source/cli/command-objects/ip-floating.rst View File

@@ -1,129 +0,0 @@
1
-===========
2
-ip floating
3
-===========
4
-
5
-Compute v2, Network v2
6
-
7
-ip floating add
8
----------------
9
-
10
-Add floating IP address to server
11
-(Deprecated, please use ``server add floating ip`` instead)
12
-
13
-.. program:: ip floating add
14
-.. code:: bash
15
-
16
-    openstack ip floating add
17
-        <ip-address>
18
-        <server>
19
-
20
-.. describe:: <ip-address>
21
-
22
-    IP address to add to server (name only)
23
-
24
-.. describe:: <server>
25
-
26
-    Server to receive the IP address (name or ID)
27
-
28
-ip floating create
29
-------------------
30
-
31
-Create new floating IP address
32
-(Deprecated, please use ``floating ip create`` instead)
33
-
34
-.. program:: ip floating create
35
-.. code:: bash
36
-
37
-    openstack ip floating create
38
-        [--subnet <subnet>]
39
-        [--port <port>]
40
-        [--floating-ip-address <floating-ip-address>]
41
-        [--fixed-ip-address <fixed-ip-address>]
42
-        <network>
43
-
44
-.. option:: --subnet <subnet>
45
-
46
-    Subnet on which you want to create the floating IP (name or ID)
47
-    (Network v2 only)
48
-
49
-.. option:: --port <port>
50
-
51
-    Port to be associated with the floating IP (name or ID)
52
-    (Network v2 only)
53
-
54
-.. option:: --floating-ip-address <floating-ip-address>
55
-
56
-    Floating IP address
57
-    (Network v2 only)
58
-
59
-.. option:: --fixed-ip-address <fixed-ip-address>
60
-
61
-    Fixed IP address mapped to the floating IP
62
-    (Network v2 only)
63
-
64
-.. describe:: <network>
65
-
66
-    Network to allocate floating IP from (name or ID)
67
-
68
-ip floating delete
69
-------------------
70
-
71
-Delete floating IP(s)
72
-(Deprecated, please use ``floating ip delete`` instead)
73
-
74
-.. program:: ip floating delete
75
-.. code:: bash
76
-
77
-    openstack ip floating delete
78
-        <floating-ip> [<floating-ip> ...]
79
-
80
-.. describe:: <floating-ip>
81
-
82
-    Floating IP(s) to delete (IP address or ID)
83
-
84
-ip floating list
85
-----------------
86
-
87
-List floating IP addresses
88
-(Deprecated, please use ``floating ip list`` instead)
89
-
90
-.. program:: ip floating list
91
-.. code:: bash
92
-
93
-    openstack ip floating list
94
-
95
-ip floating remove
96
-------------------
97
-
98
-Remove floating IP address from server
99
-(Deprecated, please use ``server remove floating ip`` instead)
100
-
101
-.. program:: ip floating remove
102
-.. code:: bash
103
-
104
-    openstack ip floating remove
105
-        <ip-address>
106
-        <server>
107
-
108
-.. describe:: <ip-address>
109
-
110
-    IP address to remove from server (name only)
111
-
112
-.. describe:: <server>
113
-
114
-    Server to remove the IP address from (name or ID)
115
-
116
-ip floating show
117
-----------------
118
-
119
-Display floating IP details
120
-(Deprecated, please use ``floating ip show`` instead)
121
-
122
-.. program:: ip floating show
123
-.. code:: bash
124
-
125
-    openstack ip floating show <floating-ip>
126
-
127
-.. describe:: <floating-ip>
128
-
129
-    Floating IP to display (IP address or ID)

+ 0
- 98
openstackclient/network/v2/floating_ip.py View File

@@ -13,8 +13,6 @@
13 13
 
14 14
 """IP Floating action implementations"""
15 15
 
16
-import logging
17
-
18 16
 from osc_lib.command import command
19 17
 from osc_lib import utils
20 18
 
@@ -155,30 +153,6 @@ class CreateFloatingIP(common.NetworkAndComputeShowOne):
155 153
         return (columns, data)
156 154
 
157 155
 
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
-
182 156
 class DeleteFloatingIP(common.NetworkAndComputeDelete):
183 157
     _description = _("Delete floating IP(s)")
184 158
 
@@ -206,30 +180,6 @@ class DeleteFloatingIP(common.NetworkAndComputeDelete):
206 180
         client.api.floating_ip_delete(self.r)
207 181
 
208 182
 
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
-
233 183
 class ListFloatingIP(common.NetworkAndComputeLister):
234 184
     # TODO(songminglong): Use SDK resource mapped attribute names once
235 185
     # the OSC minimum requirements include SDK 1.0
@@ -375,30 +325,6 @@ class ListFloatingIP(common.NetworkAndComputeLister):
375 325
                 ) for s in data))
376 326
 
377 327
 
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
-
402 328
 class SetFloatingIP(command.Command):
403 329
     _description = _("Set floating IP Properties")
404 330
 
@@ -483,30 +409,6 @@ class ShowFloatingIP(common.NetworkAndComputeShowOne):
483 409
         return (columns, data)
484 410
 
485 411
 
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
-
510 412
 class UnsetFloatingIP(command.Command):
511 413
     _description = _("Unset floating IP Properties")
512 414
 

+ 0
- 25
openstackclient/network/v2/floating_ip_pool.py View File

@@ -13,7 +13,6 @@
13 13
 
14 14
 """Floating IP Pool action implementations"""
15 15
 
16
-import logging
17 16
 
18 17
 from osc_lib import exceptions
19 18
 from osc_lib import utils
@@ -40,27 +39,3 @@ class ListFloatingIPPool(common.NetworkAndComputeLister):
40 39
                 (utils.get_dict_properties(
41 40
                     s, columns,
42 41
                 ) 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)

+ 4
- 0
releasenotes/notes/remove-ip-floating-commands-d5363f313e09249a.yaml View File

@@ -0,0 +1,4 @@
1
+---
2
+other:
3
+  - |
4
+    Remove deprecated ``ip floating`` and ``ip floating pool`` commands.

+ 0
- 7
setup.cfg View File

@@ -365,13 +365,6 @@ openstack.network.v2 =
365 365
     ip_availability_list = openstackclient.network.v2.ip_availability:ListIPAvailability
366 366
     ip_availability_show = openstackclient.network.v2.ip_availability:ShowIPAvailability
367 367
 
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
-
375 368
     network_agent_add_network = openstackclient.network.v2.network_agent:AddNetworkToAgent
376 369
     network_agent_add_router = openstackclient.network.v2.network_agent:AddRouterToAgent
377 370
     network_agent_delete = openstackclient.network.v2.network_agent:DeleteNetworkAgent

Loading…
Cancel
Save