UNPKG

cloudcms-cli

Version:
53 lines (49 loc) 1.72 kB
var helper = require("../../../helper"); var AbstractCommand = require("../../abstract"); class InspectDataStoreCommand extends AbstractCommand { constructor() { super({ "group": "admin", "name": "inspect-datastore", "description": "Inspects a datastore", "schema": { "properties": [{ "name": "datastoreTypeId", "type": "string", "description": "Enter the data store type ID", "required": true, "args": ["datastoreTypeId", "type"] }, { "name": "datastoreId", "type": "string", "description": "Enter the data store ID", "required": true, "args": ["datastoreId", "id"] }, { "name": "username", "type": "string", "description": "Admin username", "required": true, "args": ["username", "u"] }, { "name": "password", "type": "string", "description": "Admin password", "required": true, "hidden": true, "args": ["password", "p"] }] } }); } handle(options, callback) { // call workhorse function helper.inspectDatastore(options.datastoreTypeId, options.datastoreId, options.username, options.password, function(err) { callback(err); }); } } module.exports = InspectDataStoreCommand;