blob: 0e6c01613698dea1d55b123faa8e64266c015538 [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):
ivan-zhud57f3cf2013-11-06 16:59:52 +080024
Takeaki Matsumotodf4ab7c2015-08-25 17:49:23 +090025 @classmethod
26 def skip_checks(cls):
27 super(CertificatesV2TestJSON, cls).skip_checks()
28 if not CONF.compute_feature_enabled.nova_cert:
29 raise cls.skipException("Nova cert is not available")
30
Ken'ichi Ohmichi6c92edf2017-01-27 17:32:10 -080031 @decorators.idempotent_id('c070a441-b08e-447e-a733-905909535b1b')
Eiichi Aikawaa30e5192014-03-31 14:58:12 +090032 def test_create_root_certificate(self):
ivan-zhud57f3cf2013-11-06 16:59:52 +080033 # create certificates
zhufl78c91392017-08-02 13:58:53 +080034 self.certificates_client.create_certificate()
Eiichi Aikawaa30e5192014-03-31 14:58:12 +090035
Ken'ichi Ohmichi6c92edf2017-01-27 17:32:10 -080036 @decorators.idempotent_id('3ac273d0-92d2-4632-bdfc-afbc21d4606c')
Eiichi Aikawaa30e5192014-03-31 14:58:12 +090037 def test_get_root_certificate(self):
ivan-zhud57f3cf2013-11-06 16:59:52 +080038 # get the root certificate
zhufl78c91392017-08-02 13:58:53 +080039 self.certificates_client.show_certificate('root')