Determines the host name of a container. In this implementation, replaces all dots and underscores of a
        container name with a dash; then attaches another dash with the client name, unless there is just one default
        client.

        :param container_name: Name of the container.
        :type container_name: unicode | str
        :param client_name: Name of the client configuration, where applicable.
        :type client_name: unicode | str
        :return: Host name.
        :rtype: unicode | str

def get_hostname(cls, container_name, client_name=None):
        """
        Determines the host name of a container. In this implementation, replaces all dots and underscores of a
        container name with a dash; then attaches another dash with the client name, unless there is just one default
        client.

        :param container_name: Name of the container.
        :type container_name: unicode | str
        :param client_name: Name of the client configuration, where applicable.
        :type client_name: unicode | str
        :return: Host name.
        :rtype: unicode | str
        """
        base_name = container_name
        for old, new in cls.hostname_replace:
            base_name = base_name.replace(old, new)
        if not client_name or client_name == cls.default_client_name:
            return base_name
        client_suffix = client_name
        for old, new in cls.hostname_replace:
            client_suffix = client_suffix.replace(old, new)
        return '{0}-{1}'.format(base_name, client_suffix)