From a16d0893b0157d100a9cbbb58e9554516ea5b68d Mon Sep 17 00:00:00 2001 From: "Mark T. Voelker" Date: Thu, 16 Jul 2015 16:28:27 -0700 Subject: [PATCH] Update RST document formatting The .rst Guideline files currently say that they're generated from "the master JSON verison" but don't actually contain a link to their JSON counterparts. This patch makes that reference a hyperlink so folks can more easily locate the JSON files that are the authoritative documents. This is especially useful when viewing rendered versions of the RST docs. The patch also adjusts the script we use to generate the RST docs from their JSON sources so future Guidelines include similar linkage. While we're at it, we've also removed a chunk of code in the RST generator script so that it doesn't rely on the "name" field since we never really added those fields universally, which could cause the script to fail. Instead we just use the "project" field. Further, a few capabilities that are marked as removed are lacking the aforementioned "project" field, so those have been added where they were missing. Following the changes to the RST generating script, it has been re-run so that the existing 2015 Guideline RST documents have the same formatting. While the formatting has changed (added links and modified capitalization), the content has not (no capabilities or tests added/removed). Co-Authored-By: Mark T. Voelker Co-Authored-By: Rob Hirschfeld Change-Id: Idbdd7d6825aa8af2404b9e2791fa67240cdef239 --- 2015.03.json | 3 +++ 2015.03.rst | 33 +++++++++++++++++---------------- 2015.04.json | 3 +++ 2015.04.rst | 27 ++++++++++++++------------- 2015.05.json | 1 + 2015.05.rst | 33 +++++++++++++++++---------------- tools/jsonToRst.py | 18 ++++++------------ 7 files changed, 61 insertions(+), 57 deletions(-) diff --git a/2015.03.json b/2015.03.json index 49a907a1..1d16dae0 100644 --- a/2015.03.json +++ b/2015.03.json @@ -110,6 +110,7 @@ "admin": false, "status": "removed", "guidelines": ["2014.07"], + "project": "nova", "description": "Manage floating IPs through the Compute API. Not consistently implemented between Nova net and Neutron", "flagged": [], "name": "Compute Floating IPs", @@ -390,6 +391,7 @@ "admin": false, "status": "removed", "guidelines": ["2014.07"], + "project": "glance", "description": "Basic image management in the Images API v1", "flagged": [], "name": "images-v1", @@ -470,6 +472,7 @@ "admin": true, "status": "removed", "guidelines": ["2014.07"], + "project": "cinder", "description": "CRUD operations for volumes management in Block Storage API", "flagged": [], "name": "volume", diff --git a/2015.03.rst b/2015.03.rst index d9398a7f..1bf31a9b 100644 --- a/2015.03.rst +++ b/2015.03.rst @@ -4,12 +4,13 @@ OpenStack DefCore 2015.03 :Status: approved :Replaces: 2014.07 +:JSON Master: http://git.openstack.org/cgit/openstack/defcore/tree/2015.03.json This document outlines the mandatory capabilities and designated sections required to exist in a software installation in order to be eligible to use marks controlled by the OpenStack Foundation. -This document was generated from the master JSON version. +This document was generated from the `master JSON version <2015.03.json>`_. Releases Covered ============================== @@ -32,20 +33,20 @@ Compute Component Capabilities ============================== Required Capabilities ----------------------- -* Compute-auth (nova) -* Compute-flavors (nova) -* Compute-images (nova) -* Compute-instance-actions (nova) -* Compute-keypairs (nova) -* Compute-quotas (nova) -* Compute-servers (nova) -* Compute-volume (nova) -* Images-v2 (glance) +* compute-auth (Nova) +* compute-flavors (Nova) +* compute-images (Nova) +* compute-instance-actions (Nova) +* compute-keypairs (Nova) +* compute-quotas (Nova) +* compute-servers (Nova) +* compute-volume (Nova) +* images-v2 (Glance) Advisory Capabilities ----------------------- -* Auth-token (keystone) -* Compute-servers-metadata (nova) +* auth-token (Keystone) +* compute-servers-metadata (Nova) Deprecated Capabilities ------------------------- @@ -53,9 +54,9 @@ None Removed Capabilities ---------------------- -* Compute floating ips (None) -* Images-v1 (None) -* Volume (None) +* compute-floating-ips (Nova) +* images-v1 (Glance) +* volume (Cinder) @@ -64,7 +65,7 @@ Object Component Capabilities ============================= Required Capabilities ----------------------- -* Objectstore-object (swift) +* objectstore-object (Swift) Advisory Capabilities ----------------------- diff --git a/2015.04.json b/2015.04.json index a050f2bf..e09d5ade 100644 --- a/2015.04.json +++ b/2015.04.json @@ -121,6 +121,7 @@ "admin": false, "status": "removed", "guidelines": ["2014.07"], + "project": "nova", "description": "Manage floating IPs through the Compute API. Not consistently implemented between Nova net and Neutron", "flagged": [], "name": "Compute Floating IPs", @@ -428,6 +429,7 @@ "admin": false, "status": "removed", "guidelines": ["2014.07"], + "project": "glance", "description": "Basic image management in the Images API v1", "flagged": [], "name": "images-v1", @@ -514,6 +516,7 @@ "admin": true, "status": "removed", "guidelines": ["2014.07"], + "project": "cinder", "description": "CRUD operations for volumes management in Block Storage API", "flagged": [], "name": "volume", diff --git a/2015.04.rst b/2015.04.rst index 46c791fa..742f5a10 100644 --- a/2015.04.rst +++ b/2015.04.rst @@ -4,12 +4,13 @@ OpenStack DefCore 2015.04 :Status: approved :Replaces: 2015.03 +:JSON Master: http://git.openstack.org/cgit/openstack/defcore/tree/2015.04.json This document outlines the mandatory capabilities and designated sections required to exist in a software installation in order to be eligible to use marks controlled by the OpenStack Foundation. -This document was generated from the master JSON version. +This document was generated from the `master JSON version <2015.04.json>`_. Releases Covered ============================== @@ -32,20 +33,20 @@ Compute Component Capabilities ============================== Required Capabilities ----------------------- -* Compute-auth (nova) -* Compute-flavors (nova) -* Compute-images (nova) -* Compute-instance-actions (nova) -* Compute-keypairs (nova) -* Compute-quotas (nova) -* Compute-servers (nova) -* Compute-volume (nova) -* Images-v2 (glance) +* compute-auth (Nova) +* compute-flavors (Nova) +* compute-images (Nova) +* compute-instance-actions (Nova) +* compute-keypairs (Nova) +* compute-quotas (Nova) +* compute-servers (Nova) +* compute-volume (Nova) +* images-v2 (Glance) Advisory Capabilities ----------------------- -* Auth-token (keystone) -* Compute-servers-metadata (nova) +* auth-token (Keystone) +* compute-servers-metadata (Nova) Deprecated Capabilities ------------------------- @@ -62,7 +63,7 @@ Object Component Capabilities ============================= Required Capabilities ----------------------- -* Objectstore-object (swift) +* objectstore-object (Swift) Advisory Capabilities ----------------------- diff --git a/2015.05.json b/2015.05.json index 63d81d9d..c80d4f75 100644 --- a/2015.05.json +++ b/2015.05.json @@ -525,6 +525,7 @@ "admin": true, "status": "removed", "guidelines": ["2014.07"], + "project": "cinder", "description": "CRUD operations for volumes management in Block Storage API", "flagged": [], "name": "volume", diff --git a/2015.05.rst b/2015.05.rst index e97903d8..cc06bbc8 100644 --- a/2015.05.rst +++ b/2015.05.rst @@ -4,12 +4,13 @@ OpenStack DefCore 2015.05 :Status: approved :Replaces: 2015.04 +:JSON Master: http://git.openstack.org/cgit/openstack/defcore/tree/2015.05.json This document outlines the mandatory capabilities and designated sections required to exist in a software installation in order to be eligible to use marks controlled by the OpenStack Foundation. -This document was generated from the master JSON version. +This document was generated from the `master JSON version <2015.05.json>`_. Releases Covered ============================== @@ -32,21 +33,21 @@ Compute Component Capabilities ============================== Required Capabilities ----------------------- -* Identity-auth (keystone) -* Compute-auth (nova) -* Compute-flavors (nova) -* Compute-images (nova) -* Compute-instance-actions (nova) -* Compute-keypairs (nova) -* Compute-quotas (nova) -* Compute-servers (nova) -* Compute-volume (nova) -* Images-v2 (nova) +* identity-auth (Keystone) +* compute-auth (Nova) +* compute-flavors (Nova) +* compute-images (Nova) +* compute-instance-actions (Nova) +* compute-keypairs (Nova) +* compute-quotas (Nova) +* compute-servers (Nova) +* compute-volume (Nova) +* images-v2 (Nova) Advisory Capabilities ----------------------- -* Auth-token (keystone) -* Compute-servers-metadata (nova) +* auth-token (Keystone) +* compute-servers-metadata (Nova) Deprecated Capabilities ------------------------- @@ -63,12 +64,12 @@ Object Component Capabilities ============================= Required Capabilities ----------------------- -* Objectstore-object (swift) +* objectstore-object (Swift) Advisory Capabilities ----------------------- -* Identity-auth (keystone) -* Auth-token (keystone) +* identity-auth (Keystone) +* auth-token (Keystone) Deprecated Capabilities ------------------------- diff --git a/tools/jsonToRst.py b/tools/jsonToRst.py index faf8b54a..6dd83244 100755 --- a/tools/jsonToRst.py +++ b/tools/jsonToRst.py @@ -83,12 +83,13 @@ with open(outFileName, "w") as outFile: outFile.write(""" :Status: {status} :Replaces: {replaces} +:JSON Master: http://git.openstack.org/cgit/openstack/defcore/tree/{id}.json This document outlines the mandatory capabilities and designated sections required to exist in a software installation in order to be eligible to use marks controlled by the OpenStack Foundation. -This document was generated from the master JSON version. +This document was generated from the `master JSON version <{id}.json>`_. Releases Covered ============================== @@ -105,6 +106,7 @@ Platform Components :Removed: {platformRemoved} """.format(status=data.get("status"), replaces=data.get("replaces"), + id=data.get("id"), releases=printHelpArrays(data.get("releases")), platformRequired=printHelpArrays(data["platform"].get("required")), platformAdvisory=printHelpArrays(data["platform"].get("advisory")), @@ -138,17 +140,9 @@ Platform Components outFile.write("None\n") for req in data['components'][component][event]: - if not data["capabilities"][req].get('name') is None: - - outFile.write("* {name} ({project})\n".format( - name=data["capabilities"][req]["name"].capitalize(), - project=data["capabilities"][req].get("project"))) - else: - print "{ capabilities /", req, "/ name } does not exist" - - outFile.write("* {name} ({project})\n".format( - name=req.capitalize(), - project=data["capabilities"][req].get("project"))) + outFile.write("* {name} ({project})\n".format( + name=req, + project=data["capabilities"][req].get("project").capitalize())) # Designated -Sections