def add_computer (api, configuration, api_version, api_exception, hostname):
    """ Adds a computer to Deep Security Manager.

    :param api: The Deep Security API modules.
    :param configuration: Configuration object to pass to the api client.
    :param api_version: The version of the API to use.
    :param api_exception: The Deep Security API exception module.
    :param hostname: The hostname or IP address that resolves to the computer.
    :return: An Integer that contains the ID of the computer.
    """

    # Create the computer object
    computer = api.Computer()
    computer.host_name = hostname

    try:
        # Add the computer to Deep Security Manager
        computers_api = api.ComputersApi(api.ApiClient(configuration))
        new_computer = computers_api.create_computer(computer, api_version)
        return new_computer.id

    except api_exception as e:
        return "Exception: " + str(e)