Add relnotes for the two recent bug fixes
Also add a functional test for network create --project Change-Id: Idbfdf82f1ea6c84fb6a51df88e746e5ddb896b4f
This commit is contained in:
parent
a6817d0240
commit
1e3dc48c64
@ -19,6 +19,78 @@ from openstackclient.tests.functional import base
|
|||||||
class NetworkTests(base.TestCase):
|
class NetworkTests(base.TestCase):
|
||||||
"""Functional tests for network"""
|
"""Functional tests for network"""
|
||||||
|
|
||||||
|
def test_network_create(self):
|
||||||
|
"""Test create options, delete"""
|
||||||
|
# Get project IDs
|
||||||
|
cmd_output = json.loads(self.openstack('token issue -f json '))
|
||||||
|
auth_project_id = cmd_output['project_id']
|
||||||
|
|
||||||
|
cmd_output = json.loads(self.openstack('project list -f json '))
|
||||||
|
admin_project_id = None
|
||||||
|
demo_project_id = None
|
||||||
|
for p in cmd_output:
|
||||||
|
if p['Name'] == 'admin':
|
||||||
|
admin_project_id = p['ID']
|
||||||
|
if p['Name'] == 'demo':
|
||||||
|
demo_project_id = p['ID']
|
||||||
|
|
||||||
|
# Verify assumptions:
|
||||||
|
# * admin and demo projects are present
|
||||||
|
# * demo and admin are distinct projects
|
||||||
|
# * tests run as admin
|
||||||
|
self.assertIsNotNone(admin_project_id)
|
||||||
|
self.assertIsNotNone(demo_project_id)
|
||||||
|
self.assertNotEqual(admin_project_id, demo_project_id)
|
||||||
|
self.assertEqual(admin_project_id, auth_project_id)
|
||||||
|
|
||||||
|
# network create with no options
|
||||||
|
name1 = uuid.uuid4().hex
|
||||||
|
cmd_output = json.loads(self.openstack(
|
||||||
|
'network create -f json ' +
|
||||||
|
name1
|
||||||
|
))
|
||||||
|
self.addCleanup(self.openstack, 'network delete ' + name1)
|
||||||
|
self.assertIsNotNone(cmd_output["id"])
|
||||||
|
|
||||||
|
# Check the default values
|
||||||
|
self.assertEqual(
|
||||||
|
admin_project_id,
|
||||||
|
cmd_output["project_id"],
|
||||||
|
)
|
||||||
|
self.assertEqual(
|
||||||
|
'',
|
||||||
|
cmd_output["description"],
|
||||||
|
)
|
||||||
|
self.assertEqual(
|
||||||
|
'UP',
|
||||||
|
cmd_output["admin_state_up"],
|
||||||
|
)
|
||||||
|
self.assertEqual(
|
||||||
|
False,
|
||||||
|
cmd_output["shared"],
|
||||||
|
)
|
||||||
|
self.assertEqual(
|
||||||
|
'Internal',
|
||||||
|
cmd_output["router:external"],
|
||||||
|
)
|
||||||
|
|
||||||
|
name2 = uuid.uuid4().hex
|
||||||
|
cmd_output = json.loads(self.openstack(
|
||||||
|
'network create -f json ' +
|
||||||
|
'--project demo ' +
|
||||||
|
name2
|
||||||
|
))
|
||||||
|
self.addCleanup(self.openstack, 'network delete ' + name2)
|
||||||
|
self.assertIsNotNone(cmd_output["id"])
|
||||||
|
self.assertEqual(
|
||||||
|
demo_project_id,
|
||||||
|
cmd_output["project_id"],
|
||||||
|
)
|
||||||
|
self.assertEqual(
|
||||||
|
'',
|
||||||
|
cmd_output["description"],
|
||||||
|
)
|
||||||
|
|
||||||
def test_network_delete(self):
|
def test_network_delete(self):
|
||||||
"""Test create, delete multiple"""
|
"""Test create, delete multiple"""
|
||||||
name1 = uuid.uuid4().hex
|
name1 = uuid.uuid4().hex
|
||||||
|
7
releasenotes/notes/bug-1659878-f6a55b7166d99ca8.yaml
Normal file
7
releasenotes/notes/bug-1659878-f6a55b7166d99ca8.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
The ``network create`` command was ignoring the ``--project`` option and
|
||||||
|
creating networks owned by the current authenticated user's project. This
|
||||||
|
was a regression introduced in OSC 3.8.0.
|
||||||
|
[Bug `1659878 <https://bugs.launchpad.net/bugs/1659878>`_]
|
6
releasenotes/notes/bug-1659993-a5fe43bef587e490.yaml
Normal file
6
releasenotes/notes/bug-1659993-a5fe43bef587e490.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
The ``address scope list`` command failed with 'HttpException: Bad Request'
|
||||||
|
when the ``--share`` or ``--no-share`` options were used.
|
||||||
|
[Bug `1659993 <https://bugs.launchpad.net/bugs/1659993>`_]
|
Loading…
Reference in New Issue
Block a user