Skip to content

Commit

Permalink
Add rename directive to duplicate device management cmdlets.
Browse files Browse the repository at this point in the history
  • Loading branch information
peombwa committed Feb 19, 2021
1 parent 3152767 commit 8d5f801
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/DeviceManagement.Actions/DeviceManagement.Actions/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ directive:
# Remove invalid paths that exceed Windows file name limit.
- remove-path-by-operation: ^deviceManagement.(deviceShellScripts.userRunStates.deviceRunStates.managedDevice_.*|windowsAutopilotDeploymentProfiles.(assignedDevices_updateDeviceProperties|assignedDevices.deploymentProfile_assign|assignedDevices.intendedDeploymentProfile_assign|assignedDevices_assignResourceAccountToDevice|assignedDevices_unassignResourceAccountFromDevice)|deviceComplianceScripts.deviceRunStates.managedDevice_.*|deviceCustomAttributeShellScripts.(deviceRunStates.managedDevice_.*|userRunStates.deviceRunStates.managedDevice_.*)|deviceManagementScripts.deviceRunStates.managedDevice(_updateWindowsDeviceAccount|_logoutSharedAppleDeviceActiveUser|_deleteUserFromSharedAppleDevice|_createDeviceLogCollectionRequest|_sendCustomNotificationToCompanyPortal|_triggerConfigurationManagerAction|_windowsDefenderUpdateSignatures)|deviceManagementScripts.userRunStates.deviceRunStates.managedDevice_.*|deviceConfigurations.groupAssignments.deviceConfiguration(_assignedAccessMultiModeProfiles|_windowsPrivacyAccessControls)|deviceHealthScripts.deviceRunStates.managedDevice(_sendCustomNotificationToCompanyPortal|_createDeviceLogCollectionRequest)|deviceShellScripts.deviceRunStates.managedDevice_sendCustomNotificationToCompanyPortal)$

# Remove cmdlets.
- where:
verb: New
subject: ^DeviceManagementComanagedDeviceLogCollectionRequest$
remove: true
- where:
verb: Update
subject: ^DeviceManagementComanagedDevice.*
remove: true

# Rename cmdlets.
- where:
verb: Get
Expand All @@ -56,6 +66,22 @@ directive:
set:
verb: Invoke
subject: $1WindowsPrivacyAccessControl
- where:
verb: Update
subject: ^(DeviceManagementGroupPolicyConfiguration)(DefinitionValue)$
set:
subject: $1Multiple$2
- where:
verb: Update
subject: ^(DeviceManagementIntent)(Setting)$
set:
subject: $1Multiple$2
- where:
verb: Update
subject: ^(DeviceManagementManagedDevice)$
set:
verb: New
subject: $1WindowsDefenderUpdateSignature
```
### Versioning
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,24 @@ require:
title: $(service-name)
subject-prefix: ''
```
### Directives
> see https://github.com/Azure/autorest/blob/master/docs/powershell/directives.md
``` yaml
directive:
# Remove cmdlets.
- where:
verb: New
subject: ^DeviceManagementGroupPolicyMigrationReport$
remove: true
- where:
verb: Remove
subject: ^DeviceManagementGroupPolicyUploadedDefinitionFile$
remove: true
```
### Versioning
``` yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,30 @@ require:
title: $(service-name)
subject-prefix: ''
```
### Directives
> see https://github.com/Azure/autorest/blob/master/docs/powershell/directives.md
``` yaml
directive:
# Rename cmdlets.
- where:
subject: ^(DeviceManagement(Condition|ConditionStatementManagementCondition|ConditionStatementManagementConditionStatement))$
set:
subject: $1ForPlatform
- where:
subject: ^(DeviceManagementRoleScopeTag)$
variant: ^Get$
set:
subject: $1ById
- where:
subject: ^(DeviceManagementRoleScopeTag)$
variant: ^Get1$|^GetViaIdentity$
set:
subject: $1ByResource
```
### Versioning
``` yaml
Expand Down
10 changes: 10 additions & 0 deletions src/DeviceManagement/DeviceManagement/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ directive:
# Remove invalid paths.
- remove-path-by-operation: ^deviceManagement.(deviceManagementScripts.userRunStates.deviceRunStates_SetRefManagedDevice|groupPolicyConfigurations.definitionValues.presentationValues_SetRefDefinitionValue|groupPolicyConfigurations.definitionValues.presentationValues_SetRefPresentation|deviceShellScripts.userRunStates.deviceRunStates_SetRefManagedDevice)$

# Remove cmdlets.
- where:
verb: New
subject: subject: ^DeviceManagement(Managed|Comanaged)DeviceLogCollectionRequest$
remove: true
- where:
verb: Update
subject: subject: ^DeviceManagementComanagedDevice$
remove: true

# Rename cmdlets.
- where:
subject: ^(DeviceManagementUserExperienceAnalyticAppHealthApplicationPerformance)$
Expand Down

0 comments on commit 8d5f801

Please sign in to comment.