Skip to content

Commit 539c39b

Browse files
author
Steve Martinelli
committed
remove url from v3 regions
the parameter "url" was removed from Keystone, it was only added for one release as part of an experimental support for adding service providers. BackwardsIncompatibleImpact Closes-Bug: 1506841 Change-Id: I7a62fbf1d9bfa8e6dd8d619e98c32b9860348d2e
1 parent 6fdc9a8 commit 539c39b

6 files changed

Lines changed: 23 additions & 110 deletions

File tree

doc/source/backwards-incompatible.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,18 @@ List of Backwards Incompatible Changes
102102
* Bug: NA
103103
* Commit: NA
104104

105+
8. `region` commands no longer support `url`
106+
107+
The Keystone team removed support for thr `url` attribute from the client
108+
and server side. Changes to the `create`, `set` and `list` commands for
109+
regions have been affected.
110+
111+
* In favor of: NA
112+
* As of 1.9.0
113+
* Removed in: NA
114+
* Bug: https://launchpad.net/bugs/1506841
115+
* Commit: https://review.openstack.org/#/c/236736/
116+
105117
For Developers
106118
==============
107119

doc/source/command-objects/region.rst

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Create new region
1515
os region create
1616
[--parent-region <region-id>]
1717
[--description <description>]
18-
[--url <url>]
1918
<region-id>
2019
2120
.. option:: --parent-region <region-id>
@@ -26,10 +25,6 @@ Create new region
2625

2726
New region description
2827

29-
.. option:: --url <url>
30-
31-
New region URL
32-
3328
.. _region_create-region-id:
3429
.. describe:: <region-id>
3530

@@ -77,7 +72,6 @@ Set region properties
7772
os region set
7873
[--parent-region <region-id>]
7974
[--description <description>]
80-
[--url <url>]
8175
<region-id>
8276
8377
.. option:: --parent-region <region-id>
@@ -88,10 +82,6 @@ Set region properties
8882

8983
New region description
9084

91-
.. option:: --url <url>
92-
93-
New region URL
94-
9585
.. _region_set-region-id:
9686
.. describe:: <region-id>
9787

functional/tests/identity/v3/test_identity.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,12 @@ class IdentityTests(test.TestCase):
3232
'enabled', 'name', 'parent_id', 'links']
3333
ROLE_FIELDS = ['id', 'name', 'links']
3434
SERVICE_FIELDS = ['id', 'enabled', 'name', 'type', 'description']
35-
REGION_FIELDS = ['description', 'enabled', 'parent_region',
36-
'region', 'url']
35+
REGION_FIELDS = ['description', 'enabled', 'parent_region', 'region']
3736
ENDPOINT_FIELDS = ['id', 'region', 'region_id', 'service_id',
3837
'service_name', 'service_type', 'enabled',
3938
'interface', 'url']
4039

41-
REGION_LIST_HEADERS = ['Region', 'Parent Region', 'Description', 'URL']
40+
REGION_LIST_HEADERS = ['Region', 'Parent Region', 'Description']
4241
ENDPOINT_LIST_HEADERS = ['ID', 'Region', 'Service Name', 'Service Type',
4342
'Enabled', 'Interface', 'URL']
4443

@@ -194,18 +193,15 @@ def _create_dummy_project(self, add_clean_up=True):
194193
def _create_dummy_region(self, parent_region=None, add_clean_up=True):
195194
region_id = data_utils.rand_name('TestRegion')
196195
description = data_utils.rand_name('description')
197-
url = data_utils.rand_url()
198196
parent_region_arg = ''
199197
if parent_region is not None:
200198
parent_region_arg = '--parent-region %s' % parent_region
201199
raw_output = self.openstack(
202200
'region create '
203201
'%(parent_region_arg)s '
204202
'--description %(description)s '
205-
'--url %(url)s '
206203
'%(id)s' % {'parent_region_arg': parent_region_arg,
207204
'description': description,
208-
'url': url,
209205
'id': region_id})
210206
items = self.parse_show(raw_output)
211207
self.assert_show_fields(items, self.REGION_FIELDS)

openstackclient/identity/v3/region.py

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ def get_parser(self, prog_name):
4848
metavar='<description>',
4949
help=_('New region description'),
5050
)
51-
parser.add_argument(
52-
'--url',
53-
metavar='<url>',
54-
help=_('New region url'),
55-
)
56-
5751
return parser
5852

5953
@utils.log_method(log)
@@ -62,7 +56,6 @@ def take_action(self, parsed_args):
6256

6357
region = identity_client.regions.create(
6458
id=parsed_args.region,
65-
url=parsed_args.url,
6659
parent_region=parsed_args.parent_region,
6760
description=parsed_args.description,
6861
)
@@ -117,8 +110,8 @@ def take_action(self, parsed_args):
117110
if parsed_args.parent_region:
118111
kwargs['parent_region_id'] = parsed_args.parent_region
119112

120-
columns_headers = ('Region', 'Parent Region', 'Description', 'URL')
121-
columns = ('ID', 'Parent Region Id', 'Description', 'URL')
113+
columns_headers = ('Region', 'Parent Region', 'Description')
114+
columns = ('ID', 'Parent Region Id', 'Description')
122115

123116
data = identity_client.regions.list(**kwargs)
124117
return (columns_headers,
@@ -150,25 +143,16 @@ def get_parser(self, prog_name):
150143
metavar='<description>',
151144
help=_('New region description'),
152145
)
153-
parser.add_argument(
154-
'--url',
155-
metavar='<url>',
156-
help=_('New region url'),
157-
)
158146
return parser
159147

160148
@utils.log_method(log)
161149
def take_action(self, parsed_args):
162150
identity_client = self.app.client_manager.identity
163151

164-
if (not parsed_args.url
165-
and not parsed_args.parent_region
166-
and not parsed_args.description):
152+
if not parsed_args.parent_region and not parsed_args.description:
167153
return
168154

169155
kwargs = {}
170-
if parsed_args.url:
171-
kwargs['url'] = parsed_args.url
172156
if parsed_args.description:
173157
kwargs['description'] = parsed_args.description
174158
if parsed_args.parent_region:

openstackclient/tests/identity/v3/fakes.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,11 @@
123123
}
124124

125125
region_id = 'region_one'
126-
region_url = 'http://localhost:1111'
127126
region_parent_region_id = 'region_two'
128127
region_description = 'region one'
129128

130129
REGION = {
131130
'id': region_id,
132-
'url': region_url,
133131
'description': region_description,
134132
'parent_region_id': region_parent_region_id,
135133
'links': base_url + 'regions/' + region_id,

openstackclient/tests/identity/v3/test_region.py

Lines changed: 6 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,17 @@ def test_region_create_description(self):
6161
'description': identity_fakes.region_description,
6262
'id': identity_fakes.region_id,
6363
'parent_region': None,
64-
'url': None,
6564
}
6665
self.regions_mock.create.assert_called_with(
6766
**kwargs
6867
)
6968

70-
collist = ('description', 'parent_region', 'region', 'url')
69+
collist = ('description', 'parent_region', 'region')
7170
self.assertEqual(collist, columns)
7271
datalist = (
7372
identity_fakes.region_description,
7473
identity_fakes.region_parent_region_id,
7574
identity_fakes.region_id,
76-
identity_fakes.region_url,
7775
)
7876
self.assertEqual(datalist, data)
7977

@@ -94,19 +92,17 @@ def test_region_create_no_options(self):
9492
'description': None,
9593
'id': identity_fakes.region_id,
9694
'parent_region': None,
97-
'url': None,
9895
}
9996
self.regions_mock.create.assert_called_with(
10097
**kwargs
10198
)
10299

103-
collist = ('description', 'parent_region', 'region', 'url')
100+
collist = ('description', 'parent_region', 'region')
104101
self.assertEqual(collist, columns)
105102
datalist = (
106103
identity_fakes.region_description,
107104
identity_fakes.region_parent_region_id,
108105
identity_fakes.region_id,
109-
identity_fakes.region_url,
110106
)
111107
self.assertEqual(datalist, data)
112108

@@ -129,54 +125,17 @@ def test_region_create_parent_region_id(self):
129125
'description': None,
130126
'id': identity_fakes.region_id,
131127
'parent_region': identity_fakes.region_parent_region_id,
132-
'url': None,
133128
}
134129
self.regions_mock.create.assert_called_with(
135130
**kwargs
136131
)
137132

138-
collist = ('description', 'parent_region', 'region', 'url')
133+
collist = ('description', 'parent_region', 'region')
139134
self.assertEqual(collist, columns)
140135
datalist = (
141136
identity_fakes.region_description,
142137
identity_fakes.region_parent_region_id,
143138
identity_fakes.region_id,
144-
identity_fakes.region_url,
145-
)
146-
self.assertEqual(datalist, data)
147-
148-
def test_region_create_url(self):
149-
arglist = [
150-
identity_fakes.region_id,
151-
'--url', identity_fakes.region_url,
152-
]
153-
verifylist = [
154-
('region', identity_fakes.region_id),
155-
('url', identity_fakes.region_url),
156-
]
157-
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
158-
159-
# DisplayCommandBase.take_action() returns two tuples
160-
columns, data = self.cmd.take_action(parsed_args)
161-
162-
# Set expected values
163-
kwargs = {
164-
'description': None,
165-
'id': identity_fakes.region_id,
166-
'parent_region': None,
167-
'url': identity_fakes.region_url,
168-
}
169-
self.regions_mock.create.assert_called_with(
170-
**kwargs
171-
)
172-
173-
collist = ('description', 'parent_region', 'region', 'url')
174-
self.assertEqual(collist, columns)
175-
datalist = (
176-
identity_fakes.region_description,
177-
identity_fakes.region_parent_region_id,
178-
identity_fakes.region_id,
179-
identity_fakes.region_url,
180139
)
181140
self.assertEqual(datalist, data)
182141

@@ -233,13 +192,12 @@ def test_region_list_no_options(self):
233192
columns, data = self.cmd.take_action(parsed_args)
234193
self.regions_mock.list.assert_called_with()
235194

236-
collist = ('Region', 'Parent Region', 'Description', 'URL')
195+
collist = ('Region', 'Parent Region', 'Description')
237196
self.assertEqual(collist, columns)
238197
datalist = ((
239198
identity_fakes.region_id,
240199
identity_fakes.region_parent_region_id,
241200
identity_fakes.region_description,
242-
identity_fakes.region_url,
243201
), )
244202
self.assertEqual(datalist, tuple(data))
245203

@@ -257,13 +215,12 @@ def test_region_list_parent_region_id(self):
257215
self.regions_mock.list.assert_called_with(
258216
parent_region_id=identity_fakes.region_parent_region_id)
259217

260-
collist = ('Region', 'Parent Region', 'Description', 'URL')
218+
collist = ('Region', 'Parent Region', 'Description')
261219
self.assertEqual(collist, columns)
262220
datalist = ((
263221
identity_fakes.region_id,
264222
identity_fakes.region_parent_region_id,
265223
identity_fakes.region_description,
266-
identity_fakes.region_url,
267224
), )
268225
self.assertEqual(datalist, tuple(data))
269226

@@ -319,29 +276,6 @@ def test_region_set_description(self):
319276
**kwargs
320277
)
321278

322-
def test_region_set_url(self):
323-
arglist = [
324-
'--url', 'new url',
325-
identity_fakes.region_id,
326-
]
327-
verifylist = [
328-
('url', 'new url'),
329-
('region', identity_fakes.region_id),
330-
]
331-
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
332-
333-
result = self.cmd.run(parsed_args)
334-
self.assertEqual(0, result)
335-
336-
# Set expected values
337-
kwargs = {
338-
'url': 'new url',
339-
}
340-
self.regions_mock.update.assert_called_with(
341-
identity_fakes.region_id,
342-
**kwargs
343-
)
344-
345279
def test_region_set_parent_region_id(self):
346280
arglist = [
347281
'--parent-region', 'new_parent',
@@ -395,12 +329,11 @@ def test_region_show(self):
395329
identity_fakes.region_id,
396330
)
397331

398-
collist = ('description', 'parent_region', 'region', 'url')
332+
collist = ('description', 'parent_region', 'region')
399333
self.assertEqual(collist, columns)
400334
datalist = (
401335
identity_fakes.region_description,
402336
identity_fakes.region_parent_region_id,
403337
identity_fakes.region_id,
404-
identity_fakes.region_url,
405338
)
406339
self.assertEqual(datalist, data)

0 commit comments

Comments
 (0)