Workflow for redeploying a Prefix List that has drifted.
redeploy_prefix_list_dry(subscription, fqdn_list, process_id, partner_name)
Dry run of redeploying a Prefix List for a partner.
Source code in gso/workflows/prefix_list/redeploy_prefix_list.py
| @step("[DRY RUN] Redeploy Prefix List")
def redeploy_prefix_list_dry(
subscription: dict, fqdn_list: list[str], process_id: UUIDstr, partner_name: str
) -> LSOState:
"""Dry run of redeploying a Prefix List for a partner."""
return {
"playbook_name": "gap_ansible/playbooks/validate_prefix_list.yaml",
"inventory": {"all": {"hosts": dict.fromkeys(fqdn_list)}},
"extra_vars": {
"subscription": subscription,
"partner_name": partner_name,
"dry_run": True,
"verb": "deploy",
"object": "prefix_list",
"is_verification_workflow": True,
"commit_comment": f"GSO_PROCESS_ID: {process_id} - Deploy Prefix List for {partner_name}",
},
}
|
redeploy_prefix_list_real(subscription, fqdn_list, process_id, partner_name)
Redeploying a Prefix List for a partner.
Source code in gso/workflows/prefix_list/redeploy_prefix_list.py
| @step("[FOR REAL] Redeploy Prefix List")
def redeploy_prefix_list_real(
subscription: dict, fqdn_list: list[str], process_id: UUIDstr, partner_name: str
) -> LSOState:
"""Redeploying a Prefix List for a partner."""
return {
"playbook_name": "gap_ansible/playbooks/validate_prefix_list.yaml",
"inventory": {"all": {"hosts": dict.fromkeys(fqdn_list)}},
"extra_vars": {
"subscription": subscription,
"partner_name": partner_name,
"dry_run": False,
"verb": "deploy",
"object": "prefix_list",
"is_verification_workflow": True,
"commit_comment": f"GSO_PROCESS_ID: {process_id} - Deploy Prefix List for {partner_name}",
},
}
|
redeploy_prefix_list()
Redeploy a Prefix List.
Source code in gso/workflows/prefix_list/redeploy_prefix_list.py
| @redeploy_workflow("Redeploy Prefix List")
def redeploy_prefix_list() -> StepList:
"""Redeploy a Prefix List."""
return (
begin
>> build_partner_map
>> lso_interaction(redeploy_prefix_list_dry)
>> lso_interaction(redeploy_prefix_list_real)
)
|