Skip to content

Commit 1552e99

Browse files
azure-pipelines[bot]azure-powershell-botLei jin
authored
Migrate ElasticSan from generation to main (#26130)
* Move ElasticSan to main * Add change log --------- Co-authored-by: azure-powershell-bot <[email protected]> Co-authored-by: Lei jin <[email protected]>
1 parent 789536d commit 1552e99

File tree

127 files changed

+3203
-1626
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+3203
-1626
lines changed

src/ElasticSan/ElasticSan.Autorest/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ For information on how to develop for `Az.ElasticSan`, see [how-to.md](how-to.md
2828
2929
``` yaml
3030
# Please specify the commit id that includes your features to make sure generated codes stable.
31-
commit: 9770615578c920dad8cb6fce33d79c7e112824c0
31+
commit: 72c69a0cf561d41ae99fe6810c426a874d3a8372
3232
require:
3333
- $(this-folder)/../../readme.azure.noprofile.md
3434
input-file:
35-
- $(repo)/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2023-01-01/elasticsan.json
35+
- $(repo)/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/elasticsan.json
3636

3737
# Normally, title is the service name
3838
title: ElasticSan
@@ -143,7 +143,7 @@ directive:
143143
subject: ^VolumeGroup$
144144
hide: true
145145
- where:
146-
verb: New
146+
verb: ^New$|^Update$
147147
subject: Volume
148148
parameter-name: ManagedByResourceId
149149
hide: true

src/ElasticSan/ElasticSan.Autorest/UX/Microsoft.ElasticSan/elasticSans-volumegroups-snapshots.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "elasticSans/volumegroups/snapshots",
3-
"apiVersion": "2023-01-01",
3+
"apiVersion": "2024-05-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.elasticsan"
66
},

src/ElasticSan/ElasticSan.Autorest/UX/Microsoft.ElasticSan/elasticSans-volumegroups-volumes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "elasticSans/volumegroups/volumes",
3-
"apiVersion": "2023-01-01",
3+
"apiVersion": "2024-05-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.elasticsan"
66
},

src/ElasticSan/ElasticSan.Autorest/UX/Microsoft.ElasticSan/elasticSans-volumegroups.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "elasticSans/volumegroups",
3-
"apiVersion": "2023-01-01",
3+
"apiVersion": "2024-05-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.elasticsan"
66
},

src/ElasticSan/ElasticSan.Autorest/UX/Microsoft.ElasticSan/elasticSans.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "elasticSans",
3-
"apiVersion": "2023-01-01",
3+
"apiVersion": "2024-05-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.elasticsan"
66
},

src/ElasticSan/ElasticSan.Autorest/custom/New-AzElasticSanVolumeGroup.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ function New-AzElasticSanVolumeGroup {
111111
[System.String]
112112
# Type of encryption
113113
${Encryption},
114+
115+
[Parameter()]
116+
[Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Body')]
117+
[System.Boolean]
118+
# A boolean indicating whether or not Data Integrity Check is enabled
119+
${EnforceDataIntegrityCheckForIscsi},
114120

115121
[Parameter()]
116122
[Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Body')]
@@ -234,6 +240,10 @@ function New-AzElasticSanVolumeGroup {
234240
$null = $PSBoundParameters.Remove('IdentityUserAssignedIdentityId')
235241
}
236242

243+
if (($PSBoundParameters.ContainsKey("EnforceDataIntegrityCheckForIscsi") -eq $false) -or ($PSBoundParameters.EnforceDataIntegrityCheckForIscsi -eq $true)) {
244+
Write-Warning "This needs CRC32C to be set on header and data digests on the client for all the connections from the client to the volumes in this volume group. You can do this by connecting to the volumes from the client using multi-session scripts generated in portal connect flow or from documentation, which contain steps to set CRC32C on header and data digests. Do not enable CRC protection on the volume group if you are using Fedora or its downstream Linux distributions such as RHEL, CentOS etc. as data digests are not supported on them. If you enable this flag for those distributions, connectivity to the volumes will fail. Refer to https://learn.microsoft.com/en-us/azure/storage/elastic-san/elastic-san-create?tabs=azure-portal for more information."
245+
}
246+
237247
Az.ElasticSan.internal\New-AzElasticSanVolumeGroup @PSBoundParameters
238248
}
239249
}

src/ElasticSan/ElasticSan.Autorest/custom/Update-AzElasticSanVolumeGroup.ps1

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ function Update-AzElasticSanVolumeGroup {
104104
# Identity Parameter
105105
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
106106
${InputObject},
107+
108+
[Parameter()]
109+
[Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Body')]
110+
[System.Boolean]
111+
# A boolean indicating whether or not Data Integrity Check is enabled
112+
${EnforceDataIntegrityCheckForIscsi},
107113

108114
[Parameter()]
109115
[Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.PSArgumentCompleterAttribute("EncryptionAtRestWithPlatformKey", "EncryptionAtRestWithCustomerManagedKey")]
@@ -246,7 +252,7 @@ function Update-AzElasticSanVolumeGroup {
246252
break
247253
}
248254
Default {
249-
$volumeGroupProperties = AZ.ElasticSan\Get-AzElasticSanVolumeGroup -Nam $Name -ResourceGroupName $ResourceGroupName -ElasticSanName $ElasticSanName
255+
$volumeGroupProperties = AZ.ElasticSan\Get-AzElasticSanVolumeGroup -Name $Name -ResourceGroupName $ResourceGroupName -ElasticSanName $ElasticSanName
250256
break
251257
}
252258
}
@@ -261,6 +267,10 @@ function Update-AzElasticSanVolumeGroup {
261267
}
262268
$null = $PSBoundParameters.Remove('IdentityUserAssignedIdentityId')
263269
}
270+
271+
if ($PSBoundParameters.ContainsKey("EnforceDataIntegrityCheckForIscsi") -and ($PSBoundParameters.EnforceDataIntegrityCheckForIscsi -eq $true)) {
272+
Write-Warning "This needs CRC32C to be set on header and data digests on the client for all the connections from the client to the volumes in this volume group. You can do this by disconnecting the volumes from the client and reconnecting using multi-session scripts generated in portal connect flow or from documentation, which contain steps to set CRC32C on header and data digests. Do not enable CRC protection on the volume group if you are using Fedora or its downstream Linux distributions such as RHEL, CentOS etc. as data digests are not supported on them. If you enable this flag for those distributions, connectivity to the volumes will fail. Refer to https://learn.microsoft.com/en-us/azure/storage/elastic-san/elastic-san-create?tabs=azure-portal for more information."
273+
}
264274
Az.ElasticSan.internal\Update-AzElasticSanVolumeGroup @PSBoundParameters
265275
}
266276
}

src/ElasticSan/ElasticSan.Autorest/examples/New-AzElasticSanVolumeGroup.md

Lines changed: 70 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,20 @@ New-AzElasticSanVolumeGroup -ResourceGroupName myresourcegroup -ElasticSanName m
77
```
88

99
```output
10-
Encryption : EncryptionAtRestWithPlatformKey
11-
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.ElasticSan/elasticSans/myelasticsan/volumegroups/myvolumegroup
12-
Name : myvolumegroup
13-
NetworkAclsVirtualNetworkRule : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/subnet1, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/subnet2}
14-
ProtocolType : iSCSI
15-
ProvisioningState : Succeeded
16-
SystemDataCreatedAt : 9/19/2022 7:05:47 AM
17-
SystemDataCreatedBy : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
18-
SystemDataCreatedByType : Application
19-
SystemDataLastModifiedAt : 9/19/2022 7:05:47 AM
20-
SystemDataLastModifiedBy : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
21-
SystemDataLastModifiedByType : Application
22-
Type : Microsoft.ElasticSan/ElasticSans
10+
Encryption : EncryptionAtRestWithPlatformKey
11+
EnforceDataIntegrityCheckForIscsi : True
12+
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.ElasticSan/elasticSans/myelasticsan/volumegroups/myvolumegroup
13+
Name : myvolumegroup
14+
NetworkAclsVirtualNetworkRule : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/subnet1, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/subnet2}
15+
ProtocolType : iSCSI
16+
ProvisioningState : Succeeded
17+
SystemDataCreatedAt : 9/19/2022 7:05:47 AM
18+
SystemDataCreatedBy : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
19+
SystemDataCreatedByType : Application
20+
SystemDataLastModifiedAt : 9/19/2022 7:05:47 AM
21+
SystemDataLastModifiedBy : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
22+
SystemDataLastModifiedByType : Application
23+
Type : Microsoft.ElasticSan/ElasticSans
2324
```
2425

2526
This example creates two VirtualNetworkRule objects and then input the objects and other variables to create a volume group.
@@ -35,19 +36,20 @@ New-AzElasticSanVolumeGroup -ResourceGroupName myresourcegroup -ElasticSanName m
3536
```
3637

3738
```output
38-
Encryption : EncryptionAtRestWithPlatformKey
39-
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.ElasticSan/elasticSans/myelasticsan/volumegroups/myvolumegroup
40-
Name : myvolumegroup
39+
Encryption : EncryptionAtRestWithPlatformKey
40+
EnforceDataIntegrityCheckForIscsi : True
41+
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.ElasticSan/elasticSans/myelasticsan/volumegroups/myvolumegroup
42+
Name : myvolumegroup
4143
NetworkAclsVirtualNetworkRule : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/subnet1, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/subnet2}
42-
ProtocolType : iSCSI
43-
ProvisioningState : Succeeded
44-
SystemDataCreatedAt : 9/19/2022 7:05:47 AM
45-
SystemDataCreatedBy : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
46-
SystemDataCreatedByType : Application
47-
SystemDataLastModifiedAt : 9/19/2022 7:05:47 AM
48-
SystemDataLastModifiedBy : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
49-
SystemDataLastModifiedByType : Application
50-
Type : Microsoft.ElasticSan/ElasticSans
44+
ProtocolType : iSCSI
45+
ProvisioningState : Succeeded
46+
SystemDataCreatedAt : 9/19/2022 7:05:47 AM
47+
SystemDataCreatedBy : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
48+
SystemDataCreatedByType : Application
49+
SystemDataLastModifiedAt : 9/19/2022 7:05:47 AM
50+
SystemDataLastModifiedBy : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
51+
SystemDataLastModifiedByType : Application
52+
Type : Microsoft.ElasticSan/ElasticSans
5153
```
5254

5355
This command creates a volume group with the NetworkAclsVirtualNetworkRule input in json format.
@@ -60,6 +62,7 @@ New-AzElasticSanVolumeGroup -ResourceGroupName myresourcegroup -ElasticSanName m
6062
```output
6163
Encryption : EncryptionAtRestWithPlatformKey
6264
EncryptionIdentityEncryptionUserAssignedIdentity :
65+
EnforceDataIntegrityCheckForIscsi : True
6366
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.ElasticSan/elasticSans/myelasticsan/volumeGroups/myvolumegroup
6467
IdentityPrincipalId : 00000000-0000-0000-0000-000000000000
6568
IdentityTenantId : 00000000-0000-0000-0000-000000000000
@@ -99,6 +102,7 @@ New-AzElasticSanVolumeGroup -ResourceGroupName myresoucegroup -ElasticSanName my
99102
```output
100103
Encryption : EncryptionAtRestWithCustomerManagedKey
101104
EncryptionIdentityEncryptionUserAssignedIdentity : /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myuai
105+
EnforceDataIntegrityCheckForIscsi : True
102106
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.ElasticSan/elasticSans/myelasticsan/volumeGroups/myvolumegroup
103107
IdentityPrincipalId :
104108
IdentityTenantId :
@@ -120,12 +124,50 @@ ProtocolType : iSCSI
120124
ProvisioningState : Succeeded
121125
ResourceGroupName : myresourcegroup
122126
SystemDataCreatedAt : 10/7/2023 6:32:27 AM
123-
SystemDataCreatedBy : a000255f-5f09-45e0-a970-9d9ed9cc6453
127+
SystemDataCreatedBy : 00000000-0000-0000-0000-000000000000
124128
SystemDataCreatedByType : Application
125129
SystemDataLastModifiedAt : 10/7/2023 6:32:27 AM
126-
SystemDataLastModifiedBy : a000255f-5f09-45e0-a970-9d9ed9cc6453
130+
SystemDataLastModifiedBy : 00000000-0000-0000-0000-000000000000
127131
SystemDataLastModifiedByType : Application
128132
Type : Microsoft.ElasticSan/elasticSans/volumeGroups
129133
```
130134

131-
This command creates a volume group with identity type "SystemAssigned" and encryption type "platform-managed key".
135+
This command creates a volume group with identity type "SystemAssigned" and encryption type "platform-managed key".
136+
137+
### Example 5: Create a volume group with EnforceDataIntegrityCheckForIscsi disabled
138+
```powershell
139+
New-AzElasticSanVolumeGroup -ResourceGroupName myresoucegroup -ElasticSanName myelasticsan -Name myvolumegroup -EnforceDataIntegrityCheckForIscsi $false
140+
```
141+
142+
```output
143+
Encryption : EncryptionAtRestWithPlatformKey
144+
EncryptionIdentityEncryptionUserAssignedIdentity :
145+
EnforceDataIntegrityCheckForIscsi : False
146+
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.ElasticSan/elasticSans/myelasticsan/volumeGroups/myvolumegroup
147+
IdentityPrincipalId :
148+
IdentityTenantId :
149+
IdentityType :
150+
IdentityUserAssignedIdentity : {
151+
}
152+
KeyVaultPropertyCurrentVersionedKeyExpirationTimestamp :
153+
KeyVaultPropertyCurrentVersionedKeyIdentifier :
154+
KeyVaultPropertyKeyName :
155+
KeyVaultPropertyKeyVaultUri :
156+
KeyVaultPropertyKeyVersion :
157+
KeyVaultPropertyLastKeyRotationTimestamp :
158+
Name : myvolumegroup
159+
NetworkAclsVirtualNetworkRule :
160+
PrivateEndpointConnection :
161+
ProtocolType : iSCSI
162+
ProvisioningState : Succeeded
163+
ResourceGroupName : myresourcegroup
164+
SystemDataCreatedAt : 9/18/2024 3:45:01 AM
165+
SystemDataCreatedBy : 00000000-0000-0000-0000-000000000000
166+
SystemDataCreatedByType : User
167+
SystemDataLastModifiedAt : 9/18/2024 4:58:14 AM
168+
SystemDataLastModifiedBy : 00000000-0000-0000-0000-000000000000
169+
SystemDataLastModifiedByType : User
170+
Type : Microsoft.ElasticSan/elasticSans/volumeGroups
171+
```
172+
173+
This command creates a volume group with EnforceDataIntegrityCheckForIscsi disabled.

0 commit comments

Comments
 (0)