1
# Copyright 2010 Jacob Kaplan-Moss
3
# Copyright 2011 OpenStack LLC.
6
# Licensed under the Apache License, Version 2.0 (the "License"); you may
7
# not use this file except in compliance with the License. You may obtain
8
# a copy of the License at
10
# http://www.apache.org/licenses/LICENSE-2.0
12
# Unless required by applicable law or agreed to in writing, software
13
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15
# License for the specific language governing permissions and limitations
19
Certificate interface.
22
from novaclient import base
25
class Certificate(base.Resource):
27
return "<Certificate: private_key=[%s bytes] data=[%s bytes]>" % \
28
(len(self.private_key) if self.private_key else 0,
32
class CertificateManager(base.ManagerWithFind):
34
Manage :class:`Certificate` resources.
36
resource_class = Certificate
40
Create a x509 certificates for a user in tenant.
42
return self._create('/os-certificates', {}, 'certificate')
48
return self._get("/os-certificates/root", 'certificate')