"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/letstest/multitester.py" between
certbot-0.30.2.tar.gz and certbot-0.31.0.tar.gz

About: Certbot is EFF’s tool to obtain certs from Let’s Encrypt, and optionally auto-enable HTTPS on your server. It can also act as a client for any other CA that uses the ACME protocol.

multitester.py  (certbot-0.30.2):multitester.py  (certbot-0.31.0)
skipping to change at line 35 skipping to change at line 35
then: then:
>python multitester.py targets.yaml MyKeyPair.pem HappyHacker scripts/test_letse ncrypt_auto_venv_only.sh >python multitester.py targets.yaml MyKeyPair.pem HappyHacker scripts/test_letse ncrypt_auto_venv_only.sh
see: see:
https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
https://docs.aws.amazon.com/cli/latest/userguide/cli-ec2-keypairs.html https://docs.aws.amazon.com/cli/latest/userguide/cli-ec2-keypairs.html
""" """
from __future__ import print_function from __future__ import print_function
from __future__ import with_statement from __future__ import with_statement
import sys, os, time, argparse, socket import sys, os, time, argparse, socket, traceback
import multiprocessing as mp import multiprocessing as mp
from multiprocessing import Manager from multiprocessing import Manager
import urllib2 import urllib2
import yaml import yaml
import boto3 import boto3
from botocore.exceptions import ClientError from botocore.exceptions import ClientError
import fabric import fabric
from fabric.api import run, execute, local, env, sudo, cd, lcd from fabric.api import run, execute, local, env, sudo, cd, lcd
from fabric.operations import get, put from fabric.operations import get, put
from fabric.context_managers import shell_env from fabric.context_managers import shell_env
skipping to change at line 363 skipping to change at line 363
env.host_string = "%s@%s"%(target['user'], instances[ii].public_ip_addre ss) env.host_string = "%s@%s"%(target['user'], instances[ii].public_ip_addre ss)
print(env.host_string) print(env.host_string)
try: try:
install_and_launch_certbot(instances[ii], boulder_url, target) install_and_launch_certbot(instances[ii], boulder_url, target)
outqueue.put((ii, target, 'pass')) outqueue.put((ii, target, 'pass'))
print("%s - %s SUCCESS"%(target['ami'], target['name'])) print("%s - %s SUCCESS"%(target['ami'], target['name']))
except: except:
outqueue.put((ii, target, 'fail')) outqueue.put((ii, target, 'fail'))
print("%s - %s FAIL"%(target['ami'], target['name'])) print("%s - %s FAIL"%(target['ami'], target['name']))
traceback.print_exc(file=sys.stdout)
pass pass
# append server certbot.log to each per-machine output log # append server certbot.log to each per-machine output log
print("\n\ncertbot.log\n" + "-"*80 + "\n") print("\n\ncertbot.log\n" + "-"*80 + "\n")
try: try:
execute(grab_certbot_log) execute(grab_certbot_log)
except: except:
print("log fail\n") print("log fail\n")
traceback.print_exc(file=sys.stdout)
pass pass
def cleanup(cl_args, instances, targetlist): def cleanup(cl_args, instances, targetlist):
print('Logs in ', LOGDIR) print('Logs in ', LOGDIR)
if not cl_args.saveinstances: if not cl_args.saveinstances:
print('Terminating EC2 Instances') print('Terminating EC2 Instances')
if cl_args.killboulder: if cl_args.killboulder:
boulder_server.terminate() boulder_server.terminate()
for instance in instances: for instance in instances:
instance.terminate() instance.terminate()
skipping to change at line 423 skipping to change at line 425
"MERGING into master" if cl_args.merge_master else "") "MERGING into master" if cl_args.merge_master else "")
execute(local_git_PR, cl_args.repo, cl_args.pull_request, cl_args.merge_ master) execute(local_git_PR, cl_args.repo, cl_args.pull_request, cl_args.merge_ master)
elif cl_args.branch != '~': elif cl_args.branch != '~':
print('Testing branch %s of %s'%(cl_args.branch, cl_args.repo)) print('Testing branch %s of %s'%(cl_args.branch, cl_args.repo))
execute(local_git_branch, cl_args.repo, cl_args.branch) execute(local_git_branch, cl_args.repo, cl_args.branch)
else: else:
print('Testing master of %s'%cl_args.repo) print('Testing master of %s'%cl_args.repo)
execute(local_git_clone, cl_args.repo) execute(local_git_clone, cl_args.repo)
except FabricException: except FabricException:
print("FAIL: trouble with git repo") print("FAIL: trouble with git repo")
traceback.print_exc()
exit() exit()
# Set up EC2 instances # Set up EC2 instances
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
configdata = yaml.load(open(cl_args.config_file, 'r')) configdata = yaml.load(open(cl_args.config_file, 'r'))
targetlist = configdata['targets'] targetlist = configdata['targets']
print('Testing against these images: [%d total]'%len(targetlist)) print('Testing against these images: [%d total]'%len(targetlist))
for target in targetlist: for target in targetlist:
print(target['ami'], target['name']) print(target['ami'], target['name'])
 End of changes. 4 change blocks. 
1 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)