python-openstackclient 7.3.0__py3-none-any.whl → 7.3.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openstackclient/network/v2/port.py +3 -2
- openstackclient/tests/functional/network/v2/test_port.py +79 -0
- openstackclient/tests/unit/network/v2/test_port.py +1 -1
- {python_openstackclient-7.3.0.dist-info → python_openstackclient-7.3.1.dist-info}/METADATA +1 -1
- {python_openstackclient-7.3.0.dist-info → python_openstackclient-7.3.1.dist-info}/RECORD +11 -11
- python_openstackclient-7.3.1.dist-info/pbr.json +1 -0
- python_openstackclient-7.3.0.dist-info/pbr.json +0 -1
- {python_openstackclient-7.3.0.dist-info → python_openstackclient-7.3.1.dist-info}/AUTHORS +0 -0
- {python_openstackclient-7.3.0.dist-info → python_openstackclient-7.3.1.dist-info}/LICENSE +0 -0
- {python_openstackclient-7.3.0.dist-info → python_openstackclient-7.3.1.dist-info}/WHEEL +0 -0
- {python_openstackclient-7.3.0.dist-info → python_openstackclient-7.3.1.dist-info}/entry_points.txt +0 -0
- {python_openstackclient-7.3.0.dist-info → python_openstackclient-7.3.1.dist-info}/top_level.txt +0 -0
|
@@ -65,8 +65,9 @@ _formatters = {
|
|
|
65
65
|
'fixed_ips': format_columns.ListDictColumn,
|
|
66
66
|
'security_group_ids': format_columns.ListColumn,
|
|
67
67
|
'tags': format_columns.ListColumn,
|
|
68
|
-
'trunk_details': SubPortColumn,
|
|
69
68
|
}
|
|
69
|
+
_list_formatters = copy.deepcopy(_formatters)
|
|
70
|
+
_list_formatters.update({'trunk_details': SubPortColumn})
|
|
70
71
|
|
|
71
72
|
|
|
72
73
|
def _get_columns(item):
|
|
@@ -952,7 +953,7 @@ class ListPort(command.Lister):
|
|
|
952
953
|
utils.get_item_properties(
|
|
953
954
|
s,
|
|
954
955
|
attrs,
|
|
955
|
-
formatters=
|
|
956
|
+
formatters=_list_formatters,
|
|
956
957
|
)
|
|
957
958
|
for s in data
|
|
958
959
|
),
|
|
@@ -289,3 +289,82 @@ class PortTests(common.NetworkTagTests):
|
|
|
289
289
|
f'{self.base_command} create --network {self.NETWORK_NAME} {args} {name}',
|
|
290
290
|
parse_output=True,
|
|
291
291
|
)
|
|
292
|
+
|
|
293
|
+
def _trunk_creation(self):
|
|
294
|
+
pport = uuid.uuid4().hex
|
|
295
|
+
sport1 = uuid.uuid4().hex
|
|
296
|
+
sport2 = uuid.uuid4().hex
|
|
297
|
+
trunk = uuid.uuid4().hex
|
|
298
|
+
json_output = self.openstack(
|
|
299
|
+
'port create ' f'--network {self.NETWORK_NAME} {pport}',
|
|
300
|
+
parse_output=True,
|
|
301
|
+
)
|
|
302
|
+
pport_id = json_output.get('id')
|
|
303
|
+
json_output = self.openstack(
|
|
304
|
+
'port create ' f'--network {self.NETWORK_NAME} {sport1}',
|
|
305
|
+
parse_output=True,
|
|
306
|
+
)
|
|
307
|
+
sport1_id = json_output.get('id')
|
|
308
|
+
json_output = self.openstack(
|
|
309
|
+
'port create ' f'--network {self.NETWORK_NAME} {sport2}',
|
|
310
|
+
parse_output=True,
|
|
311
|
+
)
|
|
312
|
+
sport2_id = json_output.get('id')
|
|
313
|
+
|
|
314
|
+
self.openstack(
|
|
315
|
+
f'network trunk create --parent-port {pport} {trunk}',
|
|
316
|
+
)
|
|
317
|
+
self.openstack(
|
|
318
|
+
f'network trunk set --subport port={sport1},'
|
|
319
|
+
f'segmentation-type=vlan,segmentation-id=100 {trunk}',
|
|
320
|
+
)
|
|
321
|
+
self.openstack(
|
|
322
|
+
f'network trunk set --subport port={sport2},'
|
|
323
|
+
f'segmentation-type=vlan,segmentation-id=101 {trunk}',
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
# NOTE(ralonsoh): keep this order to first delete the trunk and then
|
|
327
|
+
# the ports.
|
|
328
|
+
self.addCleanup(self.openstack, f'port delete {pport_id}')
|
|
329
|
+
self.addCleanup(self.openstack, f'port delete {sport1_id}')
|
|
330
|
+
self.addCleanup(self.openstack, f'port delete {sport2_id}')
|
|
331
|
+
self.addCleanup(self.openstack, f'network trunk delete {trunk}')
|
|
332
|
+
|
|
333
|
+
return pport_id, sport1_id, sport2_id
|
|
334
|
+
|
|
335
|
+
def check_subports(self, subports, pport_id, sport1_id, sport2_id):
|
|
336
|
+
self.assertEqual(2, len(subports))
|
|
337
|
+
for subport in subports:
|
|
338
|
+
if subport['port_id'] == sport1_id:
|
|
339
|
+
self.assertEqual(100, subport['segmentation_id'])
|
|
340
|
+
elif subport['port_id'] == sport2_id:
|
|
341
|
+
self.assertEqual(101, subport['segmentation_id'])
|
|
342
|
+
else:
|
|
343
|
+
self.fail(
|
|
344
|
+
f'Port {pport_id} does not have subport '
|
|
345
|
+
f'{subport["port_id"]}'
|
|
346
|
+
)
|
|
347
|
+
self.assertEqual('vlan', subport['segmentation_type'])
|
|
348
|
+
|
|
349
|
+
def test_port_list_with_trunk(self):
|
|
350
|
+
pport_id, sport1_id, sport2_id = self._trunk_creation()
|
|
351
|
+
|
|
352
|
+
# List all ports with "--long" flag to retrieve the trunk details
|
|
353
|
+
json_output = self.openstack(
|
|
354
|
+
'port list --long',
|
|
355
|
+
parse_output=True,
|
|
356
|
+
)
|
|
357
|
+
port = next(port for port in json_output if port['ID'] == pport_id)
|
|
358
|
+
subports = port['Trunk subports']
|
|
359
|
+
self.check_subports(subports, pport_id, sport1_id, sport2_id)
|
|
360
|
+
|
|
361
|
+
def test_port_show_with_trunk(self):
|
|
362
|
+
pport_id, sport1_id, sport2_id = self._trunk_creation()
|
|
363
|
+
|
|
364
|
+
# List all ports with "--long" flag to retrieve the trunk details
|
|
365
|
+
port = self.openstack(
|
|
366
|
+
f'port show {pport_id}',
|
|
367
|
+
parse_output=True,
|
|
368
|
+
)
|
|
369
|
+
subports = port['trunk_details']['sub_ports']
|
|
370
|
+
self.check_subports(subports, pport_id, sport1_id, sport2_id)
|
|
@@ -127,7 +127,7 @@ openstackclient/network/v2/network_segment.py,sha256=3bJFnFz4QOwgb_diuLZ-QJ9WOj3
|
|
|
127
127
|
openstackclient/network/v2/network_segment_range.py,sha256=phZ4h-tRPpHbFNA8s_IegdXKm8Y84kffV62RxVITAn0,17514
|
|
128
128
|
openstackclient/network/v2/network_service_provider.py,sha256=b0pKHxB5Qq1U2lfOCWHKJ8CMX661gBbKtv0jXvuE3Xg,1384
|
|
129
129
|
openstackclient/network/v2/network_trunk.py,sha256=2QUGXB4lUGv9BvKPErzFUlgU9Tm_6Agp2pljRx3vTVw,13846
|
|
130
|
-
openstackclient/network/v2/port.py,sha256=
|
|
130
|
+
openstackclient/network/v2/port.py,sha256=sarZXmbVioCIQdZkIP44D-ot_d22NvJEQSua2pu5sBg,50368
|
|
131
131
|
openstackclient/network/v2/router.py,sha256=_-C3D4EnXFCzMYW2AML_t7zpaZROTFdudxmulw3f4rY,50102
|
|
132
132
|
openstackclient/network/v2/security_group.py,sha256=XYOze-FQFJWtGxBc-6hiGViKVSi6fDPRWtjC9Keb1Pw,15488
|
|
133
133
|
openstackclient/network/v2/security_group_rule.py,sha256=UQwuJ2uOmdGpaxcmeKNf8c3ay8I5vVjzb4fSFT3liPg,22371
|
|
@@ -224,7 +224,7 @@ openstackclient/tests/functional/network/v2/test_network_segment.py,sha256=FB7PI
|
|
|
224
224
|
openstackclient/tests/functional/network/v2/test_network_segment_range.py,sha256=bf1XRaNza6qzVrb5LNuIEtmWCFb8q-OQbktINgXwoKg,4727
|
|
225
225
|
openstackclient/tests/functional/network/v2/test_network_service_provider.py,sha256=HOKvmIkUSR_e01sQOn8XS83mvflbkcC1iVKkjqi1GFk,1499
|
|
226
226
|
openstackclient/tests/functional/network/v2/test_network_trunk.py,sha256=uliAsz_xGyy8oim2RaN1D9G5944svgsRWreYtQKAliM,5289
|
|
227
|
-
openstackclient/tests/functional/network/v2/test_port.py,sha256=
|
|
227
|
+
openstackclient/tests/functional/network/v2/test_port.py,sha256=f3D5LS954L6ytS8doMaQONIO7Wt2gNLeHFnLaM3fNH4,13319
|
|
228
228
|
openstackclient/tests/functional/network/v2/test_router.py,sha256=LHODy_BoGdBc9_rL7rZTPhXiqcuTNpLShvXw_Qkw0pA,10116
|
|
229
229
|
openstackclient/tests/functional/network/v2/test_security_group.py,sha256=HXqULP4WQoxCgbzyvwqd4dMo624airNDQ5fSm2XPdwg,2160
|
|
230
230
|
openstackclient/tests/functional/network/v2/test_security_group_rule.py,sha256=iVoR1MUhxApNRHg0klv90yYkN6KSyNoJc4rxhMr3bII,2285
|
|
@@ -397,7 +397,7 @@ openstackclient/tests/unit/network/v2/test_network_segment.py,sha256=D6MVB6eETA2
|
|
|
397
397
|
openstackclient/tests/unit/network/v2/test_network_segment_range.py,sha256=zLgAZdHqbWKn5tYYCUuDn9UA7BFOMYOowC3DQztrZyQ,23388
|
|
398
398
|
openstackclient/tests/unit/network/v2/test_network_service_provider.py,sha256=iHsMqAGuK3onjUI46uGKX1_DwGq-y6b_SOR2IU9PdfU,2047
|
|
399
399
|
openstackclient/tests/unit/network/v2/test_network_trunk.py,sha256=1VPt6Nzv92nRxLoDgwffmpTJ0sgYl4b5PmLO3qJ9INk,30556
|
|
400
|
-
openstackclient/tests/unit/network/v2/test_port.py,sha256=
|
|
400
|
+
openstackclient/tests/unit/network/v2/test_port.py,sha256=V2Krim-bHykarUW1UOK7j_v1c54HnKfH4gXstSXe4jU,94737
|
|
401
401
|
openstackclient/tests/unit/network/v2/test_router.py,sha256=ELxY_k5ibnxLYYbcr41X7GzAPpxGPuM23VyDseLnJ1A,84356
|
|
402
402
|
openstackclient/tests/unit/network/v2/test_security_group_compute.py,sha256=725tUWOhxjWJwUXVdKfxD7eXMe7zrz7bKNdK_HvK624,12576
|
|
403
403
|
openstackclient/tests/unit/network/v2/test_security_group_network.py,sha256=PIE6TgW-bUGSAZLk0B60lPELIJsw_MTKxxcHw-E1fak,20916
|
|
@@ -494,11 +494,11 @@ openstackclient/volume/v3/volume_message.py,sha256=HBBxPEcYoNqGjEbzGIEnIJ1XTcQ2K
|
|
|
494
494
|
openstackclient/volume/v3/volume_snapshot.py,sha256=pZ4q_qCwqh4jaGhX28G59wsWDmEc3uXdbpeD176osZg,3186
|
|
495
495
|
openstackclient/volume/v3/volume_transfer_request.py,sha256=PthOJV2m-pTV1njFzwTpaekXZkET1c6alIJrpuN7R6Q,7530
|
|
496
496
|
openstackclient/volume/v3/volume_type.py,sha256=_nbmu6e87UAHRjh30fQIwScMubox_FpHcQKDUOxO4NA,33955
|
|
497
|
-
python_openstackclient-7.3.
|
|
498
|
-
python_openstackclient-7.3.
|
|
499
|
-
python_openstackclient-7.3.
|
|
500
|
-
python_openstackclient-7.3.
|
|
501
|
-
python_openstackclient-7.3.
|
|
502
|
-
python_openstackclient-7.3.
|
|
503
|
-
python_openstackclient-7.3.
|
|
504
|
-
python_openstackclient-7.3.
|
|
497
|
+
python_openstackclient-7.3.1.dist-info/AUTHORS,sha256=z7JOCAe9kF-Kh6UmborfoPLRMILaSdEv8zUoNhaVdJM,21563
|
|
498
|
+
python_openstackclient-7.3.1.dist-info/LICENSE,sha256=XfKg2H1sVi8OoRxoisUlMqoo10TKvHmU_wU39ks7MyA,10143
|
|
499
|
+
python_openstackclient-7.3.1.dist-info/METADATA,sha256=PwCFj_JWf_t5YRjCoLkRGySOLjzfqPTCOFM8hfCpBYQ,6516
|
|
500
|
+
python_openstackclient-7.3.1.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
501
|
+
python_openstackclient-7.3.1.dist-info/entry_points.txt,sha256=VsZCw-6So3hkHuIiX-dGaMVL1PEqmfDynF37m1EwjCs,53260
|
|
502
|
+
python_openstackclient-7.3.1.dist-info/pbr.json,sha256=E5uUJNuOcXl1clAJ5dAvKRdI6PEscruKO3B38AEFDLA,47
|
|
503
|
+
python_openstackclient-7.3.1.dist-info/top_level.txt,sha256=htg7z9oZgysRuVUHn-m1Bk6XLGOeV65nMbZX9H8qhs0,16
|
|
504
|
+
python_openstackclient-7.3.1.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"git_version": "0ba77e67", "is_release": true}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"git_version": "34121473", "is_release": true}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_openstackclient-7.3.0.dist-info → python_openstackclient-7.3.1.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{python_openstackclient-7.3.0.dist-info → python_openstackclient-7.3.1.dist-info}/top_level.txt
RENAMED
|
File without changes
|