abaruni commented on a change in pull request #217: Add ability to get trigger
configuration and status
URL:
https://github.com/apache/incubator-openwhisk-package-kafka/pull/217#discussion_r144407001
##########
File path: action/kafkaFeedWeb.js
##########
@@ -61,6 +61,35 @@ function main(params) {
resolve(common.webResponse(statusCode, body));
});
+ } else if (params.__ow_method === "get") {
+ const triggerURL = common.getTriggerURL(params.authKey,
params.endpoint, params.triggerName);
+
+ return common.verifyTriggerAuth(triggerURL)
+ .then(() => {
+ db = new Database(params.DB_URL, params.DB_NAME);
+ return db.getTrigger(params.triggerName);
+ })
+ .then((triggerDoc) => {
+ var body = {
+ config: {
+ triggerName: triggerDoc.triggerName,
+ topic: triggerDoc.topic,
+ isJSONData: triggerDoc.isJSONData,
+ isBinaryValue: triggerDoc.isBinaryValue,
+ isBinaryKey: triggerDoc.isBinaryKey,
+ isMessageHub: triggerDoc.isMessageHub,
+ brokers: triggerDoc.brokers,
+ kafka_admin_url: triggerDoc.kafka_admin_url,
+ username: triggerDoc.username,
+ password: triggerDoc.password
Review comment:
at this point in time yes. the user needs to be authenticated. this is no
different than fetching the service credentials for your instance of message
hub from bluemix
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services