Skip to content

Commit da85565

Browse files
Migrate DataMigration from generation to main (#22383)
* Move DataMigration to main * Update ChangeLog.md --------- Co-authored-by: NanxiangLiu <[email protected]>
1 parent 19c7685 commit da85565

File tree

8 files changed

+52
-63
lines changed

8 files changed

+52
-63
lines changed

src/DataMigration/DataMigration.Autorest/Az.DataMigration.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.DataMigration.private.dll'
1313
FormatsToProcess = './Az.DataMigration.format.ps1xml'
14-
FunctionsToExport = 'Get-AzDataMigrationAssessment', 'Get-AzDataMigrationPerformanceDataCollection', 'Get-AzDataMigrationSkuRecommendation', 'Get-AzDataMigrationSqlService', 'Get-AzDataMigrationSqlServiceAuthKey', 'Get-AzDataMigrationSqlServiceIntegrationRuntimeMetric', 'Get-AzDataMigrationSqlServiceMigration', 'Get-AzDataMigrationToSqlDb', 'Get-AzDataMigrationToSqlManagedInstance', 'Get-AzDataMigrationToSqlVM', 'Invoke-AzDataMigrationCutoverToSqlManagedInstance', 'Invoke-AzDataMigrationCutoverToSqlVM', 'New-AzDataMigrationLoginsMigration', 'New-AzDataMigrationSqlServerSchema', 'New-AzDataMigrationSqlService', 'New-AzDataMigrationSqlServiceAuthKey', 'New-AzDataMigrationTdeCertificateMigration', 'New-AzDataMigrationToSqlDb', 'New-AzDataMigrationToSqlManagedInstance', 'New-AzDataMigrationToSqlVM', 'Register-AzDataMigrationIntegrationRuntime', 'Remove-AzDataMigrationSqlService', 'Remove-AzDataMigrationSqlServiceNode', 'Remove-AzDataMigrationToSqlDb', 'Stop-AzDataMigrationToSqlDb', 'Stop-AzDataMigrationToSqlManagedInstance', 'Stop-AzDataMigrationToSqlVM', 'Update-AzDataMigrationSqlService'
14+
FunctionsToExport = 'Get-AzDataMigrationAssessment', 'Get-AzDataMigrationPerformanceDataCollection', 'Get-AzDataMigrationSkuRecommendation', 'Get-AzDataMigrationSqlService', 'Get-AzDataMigrationSqlServiceAuthKey', 'Get-AzDataMigrationSqlServiceIntegrationRuntimeMetric', 'Get-AzDataMigrationSqlServiceMigration', 'Get-AzDataMigrationToSqlDb', 'Get-AzDataMigrationToSqlManagedInstance', 'Get-AzDataMigrationToSqlVM', 'Invoke-AzDataMigrationCutoverToSqlManagedInstance', 'Invoke-AzDataMigrationCutoverToSqlVM', 'New-AzDataMigrationLoginsMigration', 'New-AzDataMigrationSqlServerSchema', 'New-AzDataMigrationSqlService', 'New-AzDataMigrationSqlServiceAuthKey', 'New-AzDataMigrationTdeCertificateMigration', 'New-AzDataMigrationToSqlDb', 'New-AzDataMigrationToSqlManagedInstance', 'New-AzDataMigrationToSqlVM', 'Register-AzDataMigrationIntegrationRuntime', 'Remove-AzDataMigrationSqlService', 'Remove-AzDataMigrationSqlServiceNode', 'Remove-AzDataMigrationToSqlDb', 'Stop-AzDataMigrationToSqlDb', 'Stop-AzDataMigrationToSqlManagedInstance', 'Stop-AzDataMigrationToSqlVM', 'Update-AzDataMigrationSqlService', '*'
1515
AliasesToExport = '*'
1616
PrivateData = @{
1717
PSData = @{

src/DataMigration/DataMigration.Autorest/custom/Cmdlets/New-AzDataMigrationTdeCertificateMigration.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ function New-AzDataMigrationTdeCertificateMigration
208208
"--networkShareDomain", $NetworkShareDomain
209209
"--networkShareUserName", $NetworkShareUserName
210210
"--networkSharePassword", $NetworkSharePasswordParam
211+
"--clientType", "PS"
211212
"--databaseName"
212213
)
213214

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2+
"swagger_commit": "94144aca9314644e6883adf6c8147cb1d32d9a2d",
23
"autorest_modelerfour": "4.15.414",
3-
"autorest_powershell": "3.0.504",
4-
"node": "v14.15.5",
5-
"swagger_commit": "483cdd30332340a14e3d09eafdc1a18f3ba4324c",
64
"autorest_core": "3.9.6",
5+
"node": "v14.15.5",
6+
"autorest_powershell": "3.0.505",
77
"autorest": "`-- (empty)"
88
}

src/DataMigration/DataMigration.Autorest/generated/runtime/MessageAttribute.cs

Lines changed: 23 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class GenericBreakingChangeAttribute : Attribute
2121

2222
//The version the change is effective from, non mandatory
2323
public string DeprecateByVersion { get; }
24-
public bool DeprecateByVersionSet { get; } = false;
24+
public string DeprecateByAzVersion { get; }
2525

2626
//The date on which the change comes in effect
2727
public DateTime ChangeInEfectByDate { get; }
@@ -32,23 +32,18 @@ public class GenericBreakingChangeAttribute : Attribute
3232
//New way fo calling the cmdlet
3333
public string NewWay { get; set; }
3434

35-
public GenericBreakingChangeAttribute(string message)
36-
{
37-
_message = message;
38-
}
39-
40-
public GenericBreakingChangeAttribute(string message, string deprecateByVersion)
35+
public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion)
4136
{
4237
_message = message;
38+
this.DeprecateByAzVersion = deprecateByAzVersion;
4339
this.DeprecateByVersion = deprecateByVersion;
44-
this.DeprecateByVersionSet = true;
4540
}
4641

47-
public GenericBreakingChangeAttribute(string message, string deprecateByVersion, string changeInEfectByDate)
42+
public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate)
4843
{
4944
_message = message;
5045
this.DeprecateByVersion = deprecateByVersion;
51-
this.DeprecateByVersionSet = true;
46+
this.DeprecateByAzVersion = deprecateByAzVersion;
5247

5348
if (DateTime.TryParse(changeInEfectByDate, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result))
5449
{
@@ -86,10 +81,8 @@ public void PrintCustomAttributeInfo(Action<string> writeOutput)
8681
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByDateMessage, this.ChangeInEfectByDate.ToString("d")));
8782
}
8883

89-
if (DeprecateByVersionSet)
90-
{
91-
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion));
92-
}
84+
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion));
85+
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion));
9386

9487
if (OldWay != null && NewWay != null)
9588
{
@@ -114,18 +107,13 @@ public class CmdletBreakingChangeAttribute : GenericBreakingChangeAttribute
114107

115108
public string ReplacementCmdletName { get; set; }
116109

117-
public CmdletBreakingChangeAttribute() :
118-
base(string.Empty)
110+
public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion) :
111+
base(string.Empty, deprecateByAzVersion, deprecateByVersion)
119112
{
120113
}
121114

122-
public CmdletBreakingChangeAttribute(string deprecateByVersione) :
123-
base(string.Empty, deprecateByVersione)
124-
{
125-
}
126-
127-
public CmdletBreakingChangeAttribute(string deprecateByVersion, string changeInEfectByDate) :
128-
base(string.Empty, deprecateByVersion, changeInEfectByDate)
115+
public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) :
116+
base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate)
129117
{
130118
}
131119

@@ -146,20 +134,15 @@ protected override string GetAttributeSpecificMessage()
146134
public class ParameterSetBreakingChangeAttribute : GenericBreakingChangeAttribute
147135
{
148136
public string[] ChangedParameterSet { set; get; }
149-
public ParameterSetBreakingChangeAttribute(string[] changedParameterSet) :
150-
base(string.Empty)
151-
{
152-
ChangedParameterSet = changedParameterSet;
153-
}
154137

155-
public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByVersione) :
156-
base(string.Empty, deprecateByVersione)
138+
public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion) :
139+
base(string.Empty, deprecateByAzVersion, deprecateByVersion)
157140
{
158141
ChangedParameterSet = changedParameterSet;
159142
}
160143

161-
public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByVersion, string changeInEfectByDate) :
162-
base(string.Empty, deprecateByVersion, changeInEfectByDate)
144+
public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) :
145+
base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate)
163146
{
164147
ChangedParameterSet = changedParameterSet;
165148
}
@@ -219,20 +202,14 @@ public class ParameterBreakingChangeAttribute : GenericBreakingChangeAttribute
219202

220203
public String NewParameterType { get; set; }
221204

222-
public ParameterBreakingChangeAttribute(string nameOfParameterChanging) :
223-
base(string.Empty)
224-
{
225-
this.NameOfParameterChanging = nameOfParameterChanging;
226-
}
227-
228-
public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByVersion) :
229-
base(string.Empty, deprecateByVersion)
205+
public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion) :
206+
base(string.Empty, deprecateByAzVersion, deprecateByVersion)
230207
{
231208
this.NameOfParameterChanging = nameOfParameterChanging;
232209
}
233210

234-
public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByVersion, string changeInEfectByDate) :
235-
base(string.Empty, deprecateByVersion, changeInEfectByDate)
211+
public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) :
212+
base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate)
236213
{
237214
this.NameOfParameterChanging = nameOfParameterChanging;
238215
}
@@ -298,20 +275,14 @@ public class OutputBreakingChangeAttribute : GenericBreakingChangeAttribute
298275

299276
public string[] NewOutputProperties { get; set; }
300277

301-
public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType) :
302-
base(string.Empty)
303-
{
304-
this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType;
305-
}
306-
307-
public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByVersion) :
308-
base(string.Empty, deprecateByVersion)
278+
public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion) :
279+
base(string.Empty, deprecateByAzVersion, deprecateByVersion)
309280
{
310281
this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType;
311282
}
312283

313-
public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByVersion, string changeInEfectByDate) :
314-
base(string.Empty, deprecateByVersion, changeInEfectByDate)
284+
public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) :
285+
base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate)
315286
{
316287
this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType;
317288
}

src/DataMigration/DataMigration.Autorest/generated/runtime/Properties/Resources.Designer.cs

Lines changed: 15 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/DataMigration/DataMigration.Autorest/generated/runtime/Properties/Resources.resx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1705,7 +1705,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can
17051705
</data>
17061706
<data name="BreakingChangesAttributesInEffectByVersion" xml:space="preserve">
17071707
<value>
1708-
- The change is expected to take effect from the version : '{0}'</value>
1708+
- The change is expected to take effect from version : '{0}'</value>
17091709
</data>
17101710
<data name="BreakingChangesAttributesUsageChangeMessage" xml:space="preserve">
17111711
<value>```powershell
@@ -1738,4 +1738,7 @@ Note : Go to {0} for steps to suppress this breaking change warning, and other i
17381738
<data name="PreviewCmdletMessage" xml:space="preserve">
17391739
<value>This cmdlet is in preview. The functionality may not be available in the selected subscription.</value>
17401740
</data>
1741+
<data name="BreakingChangesAttributesInEffectByAzVersion" xml:space="preserve">
1742+
<value>- The change is expected to take effect from Az version : '{0}'</value>
1743+
</data>
17411744
</root>

src/DataMigration/DataMigration/Az.DataMigration.psd1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 06/29/2023
6+
# Generated on: 7/23/2023
77
#
88

99
@{
@@ -144,7 +144,8 @@ PrivateData = @{
144144
PSData = @{
145145

146146
# Tags applied to this module. These help with module discovery in online galleries.
147-
Tags = 'Azure','ResourceManager','ARM','Sql','Database','Data','Migration','Service'
147+
Tags = 'Azure', 'ResourceManager', 'ARM', 'Sql', 'Database', 'Data', 'Migration',
148+
'Service'
148149

149150
# A URL to the license for this module.
150151
LicenseUri = 'https://aka.ms/azps-license'
@@ -169,7 +170,7 @@ PrivateData = @{
169170

170171
} # End of PSData hashtable
171172

172-
} # End of PrivateData hashtable
173+
} # End of PrivateData hashtable
173174

174175
# HelpInfo URI of this module
175176
# HelpInfoURI = ''

src/DataMigration/DataMigration/ChangeLog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21-
21+
* Added client type to New-AzDataMigrationTdeCertificateMigration
2222
## Version 0.14.0
2323
* Added new cmdlet `New-AzDataMigrationSqlServerSchema` to migrate Sql Server Schema from the source Sql Servers to the target Azure Sql Servers
2424

0 commit comments

Comments
 (0)