1.3.1.1 ETag usage
The ETag (entity-tag) is an HTTP/1.1 response header field that is defined by the W3C organization (See [RFC2616] section 14.19). The Network Controller supports the behavior of ETag as defined by W3C. In addition, the following section outlines the behavior of the etag element that a client can expect from the Network Controller when nested resources are updated.
Case 1: A parent resource is updated.
The etag of the parent is updated.
The etag of all child resources are updated.
Recursively the etag of all child resources of the parent's child resources are updated.
Example 1: If a logicalNetworks resource is updated then its etag is updated along with all subnets resources under it and all ipPools resources under all subnets resources under the original logicalNetworks resource.
Case 2: A child resource is updated.
Recursively the etag of the parent resource of the child resource is updated.
The etag of the child resource is updated.
The etag of all child resources of the specific child resource are updated.
The etag of any other child resources of the parent are not updated.
Example 1: If a subnets resource is updated then its etag is updated along with the etag of the parent logicalNetworks resource and all ipPools resources under the specific subnets resource. Any other subnets resources under the original logicalNetworks resource will not have their etag updated.
Example 2: If an ipPools resource is updated then its etag is updated along with the etag of the parent subnets resource and the etag of the subnets' parent logicalNetworks resource. But if there are any other subnets resources under the logicalNetworks resource and ipPools resources under these subnets resources their etag will not be updated.
Case 3: A resource with dependencies is updated
The etag of the resource is updated.
The etag of the dependent resource is not updated.
Example 3: A gateways resource takes a dependency on a GatewayPools resource. Then the GatewayPools resource is updated. The GatewayPools resource's etag is updated but the gateways resource's etag is not updated.
This is the table of HTTP/1.1 response codes related to etags.
|
PUT |
Resource does not exist |
Resource exists |
|---|---|---|
|
If-Match = "" / absent |
201 Created |
200 OK |
|
If-Match = "*" |
412 Precondition Failed |
200 OK |
|
If-Match = "xyz" |
412 Precondition Failed |
200 OK / 412 Precondition Failed |
|
If-None-Match = "*" |
201 Created |
412 Precondition Failed |
|
PATCH |
Resource does not exist |
Resource exists |
|---|---|---|
|
If-Match = "" / absent |
404 Not Found |
200 OK |
|
If-Match = "*" |
404 Not Found |
200 OK |
|
If-Match = "xyz" |
404 Not Found |
200 OK / 412 Precondition Failed |
|
DELETE |
Resource does not exist |
Resource exists |
|---|---|---|
|
If-Match = "" / absent |
204 No Content |
200 OK |
|
If-Match = "*" |
204 No Content |
200 OK |
|
If-Match = "xyz" |
204 No Content |
200 OK / 412 Precondition Failed |