Add support to the transmogrifier for documenting the "out-of-band"
"pseudofeature" of QMP commands. This patch relies on the inliner adding
a dummy feature based on the presence of the oob flag for a QMP command,
which happens in the next commit.

A "pseudofeature" as I'm terming it here is not associated with a
particular member, unlike a standard real-deal feature.

Signed-off-by: John Snow <js...@redhat.com>
---
 docs/sphinx/qapidoc.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py
index 5c65f3a8025..e70a85a6403 100644
--- a/docs/sphinx/qapidoc.py
+++ b/docs/sphinx/qapidoc.py
@@ -411,9 +411,15 @@ def visit_feature(self, section: QAPIDoc.ArgSection) -> 
None:
         # Proposal: decorate the right-hand column with some graphical
         # element to indicate conditional availability?
         assert section.text  # Guaranteed by parser.py
-        assert section.member
 
-        self.generate_field("feat", section.member, section.text, section.info)
+        if section.member:
+            # Normal feature
+            self.generate_field(
+                "feat", section.member, section.text, section.info
+            )
+        else:
+            # Pseudo-feature (OOB)
+            self.add_field("feat", section.name, section.text, section.info)
 
     def visit_returns(self, section: QAPIDoc.Section) -> None:
         assert isinstance(self.entity, QAPISchemaCommand)
-- 
2.48.1


Reply via email to