From f341b5b6443739dc0dce634488e9007883832bda Mon Sep 17 00:00:00 2001 From: Goutham Pratapa Date: Thu, 27 Sep 2018 20:26:07 +0530 Subject: [PATCH] Add network availability zones client This patch creates the network v2.0 available zones client. This client has only one api calls - List available zones This patch also includes tests for the new ip available client. Change-Id: I881e3e038a775bd826b5c5675cb95e949f9c717e --- .../api/test_availability_zones.py | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 neutron_tempest_plugin/api/test_availability_zones.py diff --git a/neutron_tempest_plugin/api/test_availability_zones.py b/neutron_tempest_plugin/api/test_availability_zones.py new file mode 100644 index 00000000..8ee52a3f --- /dev/null +++ b/neutron_tempest_plugin/api/test_availability_zones.py @@ -0,0 +1,31 @@ +# Copyright 2018 AT&T Corporation. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from tempest.common import utils +from tempest.lib import decorators + +from neutron_tempest_plugin.api import base + + +class ListAvailableZonesTest(base.BaseNetworkTest): + + @decorators.idempotent_id('5a8a8a1a-c265-11e8-a611-080027758b73') + @utils.requires_ext(extension="availability_zone", + service="network") + def test_list_available_zones(self): + resource = 'availability_zones' + body = getattr(self.client, 'list_%s' % resource)() + self.assertIsNotNone(body) + self.assertIsInstance(body['availability_zones'], list)