'Copy certificates to destination directory with naming convention used
by certificate-loading code (control service, node agents and
clients).
Always copies CA certificate.
:param FilePath directory: Destination for files.
:param bool control: Whether to copy control service certificate/key.
:param bool node: Whether to copy node certificate/key.
:param bool user: Whether to copy API client certificate/key.'

def copy_to(self, directory, control=False, user=False, node=False):

    self.path.child('cluster.crt').copyTo(directory.child('cluster.crt'))
    if control:
        self.path.child('control-127.0.0.1.crt').copyTo(directory.child('control-service.crt'))
        self.path.child('control-127.0.0.1.key').copyTo(directory.child('control-service.key'))
    if user:
        self.path.child('allison.crt').copyTo(directory.child('user.crt'))
        self.path.child('allison.key').copyTo(directory.child('user.key'))
    if node:
        uuid = self.node.uuid
        self.path.child('{}.crt'.format(uuid)).copyTo(directory.child('node.crt'))
        self.path.child('{}.key'.format(uuid)).copyTo(directory.child('node.key'))
