class Staging:
+ """A virtual store used to compile pending changes before saving them in
+ the destination store.
+ """
+
def __init__(self, store: ConfigStore) -> None:
self.destination_store = store
self.incoming: Dict[EntryKey, SMBResource] = {}
def auth_refs(cluster: resources.Cluster) -> Collection[str]:
+ """Return all IDs for join_auth resources referenced by the supplied
+ cluster.
+ """
if cluster.auth_mode != AuthMode.ACTIVE_DIRECTORY:
return set()
return {
def ug_refs(cluster: resources.Cluster) -> Collection[str]:
+ """Return all IDs for users_and_groups resources referenced by the supplied
+ cluster.
+ """
if (
cluster.auth_mode != AuthMode.USER
or cluster.user_group_settings is None
path_resolver: PathResolver,
earmark_resolver: EarmarkResolver,
) -> None:
+ """Check a given resource for consistency across the set of other resources
+ in the virtual transaction represented by the staging store and
+ resolver-helpers.
+
+ The cross-check is only for things outside the scope of a single resource.
+ """
raise TypeError(f'not a valid smb resource: {type(resource)}')