client
arodonata.client ¶
Primary composition root and unified developer facade (ArodonataClient).
Wires ApiPort (AMgmtClient), CachePort (SqlCacheAdapter), and LockPort (SqlLockAdapter) into core domain services (DomainService, DomainSyncCoordinator, ObjectService, ServiceCacheService, AssetRefreshService, SearchService), defaulting engine=None to an auto-owned in-memory SQLite engine (sqlite+aiosqlite:///:memory:).
ArodonataClient ¶
ArodonataClient(
settings: ArodonataSettings | None = None,
*,
engine: AsyncEngine | str | None = None,
db_manager: DatabaseManager | None = None,
cache: CachePort | None = None,
lock_port: LockPort | None = None,
api: ApiPort | None = None,
transport: ApiTransport | None = None,
trust_policy: TrustPolicy | None = None,
connection_pool: VerifiedConnectionPool | None = None,
task_waiter: TaskWaiter | None = None,
rate_limiter: RateLimiter | None = None,
login_gate: LoginGate | None = None,
auth_provider: AuthProvider | None = None,
domain_tracker: DomainListRefreshTracker | None = None,
cluster_manager: ClusterRelationshipManager | None = None,
vsx_manager: VSXRelationshipManager | None = None,
monotonic_fn: Callable[[], float] = time.monotonic,
now_fn: Callable[[], datetime] = utc_now,
sleep_fn: Callable[[float], Awaitable[None]] = asyncio.sleep,
**settings_kwargs: Any,
)
Unified composition root and async facade for Check Point Management & MDSM.
Source code in src/arodonata/client.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | |
amgmt property ¶
Underlying AMgmtClient if constructed with the default transport adapter.
cpcrud property ¶
Declarative Check Point Policy-as-Code CRUD engine (CPCRUDService).
owns_engine property ¶
Return True if this client auto-created and owns its SQLAlchemy AsyncEngine.
rulebase_refresh property ¶
Rulebase snapshot refresh service (RulebaseRefreshService).
rulebase_source property ¶
Cached rulebase introspection and numbering source (CachedRulebaseSource).
add_object async ¶
add_object(
mgmt_name: str,
obj_type: str,
payload: dict[str, Any],
*,
domain: str | None = None,
sid: str | None = None,
server_ip: str | None = None,
) -> ApiCallResult
Create a Check Point object (add-<obj_type>) using active WriteSession context, explicit sid, or an automatic isolated write_session (C8).
Source code in src/arodonata/client.py
api_call async ¶
api_call(
mgmt_name: str,
command: str,
payload: dict[str, Any] | None = None,
*,
domain: str | None = None,
sid: str | None = None,
server_ip: str | None = None,
wait_for_task: bool = True,
timeout: float | None = None,
) -> ApiCallResult
Execute a Check Point Management API command, updating active WriteSession overlay and invalidating domain on publish.
Source code in src/arodonata/client.py
api_query async ¶
api_query(
mgmt_name: str,
command: str,
*,
domain: str | None = None,
details_level: str = "standard",
payload: dict[str, Any] | None = None,
sid: str | None = None,
server_ip: str | None = None,
limit: int = DEFAULT_PAGE_LIMIT,
) -> ApiQueryResult
Execute a continuity-verified paginated Check Point object listing query.
Source code in src/arodonata/client.py
auth_context ¶
auth_context(
auth: AuthContext | None = None,
*,
username: str | None = None,
password: str | None = None,
api_key: str | None = None,
user_id: str | None = None,
) -> Iterator[AuthContext]
Bind runtime administrator credentials (AuthContext) in contextvars.
Source code in src/arodonata/client.py
build_change_report async ¶
build_change_report(
scopes: Sequence[ReportScope | dict[str, Any]],
*,
formats: Sequence[str] = ("html", "markdown", "json"),
options: RenderOptions | None = None,
max_uid_lookups: int = MAX_UID_LOOKUPS,
) -> RenderedReportBundle
Collect and render a ChangeReport across scopes into formats.
Source code in src/arodonata/client.py
close async ¶
Cancel running background warm-up tasks immediately, drain startup cleanup, close transport, and dispose owned engine.
Source code in src/arodonata/client.py
collect_change_report async ¶
collect_change_report(
scopes: Sequence[ReportScope | dict[str, Any]],
*,
options: RenderOptions | None = None,
max_uid_lookups: int = MAX_UID_LOOKUPS,
) -> ChangeReport
Collect read-only auditable session change evidence (ChangeReport) across scopes.
Source code in src/arodonata/client.py
create_dedicated_session async ¶
create_dedicated_session(
mgmt_name: str,
domain: str | None = None,
*,
auth: AuthContext | None = None,
session_name: str | None = None,
session_description: str | None = None,
) -> tuple[str, str]
Open an isolated write session outside sid_cache, returning (sid, server_ip).
Source code in src/arodonata/client.py
delete_object async ¶
delete_object(
mgmt_name: str,
obj_type: str,
*,
uid: str | None = None,
name: str | None = None,
payload: dict[str, Any] | None = None,
domain: str | None = None,
sid: str | None = None,
server_ip: str | None = None,
) -> ApiCallResult
Delete a Check Point object (delete-<obj_type>) by uid or name using active WriteSession, explicit sid, or automatic isolated write_session (C8).
Source code in src/arodonata/client.py
describe_objects async ¶
describe_objects(
*,
mgmt_name: str | None = None,
domain_name: str | None = None,
include_global: bool = True,
) -> dict[str, Any]
Return progressive-disclosure schema and summary counts for cached objects and services.
Source code in src/arodonata/client.py
discard_staged_session async ¶
discard_staged_session(
mgmt_name: str,
domain: str | None = None,
*,
session_uid: str,
sid: str | None = None,
server_ip: str | None = None,
auth: AuthContext | None = None,
force_disconnect: bool = False,
) -> ApiCallResult
Adopt session_uid, discard uncommitted changes, and log out.
Source code in src/arodonata/client.py
filter_rulebase async ¶
filter_rulebase(
mgmt_name: str,
domain_name: str | None = None,
*,
package: str | None = None,
layer: str | None = None,
rulebase_type: RulebaseType = "access",
filter_query: str = "",
output_format: RuleFormat = "model_friendly",
cache_mode: CacheMode = "cache",
cache_ttl: float | None = None,
) -> FilteredRulebaseResult
Evaluate filter_query locally against cached rulebase and cached objects/services.
Source code in src/arodonata/client.py
find_object async ¶
find_object(
mgmt_name: str,
domain: str | None = None,
name_or_uid: str = "",
*,
obj_type: str | None = None,
cache_mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> CPObject | CPService | Asset | None
Find a single CPObject, CPService, or Asset by exact uid or name in (mgmt_name, domain) (or across all domains when domain is None), including active WriteSession overlay.
Source code in src/arodonata/client.py
1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 | |
get_access_rules async ¶
get_access_rules(
mgmt_name: str,
domain: str,
*,
layer_uid: str | None = None,
layer_name: str | None = None,
) -> list[AccessRuleEntry]
Return cached access-control rules for (mgmt_name, domain).
Source code in src/arodonata/client.py
get_address_ranges async ¶
get_address_ranges(
mgmt_name: str | None = None,
domain: str | None = None,
*,
names: Sequence[str] | None = None,
uids: Sequence[str] | None = None,
include_global: bool = False,
cache_mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> list[CPObject]
Return cached address-range CPObject models, merging any active WriteSession overlay.
Source code in src/arodonata/client.py
get_cache_status async ¶
get_cache_status(
*,
mgmt_name: str | None = None,
domain_name: str | None = None,
scope: SyncScope | None = None,
) -> dict[str, Any]
Inspect domain_sync_state across scopes and return per-domain/per-type freshness and cache_age_seconds.
Source code in src/arodonata/client.py
get_dns_domains async ¶
get_dns_domains(
mgmt_name: str | None = None,
domain: str | None = None,
*,
names: Sequence[str] | None = None,
uids: Sequence[str] | None = None,
include_global: bool = False,
cache_mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> list[CPObject]
Return cached dns-domain CPObject models, merging any active WriteSession overlay.
Source code in src/arodonata/client.py
get_domains async ¶
get_domains(
mgmt_name: str | None = None,
*,
include_global: bool = False,
cache_mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> list[DomainInfo]
Return discovered domains, excluding Global unless include_global=True.
Never triggers implicit background object-cache warm-up.
Source code in src/arodonata/client.py
get_gateways async ¶
get_gateways(
mgmt_name: str | None = None,
domain: str | None = None,
*,
types: Sequence[str] | None = None,
include_global: bool = False,
cache_mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> list[Asset]
Return cached gateway, cluster, VSX, and server Asset models.
Source code in src/arodonata/client.py
get_group_members async ¶
get_group_members(
mgmt_name: str,
domain: str | None = None,
group_name_or_uid: str = "",
*,
recursive: bool = True,
max_depth: int = 5,
cache_mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> list[CPObject | CPService | Asset]
Resolve direct (and optionally recursive) member CPObject, CPService, or child Asset items for a group, service-group, cluster, or VSX container in (mgmt_name, domain).
Source code in src/arodonata/client.py
get_groups async ¶
get_groups(
mgmt_name: str | None = None,
domain: str | None = None,
*,
names: Sequence[str] | None = None,
uids: Sequence[str] | None = None,
include_global: bool = False,
cache_mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> list[CPObject]
Return cached group CPObject models, merging any active WriteSession overlay.
Source code in src/arodonata/client.py
get_hosts async ¶
get_hosts(
mgmt_name: str | None = None,
domain: str | None = None,
*,
names: Sequence[str] | None = None,
uids: Sequence[str] | None = None,
include_global: bool = False,
cache_mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> list[CPObject]
Return cached host CPObject models, merging any active WriteSession overlay.
Source code in src/arodonata/client.py
get_https_rules async ¶
get_https_rules(
mgmt_name: str,
domain: str,
*,
layer_uid: str | None = None,
layer_name: str | None = None,
) -> list[HttpsRuleEntry]
Return cached HTTPS inspection rules for (mgmt_name, domain).
Source code in src/arodonata/client.py
get_layer_rulebase async ¶
get_layer_rulebase(
mgmt_name: str,
domain_name: str | None,
layer: str,
*,
rulebase_type: RulebaseType | None = None,
cache_mode: CacheMode = "cache",
cache_ttl: float | None = None,
) -> NumberedLayerRulebase
Return a SmartConsole-numbered NumberedLayerRulebase for layer in (mgmt_name, domain_name).
Source code in src/arodonata/client.py
get_nat_rules async ¶
get_nat_rules(
mgmt_name: str,
domain: str,
*,
package_uid: str | None = None,
package_name: str | None = None,
) -> list[NatRuleEntry]
Return cached NAT rules for (mgmt_name, domain).
Source code in src/arodonata/client.py
get_networks async ¶
get_networks(
mgmt_name: str | None = None,
domain: str | None = None,
*,
names: Sequence[str] | None = None,
uids: Sequence[str] | None = None,
include_global: bool = False,
cache_mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> list[CPObject]
Return cached network CPObject models, merging any active WriteSession overlay.
Source code in src/arodonata/client.py
get_object_by_uid async ¶
get_object_by_uid(
mgmt_name: str,
domain: str,
uid: str,
*,
cache_mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> CPObject | None
Return a single CPObject by (mgmt_name, domain, uid), respecting any active WriteSession overlay.
Source code in src/arodonata/client.py
get_objects async ¶
get_objects(
mgmt_name: str | None = None,
domain: str | None = None,
*,
types: Sequence[str] | None = None,
names: Sequence[str] | None = None,
uids: Sequence[str] | None = None,
include_global: bool = False,
cache_mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> list[CPObject]
Return cached network CPObject models across types, merging any active WriteSession overlay.
Source code in src/arodonata/client.py
get_package_rulebase async ¶
get_package_rulebase(
mgmt_name: str,
domain_name: str | None,
package: str,
*,
rulebase_type: RulebaseType = "access",
cache_mode: CacheMode = "cache",
cache_ttl: float | None = None,
) -> PackageRulebase
Return a SmartConsole-numbered PackageRulebase for package in (mgmt_name, domain_name).
Source code in src/arodonata/client.py
get_policy_packages async ¶
get_policy_packages(
mgmt_name: str,
domain_name: str | None = None,
*,
cache_mode: CacheMode = "cache",
cache_ttl: float | None = None,
) -> list[PolicyPackageInfo]
Return cached PolicyPackageInfo entries for (mgmt_name, domain_name).
Source code in src/arodonata/client.py
get_services async ¶
get_services(
mgmt_name: str | None = None,
domain: str | None = None,
*,
types: Sequence[str] | None = None,
names: Sequence[str] | None = None,
uids: Sequence[str] | None = None,
include_global: bool = False,
cache_mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> list[CPService]
Return cached CPService models, merging any active WriteSession overlay.
Source code in src/arodonata/client.py
get_threat_rules async ¶
get_threat_rules(
mgmt_name: str,
domain: str,
*,
layer_uid: str | None = None,
layer_name: str | None = None,
) -> list[ThreatRuleEntry]
Return cached Threat Prevention rules for (mgmt_name, domain).
Source code in src/arodonata/client.py
initialize async ¶
Initialize the database schema and optionally schedule startup session cleanup.
Source code in src/arodonata/client.py
invalidate_domain ¶
Invalidate freshness memos for (mgmt_name, domain) so the next smart read re-checks published head.
Source code in src/arodonata/client.py
locate_rules async ¶
locate_rules(
mgmt_name: str,
domain_name: str | None = None,
*,
rule_uids: Sequence[str] | None = None,
layer_uids: Sequence[str] | None = None,
cache_mode: CacheMode = "cache",
cache_ttl: float | None = None,
) -> RuleLocations
Locate SmartConsole rule numbers and layer prefixes across all packages and layers of a domain.
Source code in src/arodonata/client.py
logout_sid ¶
Log out a specific session identifier.
publish_staged_session async ¶
publish_staged_session(
mgmt_name: str,
domain: str | None = None,
*,
session_uid: str,
sid: str | None = None,
server_ip: str | None = None,
timeout: float | None = None,
auth: AuthContext | None = None,
force_disconnect: bool = False,
) -> ApiCallResult
Adopt session_uid, publish it, log out, and invalidate the domain cache.
Source code in src/arodonata/client.py
query_objects async ¶
query_objects(
*,
mgmt_name: str | None = None,
domain_name: str | None = None,
domains: Sequence[str] | None = None,
types: Sequence[str] | None = None,
scope_origin: Literal["all", "local", "global"] = "all",
name_pattern: str | None = None,
ip_subnet: str | None = None,
port: str | None = None,
protocol: str | None = None,
tags: Sequence[str] | None = None,
include_global: bool = False,
group_by: Sequence[str] | None = None,
aggregate: Literal["count", "list", "describe"] = "list",
limit: int = 100,
offset: int = 0,
cache_mode: CacheMode = "cache",
cache_ttl: float | None = None,
) -> dict[str, Any]
Execute structured cross-domain filtering, grouping, and counting over cached objects and services.
Source code in src/arodonata/client.py
refresh_assets async ¶
refresh_assets(
*,
mgmt_name: str | None = None,
domains: Sequence[str] | str | None = None,
include_global: bool = False,
mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> RefreshOutcome
Synchronize gateway, cluster, VSX, and server assets across domains and return RefreshOutcome.
Source code in src/arodonata/client.py
refresh_objects async ¶
refresh_objects(
*,
mgmt_name: str | None = None,
domains: Sequence[str] | str | None = None,
types: Sequence[str] | None = None,
include_global: bool = False,
mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> RefreshOutcome
Synchronize network objects across target domains and return RefreshOutcome.
Source code in src/arodonata/client.py
refresh_rulebases async ¶
refresh_rulebases(
*,
mgmt_name: str | None = None,
domains: Sequence[str] | str | None = None,
include_global: bool = False,
mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> RefreshOutcome
Synchronize policy rulebase snapshots across target domains and return RefreshOutcome.
Source code in src/arodonata/client.py
refresh_services async ¶
refresh_services(
*,
mgmt_name: str | None = None,
domains: Sequence[str] | str | None = None,
types: Sequence[str] | None = None,
include_global: bool = False,
mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> RefreshOutcome
Synchronize service objects across target domains and return RefreshOutcome.
Source code in src/arodonata/client.py
render_change_report ¶
render_change_report(
report: ChangeReport,
*,
formats: Sequence[str] = ("html", "markdown", "json"),
options: RenderOptions | None = None,
) -> RenderedReportBundle
Render a ChangeReport offline into any requested subset of 'html', 'json', and 'markdown'.
Source code in src/arodonata/client.py
search_objects async ¶
search_objects(
query: str,
*,
mgmt_name: str | None = None,
domains: Sequence[str] | str | None = None,
types: Sequence[str] | None = None,
include_global: bool = False,
max_depth: int = 2,
exact_match: bool = False,
cache_mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> SearchResult
Search cached objects across comma-separated terms and resolve parent groups up to max_depth.
Source code in src/arodonata/client.py
set_object async ¶
set_object(
mgmt_name: str,
obj_type: str,
payload: dict[str, Any],
*,
domain: str | None = None,
sid: str | None = None,
server_ip: str | None = None,
) -> ApiCallResult
Update a Check Point object (set-<obj_type>) using active WriteSession context, explicit sid, or an automatic isolated write_session (C8).
Source code in src/arodonata/client.py
start_object_cache_warmup ¶
start_object_cache_warmup(
*,
mgmt_name: str | None = None,
domains: Sequence[str] | str | None = None,
types: Sequence[str] | None = None,
include_global: bool = False,
include_services: bool = False,
mode: CacheMode = "smart",
) -> asyncio.Task[RefreshOutcome]
Explicitly schedule background object (and optional service) cache warm-up.
Source code in src/arodonata/client.py
stream_publish_staged_session async ¶
stream_publish_staged_session(
mgmt_name: str,
domain: str | None = None,
*,
session_uid: str,
sid: str | None = None,
server_ip: str | None = None,
timeout: float | None = None,
auth: AuthContext | None = None,
force_disconnect: bool = False,
) -> AsyncIterator[CPCRUDEvent]
Adopt session_uid, publish it while streaming CPCRUDEvent items, log out, and invalidate the domain cache.
Source code in src/arodonata/client.py
stream_refresh_assets async ¶
stream_refresh_assets(
*,
mgmt_name: str | None = None,
domains: Sequence[str] | str | None = None,
include_global: bool = False,
mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> AsyncIterator[SyncProgressEvent]
Stream SyncProgressEvent items while synchronizing gateway, cluster, VSX, and server assets.
Source code in src/arodonata/client.py
stream_refresh_objects async ¶
stream_refresh_objects(
*,
mgmt_name: str | None = None,
domains: Sequence[str] | str | None = None,
types: Sequence[str] | None = None,
include_global: bool = False,
mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> AsyncIterator[SyncProgressEvent]
Stream SyncProgressEvent items while synchronizing network objects.
Source code in src/arodonata/client.py
stream_refresh_rulebases async ¶
stream_refresh_rulebases(
*,
mgmt_name: str | None = None,
domains: Sequence[str] | str | None = None,
include_global: bool = False,
mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> AsyncIterator[SyncProgressEvent]
Stream SyncProgressEvent items while synchronizing policy rulebase snapshots.
Source code in src/arodonata/client.py
stream_refresh_services async ¶
stream_refresh_services(
*,
mgmt_name: str | None = None,
domains: Sequence[str] | str | None = None,
types: Sequence[str] | None = None,
include_global: bool = False,
mode: CacheMode = "smart",
cache_ttl: float | None = None,
) -> AsyncIterator[SyncProgressEvent]
Stream SyncProgressEvent items while synchronizing service objects.
Source code in src/arodonata/client.py
user_context ¶
user_context(
user: UserContext | None = None,
*,
user_id: str | None = None,
username: str | None = None,
session_name: str | None = None,
session_description: str | None = None,
client_id: str | None = None,
extra: dict[str, Any] | None = None,
) -> Iterator[UserContext]
Bind operator attribution metadata (UserContext) in contextvars.
Source code in src/arodonata/client.py
write_session async ¶
write_session(
mgmt_name: str,
domain: str | None = None,
*,
auth: AuthContext | None = None,
user: UserContext | None = None,
session_name: str | None = None,
session_description: str | None = None,
publish_on_exit: bool = True,
) -> AsyncIterator[WriteSession]
Open a context-bound isolated WriteSession with SessionOverlay read-your-own-writes isolation.
Source code in src/arodonata/client.py
588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 | |