Merge remote-tracking branch 'origin/GP-4182_d-millar_ttd_traceRMI_RB0229--SQUASHED'

This commit is contained in:
Ryan Kurtz 2024-03-04 16:57:13 -05:00
commit 0e67b99015
12 changed files with 3399 additions and 2 deletions

View file

@ -283,14 +283,19 @@ class Trace(object):
self._snap += 1
return self._snap
def snapshot(self, description, datetime=None):
def snapshot(self, description, datetime=None, snap=None):
"""
Create a snapshot.
Future state operations implicitly modify this new snapshot.
The snap argument is optional. If ommitted, this creates a snapshot immediately
after the last created snapshot. If given, it creates the given snapshot.
"""
snap = self._next_snap()
if snap is None:
snap = self._next_snap()
else:
self._snap = snap
self.client._snapshot(self.id, description, datetime, snap)
return snap