cloudcms-cli
Version:
Cloud CMS Command-Line client
42 lines (38 loc) • 1.23 kB
JavaScript
var helper = require("../../../helper");
var AbstractCommand = require("../../abstract");
class ReadDataStoreCommand extends AbstractCommand
{
constructor()
{
super({
"group": "datastore",
"name": "read",
"description": "Reads a datastore",
"schema": {
"properties": [{
"name": "datastoreTypeId",
"type": "string",
"description": "Enter the datastore type:",
"helper": "The type of the data store",
"required": true,
"args": ["type"]
}, {
"name": "datastoreId",
"type": "string",
"description": "Enter the datastore ID:",
"helper": "The ID of the data store",
"required": true,
"args": ["id"]
}]
}
});
}
handle(options, callback)
{
// call workhorse function
helper.readDatastore(options.datastoreTypeId, options.datastoreId, function(err) {
callback(err);
});
}
}
module.exports = ReadDataStoreCommand;