Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 1 | # Copyright 2013 Huawei Technologies Co.,LTD. |
| 2 | # All Rights Reserved. |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 5 | # not use this file except in compliance with the License. You may obtain |
| 6 | # a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 | # License for the specific language governing permissions and limitations |
| 14 | # under the License. |
| 15 | |
| 16 | from tempest.api.compute import base |
| 17 | from tempest.common import tempest_fixtures as fixtures |
Fei Long Wang | d39431f | 2015-05-14 11:30:48 +1200 | [diff] [blame] | 18 | from tempest.common.utils import data_utils |
Andrea Frittoli (andreaf) | db9672e | 2016-02-23 14:07:24 -0500 | [diff] [blame] | 19 | from tempest.lib import exceptions as lib_exc |
Masayuki Igawa | 394d8d9 | 2014-03-04 17:21:56 +0900 | [diff] [blame] | 20 | from tempest import test |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 21 | |
| 22 | |
| 23 | class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest): |
Ken'ichi Ohmichi | 88363cb | 2015-11-19 08:00:54 +0000 | [diff] [blame] | 24 | """Tests Aggregates API that require admin privileges""" |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 25 | |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 26 | @classmethod |
Rohan Kanade | 60b7309 | 2015-02-04 17:58:19 +0530 | [diff] [blame] | 27 | def setup_clients(cls): |
| 28 | super(AggregatesAdminNegativeTestJSON, cls).setup_clients() |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 29 | cls.client = cls.os_adm.aggregates_client |
| 30 | cls.user_client = cls.aggregates_client |
Rohan Kanade | 60b7309 | 2015-02-04 17:58:19 +0530 | [diff] [blame] | 31 | |
| 32 | @classmethod |
| 33 | def resource_setup(cls): |
| 34 | super(AggregatesAdminNegativeTestJSON, cls).resource_setup() |
Ken'ichi Ohmichi | 4937f56 | 2015-03-23 00:15:01 +0000 | [diff] [blame] | 35 | cls.aggregate_name_prefix = 'test_aggregate' |
| 36 | cls.az_name_prefix = 'test_az' |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 37 | |
ghanshyam | e1bd29e | 2015-08-18 16:47:24 +0900 | [diff] [blame] | 38 | hosts_all = cls.os_adm.hosts_client.list_hosts()['hosts'] |
Sirushti Murugesan | 935f2cc | 2016-07-12 19:48:24 +0530 | [diff] [blame] | 39 | hosts = ([host['host_name'] |
| 40 | for host in hosts_all if host['service'] == 'compute']) |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 41 | cls.host = hosts[0] |
| 42 | |
Sean Dague | 639f2fa | 2015-04-27 09:00:33 -0400 | [diff] [blame] | 43 | @test.attr(type=['negative']) |
Chris Hoge | 7579c1a | 2015-02-26 14:12:15 -0800 | [diff] [blame] | 44 | @test.idempotent_id('86a1cb14-da37-4a70-b056-903fd56dfe29') |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 45 | def test_aggregate_create_as_user(self): |
| 46 | # Regular user is not allowed to create an aggregate. |
| 47 | aggregate_name = data_utils.rand_name(self.aggregate_name_prefix) |
Masayuki Igawa | 6b1cd29 | 2015-02-16 11:11:55 +0900 | [diff] [blame] | 48 | self.assertRaises(lib_exc.Forbidden, |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 49 | self.user_client.create_aggregate, |
Yuiko Takada | f93d248 | 2014-01-30 16:25:08 +0000 | [diff] [blame] | 50 | name=aggregate_name) |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 51 | |
Sean Dague | 639f2fa | 2015-04-27 09:00:33 -0400 | [diff] [blame] | 52 | @test.attr(type=['negative']) |
Chris Hoge | 7579c1a | 2015-02-26 14:12:15 -0800 | [diff] [blame] | 53 | @test.idempotent_id('3b8a1929-3793-4e92-bcb4-dfa572ee6c1d') |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 54 | def test_aggregate_create_aggregate_name_length_less_than_1(self): |
| 55 | # the length of aggregate name should >= 1 and <=255 |
Masayuki Igawa | 4b29e47 | 2015-02-16 10:41:54 +0900 | [diff] [blame] | 56 | self.assertRaises(lib_exc.BadRequest, |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 57 | self.client.create_aggregate, |
Yuiko Takada | f93d248 | 2014-01-30 16:25:08 +0000 | [diff] [blame] | 58 | name='') |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 59 | |
Sean Dague | 639f2fa | 2015-04-27 09:00:33 -0400 | [diff] [blame] | 60 | @test.attr(type=['negative']) |
Chris Hoge | 7579c1a | 2015-02-26 14:12:15 -0800 | [diff] [blame] | 61 | @test.idempotent_id('4c194563-543b-4e70-a719-557bbe947fac') |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 62 | def test_aggregate_create_aggregate_name_length_exceeds_255(self): |
| 63 | # the length of aggregate name should >= 1 and <=255 |
| 64 | aggregate_name = 'a' * 256 |
Masayuki Igawa | 4b29e47 | 2015-02-16 10:41:54 +0900 | [diff] [blame] | 65 | self.assertRaises(lib_exc.BadRequest, |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 66 | self.client.create_aggregate, |
Yuiko Takada | f93d248 | 2014-01-30 16:25:08 +0000 | [diff] [blame] | 67 | name=aggregate_name) |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 68 | |
Sean Dague | 639f2fa | 2015-04-27 09:00:33 -0400 | [diff] [blame] | 69 | @test.attr(type=['negative']) |
Chris Hoge | 7579c1a | 2015-02-26 14:12:15 -0800 | [diff] [blame] | 70 | @test.idempotent_id('9c23a291-b0b1-487b-b464-132e061151b3') |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 71 | def test_aggregate_create_with_existent_aggregate_name(self): |
| 72 | # creating an aggregate with existent aggregate name is forbidden |
| 73 | aggregate_name = data_utils.rand_name(self.aggregate_name_prefix) |
David Kranz | 0a73517 | 2015-01-16 10:51:18 -0500 | [diff] [blame] | 74 | aggregate = self.client.create_aggregate(name=aggregate_name) |
ghanshyam | 2eb282d | 2015-08-04 15:05:19 +0900 | [diff] [blame] | 75 | self.addCleanup(self.client.delete_aggregate, |
| 76 | aggregate['aggregate']['id']) |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 77 | |
Masayuki Igawa | d938876 | 2015-01-20 14:56:42 +0900 | [diff] [blame] | 78 | self.assertRaises(lib_exc.Conflict, |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 79 | self.client.create_aggregate, |
Yuiko Takada | f93d248 | 2014-01-30 16:25:08 +0000 | [diff] [blame] | 80 | name=aggregate_name) |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 81 | |
Sean Dague | 639f2fa | 2015-04-27 09:00:33 -0400 | [diff] [blame] | 82 | @test.attr(type=['negative']) |
Chris Hoge | 7579c1a | 2015-02-26 14:12:15 -0800 | [diff] [blame] | 83 | @test.idempotent_id('cd6de795-c15d-45f1-8d9e-813c6bb72a3d') |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 84 | def test_aggregate_delete_as_user(self): |
| 85 | # Regular user is not allowed to delete an aggregate. |
| 86 | aggregate_name = data_utils.rand_name(self.aggregate_name_prefix) |
ghanshyam | 2eb282d | 2015-08-04 15:05:19 +0900 | [diff] [blame] | 87 | aggregate = (self.client.create_aggregate(name=aggregate_name) |
| 88 | ['aggregate']) |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 89 | self.addCleanup(self.client.delete_aggregate, aggregate['id']) |
| 90 | |
Masayuki Igawa | 6b1cd29 | 2015-02-16 11:11:55 +0900 | [diff] [blame] | 91 | self.assertRaises(lib_exc.Forbidden, |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 92 | self.user_client.delete_aggregate, |
| 93 | aggregate['id']) |
| 94 | |
Sean Dague | 639f2fa | 2015-04-27 09:00:33 -0400 | [diff] [blame] | 95 | @test.attr(type=['negative']) |
Chris Hoge | 7579c1a | 2015-02-26 14:12:15 -0800 | [diff] [blame] | 96 | @test.idempotent_id('b7d475a6-5dcd-4ff4-b70a-cd9de66a6672') |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 97 | def test_aggregate_list_as_user(self): |
| 98 | # Regular user is not allowed to list aggregates. |
Masayuki Igawa | 6b1cd29 | 2015-02-16 11:11:55 +0900 | [diff] [blame] | 99 | self.assertRaises(lib_exc.Forbidden, |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 100 | self.user_client.list_aggregates) |
| 101 | |
Sean Dague | 639f2fa | 2015-04-27 09:00:33 -0400 | [diff] [blame] | 102 | @test.attr(type=['negative']) |
Chris Hoge | 7579c1a | 2015-02-26 14:12:15 -0800 | [diff] [blame] | 103 | @test.idempotent_id('557cad12-34c9-4ff4-95f0-22f0dfbaf7dc') |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 104 | def test_aggregate_get_details_as_user(self): |
| 105 | # Regular user is not allowed to get aggregate details. |
| 106 | aggregate_name = data_utils.rand_name(self.aggregate_name_prefix) |
ghanshyam | 2eb282d | 2015-08-04 15:05:19 +0900 | [diff] [blame] | 107 | aggregate = (self.client.create_aggregate(name=aggregate_name) |
| 108 | ['aggregate']) |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 109 | self.addCleanup(self.client.delete_aggregate, aggregate['id']) |
| 110 | |
Masayuki Igawa | 6b1cd29 | 2015-02-16 11:11:55 +0900 | [diff] [blame] | 111 | self.assertRaises(lib_exc.Forbidden, |
Ken'ichi Ohmichi | 3de6d98 | 2015-04-13 00:20:41 +0000 | [diff] [blame] | 112 | self.user_client.show_aggregate, |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 113 | aggregate['id']) |
| 114 | |
Sean Dague | 639f2fa | 2015-04-27 09:00:33 -0400 | [diff] [blame] | 115 | @test.attr(type=['negative']) |
Chris Hoge | 7579c1a | 2015-02-26 14:12:15 -0800 | [diff] [blame] | 116 | @test.idempotent_id('c74f4bf1-4708-4ff2-95a0-f49eaca951bd') |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 117 | def test_aggregate_delete_with_invalid_id(self): |
| 118 | # Delete an aggregate with invalid id should raise exceptions. |
Masayuki Igawa | bfa0760 | 2015-01-20 18:47:17 +0900 | [diff] [blame] | 119 | self.assertRaises(lib_exc.NotFound, |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 120 | self.client.delete_aggregate, -1) |
| 121 | |
Sean Dague | 639f2fa | 2015-04-27 09:00:33 -0400 | [diff] [blame] | 122 | @test.attr(type=['negative']) |
Chris Hoge | 7579c1a | 2015-02-26 14:12:15 -0800 | [diff] [blame] | 123 | @test.idempotent_id('3c916244-2c46-49a4-9b55-b20bb0ae512c') |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 124 | def test_aggregate_get_details_with_invalid_id(self): |
| 125 | # Get aggregate details with invalid id should raise exceptions. |
Masayuki Igawa | bfa0760 | 2015-01-20 18:47:17 +0900 | [diff] [blame] | 126 | self.assertRaises(lib_exc.NotFound, |
Ken'ichi Ohmichi | 3de6d98 | 2015-04-13 00:20:41 +0000 | [diff] [blame] | 127 | self.client.show_aggregate, -1) |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 128 | |
Sean Dague | 639f2fa | 2015-04-27 09:00:33 -0400 | [diff] [blame] | 129 | @test.attr(type=['negative']) |
Chris Hoge | 7579c1a | 2015-02-26 14:12:15 -0800 | [diff] [blame] | 130 | @test.idempotent_id('0ef07828-12b4-45ba-87cc-41425faf5711') |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 131 | def test_aggregate_add_non_exist_host(self): |
| 132 | # Adding a non-exist host to an aggregate should raise exceptions. |
ghanshyam | e1bd29e | 2015-08-18 16:47:24 +0900 | [diff] [blame] | 133 | hosts_all = self.os_adm.hosts_client.list_hosts()['hosts'] |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 134 | hosts = map(lambda x: x['host_name'], hosts_all) |
| 135 | while True: |
Ken'ichi Ohmichi | 4937f56 | 2015-03-23 00:15:01 +0000 | [diff] [blame] | 136 | non_exist_host = data_utils.rand_name('nonexist_host') |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 137 | if non_exist_host not in hosts: |
| 138 | break |
| 139 | |
| 140 | aggregate_name = data_utils.rand_name(self.aggregate_name_prefix) |
ghanshyam | 2eb282d | 2015-08-04 15:05:19 +0900 | [diff] [blame] | 141 | aggregate = (self.client.create_aggregate(name=aggregate_name) |
| 142 | ['aggregate']) |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 143 | self.addCleanup(self.client.delete_aggregate, aggregate['id']) |
| 144 | |
Masayuki Igawa | bfa0760 | 2015-01-20 18:47:17 +0900 | [diff] [blame] | 145 | self.assertRaises(lib_exc.NotFound, self.client.add_host, |
Ken'ichi Ohmichi | ec452b8 | 2015-07-15 04:59:51 +0000 | [diff] [blame] | 146 | aggregate['id'], host=non_exist_host) |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 147 | |
Sean Dague | 639f2fa | 2015-04-27 09:00:33 -0400 | [diff] [blame] | 148 | @test.attr(type=['negative']) |
Chris Hoge | 7579c1a | 2015-02-26 14:12:15 -0800 | [diff] [blame] | 149 | @test.idempotent_id('7324c334-bd13-4c93-8521-5877322c3d51') |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 150 | def test_aggregate_add_host_as_user(self): |
| 151 | # Regular user is not allowed to add a host to an aggregate. |
| 152 | aggregate_name = data_utils.rand_name(self.aggregate_name_prefix) |
ghanshyam | 2eb282d | 2015-08-04 15:05:19 +0900 | [diff] [blame] | 153 | aggregate = (self.client.create_aggregate(name=aggregate_name) |
| 154 | ['aggregate']) |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 155 | self.addCleanup(self.client.delete_aggregate, aggregate['id']) |
| 156 | |
Masayuki Igawa | 6b1cd29 | 2015-02-16 11:11:55 +0900 | [diff] [blame] | 157 | self.assertRaises(lib_exc.Forbidden, |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 158 | self.user_client.add_host, |
Ken'ichi Ohmichi | ec452b8 | 2015-07-15 04:59:51 +0000 | [diff] [blame] | 159 | aggregate['id'], host=self.host) |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 160 | |
Sean Dague | 639f2fa | 2015-04-27 09:00:33 -0400 | [diff] [blame] | 161 | @test.attr(type=['negative']) |
Chris Hoge | 7579c1a | 2015-02-26 14:12:15 -0800 | [diff] [blame] | 162 | @test.idempotent_id('19dd44e1-c435-4ee1-a402-88c4f90b5950') |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 163 | def test_aggregate_add_existent_host(self): |
| 164 | self.useFixture(fixtures.LockFixture('availability_zone')) |
| 165 | aggregate_name = data_utils.rand_name(self.aggregate_name_prefix) |
ghanshyam | 2eb282d | 2015-08-04 15:05:19 +0900 | [diff] [blame] | 166 | aggregate = (self.client.create_aggregate(name=aggregate_name) |
| 167 | ['aggregate']) |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 168 | self.addCleanup(self.client.delete_aggregate, aggregate['id']) |
| 169 | |
Ken'ichi Ohmichi | ec452b8 | 2015-07-15 04:59:51 +0000 | [diff] [blame] | 170 | self.client.add_host(aggregate['id'], host=self.host) |
| 171 | self.addCleanup(self.client.remove_host, aggregate['id'], |
| 172 | host=self.host) |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 173 | |
Masayuki Igawa | d938876 | 2015-01-20 14:56:42 +0900 | [diff] [blame] | 174 | self.assertRaises(lib_exc.Conflict, self.client.add_host, |
Ken'ichi Ohmichi | ec452b8 | 2015-07-15 04:59:51 +0000 | [diff] [blame] | 175 | aggregate['id'], host=self.host) |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 176 | |
Sean Dague | 639f2fa | 2015-04-27 09:00:33 -0400 | [diff] [blame] | 177 | @test.attr(type=['negative']) |
Chris Hoge | 7579c1a | 2015-02-26 14:12:15 -0800 | [diff] [blame] | 178 | @test.idempotent_id('7a53af20-137a-4e44-a4ae-e19260e626d9') |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 179 | def test_aggregate_remove_host_as_user(self): |
| 180 | # Regular user is not allowed to remove a host from an aggregate. |
| 181 | self.useFixture(fixtures.LockFixture('availability_zone')) |
| 182 | aggregate_name = data_utils.rand_name(self.aggregate_name_prefix) |
ghanshyam | 2eb282d | 2015-08-04 15:05:19 +0900 | [diff] [blame] | 183 | aggregate = (self.client.create_aggregate(name=aggregate_name) |
| 184 | ['aggregate']) |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 185 | self.addCleanup(self.client.delete_aggregate, aggregate['id']) |
Ken'ichi Ohmichi | ec452b8 | 2015-07-15 04:59:51 +0000 | [diff] [blame] | 186 | self.client.add_host(aggregate['id'], host=self.host) |
| 187 | self.addCleanup(self.client.remove_host, aggregate['id'], |
| 188 | host=self.host) |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 189 | |
Masayuki Igawa | 6b1cd29 | 2015-02-16 11:11:55 +0900 | [diff] [blame] | 190 | self.assertRaises(lib_exc.Forbidden, |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 191 | self.user_client.remove_host, |
Ken'ichi Ohmichi | ec452b8 | 2015-07-15 04:59:51 +0000 | [diff] [blame] | 192 | aggregate['id'], host=self.host) |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 193 | |
Sean Dague | 639f2fa | 2015-04-27 09:00:33 -0400 | [diff] [blame] | 194 | @test.attr(type=['negative']) |
Chris Hoge | 7579c1a | 2015-02-26 14:12:15 -0800 | [diff] [blame] | 195 | @test.idempotent_id('95d6a6fa-8da9-4426-84d0-eec0329f2e4d') |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 196 | def test_aggregate_remove_nonexistent_host(self): |
Ken'ichi Ohmichi | 4937f56 | 2015-03-23 00:15:01 +0000 | [diff] [blame] | 197 | non_exist_host = data_utils.rand_name('nonexist_host') |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 198 | aggregate_name = data_utils.rand_name(self.aggregate_name_prefix) |
ghanshyam | 2eb282d | 2015-08-04 15:05:19 +0900 | [diff] [blame] | 199 | aggregate = (self.client.create_aggregate(name=aggregate_name) |
| 200 | ['aggregate']) |
Lingxian Kong | bf2d517 | 2013-10-01 22:00:24 +0800 | [diff] [blame] | 201 | self.addCleanup(self.client.delete_aggregate, aggregate['id']) |
| 202 | |
Masayuki Igawa | bfa0760 | 2015-01-20 18:47:17 +0900 | [diff] [blame] | 203 | self.assertRaises(lib_exc.NotFound, self.client.remove_host, |
Ken'ichi Ohmichi | ec452b8 | 2015-07-15 04:59:51 +0000 | [diff] [blame] | 204 | aggregate['id'], host=non_exist_host) |