Skip to content
Snippets Groups Projects
Commit 0fcfb63d authored by Ladislav Lhotka's avatar Ladislav Lhotka
Browse files

Fix schema digest format.

parent ce929201
Branches
Tags
No related merge requests found
...@@ -146,7 +146,7 @@ class SchemaNode: ...@@ -146,7 +146,7 @@ class SchemaNode:
"""Return dictionary of receiver's properties suitable for clients.""" """Return dictionary of receiver's properties suitable for clients."""
return { return {
"class": self._yang_class(), "class": self._yang_class(),
"description": self.description } "description": self.description if self.description else ""}
def _validate(self, inst: "InstanceNode", scope: ValidationScope, def _validate(self, inst: "InstanceNode", scope: ValidationScope,
ctype: ContentType) -> None: ctype: ContentType) -> None:
...@@ -702,9 +702,9 @@ class TerminalNode(SchemaNode): ...@@ -702,9 +702,9 @@ class TerminalNode(SchemaNode):
def _client_digest(self) -> Dict[str, Any]: def _client_digest(self) -> Dict[str, Any]:
res = super()._client_digest() res = super()._client_digest()
res.update({ res["base-type"] = self.type.yang_type()
"type": self.type.name, if self.type.name:
"base-type": self.type.yang_type()}) res["derived"] = self.type.name
df = self.default df = self.default
if df is not None: if df is not None:
res["default"] = self.type.to_raw(df) res["default"] = self.type.to_raw(df)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment