On 06/06/2016 04:13 PM, Rodrigo Trujillo wrote:
This patch creates the documentation for pluginsmanager API
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
---
docs/API/plugins.md | 13 ----------
docs/API/pluginsmanager.md | 61 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 61 insertions(+), 13 deletions(-)
delete mode 100644 docs/API/plugins.md
create mode 100644 docs/API/pluginsmanager.md
diff --git a/docs/API/plugins.md b/docs/API/plugins.md
deleted file mode 100644
index aaa37b5..0000000
--- a/docs/API/plugins.md
+++ /dev/null
@@ -1,13 +0,0 @@
-## REST API Specification for Plugins
-
-### Collection: Plugins
-
-**URI:** /plugins
-
-**Methods:**
-
-* **GET**: Retrieve a summarized list names of all UI Plugins
-
-#### Examples
-GET /plugins
-[pluginA, pluginB, pluginC]
You should keep this file there for the /plugins API.
diff --git a/docs/API/pluginsmanager.md b/docs/API/pluginsmanager.md
new file mode 100644
index 0000000..b79c8ad
--- /dev/null
+++ b/docs/API/pluginsmanager.md
@@ -0,0 +1,61 @@
+## REST API Specification for Plugins Manager
+
+### Collection: Plugins
+
+**URI:** /pluginsmanager
+
+**Methods:**
+
+* **GET**: Retrieve a list of all Plugins configured in Wok, showing name and state.
+
+#### Examples
+GET /pluginsmanager
+[
+ {
+ "enabled":true,
+ "name":"gingerbase"
+ },
+ {
+ "enabled":true,
+ "name":"kimchi"
+ },
+ {
+ "enabled":false,
+ "name":"sample"
+ }
+]
+
Maybe it would be good to have the 'uri' listed among of those plugin
info.
+### Resource: Plugin
+
+**URI:** /pluginsmanager/*:name*
+
+A plugin represents a software that will make use of infrastructure provided
+by Wok. It should be installed in a directory with its <name> in Wok directory
+'plugins' and contains an <name>.conf file.
+Example: "/usr/lib/python2.7/site-packages/wok/plugins/kimchi"
+
+**Methods:**
+
+* **GET**: Retrieve the full description of the plugin.
+ * name: The plugin name
+ * enabled: State of the plugin. If not enabled, Wok will not load it
+* **POST**: *See Task Actions*
+
+**Actions (POST):**
+
+* enable: enable a plugin. Also changes plugin's configuration file
+
+* disable: disable a plugin. Also changes plugin's configuration file
+
+#### Examples
+GET /pluginsmanager/sample
+{
+ "enabled":false,
+ "name":"sample"
+}
+
+POST /pluginsmanager/sample/enable
+{
+ "enabled":true,
+ "name":"sample"
+}
Add an example for 'disable' action