Skip to content

Commit 8254069

Browse files
mgr/smb: extend the mon key store to support raw data
Previously, a new protocol for raw data entries was added. Extend the MonKeyStoreEntry to meet this protocol so that it can be used to retain raw text/data blobs. Signed-off-by: John Mulligan <[email protected]>
1 parent b5e0ab8 commit 8254069

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/pybind/mgr/smb/mon_store.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,14 @@ def get(self) -> Simplified:
146146
"""Get the deserialized store entry value."""
147147
return json.loads(self._store._get_val(self._key))
148148

149+
def set_data(self, data: str) -> None:
150+
"""Set the store entry value to the given data."""
151+
self._store._set_val(self._key, data)
152+
153+
def get_data(self) -> str:
154+
"""Get the stored data value."""
155+
return self._store._get_val(self._key)
156+
149157
def remove(self) -> bool:
150158
"""Remove the current entry from the store."""
151159
return self._store.remove(self.full_key)

0 commit comments

Comments
 (0)