Ejemplo n.º 1
0
    def deleteLogEntry(self, logId):
        if logId is None or not len(logId):
            raise InvalidRequest('Log id must be provided.')

        url = '%s/logs/%s/delete' % (self.getContextRoot(), logId)

        response = self.sendSessionRequest(url=url, method='DELETE')
        return CdbObject(response)
Ejemplo n.º 2
0
 def __init__(self, dict):
     CdbObject.__init__(self, dict)
Ejemplo n.º 3
0
 def writeFile(self, path, content):
     f = open(path, 'w')
     f.write('%s\n' % content)
     f.close()
     return CdbObject({'path': path})
Ejemplo n.º 4
0
 def getDirectoryList(self, path):
     p = CdbSubprocess('ls -l %s' % path)
     p.run()
     return CdbObject({'path': path, 'directoryList': p.getStdOut()})