Merge branch '2019.2.1' into 2019.2.1

This commit is contained in:
tanlingyun2005 2019-04-20 19:18:52 +08:00 committed by GitHub
commit 463b60e817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 5 deletions

View File

@ -1391,10 +1391,13 @@ def create_certificate(
for ignore in list(_STATE_INTERNAL_KEYWORDS) + \
['listen_in', 'preqrequired', '__prerequired__']:
kwargs.pop(ignore, None)
# TODO: Make timeout configurable in Neon
certs = __salt__['publish.publish'](
tgt=ca_server,
fun='x509.sign_remote_certificate',
arg=salt.utils.data.decode_dict(kwargs, to_str=True))
arg=salt.utils.data.decode_dict(kwargs, to_str=True),
timeout=30
)
if not any(certs):
raise salt.exceptions.SaltInvocationError(

View File

@ -28,7 +28,7 @@ tcp_master_workers: 64515
peer:
'.*':
- 'test.*'
- '(x509|test).*'
ext_pillar:
- ext_pillar_opts:

View File

@ -1,3 +0,0 @@
peer:
.*:
- x509.sign_remote_certificate

View File

@ -60,6 +60,9 @@ class x509Test(ModuleCase, SaltReturnAssertsMixin):
def tearDown(self):
os.remove(os.path.join(TMP_PILLAR_TREE, 'signing_policies.sls'))
os.remove(os.path.join(TMP_PILLAR_TREE, 'top.sls'))
certs_path = os.path.join(TMP, 'pki')
if os.path.exists(certs_path):
salt.utils.files.rm_rf(certs_path)
self.run_function('saltutil.refresh_pillar')
def run_function(self, *args, **kwargs):