

@classmethod
def from_files(cls, certificate_path, key_path):
    '\n        Load a user certificate and keypair from the specified file paths.\n        Extracts the username from the parsed certificate.\n\n        :param FilePath certificate_path: Absolute path to the user\n            certificate file.\n        :param FilePath key_path: Absolute path to the user private key file.\n\n        :return: A ``UserCredential`` instance representing the parsed data.\n        '
    certificate = load_certificate_file(certificate_path)
    keypair = load_key_file(key_path)
    dn = certificate.getSubject()
    username = dn.CN.decode('utf-8').replace('user-', '', 1)
    credential = FlockerCredential(path=keypair.parent(), keypair=keypair, certificate=certificate)
    return cls(credential=credential, username=username)

dataset/ETHPy150Open ClusterHQ/flocker/flocker/ca/_ca.py UserCredential.from_files/VarMisuse@67/225 `certificate_path`->`keypair`