Mailinglist Archive: yast-commit (1535 mails)
| < Previous | Next > |
[yast-commit] <rest-service> master : add restdoc for ntp
- From: Josef Reidinger <jreidinger@xxxxxxx>
- Date: Thu, 15 Oct 2009 14:33:34 +0200
- Message-id: <E1MyPWU-0007Sq-QC@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit c7e43622428fcacfc31395654bf936874c7ce350
Author: Josef Reidinger <jreidinger@xxxxxxx>
Date: Thu Oct 15 14:33:16 2009 +0200
add restdoc for ntp
---
plugins/ntp/restdoc/api.txt | 50 ++++++++++++++++++++++++++++++++++
plugins/ntp/restdoc/ntp.xml | 6 ++++
plugins/ntp/restdoc/sync_request.xml | 4 +++
3 files changed, 60 insertions(+), 0 deletions(-)
diff --git a/plugins/ntp/restdoc/api.txt b/plugins/ntp/restdoc/api.txt
new file mode 100644
index 0000000..81ce0ae
--- /dev/null
+++ b/plugins/ntp/restdoc/api.txt
@@ -0,0 +1,50 @@
+= YaST REST Service Documentation
+== Ntp Service
+
+ Only authenticated users are allowed to access the API. Authentication is
done
+ by sending a Basic HTTP Authorisation header.
+
+ All names aren't allowed to contain spaces, slashes or colons.
+
+
+== Table of Contents
+
+Contents:
+
+== Formats
+
+ The Ntp REST service supports only XML and JSON input/output formats.
+
+== Overview
+
+ This module provides access to the Ntp synchronization. Curretly it provides
only synchronize again predefined server.
+
+== PolicyKit Access Rights
+
+ The following PolicyKit permissions are needed to execute synchronize:
+
+ Synchronize: org.opensuse.yast.modules.yapi.ntp.synchronize
+
+== System Actions
+
+
+GET /ntp
+
+ Get the list of supported system actions. The list contains actions for ntp.
Nowadays, it is like <i>synchronize</i>.
+
+ CURL Example: curl -u >user< http://localhost:4984/ntp.xml
+
+XmlResult: ntp
+
+
+PUT /ntp
+
+ Trigger a action. Set active flag to true for the action which should be
started - see the XML example file.
+
+ CURL example: curl -u user -X PUT -H 'Content-type: text/xml' -d
@sync_request.xml http://localhost:4984/ntp.xml
+
+XmlBody: sync_request
+
+XmlResult: ntp
+
+
diff --git a/plugins/ntp/restdoc/ntp.xml b/plugins/ntp/restdoc/ntp.xml
new file mode 100644
index 0000000..05846eb
--- /dev/null
+++ b/plugins/ntp/restdoc/ntp.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<actions>
+ <synchronize type="boolean">
+ false
+ </synchronize>
+</actions>
diff --git a/plugins/ntp/restdoc/sync_request.xml
b/plugins/ntp/restdoc/sync_request.xml
new file mode 100644
index 0000000..e8c2a9c
--- /dev/null
+++ b/plugins/ntp/restdoc/sync_request.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ntp>
+ <synchronize type="boolean">true</synchronize>
+</ntp>
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
commit c7e43622428fcacfc31395654bf936874c7ce350
Author: Josef Reidinger <jreidinger@xxxxxxx>
Date: Thu Oct 15 14:33:16 2009 +0200
add restdoc for ntp
---
plugins/ntp/restdoc/api.txt | 50 ++++++++++++++++++++++++++++++++++
plugins/ntp/restdoc/ntp.xml | 6 ++++
plugins/ntp/restdoc/sync_request.xml | 4 +++
3 files changed, 60 insertions(+), 0 deletions(-)
diff --git a/plugins/ntp/restdoc/api.txt b/plugins/ntp/restdoc/api.txt
new file mode 100644
index 0000000..81ce0ae
--- /dev/null
+++ b/plugins/ntp/restdoc/api.txt
@@ -0,0 +1,50 @@
+= YaST REST Service Documentation
+== Ntp Service
+
+ Only authenticated users are allowed to access the API. Authentication is
done
+ by sending a Basic HTTP Authorisation header.
+
+ All names aren't allowed to contain spaces, slashes or colons.
+
+
+== Table of Contents
+
+Contents:
+
+== Formats
+
+ The Ntp REST service supports only XML and JSON input/output formats.
+
+== Overview
+
+ This module provides access to the Ntp synchronization. Curretly it provides
only synchronize again predefined server.
+
+== PolicyKit Access Rights
+
+ The following PolicyKit permissions are needed to execute synchronize:
+
+ Synchronize: org.opensuse.yast.modules.yapi.ntp.synchronize
+
+== System Actions
+
+
+GET /ntp
+
+ Get the list of supported system actions. The list contains actions for ntp.
Nowadays, it is like <i>synchronize</i>.
+
+ CURL Example: curl -u >user< http://localhost:4984/ntp.xml
+
+XmlResult: ntp
+
+
+PUT /ntp
+
+ Trigger a action. Set active flag to true for the action which should be
started - see the XML example file.
+
+ CURL example: curl -u user -X PUT -H 'Content-type: text/xml' -d
@sync_request.xml http://localhost:4984/ntp.xml
+
+XmlBody: sync_request
+
+XmlResult: ntp
+
+
diff --git a/plugins/ntp/restdoc/ntp.xml b/plugins/ntp/restdoc/ntp.xml
new file mode 100644
index 0000000..05846eb
--- /dev/null
+++ b/plugins/ntp/restdoc/ntp.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<actions>
+ <synchronize type="boolean">
+ false
+ </synchronize>
+</actions>
diff --git a/plugins/ntp/restdoc/sync_request.xml
b/plugins/ntp/restdoc/sync_request.xml
new file mode 100644
index 0000000..e8c2a9c
--- /dev/null
+++ b/plugins/ntp/restdoc/sync_request.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ntp>
+ <synchronize type="boolean">true</synchronize>
+</ntp>
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
| < Previous | Next > |