def runCommand(self): self.parseArgs(usage=""" cdb-update-log --log-id=LOG_ID Description: Removes a log entry. """) self.checkArgs() api = LogRestApi(self.getUsername(), self.getPassword(), self.getServiceHost(), self.getServicePort(), self.getServiceProtocol()) cdbObject = api.deleteLogEntry(self.getLogId()) print cdbObject.getDisplayString(self.getDisplayKeys(), self.getDisplayFormat())
def runCommand(self): self.parseArgs(usage=""" cdb-add-log-attachment --log-id=LOG_ID --attachment=ATTACHMENT --attachment-description=ATTACHMENT_DESCRIPTION Description: Adds an attachment to a log. """) self.checkArgs() api = LogRestApi(self.getUsername(), self.getPassword(), self.getServiceHost(), self.getServicePort(), self.getServiceProtocol()) logAttachment = api.addLogAttachment(self.getLogId(), self.getAttachment(), self.getAttachmentDescription()) print logAttachment.getDisplayString(self.getDisplayKeys(), self.getDisplayFormat())
def runCommand(self): self.parseArgs(usage=""" cdb-update-log --log-id=LOG_ID --text=TEXT --log-topic-name=LOG_TOPIC_NAME --effective-from-date-time=EFFECTIVE_FROM_DATE_TIME --effective-to-date-time=EFFECTIVE_TO_DATE_TIME Description: Updates attributes of a log entry. """) self.checkArgs() api = LogRestApi(self.getUsername(), self.getPassword(), self.getServiceHost(), self.getServicePort(), self.getServiceProtocol()) log = api.updateLogEntry(self.getLogId(), self.getLogText(), self.getEffectiveFromDate(), self.getEffectiveToDate(), self.getLogTopicName()) print log.getDisplayString(self.getDisplayKeys(), self.getDisplayFormat())