summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2017-01-28 07:18:45 -0600
committerDean Troyer <dtroyer@gmail.com>2017-01-28 07:42:17 -0600
commit1e3dc48c64304eb378660ceb531aab3d42ac0710 (patch)
tree7cbe826d261b493dbc7c0593636e5e8d480e2a81
parenta6817d024014ecf2e873b009098a81fd179d7dd8 (diff)
downloadpython-openstackclient-3.8.1.tar.gz
Add relnotes for the two recent bug fixes3.8.1
Also add a functional test for network create --project Change-Id: Idbfdf82f1ea6c84fb6a51df88e746e5ddb896b4f
-rw-r--r--openstackclient/tests/functional/network/v2/test_network.py72
-rw-r--r--releasenotes/notes/bug-1659878-f6a55b7166d99ca8.yaml7
-rw-r--r--releasenotes/notes/bug-1659993-a5fe43bef587e490.yaml6
3 files changed, 85 insertions, 0 deletions
diff --git a/openstackclient/tests/functional/network/v2/test_network.py b/openstackclient/tests/functional/network/v2/test_network.py
index c55d70f9..1f7b7c9e 100644
--- a/openstackclient/tests/functional/network/v2/test_network.py
+++ b/openstackclient/tests/functional/network/v2/test_network.py
@@ -19,6 +19,78 @@ from openstackclient.tests.functional import base
class NetworkTests(base.TestCase):
"""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):
"""Test create, delete multiple"""
name1 = uuid.uuid4().hex
diff --git a/releasenotes/notes/bug-1659878-f6a55b7166d99ca8.yaml b/releasenotes/notes/bug-1659878-f6a55b7166d99ca8.yaml
new file mode 100644
index 00000000..f7932a66
--- /dev/null
+++ b/releasenotes/notes/bug-1659878-f6a55b7166d99ca8.yaml
@@ -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>`_]
diff --git a/releasenotes/notes/bug-1659993-a5fe43bef587e490.yaml b/releasenotes/notes/bug-1659993-a5fe43bef587e490.yaml
new file mode 100644
index 00000000..db2349b5
--- /dev/null
+++ b/releasenotes/notes/bug-1659993-a5fe43bef587e490.yaml
@@ -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>`_]