~andrewjbeach/juju-ci-tools/isolate-autoload

« back to all changes in this revision

Viewing changes to assess_log_forward.py

  • Committer: Christopher Lee
  • Date: 2016-07-19 07:47:19 UTC
  • mto: This revision was merged to the branch mainline in revision 1535.
  • Revision ID: chris.lee@canonical.com-20160719074719-ixb0d1ub4t1d3lv6
Change certificate details to not be a getter function.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
import yaml
19
19
 
20
20
from assess_model_migration import get_bootstrap_managers
21
 
from certificates import (
22
 
    create_certificate,
23
 
    get_ca_pem_contents,
24
 
)
 
21
import certificates
25
22
from utility import (
26
23
    add_basic_testing_arguments,
27
24
    configure_logging,
180
177
 
181
178
 
182
179
def install_certificates(client, config_dir, ip_address, unit_machine):
183
 
    cert, key = create_certificate(config_dir, ip_address)
 
180
    cert, key = certificates.create_certificate(config_dir, ip_address)
184
181
 
185
182
    # Write contents to file to scp across
186
183
    ca_file = os.path.join(config_dir, 'ca.pem')
187
184
    with open(ca_file, 'wt') as f:
188
 
        f.write(get_ca_pem_contents())
 
185
        f.write(certificates.ca_pem_contents)
189
186
 
190
187
    scp_command = (
191
188
        '--', cert, key, ca_file, '{unit}:/home/ubuntu/'.format(
203
200
 
204
201
    return {
205
202
        'syslog-host': '{}:10514'.format(ip_address),
206
 
        'syslog-ca-cert': get_ca_pem_contents(),
 
203
        'syslog-ca-cert': certificates.ca_pem_contents,
207
204
        'syslog-client-cert': cert_contents,
208
205
        'syslog-client-key': key_contents
209
206
    }