From d18cecd189cfe5dfa4214ef6d06a36fe12093b5e Mon Sep 17 00:00:00 2001 From: azure-powershell-bot <65331932+azure-powershell-bot@users.noreply.github.com> Date: Mon, 6 Feb 2023 07:47:27 +0000 Subject: [PATCH] Move DataMigration to main --- .../DataMigration.Autorest/Az.DataMigration.psm1 | 2 +- .../custom/Cmdlets/New-AzDataMigrationLoginsMigration.ps1 | 2 +- src/DataMigration/DataMigration.Autorest/custom/readme.md | 2 +- src/DataMigration/DataMigration.Autorest/docs/readme.md | 2 +- .../DataMigration.Autorest/exports/README.md | 2 +- .../DataMigration.Autorest/generate-info.json | 8 ++++---- src/DataMigration/DataMigration.Autorest/how-to.md | 2 +- .../DataMigration.Autorest/internal/README.md | 2 +- src/DataMigration/DataMigration/Az.DataMigration.psd1 | 7 ++++--- 9 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/DataMigration/DataMigration.Autorest/Az.DataMigration.psm1 b/src/DataMigration/DataMigration.Autorest/Az.DataMigration.psm1 index 51ef8aa2163d..f51fed41ca61 100644 --- a/src/DataMigration/DataMigration.Autorest/Az.DataMigration.psm1 +++ b/src/DataMigration/DataMigration.Autorest/Az.DataMigration.psm1 @@ -33,7 +33,7 @@ } if(-not $accountsModule) { - Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://learn.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://docs.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop } elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) { Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop } diff --git a/src/DataMigration/DataMigration.Autorest/custom/Cmdlets/New-AzDataMigrationLoginsMigration.ps1 b/src/DataMigration/DataMigration.Autorest/custom/Cmdlets/New-AzDataMigrationLoginsMigration.ps1 index 3e38be1795c9..e9173e3af252 100644 --- a/src/DataMigration/DataMigration.Autorest/custom/Cmdlets/New-AzDataMigrationLoginsMigration.ps1 +++ b/src/DataMigration/DataMigration.Autorest/custom/Cmdlets/New-AzDataMigrationLoginsMigration.ps1 @@ -94,7 +94,7 @@ function New-AzDataMigrationLoginsMigration #Downloading and extracting LoginsMigration Zip file if(-Not $TestExePath) { - $ZipSource = "https://sqlloginmigration.blob.core.windows.net/app/LoginsMigration.zip"; + $ZipSource = "https://sqlassess.blob.core.windows.net/app/LoginsMigration.zip"; $ZipDestination = Join-Path -Path $BaseFolder -ChildPath "LoginsMigration.zip"; Invoke-RestMethod -Uri $ZipSource -OutFile $ZipDestination; diff --git a/src/DataMigration/DataMigration.Autorest/custom/readme.md b/src/DataMigration/DataMigration.Autorest/custom/readme.md index 9a95574c9dc9..0c59b6988bd9 100644 --- a/src/DataMigration/DataMigration.Autorest/custom/readme.md +++ b/src/DataMigration/DataMigration.Autorest/custom/readme.md @@ -32,7 +32,7 @@ These provide functionality to our HTTP pipeline and other useful features. In s ### Attributes For processing the cmdlets, we've created some additional attributes: - `Microsoft.Azure.PowerShell.Cmdlets.DataMigration.DescriptionAttribute` - - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts. + - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts. - `Microsoft.Azure.PowerShell.Cmdlets.DataMigration.DoNotExportAttribute` - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.DataMigration`. - `Microsoft.Azure.PowerShell.Cmdlets.DataMigration.InternalExportAttribute` diff --git a/src/DataMigration/DataMigration.Autorest/docs/readme.md b/src/DataMigration/DataMigration.Autorest/docs/readme.md index 93e69d58940b..6b3a68ca7b81 100644 --- a/src/DataMigration/DataMigration.Autorest/docs/readme.md +++ b/src/DataMigration/DataMigration.Autorest/docs/readme.md @@ -8,4 +8,4 @@ This directory contains the documentation of the cmdlets for the `Az.DataMigrati - Packaged: yes ## Details -The process of documentation generation loads `Az.DataMigration` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file +The process of documentation generation loads `Az.DataMigration` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file diff --git a/src/DataMigration/DataMigration.Autorest/exports/README.md b/src/DataMigration/DataMigration.Autorest/exports/README.md index 8a8dc69fd5e4..c1ceef6cb48f 100644 --- a/src/DataMigration/DataMigration.Autorest/exports/README.md +++ b/src/DataMigration/DataMigration.Autorest/exports/README.md @@ -1,5 +1,5 @@ # Exports -This directory contains the cmdlets *exported by* `Az.DataMigration`. No other cmdlets in this repository are directly exported. What that means is the `Az.DataMigration` module will run [Export-ModuleMember](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/export-modulemember) on the cmldets in this directory. The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation. +This directory contains the cmdlets *exported by* `Az.DataMigration`. No other cmdlets in this repository are directly exported. What that means is the `Az.DataMigration` module will run [Export-ModuleMember](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/export-modulemember) on the cmldets in this directory. The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation. ## Info - Modifiable: no diff --git a/src/DataMigration/DataMigration.Autorest/generate-info.json b/src/DataMigration/DataMigration.Autorest/generate-info.json index 86c11a76f576..5ff94a8a3997 100644 --- a/src/DataMigration/DataMigration.Autorest/generate-info.json +++ b/src/DataMigration/DataMigration.Autorest/generate-info.json @@ -1,8 +1,8 @@ { + "autorest_powershell": "3.0.498", + "autorest": "`-- (empty)", "autorest_modelerfour": "4.15.414", - "swagger_commit": "34ba022add0034e30462b76e1548ce5a7e053e33", - "autorest_core": "3.9.2", "node": "v14.15.5", - "autorest": "`-- (empty)", - "autorest_powershell": "3.0.494" + "swagger_commit": "e217fd77475710b4a48542f433e3b9782f26f229", + "autorest_core": "3.9.4" } diff --git a/src/DataMigration/DataMigration.Autorest/how-to.md b/src/DataMigration/DataMigration.Autorest/how-to.md index b53bd91e314f..3dc1a7a13cbd 100644 --- a/src/DataMigration/DataMigration.Autorest/how-to.md +++ b/src/DataMigration/DataMigration.Autorest/how-to.md @@ -14,7 +14,7 @@ To generate documentation, the process is now integrated into the `build-module. To test the cmdlets, we use [Pester](https://github.com/pester/Pester). Tests scripts (`.ps1`) should be added to the `test` folder. To execute the Pester tests, run the `test-module.ps1` script. This will run all tests in `playback` mode within the `test` folder. To read more about testing cmdlets, look at the [README.md](examples/README.md) in the `examples` folder. ## Packing `Az.DataMigration` -To pack `Az.DataMigration` for distribution, run the `pack-module.ps1` script. This will take the contents of multiple directories and certain root-folder files to create a `.nupkg`. The structure of the `.nupkg` is created so it can be loaded part of a [PSRepository](https://learn.microsoft.com/powershell/module/powershellget/register-psrepository). Additionally, this package is in a format for distribution to the [PSGallery](https://www.powershellgallery.com/). For signing an Azure module, please contact the [Azure PowerShell](https://github.com/Azure/azure-powershell) team. +To pack `Az.DataMigration` for distribution, run the `pack-module.ps1` script. This will take the contents of multiple directories and certain root-folder files to create a `.nupkg`. The structure of the `.nupkg` is created so it can be loaded part of a [PSRepository](https://docs.microsoft.com/powershell/module/powershellget/register-psrepository). Additionally, this package is in a format for distribution to the [PSGallery](https://www.powershellgallery.com/). For signing an Azure module, please contact the [Azure PowerShell](https://github.com/Azure/azure-powershell) team. ## Module Script Details There are multiple scripts created for performing different actions for developing `Az.DataMigration`. diff --git a/src/DataMigration/DataMigration.Autorest/internal/README.md b/src/DataMigration/DataMigration.Autorest/internal/README.md index 0d1bd99973ce..a4f1d0f7f0a5 100644 --- a/src/DataMigration/DataMigration.Autorest/internal/README.md +++ b/src/DataMigration/DataMigration.Autorest/internal/README.md @@ -8,7 +8,7 @@ This directory contains a module to handle *internal only* cmdlets. Cmdlets that - Packaged: yes ## Details -The `Az.DataMigration.internal.psm1` file is generated to this folder. This module file handles the hidden cmdlets. These cmdlets will not be exported by `Az.DataMigration`. Instead, this sub-module is imported by the `..\custom\Az.DataMigration.custom.psm1` module, allowing you to use hidden cmdlets in your custom, exposed cmdlets. To call these cmdlets in your custom scripts, simply use [module-qualified calls](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_command_precedence?view=powershell-6#qualified-names). For example, `Az.DataMigration.internal\Get-Example` would call an internal cmdlet named `Get-Example`. +The `Az.DataMigration.internal.psm1` file is generated to this folder. This module file handles the hidden cmdlets. These cmdlets will not be exported by `Az.DataMigration`. Instead, this sub-module is imported by the `..\custom\Az.DataMigration.custom.psm1` module, allowing you to use hidden cmdlets in your custom, exposed cmdlets. To call these cmdlets in your custom scripts, simply use [module-qualified calls](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_command_precedence?view=powershell-6#qualified-names). For example, `Az.DataMigration.internal\Get-Example` would call an internal cmdlet named `Get-Example`. ## Purpose This allows you to include REST specifications for services that you *do not wish to expose from your module*, but simply want to call within custom cmdlets. For example, if you want to make a custom cmdlet that uses `Storage` services, you could include a simplified `Storage` REST specification that has only the operations you need. When you run the generator and build this module, note the generated `Storage` cmdlets. Then, in your readme configuration, use [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) on the `Storage` cmdlets and they will *only be exposed to the custom cmdlets* you want to write, and not be exported as part of `Az.DataMigration`. diff --git a/src/DataMigration/DataMigration/Az.DataMigration.psd1 b/src/DataMigration/DataMigration/Az.DataMigration.psd1 index c6d68949b7b1..75f7b1881643 100644 --- a/src/DataMigration/DataMigration/Az.DataMigration.psd1 +++ b/src/DataMigration/DataMigration/Az.DataMigration.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 10/10/2022 +# Generated on: 2/6/2023 # @{ @@ -142,7 +142,8 @@ PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','Sql','Database','Data','Migration','Service' + Tags = 'Azure', 'ResourceManager', 'ARM', 'Sql', 'Database', 'Data', 'Migration', + 'Service' # A URL to the license for this module. LicenseUri = 'https://aka.ms/azps-license' @@ -168,7 +169,7 @@ PrivateData = @{ } # End of PSData hashtable - } # End of PrivateData hashtable +} # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = ''