Define get and create API for repositories collection.
Define get, update, enable and disable API for repository resource.
Signed-off-by: Paulo Vital <pvital(a)linux.vnet.ibm.com>
---
docs/API.md | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 80 insertions(+)
diff --git a/docs/API.md b/docs/API.md
index 580728c..52bafae 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -741,3 +741,83 @@ Contains the host sample data.
* size: The total size of the partition, in bytes
* mountpoint: If the partition is mounted, represents the mountpoint.
Otherwise blank.
+
+### Collection: Host Repositories
+
+**URI:** /host/repositories
+
+**Methods:**
+
+* **GET**: Retrieve a summarized list of all repositories available
+* **POST**: Add a new repository
+ * repo_id *(optional)*: Unique repository name for each repository,
+one word.
+ * baseurl: URL to the repodata directory when "is_mirror" is false.
+Otherwise, it can be URL to the mirror system for YUM. Can be an
+http://, ftp:// or file:// URL.
+ * is_mirror *(optional)*: Set the given URI of baseurl as a mirror
+list, instead of use baseurl in repository configuration.
+ * url_args *(optional)*: Arguments to be passed to baseurl, like the
+list of APT repositories provided by the same baseurl.
+ * gpgkey *(optional)*: URL pointing to the ASCII-armored GPG key
+file for the repository. This option is used if yum needs a public key
+to verify a package and the required key hasn't been imported into the
+RPM database.
+
+### Resource: Repository
+
+**URI:** /host/repositories/*:repo-id*
+
+**Methods:**
+
+* **GET**: Retrieve the full description of a Repository
+ * repo_id: Unique repository name for each repository, one word.
+ * repo_name: Human-readable string describing the repository.
+ * baseurl: URL to the repodata directory when "is_mirror" is false.
+Otherwise, it can be URL to the mirror system for YUM. Can be an
+http://, ftp:// or file:// URL.
+ * url_args *(optional)*: Arguments to be passed to baseurl, like the
+list of APT repositories provided by the same baseurl.
+ * enabled: Indicates if repository should be included
+as a package source:
+ * false: Do not include the repository.
+ * true: Include the repository.
+ * gpgcheck *(optional)*: Indicates if a GPG signature check on the
+packages gotten from repository should be performed:
+ * false: Do not check GPG signature
+ * true: Check GPG signature
+ * gpgkey *(optional)*: URL pointing to the ASCII-armored GPG key
+file for the repository. This option is used if yum needs a public key
+to verify a package and the required key hasn't been imported into the
+RPM database.
+* **DELETE**: Remove the Repository
+* **POST**: *See Repository Actions*
+* **PUT**: update the parameters of existing Repository
+ * repo_id *(otional)*: Unique repository name for each repository,
+one word.
+ * repo_name *(otional)*: Human-readable string describing the
+repository.
+ * baseurl *(optional)*: URL to the repodata directory when
+"is_mirror" is false. Otherwise, it can be URL to the mirror system for
+YUM. Can be an http://, ftp:// or file:// URL.
+ * is_mirror *(optional)*: Set the given URI of baseurl as a mirror
+list, instead of use baseurl in repository configuration.
+ * url_args *(optional)*: Arguments to be passed to baseurl, like the
+list of APT repositories provided by the same baseurl.
+ * enabled *(optional)*: Indicates if repository should be included
+as a package source:
+ * false: Do not include the repository.
+ * true: Include the repository.
+ * gpgcheck *(optional)*: Indicates if a GPG signature check on the
+packages gotten from repository should be performed:
+ * false: Do not check GPG signature
+ * true: Check GPG signature
+ * gpgkey *(optional)*: URL pointing to the ASCII-armored GPG key
+file for the repository. This option is used if yum needs a public key
+to verify a package and the required key hasn't been imported into the
+RPM database.
+
+**Actions (POST):**
+
+* enable: Enable the Repository as package source
+* disable: Disable the Repository as package source
--
1.8.3.1