def import_conf(user, conf_dir, tarball, keyring, secret_keyring, auth_method,
        gpg_home_dir):
    with tarfile.open(tarball, "r:gz") as tf:
        name = get_attribute_from_tarfile("name", tf)
        key = get_attribute_from_tarfile("fingerprint", tf)

        write_conf(conf_dir, name, key, auth_method)

        import_pgp(user, get_attribute_from_tarfile('key.pub', tf),
                   'public', keyring, gpg_home_dir)
        import_pgp(user, get_attribute_from_tarfile('key.priv', tf),
                   'secret', secret_keyring, gpg_home_dir)
Import the slave configuration from the tarball.
dataset/ETHPy150Open opencollab/debile/tools/debile_slave_import_conf.py/import_conf