F5 plugins for Nornir
Project description
nornir_f5
Collection of Nornir plugins to interact with F5 systems and deploy declaratives to F5 Automation Toolchain (ATC) services like AS3, DO, and TS.
Installation
Pip
pip install nornir-f5
Poetry
poetry add nornir-f5
Usage
from nornir import InitNornir
from nornir.core.task import Result, Task
from nornir_utils.plugins.functions import print_result
from nornir_f5.plugins.tasks import (
atc,
bigip_cm_config_sync,
bigip_cm_failover_status,
)
def as3_post(task: Task, as3_tenant: str) -> Result:
# Get the failover status of the device.
failover_status = task.run(
name="Get failover status", task=bigip_cm_failover_status
).result
# If it's the ACTIVE device, send the declaration and perform a sync.
if failover_status == "ACTIVE":
task.run(
name="POST AS3 Declaration from file",
task=atc,
atc_method="POST",
atc_service="AS3",
as3_tenant=as3_tenant,
atc_declaration_file=task.host["appsvcs"][as3_tenant][
"atc_declaration_file"
],
)
task.run(
name="Synchronize the devices",
task=bigip_cm_config_sync,
device_group=task.host["device_group"],
)
return Result(
host=task.host,
result="ACTIVE device, AS3 declaration successfully deployed.",
)
# Else, do nothing...
else:
return Result(host=task.host, result="STANDBY device, skipped.")
nr = InitNornir(config_file="config.yml")
nr = nr.filter(platform="f5_bigip")
result = nr.run(
name="AS3 POST",
task=as3_post,
as3_tenant="Simple_01",
)
print_result(result)
Plugins
Connections
- f5: Connects to an F5 REST server.
Tasks
- atc: Deploys ATC declaratives on a BIG-IP/IQ system.
- atc_info: Returns the version and release information of the ATC service instance.
- bigip_cm_config_sync: Synchronizes the configuration between BIG-IP systems.
- bigip_cm_failover_status: Gets the failover status of the BIG-IP system.
- bigip_cm_sync_status: Gets the configuration synchronization status of the BIG-IP system.
- bigip_shared_file_transfer_uploads: Uploads a file to a BIG-IP system.
- bigip_shared_iapp_lx_package: Manages Javascript LX packages on a BIG-IP system.
- bigip_sys_version: Gets software version information for the BIG-IP system.
- bigip_util_unix_ls: Lists information about the file(s) or directory content on a BIG-IP system.
- bigip_util_unix_rm: Deletes a file on a BIG-IP system.
Authors
- Eric Jacob (@erjac77)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nornir_f5-0.7.0.tar.gz.
File metadata
- Download URL: nornir_f5-0.7.0.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7319ffea4a4e890e27f50b9c00c8342ec7477cca9d51ea4e59a26eb75b938d6e
|
|
| MD5 |
9d8d342c19d0e7b6a16a9d2a1d79426d
|
|
| BLAKE2b-256 |
818aa20ca50c4ba58c683d73844dcf78637511a2caac4f234ab1151855275eef
|
Provenance
The following attestation bundles were made for nornir_f5-0.7.0.tar.gz:
Publisher:
publish.yml on erjac77/nornir_f5
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nornir_f5-0.7.0.tar.gz -
Subject digest:
7319ffea4a4e890e27f50b9c00c8342ec7477cca9d51ea4e59a26eb75b938d6e - Sigstore transparency entry: 195566352
- Sigstore integration time:
-
Permalink:
erjac77/nornir_f5@1d686bd1c2e71ccd7a0a2b545cb79f25b78dab07 -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/erjac77
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1d686bd1c2e71ccd7a0a2b545cb79f25b78dab07 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nornir_f5-0.7.0-py3-none-any.whl.
File metadata
- Download URL: nornir_f5-0.7.0-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d981637a671cbf435515a9d45c4a5adda97f25e5d3fa02b9b573840eff16f777
|
|
| MD5 |
e111600618041d9a69b1080fa6673fc2
|
|
| BLAKE2b-256 |
13d490c7d9a3dde62127faced8eb7581762ba99bd4ca14ccb68805c6326a4050
|
Provenance
The following attestation bundles were made for nornir_f5-0.7.0-py3-none-any.whl:
Publisher:
publish.yml on erjac77/nornir_f5
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nornir_f5-0.7.0-py3-none-any.whl -
Subject digest:
d981637a671cbf435515a9d45c4a5adda97f25e5d3fa02b9b573840eff16f777 - Sigstore transparency entry: 195566356
- Sigstore integration time:
-
Permalink:
erjac77/nornir_f5@1d686bd1c2e71ccd7a0a2b545cb79f25b78dab07 -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/erjac77
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1d686bd1c2e71ccd7a0a2b545cb79f25b78dab07 -
Trigger Event:
push
-
Statement type: