|
| 1 | +--- |
| 2 | +title: How to use Commit Workflow v2 in Azure Operator Nexus |
| 3 | +description: Learn the process for using Commit Workflow v2 in Nexus Network Fabric |
| 4 | +author: sushantjrao |
| 5 | +ms.author: sushrao |
| 6 | +ms.date: 05/26/2025 |
| 7 | +ms.topic: how-to |
| 8 | +ms.service: azure-operator-nexus |
| 9 | +ms.custom: template-how-to, devx-track-azurecli |
| 10 | +--- |
| 11 | + |
| 12 | +# How to use Commit Workflow v2 in Azure Operator Nexus |
| 13 | + |
| 14 | +The **Commit Workflow v2** ensures that device-impacting changes to a Network Fabric instance are explicitly acknowledged and committed before being applied to the underlying infrastructure. This structured workflow increases reliability and control over configuration changes. |
| 15 | + |
| 16 | +## Prerequisites |
| 17 | + |
| 18 | +* **Runtime version**: `5.0.1` or later is required for Commit Workflow v2. |
| 19 | + |
| 20 | +* Your **Network Fabric must be in `Provisioned` state** and **configuration state must be `Succeeded`**. |
| 21 | + |
| 22 | +* The **fabric and all impacted resources must have admin state set to `Enabled`**. |
| 23 | + |
| 24 | +* You must have **BYOS (Bring Your Own Storage)** configured on the fabric to use the optional validation step. |
| 25 | + |
| 26 | +## Commit Workflow v2 overview |
| 27 | + |
| 28 | +Any `patch` operation on parent resources or `Create`/`Update`/`Delete` (CUD) operation on connected child resources now requires an explicit commit step. Changes are **batched** until you lock, validate (optional), and commit them. |
| 29 | + |
| 30 | +### Step 1: Update resources |
| 31 | + |
| 32 | +Make patch or CUD operations via Azure CLI, Portal, or ARM template. |
| 33 | +Once these changes are made, the fabric's configuration state will change to `Accepted (Pending Commit)`. |
| 34 | + |
| 35 | +#### Example scenarios |
| 36 | + |
| 37 | +* Create a new **Route Policy** and attach it to **Internal Network 1** |
| 38 | + |
| 39 | +* Create another **Internal Network 2** |
| 40 | + |
| 41 | +All these changes are **batched**, but **not applied** to devices yet. |
| 42 | + |
| 43 | + |
| 44 | +### Step 2: Lock Configuration (Mandatory) |
| 45 | + |
| 46 | +Lock the configuration to signal that all intended updates are completed. After this lock, **no further updates** can be made to any fabric-related resources until you unlock. |
| 47 | + |
| 48 | +#### Azure CLI Command |
| 49 | + |
| 50 | +```Azure CLI |
| 51 | +az networkfabric fabric lock-fabric \ |
| 52 | + --action Lock \ |
| 53 | + --lock-type Configuration \ |
| 54 | + --network-fabric-name "example-fabric" \ |
| 55 | + --resource-group "example-rg" |
| 56 | +``` |
| 57 | + |
| 58 | +- Successful execution transitions the fabric to a **locked state**. |
| 59 | + |
| 60 | +- Check CLI output for success or failure status. |
| 61 | + |
| 62 | + |
| 63 | +### Step 3: Validate updates (Optional but recommended) |
| 64 | + |
| 65 | +Validate the configuration using the `view-device-configuration` post-action. This step provides insight into the expected configuration outcomes. |
| 66 | + |
| 67 | +> [!Important] |
| 68 | +> BYOS must be configured on the Network Fabric. |
| 69 | +
|
| 70 | +#### Azure CLI Command |
| 71 | + |
| 72 | +```Azure CLI |
| 73 | +
|
| 74 | +az networkfabric fabric view-device-configuration \ |
| 75 | + --network-fabric-name "example-fabric"\ |
| 76 | + --resource-group "example-rg" |
| 77 | +``` |
| 78 | + |
| 79 | +- **Pre-Device Changes**: Current config for all devices (CE, TOR, Management Switches) |
| 80 | + |
| 81 | +- **Post-Device Changes**: Preview of what will be applied after commit |
| 82 | + |
| 83 | +#### Need to Make More Updates? |
| 84 | + |
| 85 | +Unlock the configuration to make further changes, then repeat the lock/validate/commit steps. |
| 86 | + |
| 87 | +#### Unlock Example |
| 88 | + |
| 89 | +```Azure CLI |
| 90 | +az networkfabric fabric lock-fabric \ |
| 91 | + --action Unlock \ |
| 92 | + --lock-type Configuration \ |
| 93 | + --network-fabric-name "example-fabric" \ |
| 94 | + --resource-group "example-rg" |
| 95 | +``` |
| 96 | + |
| 97 | +### Step 4: Commit Configuration (Mandatory) |
| 98 | + |
| 99 | +Commit the configuration to apply the batched changes to all relevant fabric devices. |
| 100 | + |
| 101 | +#### Azure CLI Command |
| 102 | + |
| 103 | +```Azure CLI |
| 104 | +az networkfabric fabric commit-configuration \ |
| 105 | + --resource-group "example-rg" \ |
| 106 | + --resource-name "example-fabric" |
| 107 | +``` |
| 108 | + |
| 109 | +- The operation returns a **status**: `Succeeded`, `InProgress`, or `Failed` |
| 110 | + |
| 111 | +- Use CLI polling or Azure Activity Logs to monitor progress |
| 112 | + |
| 113 | +> [!Important] |
| 114 | +> - This workflow applies **only when the fabric is in Provisioned state** and **admin state is Enabled**. <br> |
| 115 | +> - Locking is mandatory before commit; **commit cannot proceed without locking first**. <br> |
| 116 | +> - **Rollback is not supported** – any incorrect configuration must be updated and re-committed. <br> |
| 117 | +> - Updates outside of this workflow (e.g., to tags or disconnected resources) do **not require commit**. <br> |
| 118 | +
|
0 commit comments