From 44cee9700da2282d9fbb21cf78cd9901a3a704cf Mon Sep 17 00:00:00 2001 From: "ssmalpani@g.hmc.edu" Date: Thu, 2 Mar 2023 18:41:40 -0800 Subject: [PATCH 1/4] regex changes --- .../preview/2022-10-01-preview/TrafficController.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2022-10-01-preview/TrafficController.json b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2022-10-01-preview/TrafficController.json index 57d71561454f..6e5beaf9bea0 100644 --- a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2022-10-01-preview/TrafficController.json +++ b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2022-10-01-preview/TrafficController.json @@ -1319,7 +1319,7 @@ "required": true, "description": "Name of Association", "type": "string", - "pattern": "[A-Za-z0-9]*", + "pattern": "[A-Za-z0-9_][A-Za-z0-9-_.]{0,63}", "x-ms-parameter-location": "method" }, "Frontend.frontendName": { @@ -1328,7 +1328,7 @@ "required": true, "description": "Frontends", "type": "string", - "pattern": "[A-Za-z0-9]*", + "pattern": "[A-Za-z0-9_][A-Za-z0-9-_.]{0,63}", "x-ms-parameter-location": "method" }, "TrafficController.trafficControllerName": { @@ -1337,7 +1337,7 @@ "required": true, "description": "traffic controller name for path", "type": "string", - "pattern": "[A-Za-z0-9]*", + "pattern": "[A-Za-z0-9_][A-Za-z0-9-_.]{0,63}", "x-ms-parameter-location": "method" } } From 55c1276720c5c54ee31754c62394b9dd301b4a7f Mon Sep 17 00:00:00 2001 From: "ssmalpani@g.hmc.edu" Date: Thu, 2 Mar 2023 18:49:52 -0800 Subject: [PATCH 2/4] enum errors --- .../cadl/examples/FrontendGet.json | 2 +- .../cadl/examples/FrontendPatch.json | 4 ++-- .../cadl/examples/FrontendPut.json | 6 +++--- .../cadl/examples/FrontendsGet.json | 2 +- .../preview/2022-10-01-preview/TrafficController.json | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendGet.json b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendGet.json index c4365e67b9d7..a5946d440be6 100644 --- a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendGet.json +++ b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendGet.json @@ -14,7 +14,7 @@ "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", "properties": { - "mode": "public", + "mode": "Public", "ipAddressVersion": "IPv4", "publicIPAddress": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIP-fe1" diff --git a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendPatch.json b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendPatch.json index e13bcb656511..6ae2e27b8934 100644 --- a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendPatch.json +++ b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendPatch.json @@ -7,7 +7,7 @@ "frontendName": "fe1", "properties": { "properties": { - "mode": "public", + "mode": "Public", "ipAddressVersion": "IPv4", "publicIPAddress": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIP-fe1" @@ -23,7 +23,7 @@ "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", "properties": { - "mode": "public", + "mode": "Public", "ipAddressVersion": "IPv4", "publicIPAddress": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIP-fe1" diff --git a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendPut.json b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendPut.json index 8dcd1f383ac8..2de57ebad38c 100644 --- a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendPut.json +++ b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendPut.json @@ -8,7 +8,7 @@ "resource": { "location": "NorthCentralUS", "properties": { - "mode": "public", + "mode": "Public", "ipAddressVersion": "IPv4", "publicIPAddress": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIP-fe1" @@ -24,7 +24,7 @@ "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", "properties": { - "mode": "public", + "mode": "Public", "ipAddressVersion": "IPv4", "publicIPAddress": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIP-fe1" @@ -40,7 +40,7 @@ "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", "properties": { - "mode": "public", + "mode": "Public", "ipAddressVersion": "IPv4", "publicIPAddress": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIP-fe1" diff --git a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendsGet.json b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendsGet.json index 500188fe1337..fde1a8f5ec90 100644 --- a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendsGet.json +++ b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendsGet.json @@ -15,7 +15,7 @@ "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", "properties": { - "mode": "public", + "mode": "Public", "ipAddressVersion": "IPv4", "publicIPAddress": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIP-fe1" diff --git a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2022-10-01-preview/TrafficController.json b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2022-10-01-preview/TrafficController.json index 6e5beaf9bea0..c1f019475a73 100644 --- a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2022-10-01-preview/TrafficController.json +++ b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2022-10-01-preview/TrafficController.json @@ -1008,7 +1008,7 @@ "AssociationType": { "type": "string", "enum": [ - "subnets" + "Subnet" ], "x-ms-enum": { "name": "AssociationType", @@ -1102,7 +1102,7 @@ "FrontendMode": { "type": "string", "enum": [ - "public" + "Public" ], "x-ms-enum": { "name": "FrontendMode", From ec744fdc95c2a77c10b3ccd61dfa0bd70ec95d0a Mon Sep 17 00:00:00 2001 From: "ssmalpani@g.hmc.edu" Date: Thu, 2 Mar 2023 19:52:25 -0800 Subject: [PATCH 3/4] reverting enum changes, uupdating cadl, updating regex --- .../cadl/TrafficController.cadl | 16 ++++++++-------- .../2022-10-01-preview/TrafficController.json | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/TrafficController.cadl b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/TrafficController.cadl index 7a88a84719ee..cabeea70a1d4 100644 --- a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/TrafficController.cadl +++ b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/TrafficController.cadl @@ -42,7 +42,7 @@ model FrontendProperties { @doc("Frontend Public IP Address (Optional).") publicIPAddress?: FrontendPropertiesIPAddress; @visibility("read") - @doc("test doc") + @doc("Provisioning State of Traffic Controller Frontend Resource") provisioningState?: ProvisioningState; } @@ -79,7 +79,7 @@ model AssociationProperties { @doc("Association Subnet") subnet?: AssociationSubnet; @visibility("read") - @doc("Provisioning State") + @doc("Provisioning State of Traffic Controller Association Resource") provisioningState?: ProvisioningState; } @@ -120,17 +120,17 @@ model TrafficControllerProperties { provisioningState?: ProvisioningState; } -@knownValues(ProvisioningStateKV) -model ProvisioningState is string; - @lroStatus -enum ProvisioningStateKV { - ...ResourceProvisioningStateKV, +enum ProvisioningState{ Provisioning, Updating, Deleting, Accepted, + Succeeded, + Failed, + Canceled } + @doc("Resource ID definition used by parent to reference child resources.") model ResourceID{ @doc("Resource ID of child resource.") @@ -147,7 +147,7 @@ interface FrontendsInterface extends ResourceInstanceOperations{ +interface TrafficControllerInterface extends ResourceInstanceOperations{ } interface Operations extends Azure.ResourceManager.Operations {} diff --git a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2022-10-01-preview/TrafficController.json b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2022-10-01-preview/TrafficController.json index c1f019475a73..61189d78dc40 100644 --- a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2022-10-01-preview/TrafficController.json +++ b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2022-10-01-preview/TrafficController.json @@ -1008,7 +1008,7 @@ "AssociationType": { "type": "string", "enum": [ - "Subnet" + "subnets" ], "x-ms-enum": { "name": "AssociationType", @@ -1102,7 +1102,7 @@ "FrontendMode": { "type": "string", "enum": [ - "Public" + "public" ], "x-ms-enum": { "name": "FrontendMode", @@ -1319,7 +1319,7 @@ "required": true, "description": "Name of Association", "type": "string", - "pattern": "[A-Za-z0-9_][A-Za-z0-9-_.]{0,63}", + "pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+", "x-ms-parameter-location": "method" }, "Frontend.frontendName": { @@ -1328,7 +1328,7 @@ "required": true, "description": "Frontends", "type": "string", - "pattern": "[A-Za-z0-9_][A-Za-z0-9-_.]{0,63}", + "pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+", "x-ms-parameter-location": "method" }, "TrafficController.trafficControllerName": { @@ -1337,7 +1337,7 @@ "required": true, "description": "traffic controller name for path", "type": "string", - "pattern": "[A-Za-z0-9_][A-Za-z0-9-_.]{0,63}", + "pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+", "x-ms-parameter-location": "method" } } From 4ff04ab2f7c19a83ca1c83d7189238930ca0d1ae Mon Sep 17 00:00:00 2001 From: "ssmalpani@g.hmc.edu" Date: Thu, 2 Mar 2023 20:09:10 -0800 Subject: [PATCH 4/4] reverting example enum changes --- .../cadl/examples/AssociationGet.json | 2 +- .../cadl/examples/AssociationPatch.json | 4 ++-- .../cadl/examples/AssociationPut.json | 6 +++--- .../cadl/examples/AssociationsGet.json | 2 +- .../cadl/examples/FrontendGet.json | 2 +- .../cadl/examples/FrontendPatch.json | 4 ++-- .../cadl/examples/FrontendPut.json | 6 +++--- .../cadl/examples/FrontendsGet.json | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/AssociationGet.json b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/AssociationGet.json index 538e1fc7d730..c80059e638e1 100644 --- a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/AssociationGet.json +++ b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/AssociationGet.json @@ -14,7 +14,7 @@ "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1", "location": "NorthCentralUS", "properties": { - "associationType": "Subnet", + "associationType": "subnets", "subnet": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" }, diff --git a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/AssociationPatch.json b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/AssociationPatch.json index f32188ebd2da..27c9219a467f 100644 --- a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/AssociationPatch.json +++ b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/AssociationPatch.json @@ -7,7 +7,7 @@ "associationName": "as1", "properties": { "properties": { - "associationType": "Subnet", + "associationType": "subnets", "subnet": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" } @@ -22,7 +22,7 @@ "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1", "location": "NorthCentralUS", "properties": { - "associationType": "Subnet", + "associationType": "subnets", "subnet": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" } diff --git a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/AssociationPut.json b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/AssociationPut.json index d04d88e7dbbb..dfb1c9b41413 100644 --- a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/AssociationPut.json +++ b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/AssociationPut.json @@ -8,7 +8,7 @@ "resource": { "location": "NorthCentralUS", "properties": { - "associationType": "Subnet", + "associationType": "subnets", "subnet": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" } @@ -23,7 +23,7 @@ "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1", "location": "NorthCentralUS", "properties": { - "associationType": "Subnet", + "associationType": "subnets", "subnet": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" }, @@ -38,7 +38,7 @@ "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1", "location": "NorthCentralUS", "properties": { - "associationType": "Subnet", + "associationType": "subnets", "subnet": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" } diff --git a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/AssociationsGet.json b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/AssociationsGet.json index 58a95ed9e18a..622ef9da9eca 100644 --- a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/AssociationsGet.json +++ b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/AssociationsGet.json @@ -15,7 +15,7 @@ "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1", "location": "NorthCentralUS", "properties": { - "associationType": "Subnet", + "associationType": "subnets", "subnet": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" }, diff --git a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendGet.json b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendGet.json index a5946d440be6..c4365e67b9d7 100644 --- a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendGet.json +++ b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendGet.json @@ -14,7 +14,7 @@ "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", "properties": { - "mode": "Public", + "mode": "public", "ipAddressVersion": "IPv4", "publicIPAddress": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIP-fe1" diff --git a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendPatch.json b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendPatch.json index 6ae2e27b8934..e13bcb656511 100644 --- a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendPatch.json +++ b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendPatch.json @@ -7,7 +7,7 @@ "frontendName": "fe1", "properties": { "properties": { - "mode": "Public", + "mode": "public", "ipAddressVersion": "IPv4", "publicIPAddress": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIP-fe1" @@ -23,7 +23,7 @@ "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", "properties": { - "mode": "Public", + "mode": "public", "ipAddressVersion": "IPv4", "publicIPAddress": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIP-fe1" diff --git a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendPut.json b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendPut.json index 2de57ebad38c..8dcd1f383ac8 100644 --- a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendPut.json +++ b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendPut.json @@ -8,7 +8,7 @@ "resource": { "location": "NorthCentralUS", "properties": { - "mode": "Public", + "mode": "public", "ipAddressVersion": "IPv4", "publicIPAddress": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIP-fe1" @@ -24,7 +24,7 @@ "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", "properties": { - "mode": "Public", + "mode": "public", "ipAddressVersion": "IPv4", "publicIPAddress": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIP-fe1" @@ -40,7 +40,7 @@ "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", "properties": { - "mode": "Public", + "mode": "public", "ipAddressVersion": "IPv4", "publicIPAddress": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIP-fe1" diff --git a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendsGet.json b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendsGet.json index fde1a8f5ec90..500188fe1337 100644 --- a/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendsGet.json +++ b/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/cadl/examples/FrontendsGet.json @@ -15,7 +15,7 @@ "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", "properties": { - "mode": "Public", + "mode": "public", "ipAddressVersion": "IPv4", "publicIPAddress": { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIP-fe1"