import uuid


def generate_name(username, command):
    """Create a name for the container.

    :Returns: String

    :param username: The name of the user executing Container Shell.
    :type username: String

    :param command: The command being ran inside the container.
    :type command: String
    """
    if command.startswith('scp') or command.endswith('sftp-server'):
        # SCP & SFTP commands run in their own, standalone containers.
        # So they need a unique name.
        name = '{}-{}'.format(username, uuid.uuid4().hex[:6])
    else:
        name = username
    return name