netorca_pack_data - Push stage data into a NetOrca Pack pipeline¶
Part of the netautomate.netorca collection (version 2.0.0). Added in version 2.0.0.
Synopsis¶
- Post a stage payload for a service item (or service) in NetOrca Pack - this is how an external executor reports back into a pipeline.
- The canonical use is the
executionstage - a pipeline whose execution processor is external sits inWAITING_FOR_RESPONSEuntil your automation deploys the rendered config and pushes the result here. Pushingconfigorverifydata instead feeds the pipeline a stage produced outside the AI (a hand-rendered config, an external validation verdict). - The
datadictionary is stored verbatim as the stage's data - its shape is whatever your service's response schema and executor agree on. - Every run of this module creates a new pack data record - this action is deliberately not idempotent (stage data is versioned per run, and a skipped push would leave the pipeline waiting forever). Guard re-runs with your own
when:. - The pack executor endpoints are not covered by the netorca-sdk resource layer yet, so this module speaks to
external/{context}/pack/datadirectly.
Requirements¶
The below requirements are needed on the host that executes this module.
- netorca-sdk >= 1.0.9, < 2.0.0
Parameters¶
| Parameter | Comments |
|---|---|
datadictrequired |
The stage payload, stored verbatim. |
object_idintrequired |
ID of the service item (or service) the data belongs to. |
object_typestr |
What object_id refers to.Choices: service_item, serviceDefault: service_item |
stagestrrequired |
The pipeline stage the payload is for. Choices: config, verify, execution |
Common parameters¶
Connection and query parameters shared by every module in the collection. See Authentication for the environment-variable pattern.
| Parameter | Comments |
|---|---|
contextstr |
Point of view for the request. The same query returns different data depending on which side of the service relationship your team is on.serviceowner operates on the services your team offers - the requests made against them, their service items and deployed items. This is the side that validates, approves, deploys and completes changes.consumer operates on what your team consumes - the service items your applications declared and the change instances tracking your own requests.If not set, the value of the NETORCA_CONTEXT environment variable is used.Choices: serviceowner, consumerDefault: serviceowner |
api_urlstrrequired |
Base URL of the NetOrca API, for example https://api.example.netorca.io.The URL is normalised to end in a single /v1, so passing it with or without the suffix both work.If not set, the value of the NETORCA_API_URL environment variable is used. |
api_keystrrequired |
API key of your NetOrca team. The NetOrca API supports API-key authentication only - there is no username/password mode. Treat the key like a password - supply it via the NETORCA_API_KEY environment variable (for example from a CI/CD secret) or from Ansible Vault, never as a literal in a playbook.If not set, the value of the NETORCA_API_KEY environment variable is used. |
validate_certsbool |
Whether to validate TLS certificates when talking to the API. Only disable this for lab instances with self-signed certificates. If not set, the value of the NETORCA_VALIDATE_CERTS environment variable is used.Default: true |
Attributes¶
| Attribute | Support | Description |
|---|---|---|
| check_mode | full | Reports what would be pushed without any API call. The existence of the target object is not validated in check mode. |
| diff_mode | N/A | A push creates a new record; there is no before state to diff. |
Notes¶
- All modules talk to the NetOrca REST API and are typically executed on the controller (
hosts=localhostwithgather_facts=false, ordelegate_to=localhost). - Module parameters take precedence over their
NETORCA_*environment variable fallbacks.
Examples¶
- name: Report a successful deployment into the waiting pipeline
netautomate.netorca.netorca_pack_data:
object_id: 389
stage: execution
data:
success: true
deployed_bigips: [BigIPWAF-D]
deployed_at: "{{ now(utc=true).isoformat() }}"
- name: Report a failed deployment (the retrigger loop takes it from here)
netautomate.netorca.netorca_pack_data:
object_id: 389
stage: execution
data:
success: false
error: "pool member 10.0.0.20:8080 unreachable"
Return values¶
msg¶
Human-readable summary of what happened.
- Returned: always
- Type:
str - Sample:
pack_data¶
The created pack data record (or the projected payload in check mode).
- Returned: always
- Type:
dict - Sample:
See also¶
- netautomate.netorca.netorca_pack_pipeline_info - Find the runs waiting for your push.
- netautomate.netorca.netorca_pack_pipeline - Mark the run applied once deployed.
- netautomate.netorca.netorca_pack_data_info - Read stage data back.
Authors¶
- NetAutomate (@netautomate)