Name | invariant-client JSON |
Version |
1.7.5
JSON |
| download |
home_page | None |
Summary | Invariant: manage ACLs in an entirely new way |
upload_time | 2024-12-13 07:04:58 |
maintainer | None |
docs_url | None |
author | Rob Ankeny |
requires_python | <4.0,>=3.10 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Invariant CLI and Python SDK
## Installation
The Invariant client is available as a Python package. You can install it through pip or pipx like so:
```bash
pip install invariant-client
# Or using pipx
pipx install invariant-client
```
The Invariant CLI can be used to run Invariant from your test automation workflow. This example shows one way to install it for Github Actions:
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: python -m pip install --upgrade pip invariant-client
- name: Evaluate current directory using Invariant
run: |
python -m invariant-client run
```
## Usage: Command Line Interface
The Invariant CLI can analyize local changes to network configuration files.
```bash
$ invariant login
Open this link in your browser to log in:
https://prod.invariant.tech/login?code=320664
Login successful.
$ invariant run
Uploading snapshot...
Processing... (5b7f28b5-95b3-44ee-8c42-ea0240ef52f5)
Analysis complete.
╭───────────────────────┬────────╮
│ Network Information │ Rows │
├───────────────────────┼────────┤
│ nodes │ 38 │
│ interfaces │ 201 │
│ named_structures │ 148 │
│ defined_structures │ 334 │
│ referenced_structures │ 333 │
│ unused_structures │ 5 │
│ vlan_properties │ 14 │
│ hsrp_properties │ 0 │
│ mlag_properties │ 0 │
│ ip_owners │ 75 │
│ undefined_references │ 0 │
│ vrrp_properties │ 8 │
╰───────────────────────┴────────╯
╭───────────────┬────────╮
│ Topology │ Rows │
├───────────────┼────────┤
│ edges │ 120 │
│ layer_1_edges │ 0 │
│ layer_3_edges │ 120 │
│ network_map │ 1 │
╰───────────────┴────────╯
╭────────────────────────────┬────────╮
│ Routing │ Rows │
├────────────────────────────┼────────┤
│ routes │ 8994 │
│ bgp_process_config │ 12 │
│ bgp_peer_config │ 24 │
│ bgp_session_compatibility │ 24 │
│ bgp_session_status │ 24 │
│ bgp_edges │ 20 │
│ bgp_ribs │ 4320 │
│ ospf_process_config │ 6 │
│ ospf_interface_config │ 36 │
│ ospf_area_config │ 6 │
│ ospf_session_compatibility │ 20 │
╰────────────────────────────┴────────╯
╭───────────────────┬────────╮
│ Setup │ Rows │
├───────────────────┼────────┤
│ unconnected_nodes │ 3 │
│ ignored_lines │ 49 │
│ file_parse_status │ 16 │
│ parse_warnings │ 92 │
│ errors │ 0 │
╰───────────────────┴────────╯
╭────────────────────────┬────────╮
│ Inconsistent Traffic │ Rows │
├────────────────────────┼────────┤
│ subnet_multipath │ 0 │
│ loopback_multipath │ 0 │
╰────────────────────────┴────────╯
╭──────────┬────────╮
│ Probes │ Rows │
├──────────┼────────┤
│ probes │ 4 │
╰──────────┴────────╯
$ invariant show probes --json
[
{
"target": "8.8.8.8/32",
"type": "ICMP_ECHO",
"comment": "Custom 8.8.8.8 ECHO No-Ignore Filters",
"ignore_filters": false,
"node_outcomes": {
"asa": "always",
"border-1": "always",
"core-1": "always",
"core-2": "always",
"dc-1": "always",
"dist-1": "always",
"dist-2": "always",
"dmzfw-1": "always",
"dmzsw-1": "always",
"host-srv-dmz": "always",
"i-01602d9efaed4409a": "always",
"i-02cae6eaa9edeed70": "always",
"i-04cd3db5124a05ee6": "never",
"i-0a5d64b8b58c6dd09": "never",
"internet": "always",
"isp_64501": "always",
"isp_64502": "always",
"subnet-009d57c7f13813630": "never",
"subnet-0333a0749ea4ce3df": "never",
"subnet-03acae3b9a534fff9": "never",
"subnet-06005943afe32f714": "never",
"subnet-06a692ed4ef84368d": "never",
"subnet-09b389def558a9c7d": "never",
"subnet-0cb5f4c094bee5214": "never",
"subnet-0f84a4be105f7aaef": "never",
"tgw-06b348adabd13452d": "partial",
"tgw-0888a76c8a371246d": "partial"
}
}
]
```
Raw data
{
"_id": null,
"home_page": null,
"name": "invariant-client",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Rob Ankeny",
"author_email": "ankenyr@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/e9/3b/cf5a39d07d9e88f972a0d9bf0cf6d55aa7d584b1312ee77eba12885ebc91/invariant_client-1.7.5.tar.gz",
"platform": null,
"description": "# Invariant CLI and Python SDK\n\n## Installation\n\nThe Invariant client is available as a Python package. You can install it through pip or pipx like so:\n\n```bash\npip install invariant-client\n\n# Or using pipx\npipx install invariant-client\n```\n\nThe Invariant CLI can be used to run Invariant from your test automation workflow. This example shows one way to install it for Github Actions:\n\n```yaml\nsteps:\n- uses: actions/checkout@v4\n- uses: actions/setup-python@v4\n with:\n python-version: '3.11'\n cache: 'pip'\n- name: Install dependencies\n run: python -m pip install --upgrade pip invariant-client\n- name: Evaluate current directory using Invariant\n run: |\n python -m invariant-client run\n```\n\n## Usage: Command Line Interface\n\nThe Invariant CLI can analyize local changes to network configuration files.\n\n```bash\n$ invariant login\nOpen this link in your browser to log in:\nhttps://prod.invariant.tech/login?code=320664\nLogin successful.\n\n$ invariant run\nUploading snapshot...\nProcessing... (5b7f28b5-95b3-44ee-8c42-ea0240ef52f5)\nAnalysis complete.\n\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Network Information \u2502 Rows \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 nodes \u2502 38 \u2502\n\u2502 interfaces \u2502 201 \u2502\n\u2502 named_structures \u2502 148 \u2502\n\u2502 defined_structures \u2502 334 \u2502\n\u2502 referenced_structures \u2502 333 \u2502\n\u2502 unused_structures \u2502 5 \u2502\n\u2502 vlan_properties \u2502 14 \u2502\n\u2502 hsrp_properties \u2502 0 \u2502\n\u2502 mlag_properties \u2502 0 \u2502\n\u2502 ip_owners \u2502 75 \u2502\n\u2502 undefined_references \u2502 0 \u2502\n\u2502 vrrp_properties \u2502 8 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Topology \u2502 Rows \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 edges \u2502 120 \u2502\n\u2502 layer_1_edges \u2502 0 \u2502\n\u2502 layer_3_edges \u2502 120 \u2502\n\u2502 network_map \u2502 1 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Routing \u2502 Rows \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 routes \u2502 8994 \u2502\n\u2502 bgp_process_config \u2502 12 \u2502\n\u2502 bgp_peer_config \u2502 24 \u2502\n\u2502 bgp_session_compatibility \u2502 24 \u2502\n\u2502 bgp_session_status \u2502 24 \u2502\n\u2502 bgp_edges \u2502 20 \u2502\n\u2502 bgp_ribs \u2502 4320 \u2502\n\u2502 ospf_process_config \u2502 6 \u2502\n\u2502 ospf_interface_config \u2502 36 \u2502\n\u2502 ospf_area_config \u2502 6 \u2502\n\u2502 ospf_session_compatibility \u2502 20 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Setup \u2502 Rows \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 unconnected_nodes \u2502 3 \u2502\n\u2502 ignored_lines \u2502 49 \u2502\n\u2502 file_parse_status \u2502 16 \u2502\n\u2502 parse_warnings \u2502 92 \u2502\n\u2502 errors \u2502 0 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Inconsistent Traffic \u2502 Rows \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 subnet_multipath \u2502 0 \u2502\n\u2502 loopback_multipath \u2502 0 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Probes \u2502 Rows \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 probes \u2502 4 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n$ invariant show probes --json\n[\n {\n \"target\": \"8.8.8.8/32\",\n \"type\": \"ICMP_ECHO\",\n \"comment\": \"Custom 8.8.8.8 ECHO No-Ignore Filters\",\n \"ignore_filters\": false,\n \"node_outcomes\": {\n \"asa\": \"always\",\n \"border-1\": \"always\",\n \"core-1\": \"always\",\n \"core-2\": \"always\",\n \"dc-1\": \"always\",\n \"dist-1\": \"always\",\n \"dist-2\": \"always\",\n \"dmzfw-1\": \"always\",\n \"dmzsw-1\": \"always\",\n \"host-srv-dmz\": \"always\",\n \"i-01602d9efaed4409a\": \"always\",\n \"i-02cae6eaa9edeed70\": \"always\",\n \"i-04cd3db5124a05ee6\": \"never\",\n \"i-0a5d64b8b58c6dd09\": \"never\",\n \"internet\": \"always\",\n \"isp_64501\": \"always\",\n \"isp_64502\": \"always\",\n \"subnet-009d57c7f13813630\": \"never\",\n \"subnet-0333a0749ea4ce3df\": \"never\",\n \"subnet-03acae3b9a534fff9\": \"never\",\n \"subnet-06005943afe32f714\": \"never\",\n \"subnet-06a692ed4ef84368d\": \"never\",\n \"subnet-09b389def558a9c7d\": \"never\",\n \"subnet-0cb5f4c094bee5214\": \"never\",\n \"subnet-0f84a4be105f7aaef\": \"never\",\n \"tgw-06b348adabd13452d\": \"partial\",\n \"tgw-0888a76c8a371246d\": \"partial\"\n }\n }\n]\n```\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Invariant: manage ACLs in an entirely new way",
"version": "1.7.5",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1c113889dcf6d6053c88eb2240421a4a509f921478e383ec2eeb29b94345f521",
"md5": "cc3bb8941cf3e331ced6895f4c36e0ef",
"sha256": "cf2fcbd9199bebdc2091bb1000ce9a5304fffbc44f9eb6694a0f4dc2b07384e9"
},
"downloads": -1,
"filename": "invariant_client-1.7.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cc3bb8941cf3e331ced6895f4c36e0ef",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 257786,
"upload_time": "2024-12-13T07:04:56",
"upload_time_iso_8601": "2024-12-13T07:04:56.173218Z",
"url": "https://files.pythonhosted.org/packages/1c/11/3889dcf6d6053c88eb2240421a4a509f921478e383ec2eeb29b94345f521/invariant_client-1.7.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e93bcf5a39d07d9e88f972a0d9bf0cf6d55aa7d584b1312ee77eba12885ebc91",
"md5": "e5f67bf3dafb56ba5c6f70af2d7d180d",
"sha256": "faef4d61981d40ea07ee9ad4a88fbb043518f13df65f806962429a40165e0312"
},
"downloads": -1,
"filename": "invariant_client-1.7.5.tar.gz",
"has_sig": false,
"md5_digest": "e5f67bf3dafb56ba5c6f70af2d7d180d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 81296,
"upload_time": "2024-12-13T07:04:58",
"upload_time_iso_8601": "2024-12-13T07:04:58.203977Z",
"url": "https://files.pythonhosted.org/packages/e9/3b/cf5a39d07d9e88f972a0d9bf0cf6d55aa7d584b1312ee77eba12885ebc91/invariant_client-1.7.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-13 07:04:58",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "invariant-client"
}