From 3dbb101b4a05ba5e0eee4d5720865627fdf3e0ed Mon Sep 17 00:00:00 2001 From: kevin cloinger Date: Thu, 16 Jul 2015 02:42:56 -0600 Subject: [PATCH 1/2] added updateDeps Added updateDeps to foxx-manager cli for use with salt. please give good look over this. --- .../modules/org/arangodb/foxx/manager.js | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/js/client/modules/org/arangodb/foxx/manager.js b/js/client/modules/org/arangodb/foxx/manager.js index 6eb3906423..2c3054538f 100644 --- a/js/client/modules/org/arangodb/foxx/manager.js +++ b/js/client/modules/org/arangodb/foxx/manager.js @@ -150,6 +150,7 @@ var help = function () { "available" : "lists all Foxx applications available in the local repository", "configuration" : "request the configuration information for the given mountpoint", "configure" : "sets the configuration for the given mountpoint", + "updateDeps" : "links the dependencies in manifest to a mountpoint" "dependencies" : "request the dependencies information for the given mountpoint", "development" : "activates development mode for the given mountpoint", "help" : "shows this help", @@ -477,7 +478,28 @@ var configuration = function(mount) { arangosh.checkRequestResult(res); return res; }; +//////////////////////////////////////////////////////////////////////////////// +/// @brief Link Dependencies to the installed mountpoint the app at the mountpoint +//////////////////////////////////////////////////////////////////////////////// +var updateDeps = function(mount, options) { + checkParameter( + "update()", + [ [ "Mount path", "string" ] ], + [ mount ] ); + utils.validateMount(mount); + var req = { + mount: mount, + options: options + }; + var res = arango.POST("/_admin/foxx/updateDeps", JSON.stringify(req)); + arangosh.checkRequestResult(res); + return { + name: res.name, + version: res.version, + mount: res.mount + }; +}; //////////////////////////////////////////////////////////////////////////////// /// @brief Configure the dependencies of the app at the mountpoint //////////////////////////////////////////////////////////////////////////////// @@ -668,6 +690,14 @@ var run = function (args) { res = configuration(args[1]); printf("Configuration options:\n%s\n", JSON.stringify(res, undefined, 2)); break; + case "updateDeps": + options = extractOptions(args).configuration || {}; + res = updateDeps(args[1], options); + printf("Reconfigured Application %s version %s on mount point %s\n", + res.name, + res.version, + res.mount); + break; case "set-dependencies": options = extractOptions(args).configuration || {}; res = setDependencies(args[1], options); From 71c37439a8acb3ef457f596da19f7ff2f022961a Mon Sep 17 00:00:00 2001 From: kevin cloinger Date: Thu, 16 Jul 2015 03:02:35 -0600 Subject: [PATCH 2/2] added updateDeps and a comma --- js/client/modules/org/arangodb/foxx/manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/client/modules/org/arangodb/foxx/manager.js b/js/client/modules/org/arangodb/foxx/manager.js index 2c3054538f..391d6bfa55 100644 --- a/js/client/modules/org/arangodb/foxx/manager.js +++ b/js/client/modules/org/arangodb/foxx/manager.js @@ -150,7 +150,7 @@ var help = function () { "available" : "lists all Foxx applications available in the local repository", "configuration" : "request the configuration information for the given mountpoint", "configure" : "sets the configuration for the given mountpoint", - "updateDeps" : "links the dependencies in manifest to a mountpoint" + "updateDeps" : "links the dependencies in manifest to a mountpoint", "dependencies" : "request the dependencies information for the given mountpoint", "development" : "activates development mode for the given mountpoint", "help" : "shows this help",