Workflow step for running a playbook that checks whether base config has drifted.
Source code in gso/workflows/placement_port/base_validate_placement_port.py
| @step("Check L3 interface Port")
def verify_l3_port(subscription: SubscriptionModel) -> LSOState:
"""Workflow step for running a playbook that checks whether base config has drifted."""
partner_name = get_partner_by_id(subscription.customer_id).name
return {
"playbook_name": "gap_ansible/playbooks/l3_interface.yaml",
"inventory": {"all": {"hosts": {subscription.l3_interface.edge_port.node.router_fqdn: None}}}, # type: ignore[attr-defined]
"extra_vars": {
"subscription_json": json.loads(json_dumps(subscription)),
"verb": "deploy",
"dry_run": True,
"is_verification_workflow": "true",
"object": "l3_interface",
"partner_name": partner_name,
},
}
|