From 8cf28a34ab29a1630f937b8dd77ebf27455f8471 Mon Sep 17 00:00:00 2001
From: Richard Theis <rtheis@us.ibm.com>
Date: Thu, 3 Mar 2016 12:32:09 -0600
Subject: [PATCH] Fix test_aggregate functional test

Nova API validation changes [1] appear to have broken the
'os aggregate create' and 'nova aggregate-create' commands when
an availability zone name is not specified. This patch set updates
the test_aggregate functional test to set the availability zone
name in order to unblock the osc gate while nova investigates
the issue.

[1] https://review.openstack.org/#/c/281143/

Change-Id: I00b497be61c4bc4bc467c66c1e49b2e0636ab841
Related-Bug: #1541691
---
 functional/tests/compute/v2/test_aggregate.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/functional/tests/compute/v2/test_aggregate.py b/functional/tests/compute/v2/test_aggregate.py
index 73e51ede96..b4d27fae0c 100644
--- a/functional/tests/compute/v2/test_aggregate.py
+++ b/functional/tests/compute/v2/test_aggregate.py
@@ -25,7 +25,10 @@ class AggregateTests(test.TestCase):
     @classmethod
     def setUpClass(cls):
         opts = cls.get_show_opts(cls.FIELDS)
-        raw_output = cls.openstack('aggregate create ' + cls.NAME + opts)
+        # Use the default 'nova' availability zone for the aggregate.
+        raw_output = cls.openstack(
+            'aggregate create --zone nova ' + cls.NAME + opts
+        )
         expected = cls.NAME + '\n'
         cls.assertOutput(expected, raw_output)