

def ext_pillar(minion_id, pillar, command):
    '\n    Read in the generated libvirt keys\n    '
    key_dir = os.path.join(__opts__['pki_dir'], 'libvirt', minion_id)
    cacert = os.path.join(__opts__['pki_dir'], 'libvirt', 'cacert.pem')
    if (not os.path.isdir(key_dir)):
        gen_hyper_keys(minion_id)
    ret = {
        
    }
    for key in os.listdir(key_dir):
        if (not key.endswith('.pem')):
            continue
        fn_ = os.path.join(key_dir, key)
        with salt.utils.fopen(fn_, 'r') as fp_:
            ret['libvirt.{0}'.format(key)] = fp_.read()
    with salt.utils.fopen(cacert, 'r') as fp_:
        ret['libvirt.cacert.pem'] = fp_.read()
    return ret

dataset/ETHPy150Open saltstack/salt/salt/pillar/libvirt.py ext_pillar/original