[Kimchi-devel] [PATCH v2][Wok 4/8] Change plugins API documentation by pluginsmanager API
Rodrigo Trujillo
rodrigo.trujillo at linux.vnet.ibm.com
Wed Jun 8 21:11:18 UTC 2016
On 06/08/2016 04:02 PM, Aline Manera wrote:
>
>
> 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 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]
>
> You should keep this file there for the /plugins API.
Yes... I forget to back the file, after have decided to back with this
api without authentication
>
>> 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.
Yes, this API can be improved with more info, specially thinking on data
to fill future UI
>
>> +### 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
ACK
>
> _______________________________________________
> Kimchi-devel mailing list
> Kimchi-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
>
More information about the Kimchi-devel
mailing list