anvil_consortium_manager.audit.audit module
- class anvil_consortium_manager.audit.audit.AccountAudit
Bases:
anvil_consortium_manager.audit.audit.AnVILAuditClass that runs an audit for Account instances.
- ERROR_NOT_IN_ANVIL = 'Not in AnVIL'
Error when the Account does not exist in AnVIL.
- run_audit()
- class anvil_consortium_manager.audit.audit.AnVILAudit
Bases:
abc.ABCAbstract base class for AnVIL audit results.
- add_result(result)
- export(include_verified=True, include_errors=True, include_not_in_app=True)
Return a dictionary representation of the audit results.
- get_error_results()
- get_not_in_app_results()
- get_result_for_model_instance(model_instance)
- get_verified_results()
- ok()
- run_audit()
- class anvil_consortium_manager.audit.audit.BillingProjectAudit
Bases:
anvil_consortium_manager.audit.audit.AnVILAuditClass that runs an audit for BillingProject instances.
- ERROR_NOT_IN_ANVIL = 'Not in AnVIL'
Error when a BillingProject in the app does not exist in AnVIL.
- run_audit()
- class anvil_consortium_manager.audit.audit.ErrorTable(data=None, order_by=None, orderable=None, empty_text=None, exclude=None, attrs=None, row_attrs=None, pinned_row_attrs=None, sequence=None, prefix=None, order_by_field=None, page_field=None, per_page_field=None, template_name=None, default=None, request=None, show_header=None, show_footer=True, extra_columns=None)
Bases:
django_tables2.tables.TableTable for results with errors.
- base_columns = {'errors': <django_tables2.columns.base.Column object>, 'model_instance': <django_tables2.columns.base.Column object>}
- render_errors(record)
- class anvil_consortium_manager.audit.audit.ManagedGroupAudit
Bases:
anvil_consortium_manager.audit.audit.AnVILAuditClass to runs an audit for ManagedGroup instances.
- ERROR_DIFFERENT_ROLE = 'App has a different role in this group'
Error when the service account running the app has a different role on AnVIL.
- ERROR_GROUP_MEMBERSHIP = 'Group membership does not match in AnVIL'
Error when a ManagedGroup has a different record of membership in the app compared to on AnVIL.
- ERROR_NOT_IN_ANVIL = 'Not in AnVIL'
Error when a ManagedGroup in the app does not exist in AnVIL.
- run_audit()
Run an audit on managed groups in the app.
- class anvil_consortium_manager.audit.audit.ManagedGroupMembershipAudit(managed_group, *args, **kwargs)
Bases:
anvil_consortium_manager.audit.audit.AnVILAuditClass that runs an audit for membership of a specific ManagedGroup instance.
- ERROR_ACCOUNT_ADMIN_NOT_IN_ANVIL = 'Account not an admin in AnVIL'
Error when an Account is an admin of a ManagedGroup on the app, but not in AnVIL.
- ERROR_ACCOUNT_MEMBER_NOT_IN_ANVIL = 'Account not a member in AnVIL'
Error when an Account is a member of a ManagedGroup on the app, but not in AnVIL.
- ERROR_DEACTIVATED_ACCOUNT_IS_ADMIN_IN_ANVIL = 'Account is deactivated but is an admin in AnVIL.'
Error when a deactivated Account is an admin of a ManagedGroup in AnVIL.
- ERROR_DEACTIVATED_ACCOUNT_IS_MEMBER_IN_ANVIL = 'Account is deactivated but is a member in AnVIL.'
Error when a deactivated Account is a member of a ManagedGroup in AnVIL.
- ERROR_GROUP_ADMIN_NOT_IN_ANVIL = 'Group not an admin in AnVIL'
Error when a ManagedGroup is an admin of another ManagedGroup on the app, but not in AnVIL.
- ERROR_GROUP_MEMBER_NOT_IN_ANVIL = 'Group not a member in AnVIL'
Error when an ManagedGroup is a member of another ManagedGroup on the app, but not in AnVIL.
- run_audit()
Run an audit on all membership of the managed group.
- class anvil_consortium_manager.audit.audit.ModelInstanceResult(model_instance)
Bases:
objectClass to hold an audit result for a specific instance of a model.
- add_error(error)
Add an error to the audit result for this model instance.
- ok()
Check whether an audit result has errors.
- class anvil_consortium_manager.audit.audit.NotInAppResult(record)
Bases:
objectClass to hold an audit result for a record that is not present in the app.
- class anvil_consortium_manager.audit.audit.NotInAppTable(data=None, order_by=None, orderable=None, empty_text=None, exclude=None, attrs=None, row_attrs=None, pinned_row_attrs=None, sequence=None, prefix=None, order_by_field=None, page_field=None, per_page_field=None, template_name=None, default=None, request=None, show_header=None, show_footer=True, extra_columns=None)
Bases:
django_tables2.tables.Table- base_columns = {'record': <django_tables2.columns.base.Column object>}
- class anvil_consortium_manager.audit.audit.VerifiedTable(data=None, order_by=None, orderable=None, empty_text=None, exclude=None, attrs=None, row_attrs=None, pinned_row_attrs=None, sequence=None, prefix=None, order_by_field=None, page_field=None, per_page_field=None, template_name=None, default=None, request=None, show_header=None, show_footer=True, extra_columns=None)
Bases:
django_tables2.tables.TableTable for verified results.
- base_columns = {'model_instance': <django_tables2.columns.base.Column object>}
- class anvil_consortium_manager.audit.audit.WorkspaceAudit
Bases:
anvil_consortium_manager.audit.audit.AnVILAuditClass to runs an audit for Workspace instances.
- ERROR_DIFFERENT_AUTH_DOMAINS = 'Has different auth domains on AnVIL'
Error when the Workspace has different auth domains in the app and on AnVIL.
- ERROR_DIFFERENT_LOCK = 'Workspace lock status does not match on AnVIL'
Error when the workspace.is_locked status does not match the lock status on AnVIL.
- ERROR_NOT_IN_ANVIL = 'Not in AnVIL'
Error when a Workspace in the app does not exist on AnVIL.
- ERROR_NOT_OWNER_ON_ANVIL = 'Not an owner on AnVIL'
Error when the service account running the app is not an owner of the Workspace on AnVIL.
- ERROR_WORKSPACE_SHARING = 'Workspace sharing does not match on AnVIL'
Error when a Workspace is shared with different ManagedGroups in the app and on AnVIL.
- run_audit()
Run an audit on Workspaces in the app.
- class anvil_consortium_manager.audit.audit.WorkspaceSharingAudit(workspace, *args, **kwargs)
Bases:
anvil_consortium_manager.audit.audit.AnVILAuditClass that runs an audit for sharing of a specific Workspace instance.
- ERROR_DIFFERENT_ACCESS = 'Different access level in AnVIL'
Error when a ManagedGroup has a different access level for workspace in the app and on AnVIL.
- ERROR_DIFFERENT_CAN_COMPUTE = 'can_compute value does not match in AnVIL'
Error when the can_compute value for a ManagedGroup does not match what’s on AnVIL.
- ERROR_DIFFERENT_CAN_SHARE = 'can_share value does not match in AnVIL'
Error when the can_share value for a ManagedGroup does not match what’s on AnVIL.
- ERROR_NOT_SHARED_IN_ANVIL = 'Not shared in AnVIL'
Error when a ManagedGroup has access to a workspace in the app but not on AnVIL.
- run_audit()
Run the audit for all workspace instances.