summaryrefslogtreecommitdiff
path: root/buildscripts/idl/idl/ast.py
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2021-03-01 15:28:37 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-03-02 01:01:01 +0000
commit5bc18e5edf382187c421ae23a5707a3207ef3204 (patch)
tree22f86edb736ad252a1044ca64fc4d7d2904a9216 /buildscripts/idl/idl/ast.py
parent8c248bf16a781bd096f1829ab61bed9f5655ad41 (diff)
downloadmongo-5bc18e5edf382187c421ae23a5707a3207ef3204.tar.gz
SERVER-54520 Extend IDL for new access_check field and none value and generate code when api_version != “”
Diffstat (limited to 'buildscripts/idl/idl/ast.py')
-rw-r--r--buildscripts/idl/idl/ast.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/buildscripts/idl/idl/ast.py b/buildscripts/idl/idl/ast.py
index 3b5e5e3d122..aa7e6a88ae1 100644
--- a/buildscripts/idl/idl/ast.py
+++ b/buildscripts/idl/idl/ast.py
@@ -225,6 +225,16 @@ class Field(common.SourceLocation):
super(Field, self).__init__(file_name, line, column)
+class AccessCheck(common.SourceLocation):
+ """IDL commmand access check information."""
+
+ def __init__(self, file_name, line, column):
+ # type: (str, int, int) -> None
+ """Construct an AccessCheck."""
+ self.placeholder = None # type: str
+ super(AccessCheck, self).__init__(file_name, line, column)
+
+
class Command(Struct):
"""
IDL commmand information.
@@ -244,6 +254,7 @@ class Command(Struct):
self.reply_type = None # type: Field
self.api_version = "" # type: str
self.is_deprecated = False # type: bool
+ self.access_checks = None # type: List[AccessCheck]
super(Command, self).__init__(file_name, line, column)