mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #24189 from basepi/merge-forward-2015.5
[2015.5] Merge forward from 2014.7 to 2015.5
This commit is contained in:
commit
9fcda79cd4
2 changed files with 12 additions and 6 deletions
|
@ -73,9 +73,13 @@ __opts__ = {}
|
|||
|
||||
def auth(profile=None, **connection_args):
|
||||
'''
|
||||
Set up keystone credentials
|
||||
Set up keystone credentials. Only intended to be used within Keystone-enabled modules.
|
||||
|
||||
Only intended to be used within Keystone-enabled modules
|
||||
CLI Example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
salt '*' keystone.auth
|
||||
'''
|
||||
|
||||
if profile:
|
||||
|
@ -329,7 +333,9 @@ def endpoint_delete(service, profile=None, **connection_args):
|
|||
|
||||
def role_create(name, profile=None, **connection_args):
|
||||
'''
|
||||
Create named role
|
||||
Create a named role.
|
||||
|
||||
CLI Example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ import time
|
|||
import logging
|
||||
import hashlib
|
||||
from salt.ext import six
|
||||
from salt.ext.six.moves import range
|
||||
from salt.ext.six.moves import range as _range
|
||||
from datetime import datetime
|
||||
|
||||
HAS_SSL = False
|
||||
|
@ -850,7 +850,7 @@ def create_ca_signed_cert(ca_name,
|
|||
# so we mimic the newly get_extensions method present in ultra
|
||||
# recent pyopenssl distros
|
||||
native_exts_obj = OpenSSL._util.lib.X509_REQ_get_extensions(req._req)
|
||||
for i in range(OpenSSL._util.lib.sk_X509_EXTENSION_num(native_exts_obj)):
|
||||
for i in _range(OpenSSL._util.lib.sk_X509_EXTENSION_num(native_exts_obj)):
|
||||
ext = OpenSSL.crypto.X509Extension.__new__(OpenSSL.crypto.X509Extension)
|
||||
ext._extension = OpenSSL._util.lib.sk_X509_EXTENSION_value(native_exts_obj, i)
|
||||
exts.append(ext)
|
||||
|
@ -1034,7 +1034,7 @@ def cert_info(cert_path, digest='sha256'):
|
|||
# add additional info if your version of pyOpenSSL supports it
|
||||
if hasattr(cert, 'get_extension_count'):
|
||||
ret['extensions'] = {}
|
||||
for i in range(cert.get_extension_count()):
|
||||
for i in _range(cert.get_extension_count()):
|
||||
ext = cert.get_extension(i)
|
||||
ret['extensions'][ext.get_short_name()] = ext
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue