blob: 59179310cd58a493c221cbd38a2cd4d0c1ed6e20 [file] [log] [blame]
ivan-zhud57f3cf2013-11-06 16:59:52 +08001# Copyright 2012 OpenStack Foundation
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
16from tempest.api.compute import base
Takeaki Matsumotodf4ab7c2015-08-25 17:49:23 +090017from tempest import config
Ken'ichi Ohmichi6c92edf2017-01-27 17:32:10 -080018from tempest.lib import decorators
ivan-zhud57f3cf2013-11-06 16:59:52 +080019
Takeaki Matsumotodf4ab7c2015-08-25 17:49:23 +090020CONF = config.CONF
21
ivan-zhud57f3cf2013-11-06 16:59:52 +080022
Ken'ichi Ohmichi02a8ccd2015-11-05 06:05:29 +000023class CertificatesV2TestJSON(base.BaseV2ComputeTest):
zhufl36ef0892020-08-12 13:47:21 +080024 """Test Certificates API"""
ivan-zhud57f3cf2013-11-06 16:59:52 +080025
Takeaki Matsumotodf4ab7c2015-08-25 17:49:23 +090026 @classmethod
27 def skip_checks(cls):
28 super(CertificatesV2TestJSON, cls).skip_checks()
29 if not CONF.compute_feature_enabled.nova_cert:
30 raise cls.skipException("Nova cert is not available")
31
Ken'ichi Ohmichi6c92edf2017-01-27 17:32:10 -080032 @decorators.idempotent_id('c070a441-b08e-447e-a733-905909535b1b')
Eiichi Aikawaa30e5192014-03-31 14:58:12 +090033 def test_create_root_certificate(self):
zhufl36ef0892020-08-12 13:47:21 +080034 """Test creating root certificate"""
zhufl78c91392017-08-02 13:58:53 +080035 self.certificates_client.create_certificate()
Eiichi Aikawaa30e5192014-03-31 14:58:12 +090036
Ken'ichi Ohmichi6c92edf2017-01-27 17:32:10 -080037 @decorators.idempotent_id('3ac273d0-92d2-4632-bdfc-afbc21d4606c')
Eiichi Aikawaa30e5192014-03-31 14:58:12 +090038 def test_get_root_certificate(self):
zhufl36ef0892020-08-12 13:47:21 +080039 """Test getting root certificate details"""
zhufl78c91392017-08-02 13:58:53 +080040 self.certificates_client.show_certificate('root')