示例#1
0
 def get(self):
     entityname = self.get_argument("entityname", "")       
     entityid = self.get_argument("id", "")
     row = entity.getEntity(entityname, entityid)
     print row
     columns = const.entities[entityname]['columns']        
     return self.render("edit.html", entityname=entityname, columns=columns, entity=row)
示例#2
0
文件: auth.py 项目: DRArpitha/splunk
def getRole(name, **kwargs):
    '''
    Returns a dictionary of role info.
    '''
    if not name:
        raise TypeError('Name argument is missing')

    uri = 'authentication/roles' 
    try:
        return en.getEntity(uri, name, **kwargs)
    except splunk.ResourceNotFound:
        return {}
示例#3
0
def getRole(name, **kwargs):
    '''
    Returns a dictionary of role info.
    '''
    if not name:
        raise TypeError('Name argument is missing')

    uri = 'authentication/roles'
    try:
        return en.getEntity(uri, name, **kwargs)
    except splunk.ResourceNotFound:
        return {}
def getSavedSearch(label,
                   namespace=None,
                   sessionKey=None,
                   owner=None,
                   hostPath=None,
                   uri=None):
    '''Retrieve a single saved search.'''
    return entity.getEntity(SAVED_SEARCHES_ENDPOINT_ENTITY_PATH,
                            label,
                            namespace=namespace,
                            owner=owner,
                            sessionKey=sessionKey,
                            hostPath=hostPath,
                            uri=uri)
def getSavedSearchWithTimes(label,
                            et,
                            lt,
                            namespace=None,
                            sessionKey=None,
                            owner=None,
                            hostPath=None):
    '''Retrieve a list of UTC times that a saved searches was schedule to run.'''
    return entity.getEntity(SAVED_SEARCHES_ENDPOINT_ENTITY_PATH,
                            label,
                            earliest_time=et,
                            latest_time=lt,
                            namespace=namespace,
                            owner=owner,
                            sessionKey=sessionKey,
                            hostPath=hostPath)
示例#6
0
文件: auth.py 项目: DRArpitha/splunk
def getUser(name=None, id=None, **kwargs):
    '''
    Returns a dictionary of user info for a specific user ID.
    '''
    uri = 'authentication/users'
    if name:
        try:
            info = en.getEntity(uri, name, **kwargs)
            info['name'] = name
            return info
        except splunk.ResourceNotFound:
            return None

    elif id:
        raise Exception, 'User IDs are no longer available; all users must be identified by name'
        
    else:
        raise TypeError('No arguments specified')
示例#7
0
def getUser(name=None, id=None, **kwargs):
    '''
    Returns a dictionary of user info for a specific user ID.
    '''
    uri = 'authentication/users'
    if name:
        try:
            info = en.getEntity(uri, name, **kwargs)
            info['name'] = name
            return info
        except splunk.ResourceNotFound:
            return None

    elif id:
        raise Exception, 'User IDs are no longer available; all users must be identified by name'

    else:
        raise TypeError('No arguments specified')
def getSavedSearch(label, namespace=None, sessionKey=None, owner=None, hostPath=None, uri=None):
    '''Retrieve a single saved search.'''
    return entity.getEntity(SAVED_SEARCHES_ENDPOINT_ENTITY_PATH, label, namespace=namespace, owner=owner, sessionKey=sessionKey, hostPath=hostPath, uri=uri)
def getSavedSearchWithTimes(label, et, lt, namespace=None, sessionKey=None, owner=None, hostPath=None):
    '''Retrieve a list of UTC times that a saved searches was schedule to run.'''
    return entity.getEntity(SAVED_SEARCHES_ENDPOINT_ENTITY_PATH, label, earliest_time=et, latest_time=lt, namespace=namespace, owner=owner, sessionKey=sessionKey, hostPath=hostPath)