def current_kv_names(sci, app_user, app_name, request=None):
    """Return set of string names of current available Splunk KV collections
    
    Args:
        sci: Instance of sparc.db.splunk.ISplunkConnectionInfo
        app_user: Splunk KV Collection app user to reference
        app_name: Splunk KV Collection application name to reference
    kwargs:
        request: instance of sparc.utils.requests.IRequest
        
    request will be resolved via 'sparc.utils.requests.request_resolver' named
    component.

    Returns:
        Set of string names for collections found
    """
    resolver = sm.getUtility(IRequest, u'sparc.utils.requests.request_resolver')
    req = resolver(request=request)
    kwargs = {'auth': (sci['username'], sci['password'], )}
    url = "".join(['https://',sci['host'],':',sci['port'],
                                    '/servicesNS/',app_user,'/',
                                                        app_name,'/'])
    _return = set()
    r = req.request('get', url+"storage/collections/config", **kwargs)
    r.raise_for_status()
    root = ET.fromstring(r.text)
    for entry in root.findall('./atom:entry', xml_ns):
        name = entry.find('./atom:title', xml_ns).text
        if not name:
            raise ValueError('unexpectedly found empty collection title')
        _return.add(name)
    return _return
def current_kv_names ( sci , app_user , app_name , request = None ) : resolver = sm . getUtility ( IRequest , u'sparc.utils.requests.request_resolver' ) req = resolver ( request = request ) kwargs = { 'auth' : ( sci [ 'username' ] , sci [ 'password' ] , ) } url = "" . join ( [ 'https://' , sci [ 'host' ] , ':' , sci [ 'port' ] , '/servicesNS/' , app_user , '/' , app_name , '/' ] ) _return = set ( ) r = req . request ( 'get' , url + "storage/collections/config" , ** kwargs ) r . raise_for_status ( ) root = ET . fromstring ( r . text ) for entry in root . findall ( './atom:entry' , xml_ns ) : name = entry . find ( './atom:title' , xml_ns ) . text if not name : raise ValueError ( 'unexpectedly found empty collection title' ) _return . add ( name ) return _return
Return set of string names of current available Splunk KV collections
    
    Args:
        sci: Instance of sparc.db.splunk.ISplunkConnectionInfo
        app_user: Splunk KV Collection app user to reference
        app_name: Splunk KV Collection application name to reference
    kwargs:
        request: instance of sparc.utils.requests.IRequest
        
    request will be resolved via 'sparc.utils.requests.request_resolver' named
    component.

    Returns:
        Set of string names for collections found