StarlingX/Developer Guide/API Documentation
- 1 Intro
- 2 Analysis
- 3 Community Discussion
- 4 StarlingX API
- 5 OpenStack Learning Corner
- 6 Structure
StarlingX/Docs_and_Infra is working in collaboration with Tech Writers team to document StarlingX APIs, this page reflects the research on what it means for StarlingX.
- Storyboard Doc Provide StarlingX API documentation
Adding information from Greg Waines who has done some research related to this:
Provide upstream API Documentation for the individual StarlingX sub-projects:
- Host Management (stx-metal)
- Configuration Management (stx-config)
- Service Management (stx-ha)
- Software Management (stx-update)
- Infrastructure Orchestration (stx-nfv)
- Fault Management (stx-fault)
The existing API documentation for SYSINV is managed in a very very old mechanism, using maven and wadl files, circa Grizzly.
This API Documentation needs to be converted into the current approach for writing upstream OpenStack API Documentation. i.e. see https://docs.openstack.org/doc-contrib-guide/api-guides.html ( ... see also any current OpenStack Project's rest api documentation, e.g. for glance, https://github.com/openstack/glance/tree/master/api-ref/source )
We will also move the different sections of the big blob of SYSINV API Documentation under the appropriate StarlingX sub-projects:
- Dcmanager API v1 (Tbd)
- Map to stx-?
- NFV VIM API v1 (NFV VIM Service REST API)
- Patching API v1 (Patching REST API)
- System Inventory API v1 (System Inventory (SysInv) REST API)
- Block Storage V2 Extensions API (Extensions to Block Storage REST API)
- Compute V2 Extensions API (Extensions to Compute REST API)
- Image V2 Extensions API (Extensions to Image REST API)
- Networking V2 Extensions API (Extensions to Networking REST API)
- Telemetry V2 Extensions API (Extensions to Telemetry REST API)
There are no Extensions to Identity REST API (Keystone) and Orchestration REST API (Heat).
- Storyboard Task: OpenStack API Service Implementation
- Create ./api-ref/source directory under each StarlingX sub-project for containing API Documentation
- Update the sub-project's (or StarlingX's) tox.ini file to include a configuration for building the API reference locally
- Storyboard Task: StarlingX API Documentation Migration
- Convert the appropriate sections of existing SYSINV API Documentation from maven/wadl to .rst/.yaml format
- Storyboard Task: OpenStack API Reference Pages Creation
- Add the api-ref-jobs template to StarlingX project, patch the zuul.d/projects.yaml file stored in openstack-infra/project-config repository.
- Storyboard Task: To Be Defined
- Add links to StarlingX sub-project's API DOCs from the API landing page and the OpenStack Governance reference document, projects.yaml.
- To add a link to the StarlingX sub-project’s API docs to the API landing page, patch the index.rst file stored in the openstack/api-site repository.
- To ensure the openstack/governance repository has the correct link to your API documentation, patch the reference/projects.yaml file in the openstack/governance repository.
- StarlingX API Documentation is converted to current upstream OpenStack API Documentation approach,
- StarlingX API Documentation are built and available on upstream OpenStack API Documentation sites.
Starlingx-discuss: StarlingX API Documentation
For this activity we are initially be considering from API Documentation 2 separate efforts for each project:
- API Guide .. the concepts in the API
- API Ref .. a reference for the API
Both concepts (API Guide) and the ref (API Ref) need to be be written at the same time. The new OpenStack approach allows for tags to go in the code. The concepts in our APIs are pretty standard and if prioritization is required the API Reference work higher.
We categorize the StarlingX APIs in 2:
- Brand New APIs from StarlingX projects
- Existing APIs from OpenStack projects
StarlingX should not document other OpenStack API's.
StarlingX API Brand New
The projects falling into this category are the following:
- NFVI Orchestration
- High Availability/Process Monitoring/Service Management
- StarlingX System Configuration Management
- Horizon plugins for new StarlingX services
All projects in the Flock should be included. I think there is a dependency on some of the code restructuring activities that are underway, we need to make sure these activities don't collide.
StarlingX API SysInv
(You may know this already) The StarlingX APIs (especially for sysinv) are currently documented at: https://git.openstack.org/cgit/openstack/stx-integ/tree/restapi-doc/restapi-doc You can use the content as a starting point. However, the mechanism used is outdated using maven and wadl files. So you need to use the more current approach.
Greg Waines did some research on this [Here]
StarlingX API Existing
We have not gone through a deeper review if we are modifying/adding new calls into the OpenStack projects however if we are and we need to document them:
- There is official OpenStack <Project> API documentation, we can make references to them for the existing calls
- What about the modifications/additions? Should we document them? What is the best place for this? We were talking in our weekly call about stx-docs is a good place for things without a repo, is this a good example?
- Any easy way besides "find + grep" to get where those API modifications are happening?
StarlingX API Unit Tests
OpenStack projects includes Unit Tests. To be considered if this is required.
OpenStack Learning Corner
- Sphinx extension to support OpenStack API reference pages creation
We saw 2 ways to host API Reference documention:
- under doc/source/api
- under api-ref/source/
The second one is the correct one. See the below Nova Gerrit Patch:
This is a good project to work with since it has the 2 projects related to APIs, the Guide and Ref, I have also included Specs to see if that applies.
This guide covers the concepts in the OpenStack Compute API. For a full reference listing, please see: Compute API Reference.
This is a reference for the OpenStack Compute API which is provided by the Nova project. To learn more about the OpenStack Compute API concepts, please refer to the API guide.
- Search for Nova
Zuul (continuous integration, delivery, and deployment) allows us to enable that automatic publishing based on templates:
- project: name: openstack/nova templates: - openstack-python-jobs - openstack-python35-jobs - periodic-jobs-with-oslo-master - publish-openstack-sphinx-docs - release-openstack-server - periodic-stable-jobs - check-requirements - integrated-gate - integrated-gate-py35 - translation-jobs - translation-jobs-queens - translation-jobs-rocky - release-notes-jobs - api-guide-jobs - api-ref-jobs
Masakari Git API Ref
Masakari API Ref
- Search for Masakari
- project: name: openstack/masakari templates: - check-requirements - openstack-python-jobs - openstack-python35-jobs-nonvoting - publish-to-pypi - release-notes-jobs - api-ref-jobs - publish-openstack-sphinx-docs