Skip to content

Commit e15d680

Browse files
committed
Fix the non singular parameter of Export-ChildItemProperties and add exception for the cmdlet name
1 parent 76639f4 commit e15d680

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

src/ResourceManager/DataLakeStore/Commands.DataLakeStore/DataPlaneCommands/ExportAzureRmDataLakeStoreChildItemProperties.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class ExportAzureRmDataLakeStoreChildItemProperties : DataLakeStoreFileSy
4040
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false,
4141
HelpMessage =
4242
"Show stats at file level (default is to show directory-level info only)")]
43-
public SwitchParameter IncludeFiles { get; set; }
43+
public SwitchParameter IncludeFile { get; set; }
4444

4545
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false,
4646
HelpMessage = "Maximum depth from the Path specified, to which disk usage or acl is displayed")]
@@ -75,7 +75,7 @@ public class ExportAzureRmDataLakeStoreChildItemProperties : DataLakeStoreFileSy
7575
"For example if all files and folders under /a/b are the same, do not show the subtree" +
7676
"under /a/b, and just output /a/b with 'True' in the Consistent ACL column" +
7777
"Cannot be set if IncludeFiles is not set, because consistent Acl cannot be determined without retrieving acls for the files.")]
78-
public SwitchParameter HideConsistentAcls { get; set; }
78+
public SwitchParameter HideConsistentAcl { get; set; }
7979

8080
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false,
8181
HelpMessage =
@@ -86,7 +86,7 @@ public class ExportAzureRmDataLakeStoreChildItemProperties : DataLakeStoreFileSy
8686
public override void ExecuteCmdlet()
8787
{
8888
DataLakeStoreFileSystemClient.GetFileProperties(Account, Path.TransformedPath, GetAcl, OutputPath,
89-
GetDiskUsage, !SaveToAdl, Concurrency, IncludeFiles, HideConsistentAcls, MaximumDepth);
89+
GetDiskUsage, !SaveToAdl, Concurrency, IncludeFile, HideConsistentAcl, MaximumDepth);
9090
if (PassThru)
9191
{
9292
WriteObject(true);

src/ResourceManager/DataLakeStore/Commands.DataLakeStore/help/Export-AzureRmDataLakeStoreChildItemProperties.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,24 @@ Exports the properties (Disk usage and Acl) for the entire tree from the specifi
1515
### GetDiskUsage
1616
```
1717
Export-AzureRmDataLakeStoreChildItemProperties [-Account] <String> [-Path] <DataLakeStorePathInstance>
18-
[-OutputPath] <String> [-SaveToAdl] [-IncludeFiles] [-MaximumDepth <Int32>] [-Concurrency <Int32>]
18+
[-OutputPath] <String> [-SaveToAdl] [-IncludeFile] [-MaximumDepth <Int32>] [-Concurrency <Int32>]
1919
[-GetDiskUsage] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
2020
[<CommonParameters>]
2121
```
2222

2323
### GetAllProperties
2424
```
2525
Export-AzureRmDataLakeStoreChildItemProperties [-Account] <String> [-Path] <DataLakeStorePathInstance>
26-
[-OutputPath] <String> [-SaveToAdl] [-IncludeFiles] [-MaximumDepth <Int32>] [-Concurrency <Int32>]
27-
[-GetDiskUsage] [-GetAcl] [-HideConsistentAcls] [-PassThru] [-DefaultProfile <IAzureContextContainer>]
26+
[-OutputPath] <String> [-SaveToAdl] [-IncludeFile] [-MaximumDepth <Int32>] [-Concurrency <Int32>]
27+
[-GetDiskUsage] [-GetAcl] [-HideConsistentAcl] [-PassThru] [-DefaultProfile <IAzureContextContainer>]
2828
[-WhatIf] [-Confirm] [<CommonParameters>]
2929
```
3030

3131
### GetAclDump
3232
```
3333
Export-AzureRmDataLakeStoreChildItemProperties [-Account] <String> [-Path] <DataLakeStorePathInstance>
34-
[-OutputPath] <String> [-SaveToAdl] [-IncludeFiles] [-MaximumDepth <Int32>] [-Concurrency <Int32>] [-GetAcl]
35-
[-HideConsistentAcls] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
34+
[-OutputPath] <String> [-SaveToAdl] [-IncludeFile] [-MaximumDepth <Int32>] [-Concurrency <Int32>] [-GetAcl]
35+
[-HideConsistentAcl] [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
3636
[<CommonParameters>]
3737
```
3838

@@ -43,21 +43,21 @@ The **Export-AzureRmDataLakeStoreChildItemProperties** is used to report the ADL
4343

4444
### Example 1: Get the disk usage and ACL usage for all subdirectories and files
4545
```
46-
PS C:\> Export-AzureRmDataLakeStoreChildItemProperties -Account ContosoADL -Path /a -OutputPath "C:\Users\contoso\Desktop\DumpFile.txt" -GetAcl -GetDiskUsage -IncludeFiles
46+
PS C:\> Export-AzureRmDataLakeStoreChildItemProperties -Account ContosoADL -Path /a -OutputPath "C:\Users\contoso\Desktop\DumpFile.txt" -GetAcl -GetDiskUsage -IncludeFile
4747
```
4848

49-
Get the disk usage and ACL usage for all subdirectories and files under /a. IncludeFiles ensures the usage is reported for files also
49+
Get the disk usage and ACL usage for all subdirectories and files under /a. IncludeFile ensures the usage is reported for files also
5050

5151
### Example 2: Get the ACL usage for all subdirectories and files with the consistent ACL hidden
5252
```
5353
PS C:\> $fullAcl="user:c9d53a11-cbd5-4a04-8b7c-0d6e39d7fa35:--x|user::rwx|other::---|group::rwx"
5454
PS C:\> $newFullAcl = $fullAcl.Split("{|}");
5555
PS C:\> Set-AzureRmDataLakeStoreItemAcl -Account rdutta1 -Path /a -Acl $newFullAcl -Recurse -Debug
5656
57-
PS C:\> Export-AzureRmDataLakeStoreChildItemProperties -Account ContosoADL -Path /a -OutputPath "C:\Users\contoso\Desktop\DumpFile.txt" -GetAcl -HideConsistentAcls -IncludeFiles
57+
PS C:\> Export-AzureRmDataLakeStoreChildItemProperties -Account ContosoADL -Path /a -OutputPath "C:\Users\contoso\Desktop\DumpFile.txt" -GetAcl -HideConsistentAcl -IncludeFile
5858
```
5959

60-
Get the ACL usage for all subdirectories and files under /a. IncludeFiles ensures the usage is reported for files also. HideconsistentAcl in this case will show the Acl of /a, not it's children since all of the children has same acl as /a. This flag skips the acl ouput of subtree if all it's acls are same as the root.
60+
Get the ACL usage for all subdirectories and files under /a. IncludeFile ensures the usage is reported for files also. HideconsistentAcl in this case will show the Acl of /a, not it's children since all of the children has same acl as /a. This flag skips the acl ouput of subtree if all it's acls are same as the root.
6161

6262
## PARAMETERS
6363

@@ -137,7 +137,7 @@ Accept pipeline input: True (ByPropertyName)
137137
Accept wildcard characters: False
138138
```
139139
140-
### -HideConsistentAcls
140+
### -HideConsistentAcl
141141
Do not show directory subtree if the ACLs are the same throughout the entire subtree. This makes it easier to see only the paths up to which the ACLs differ.For example if all files and folders under /a/b are the same, do not show the subtreeunder /a/b, and just output /a/b with 'True' in the Consistent ACL columnCannot be set if IncludeFiles is not set, because consistent Acl cannot be determined without retrieving acls for the files.
142142
143143
```yaml
@@ -152,7 +152,7 @@ Accept pipeline input: True (ByPropertyName)
152152
Accept wildcard characters: False
153153
```
154154
155-
### -IncludeFiles
155+
### -IncludeFile
156156
Show stats at file level (default is to show directory-level info only)
157157
158158
```yaml

tools/StaticAnalysis/Exceptions/SignatureIssues.csv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,4 +1093,5 @@
10931093
"Microsoft.Azure.Commands.Aks.dll","Microsoft.Azure.Commands.Aks.RemoveAzureRmAks","Remove-AzureRmAks","1","8400","Remove-AzureRmAks uses the noun 'AzureRmAks', which does not follow the enforced naming convention of using a singular noun for a cmdlet name.","Consider using a singular noun for the cmdlet name."
10941094
"Microsoft.Azure.Commands.Aks.dll","Microsoft.Azure.Commands.Aks.SetAzureRmAks","Set-AzureRmAks","1","8400","Set-AzureRmAks uses the noun 'AzureRmAks', which does not follow the enforced naming convention of using a singular noun for a cmdlet name.","Consider using a singular noun for the cmdlet name."
10951095
"Microsoft.Azure.Commands.Aks.dll","Microsoft.Azure.Commands.Aks.StartAzureRmAksDashboard","Start-AzureRmAksDashboard","1","8100","Start-AzureRmAksDashboard Does not support ShouldProcess but the cmdlet verb Start indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
1096-
"Microsoft.Azure.Commands.Aks.dll","Microsoft.Azure.Commands.Aks.StopAzureRmAksDashboard","Stop-AzureRmAksDashboard","1","8100","Stop-AzureRmAksDashboard Does not support ShouldProcess but the cmdlet verb Stop indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
1096+
"Microsoft.Azure.Commands.Aks.dll","Microsoft.Azure.Commands.Aks.StopAzureRmAksDashboard","Stop-AzureRmAksDashboard","1","8100","Stop-AzureRmAksDashboard Does not support ShouldProcess but the cmdlet verb Stop indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
1097+
"c:\workspace\powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.DataLakeStore\Microsoft.Azure.Commands.DataLakeStore.dll","Microsoft.Azure.Commands.DataLakeStore.ExportAzureRmDataLakeStoreChildItemProperties","Export-AzureRmDataLakeStoreChildItemProperties","1","8400","Export-AzureRmDataLakeStoreChildItemProperties uses the noun 'AzureRmDataLakeStoreChildItemProperties', which does not follow the enforced naming convention of using a singular noun for a cmdlet name.","Consider using a singular noun for the cmdlet name."

0 commit comments

Comments
 (0)