Manage Records Transactionally
This blueprint proposes the Designate API includes the ability to manage (create, update, or delete) multiple records in a single transaction.
For example, with nsupdate, you are able to delete an old record and add a new record:
nsupdate
> server ns.example.com
> update delete oldhost.
> update add newhost.
> send
> quit
The example APl calls that would do the same in Designate (assuming the oldhost.
Request:
POST /v2/zones/
Host: dns.provider.com
Accept: application/json
Content-Type: application/json
Response:
HTTP/1.1 201 Created
Content-Type: application/json
Location: https:/
{
"id": "2e32e609-
"links": {
"self": "https:/
}
}
Request:
PUT /v2/zones/
Host: dns.provider.com
Accept: application/json
Content-Type: application/json
{
"records": [
{
"id": "a86dba58-
},
{
"name": "oldhost.
"type": "A",
"data": "192.168.0.109",
}
}
Any number of records can be managed in a single transaction this way. Valid action attributes are "CREATE", "DELETE", "UPDATE".
Note transactions will be rolled back automatically after a timeout period expires or they can be rolled back explicitly using HTTP DELETE method.
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Medium
- Drafter:
- Ron Rickard
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Superseded
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
- Kiall Mac Innes
Related branches
Related bugs
Sprints
Whiteboard
This blueprint needs some more discussion around the API (how does it get exposed?). Assuming "transactions" refers to ensuring all changes are executed. If any failures, changes are rolled back like a DB transaction. Implementing this would mean that the other bulk operations may not be needed.