(cls, instance)
return url, username, password, ssl_params, custom_queries, tags
Parse instance configuration and perform minimal verification
Parse instance configuration and perform minimal verification
Parse instance configuration and perform minimal verification
def _get_instance_params(cls, instance):
        """
        Parse instance configuration and perform minimal verification
        """
        url = instance.get("url")
        if url is None:
            raise ConfigurationError("You must specify a url for your instance in `conf.yaml`")
        username = instance.get("username")
        password = instance.get("password")
        ssl_params = None
        if url.startswith("ldaps"):
            ssl_params = {
                "key": instance.get("ssl_key"),
                "cert": instance.get("ssl_cert"),
                "ca_certs": instance.get("ssl_ca_certs"),
                "verify": is_affirmative(instance.get("ssl_verify", True)),
            }
        custom_queries = instance.get("custom_queries", [])
        tags = list(instance.get("tags", []))
        tags.append("url:{}".format(url))

        return url, username, password, ssl_params, custom_queries, tags
def _get_instance_params ( cls , instance ) : url = instance . get ( "url" ) if url is None : raise ConfigurationError ( "You must specify a url for your instance in `conf.yaml`" ) username = instance . get ( "username" ) password = instance . get ( "password" ) ssl_params = None if url . startswith ( "ldaps" ) : ssl_params = { "key" : instance . get ( "ssl_key" ) , "cert" : instance . get ( "ssl_cert" ) , "ca_certs" : instance . get ( "ssl_ca_certs" ) , "verify" : is_affirmative ( instance . get ( "ssl_verify" , True ) ) , } custom_queries = instance . get ( "custom_queries" , [ ] ) tags = list ( instance . get ( "tags" , [ ] ) ) tags . append ( "url:{}" . format ( url ) ) return url , username , password , ssl_params , custom_queries , tags