@@ -357,6 +357,10 @@ <h2>Table of Contents</h2>
357357 <a href="#metalstack.api.v2.UpdateLabels"><span class="badge">M</span>UpdateLabels</a>
358358 </li>
359359
360+ <li>
361+ <a href="#metalstack.api.v2.UpdateMeta"><span class="badge">M</span>UpdateMeta</a>
362+ </li>
363+
360364
361365 <li>
362366 <a href="#metalstack.api.v2.AdminRole"><span class="badge">E</span>AdminRole</a>
@@ -370,6 +374,10 @@ <h2>Table of Contents</h2>
370374 <a href="#metalstack.api.v2.InfraRole"><span class="badge">E</span>InfraRole</a>
371375 </li>
372376
377+ <li>
378+ <a href="#metalstack.api.v2.OptimisticLockingStrategy"><span class="badge">E</span>OptimisticLockingStrategy</a>
379+ </li>
380+
373381 <li>
374382 <a href="#metalstack.api.v2.ProjectRole"><span class="badge">E</span>ProjectRole</a>
375383 </li>
@@ -6663,6 +6671,38 @@ <h3 id="metalstack.api.v2.UpdateLabels">UpdateLabels</h3>
66636671
66646672
66656673
6674+ <h3 id="metalstack.api.v2.UpdateMeta">UpdateMeta</h3>
6675+ <p>UpdateMeta must be provided with every UpdateRequest to define how optimistic locking should be handled</p>
6676+
6677+
6678+ <table class="field-table">
6679+ <thead>
6680+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
6681+ </thead>
6682+ <tbody>
6683+
6684+ <tr>
6685+ <td>updated_at</td>
6686+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
6687+ <td></td>
6688+ <td><p>UpdatedAt is the date when this entity was updated
6689+ must be part of the update request to ensure optimistic locking </p></td>
6690+ </tr>
6691+
6692+ <tr>
6693+ <td>locking_strategy</td>
6694+ <td><a href="#metalstack.api.v2.OptimisticLockingStrategy">OptimisticLockingStrategy</a></td>
6695+ <td></td>
6696+ <td><p>LockingStrategy to be used for this update request </p></td>
6697+ </tr>
6698+
6699+ </tbody>
6700+ </table>
6701+
6702+
6703+
6704+
6705+
66666706
66676707
66686708 <h3 id="metalstack.api.v2.AdminRole">AdminRole</h3>
@@ -6752,6 +6792,36 @@ <h3 id="metalstack.api.v2.InfraRole">InfraRole</h3>
67526792 </tbody>
67536793 </table>
67546794
6795+ <h3 id="metalstack.api.v2.OptimisticLockingStrategy">OptimisticLockingStrategy</h3>
6796+ <p>OptimisticLockingStrategy defines how optimistic locking should be handled.</p><p>It defaults to client side, which requires the UpdatedAt timestamp to be provided</p>
6797+ <table class="enum-table">
6798+ <thead>
6799+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
6800+ </thead>
6801+ <tbody>
6802+
6803+ <tr>
6804+ <td>OPTIMISTIC_LOCKING_STRATEGY_UNSPECIFIED</td>
6805+ <td>0</td>
6806+ <td><p>OPTIMISTIC_LOCKING_STRATEGY_UNSPECIFIED same as client side</p></td>
6807+ </tr>
6808+
6809+ <tr>
6810+ <td>OPTIMISTIC_LOCKING_STRATEGY_CLIENT</td>
6811+ <td>1</td>
6812+ <td><p>OPTIMISTIC_LOCKING_STRATEGY_CLIENT requires UpdatedAt to be specified</p></td>
6813+ </tr>
6814+
6815+ <tr>
6816+ <td>OPTIMISTIC_LOCKING_STRATEGY_SERVER</td>
6817+ <td>2</td>
6818+ <td><p>OPTIMISTIC_LOCKING_STRATEGY_SERVER allows to omit UpdatedAt
6819+ and fetches the most recent entity before updating with the given values with the update request</p></td>
6820+ </tr>
6821+
6822+ </tbody>
6823+ </table>
6824+
67556825 <h3 id="metalstack.api.v2.ProjectRole">ProjectRole</h3>
67566826 <p>ProjectRole specifies what role a logged in user needs to call this project scoped service</p>
67576827 <table class="enum-table">
@@ -7902,11 +7972,10 @@ <h3 id="metalstack.admin.v2.FilesystemServiceUpdateRequest">FilesystemServiceUpd
79027972 </tr>
79037973
79047974 <tr>
7905- <td>updated_at </td>
7906- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp </a></td>
7975+ <td>update_meta </td>
7976+ <td><a href="#metalstack.api.v2.UpdateMeta">metalstack.api.v2.UpdateMeta </a></td>
79077977 <td></td>
7908- <td><p>UpdatedAt is the date when this entity was updated
7909- must be part of the update request to ensure optimistic locking </p></td>
7978+ <td><p>UpdateMeta contains the timestamp and strategy to be used in this update request </p></td>
79107979 </tr>
79117980
79127981 <tr>
@@ -8597,11 +8666,10 @@ <h3 id="metalstack.admin.v2.ImageServiceUpdateRequest">ImageServiceUpdateRequest
85978666 </tr>
85988667
85998668 <tr>
8600- <td>updated_at </td>
8601- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp </a></td>
8669+ <td>update_meta </td>
8670+ <td><a href="#metalstack.api.v2.UpdateMeta">metalstack.api.v2.UpdateMeta </a></td>
86028671 <td></td>
8603- <td><p>UpdatedAt is the date when this entity was updated
8604- must be part of the update request to ensure optimistic locking </p></td>
8672+ <td><p>UpdateMeta contains the timestamp and strategy to be used in this update request </p></td>
86058673 </tr>
86068674
86078675 <tr>
@@ -9248,11 +9316,10 @@ <h3 id="metalstack.api.v2.IPServiceUpdateRequest">IPServiceUpdateRequest</h3>
92489316 </tr>
92499317
92509318 <tr>
9251- <td>updated_at </td>
9252- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp </a></td>
9319+ <td>update_meta </td>
9320+ <td><a href="#metalstack.api.v2.UpdateMeta">UpdateMeta </a></td>
92539321 <td></td>
9254- <td><p>UpdatedAt is the date when this entity was updated
9255- must be part of the update request to ensure optimistic locking </p></td>
9322+ <td><p>UpdateMeta contains the timestamp and strategy to be used in this update request </p></td>
92569323 </tr>
92579324
92589325 <tr>
@@ -10239,11 +10306,10 @@ <h3 id="metalstack.api.v2.NetworkServiceUpdateRequest">NetworkServiceUpdateReque
1023910306 </tr>
1024010307
1024110308 <tr>
10242- <td>updated_at </td>
10243- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp </a></td>
10309+ <td>update_meta </td>
10310+ <td><a href="#metalstack.api.v2.UpdateMeta">UpdateMeta </a></td>
1024410311 <td></td>
10245- <td><p>UpdatedAt is the date when this entity was updated
10246- must be part of the update request to ensure optimistic locking </p></td>
10312+ <td><p>UpdateMeta contains the timestamp and strategy to be used in this update request </p></td>
1024710313 </tr>
1024810314
1024910315 <tr>
@@ -12850,11 +12916,10 @@ <h3 id="metalstack.api.v2.MachineServiceUpdateRequest">MachineServiceUpdateReque
1285012916 </tr>
1285112917
1285212918 <tr>
12853- <td>updated_at </td>
12854- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp </a></td>
12919+ <td>update_meta </td>
12920+ <td><a href="#metalstack.api.v2.UpdateMeta">UpdateMeta </a></td>
1285512921 <td></td>
12856- <td><p>UpdatedAt is the date when this entity was updated
12857- must be part of the update request to ensure optimistic locking </p></td>
12922+ <td><p>UpdateMeta contains the timestamp and strategy to be used in this update request </p></td>
1285812923 </tr>
1285912924
1286012925 <tr>
@@ -13844,11 +13909,10 @@ <h3 id="metalstack.admin.v2.NetworkServiceUpdateRequest">NetworkServiceUpdateReq
1384413909 </tr>
1384513910
1384613911 <tr>
13847- <td>updated_at </td>
13848- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp </a></td>
13912+ <td>update_meta </td>
13913+ <td><a href="#metalstack.api.v2.UpdateMeta">metalstack.api.v2.UpdateMeta </a></td>
1384913914 <td></td>
13850- <td><p>UpdatedAt is the date when this entity was updated
13851- must be part of the update request to ensure optimistic locking </p></td>
13915+ <td><p>UpdateMeta contains the timestamp and strategy to be used in this update request </p></td>
1385213916 </tr>
1385313917
1385413918 <tr>
@@ -14290,11 +14354,10 @@ <h3 id="metalstack.admin.v2.PartitionServiceUpdateRequest">PartitionServiceUpdat
1429014354 </tr>
1429114355
1429214356 <tr>
14293- <td>updated_at </td>
14294- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp </a></td>
14357+ <td>update_meta </td>
14358+ <td><a href="#metalstack.api.v2.UpdateMeta">metalstack.api.v2.UpdateMeta </a></td>
1429514359 <td></td>
14296- <td><p>UpdatedAt is the date when this entity was updated
14297- must be part of the update request to ensure optimistic locking </p></td>
14360+ <td><p>UpdateMeta contains the timestamp and strategy to be used in this update request </p></td>
1429814361 </tr>
1429914362
1430014363 <tr>
@@ -14539,11 +14602,10 @@ <h3 id="metalstack.admin.v2.SizeServiceUpdateRequest">SizeServiceUpdateRequest</
1453914602 </tr>
1454014603
1454114604 <tr>
14542- <td>updated_at </td>
14543- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp </a></td>
14605+ <td>update_meta </td>
14606+ <td><a href="#metalstack.api.v2.UpdateMeta">metalstack.api.v2.UpdateMeta </a></td>
1454414607 <td></td>
14545- <td><p>UpdatedAt is the date when this entity was updated
14546- must be part of the update request to ensure optimistic locking </p></td>
14608+ <td><p>UpdateMeta contains the timestamp and strategy to be used in this update request </p></td>
1454714609 </tr>
1454814610
1454914611 <tr>
@@ -15448,11 +15510,10 @@ <h3 id="metalstack.api.v2.TenantServiceUpdateRequest">TenantServiceUpdateRequest
1544815510 </tr>
1544915511
1545015512 <tr>
15451- <td>updated_at </td>
15452- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp </a></td>
15513+ <td>update_meta </td>
15514+ <td><a href="#metalstack.api.v2.UpdateMeta">UpdateMeta </a></td>
1545315515 <td></td>
15454- <td><p>UpdatedAt is the date when this entity was updated
15455- must be part of the update request to ensure optimistic locking </p></td>
15516+ <td><p>UpdateMeta contains the timestamp and strategy to be used in this update request </p></td>
1545615517 </tr>
1545715518
1545815519 <tr>
@@ -16315,11 +16376,10 @@ <h3 id="metalstack.api.v2.TokenServiceUpdateRequest">TokenServiceUpdateRequest</
1631516376 </tr>
1631616377
1631716378 <tr>
16318- <td>updated_at </td>
16319- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp </a></td>
16379+ <td>update_meta </td>
16380+ <td><a href="#metalstack.api.v2.UpdateMeta">UpdateMeta </a></td>
1632016381 <td></td>
16321- <td><p>UpdatedAt is the date when this entity was updated
16322- must be part of the update request to ensure optimistic locking </p></td>
16382+ <td><p>UpdateMeta contains the timestamp and strategy to be used in this update request </p></td>
1632316383 </tr>
1632416384
1632516385 <tr>
@@ -17940,11 +18000,10 @@ <h3 id="metalstack.api.v2.ProjectServiceUpdateRequest">ProjectServiceUpdateReque
1794018000 </tr>
1794118001
1794218002 <tr>
17943- <td>updated_at </td>
17944- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp </a></td>
18003+ <td>update_meta </td>
18004+ <td><a href="#metalstack.api.v2.UpdateMeta">UpdateMeta </a></td>
1794518005 <td></td>
17946- <td><p>UpdatedAt is the date when this entity was updated
17947- must be part of the update request to ensure optimistic locking </p></td>
18006+ <td><p>UpdateMeta contains the timestamp and strategy to be used in this update request </p></td>
1794818007 </tr>
1794918008
1795018009 <tr>
0 commit comments