예제 #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)
예제 #2
0
 def __init__(self, dict):
     CdbObject.__init__(self, dict)
예제 #3
0
 def writeFile(self, path, content):
     f = open(path, 'w')
     f.write('%s\n' % content)
     f.close()
     return CdbObject({'path': path})
예제 #4
0
 def getDirectoryList(self, path):
     p = CdbSubprocess('ls -l %s' % path)
     p.run()
     return CdbObject({'path': path, 'directoryList': p.getStdOut()})