[Kimchi-devel] [PATCH v2][Wok 4/8] Change plugins API documentation by pluginsmanager API

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Mon Jun 6 19:13:32 UTC 2016


This patch creates the documentation for pluginsmanager API

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at 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]
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"
+  }
+]
+
+### 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"
+}
-- 
2.1.0




More information about the Kimchi-devel mailing list