def populate_source(cls, source):
        """Derive missing values of source from the existing fields."""
        # Only URL pararemter is mandatory, let the KeyError be thrown.
        if "name" not in source:
            source["name"] = get_url_name(source["url"])
        if "verify_ssl" not in source:
            source["verify_ssl"] = "https://" in source["url"]
        if not isinstance(source["verify_ssl"], bool):
            source["verify_ssl"] = source["verify_ssl"].lower() == "true"
        return source
def populate_source ( cls , source ) : if "name" not in source : source [ "name" ] = get_url_name ( source [ "url" ] ) if "verify_ssl" not in source : source [ "verify_ssl" ] = "https://" in source [ "url" ] if not isinstance ( source [ "verify_ssl" ] , bool ) : source [ "verify_ssl" ] = source [ "verify_ssl" ] . lower ( ) == "true" return source
Derive missing values of source from the existing fields.