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