-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OIL] Split the API reference markdown into smaller files and use templates to generate it. #5338
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
kc284 marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
--- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These headers are a particularity of XS docs. If there is an issue with having them here, I can remove them and have the pipeline insert them later (since it will have to replace the |
||
layout: doc | ||
--- | ||
|
||
# API Basics | ||
|
||
This document defines the XenServer Management API - an interface for remotely | ||
configuring and controlling virtualised guests running on a Xen-enabled host. | ||
configuring and controlling virtualized guests running on a Xen-enabled host. | ||
|
||
The API is presented here as a set of Remote Procedure Calls (RPCs). There are | ||
two supported wire formats, one based upon [XML-RPC](http://xmlrpc.scripting.com/spec.html) | ||
and one based upon [JSON-RPC](http://www.jsonrpc.org) (v1.0 and v2.0 are both | ||
recognised). No specific language bindings are prescribed, although examples | ||
recognized). No specific language bindings are prescribed, although examples | ||
will be given in the python programming language. | ||
|
||
Although we adopt some terminology from object-oriented programming, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
--- | ||
layout: doc | ||
--- | ||
|
||
# VM Lifecycle | ||
|
||
The following diagram shows the states that a VM can be in | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
layout: doc | ||
--- | ||
|
||
# API Reference | ||
|
||
Version **@xapi-version@** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there an easy way to have this replaced during build time? If not, I can have the pipeline replace it later). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently, the version is embedded into binaries using the One way you can try is to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the tip; I won't consider this as a blocker for this PR though (it's probably not a big change, but I only have time to work on this on and off, so I'd rather get the PR in the soonest possible and improve the versioning later). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Had a look, and the binary that generates the files already has access to this library, So it can already use mustache templates to generate it. The only complication is that the binary needs to be "installed" before it generated the files so it can pick up the version, because of how dune injects the version, I've done this in psafont@13da274 But it needs testing to ensure that the version injected in the CI is simply the tag, and not either of these types:
(this happens when the commit is untagged, and when make is run before make doc, respectively) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As discussed, building in the CI yields |
||
|
||
- [Classes](@root@management-api/classes.html) | ||
- [Relationships Between Classes](@root@management-api/relationships-between-classes.html) | ||
- [Types](@root@management-api/types.html) | ||
- [ErrorHandling](@root@management-api/api-ref-autogen-errors.html) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(alias | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is an alias with a name and dependency, but where is the action? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No action, just using |
||
(name markdowngen) | ||
(deps | ||
(source_tree .) | ||
) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could define some install sections in dune and let dune install things into the right places. The method of installing files in the Makefile was from the time when we didn't have dune.
Then also the version substitutions inside the markdown files might work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See https://dune.readthedocs.io/en/stable/dune-files.html#install
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless I'm missing something, it doesn't seem to me that I can do this efficiently with the version of dune we're currently using. All the useful stanzas (source_trees, glob_files, include) have been added in various 3.x versions.The install sections I see in other dune files in the repo handle single files, but here there is a good number of autogenerated files that have to be installed.