Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions eng/mgmt/mgmtmetadata/compute_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/compute/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\hylee-sdk\avset\sdk
2019-08-30 19:41:37 UTC
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/compute-2019-07/specification/compute/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=E:\git_projects\azure-sdk-for-net\sdk
2019-09-17 22:52:26 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 6359c5dac93947b24007afd9c569e23e92848ea5
Branch: compute-2019-07
Commit: 6faf3edebd04e0e6bf681a6379ce1a6853cf3d64
AutoRest information
Requested version: latest
Bootstrapper version: autorest@2.0.4283
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

The SetSwaggerTestEnvironment.ps1 script will set the environment variables that are required to Create/Update/Running the swagger tests in the SDK repo.

Sample:
.\SetSwaggerTestEnvironment.ps1 -Mode Record -SubscriptionId 0296790d-427c-48ca-b204-8b729bbd8670 -aadclientid a43cd9f5-83b7-425b-822d-903c97f75aac -ApplicationSecret fB4gAmUE5cNQ2ad43VZZhPq8+mW645Hu/dJWuyjdhR0= -aadtenant 72f988bf-86f1-41af-91ab-2d7cd011db47 -Environment Prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
param
(
[Parameter(Mandatory=$true, ParameterSetName = "Record", Position = 0)]
[Parameter(Mandatory=$false, ParameterSetName = "Mode", Position = 0)]
[ValidateSet("Record", "Playback")]
[string]$Mode,

[Parameter(Mandatory=$true, ParameterSetName = "Admin", Position = 0)]
[Switch]$Admin,

[Parameter(Mandatory=$true, ParameterSetName = "Record", Position = 1)]
[Parameter(Mandatory=$true, ParameterSetName = "Admin", Position = 1)]
[Parameter(Mandatory=$false, ParameterSetName = "Mode", Position = 1)]
[string]$SubscriptionId,

[Parameter(Mandatory=$true, ParameterSetName = "Record", Position = 2)]
[string]$AADClientId,

[Parameter(Mandatory=$true, ParameterSetName = "Record", Position = 3)]
[string]$ApplicationSecret,

[Parameter(Mandatory=$true, ParameterSetName = "Record", Position = 4)]
[string]$AADTenant,

[Parameter(Mandatory=$false, ParameterSetName = "Record", Position = 5)]
[string]$Environment = "",

[Parameter(Mandatory=$false, ParameterSetName = "Record", Position = 6)]
[string]$BaseUri = "",

[Parameter(Mandatory=$false, ParameterSetName = "Mode", Position = 2)]
[string]$UserId = "",

[Parameter(Mandatory=$false, ParameterSetName = "Record", Position = 7)]
[Parameter(Mandatory=$false, ParameterSetName = "Mode", Position = 3)]
[string]$Location = "",

[Parameter(Mandatory=$false)]
[string]$SolutionFile = "..\..\Microsoft.Azure.Management.Compute\Microsoft.Azure.Management.Compute.sln"
)

Write-Host "=========================================";
Write-Host "Sample Commands :";
Write-Host "-----------------------------------------";
Write-Host "powershell -file .\New-TestEnvironment.ps1 -Mode Record -SubscriptionId xxx -AADClientId xxx -ApplicationSecret xxx -AADTenant xxx -Environment Prod";
Write-Host "powershell -file .\New-TestEnvironment.ps1 -Admin -SubscriptionId xxx";
Write-Host "powershell -file .\New-TestEnvironment.ps1";
Write-Host
Write-Host "=========================================";
Write-Host "Input Variables :";
Write-Host "-----------------------------------------";
Write-Host "`$Mode=$Mode";
Write-Host "`$SubscriptionId=$SubscriptionId";
Write-Host "`$AADClientId=$AADClientId";
Write-Host "`$ApplicationSecret=$ApplicationSecret";
Write-Host "`$AADTenant=$AADTenant";
Write-Host "`$Environment=$Environment";
Write-Host "=========================================";

$table = @{
"AZURE_TEST_MODE" = "Playback";
"TEST_CSM_SPN_AUTHENTICATION" = "";
"TEST_CSM_ORGID_AUTHENTICATION" = "";
"TEST_ORGID_AUTHENTICATION" = "";
"TEST_CONNECTION_STRING" = "";
"TEST_PUBLISHSETTINGS_FILE" = "";
"AZURE_VM_TEST_LOCATION" = "";
};

if ($Mode.ToLower() -eq 'record')
{
$table["AZURE_TEST_MODE"] = "Record";

if ([System.String]::IsNullOrEmpty($AADClientId))
{
if ([System.String]::IsNullOrEmpty($UserId))
{
$table["TEST_CSM_ORGID_AUTHENTICATION"] = "SubscriptionId=${SubscriptionId};";
$table["TEST_ORGID_AUTHENTICATION"] = "SubscriptionId=${SubscriptionId};";
}
else
{
$table["TEST_CSM_ORGID_AUTHENTICATION"] = "SubscriptionId=${SubscriptionId};UserId=${UserId}";
$table["TEST_ORGID_AUTHENTICATION"] = "SubscriptionId=${SubscriptionId};UserId=${UserId}";
}
}
else
{
$table["TEST_CSM_ORGID_AUTHENTICATION"] = "SubscriptionId=${SubscriptionId};ServicePrincipal=${AADClientId};Password=${ApplicationSecret};AADTenant=${AADTenant}";
}

if (-not [System.String]::IsNullOrEmpty($BaseUri))
{
$table["TEST_ORGID_AUTHENTICATION"] = $table["TEST_ORGID_AUTHENTICATION"] += ';BaseUri=' + $BaseUri;
$table["TEST_CSM_ORGID_AUTHENTICATION"] = $table["TEST_CSM_ORGID_AUTHENTICATION"] += ';BaseUri=' + $BaseUri;
}

if (-not [System.String]::IsNullOrEmpty($Environment))
{
$table["TEST_ORGID_AUTHENTICATION"] = $table["TEST_ORGID_AUTHENTICATION"] += ';Environment=' + $Environment;
$table["TEST_CSM_ORGID_AUTHENTICATION"] = $table["TEST_CSM_ORGID_AUTHENTICATION"] += ';Environment=' + $Environment;
}
}
else
{
$table["AZURE_TEST_MODE"] = "Playback";
}

if (-not [System.String]::IsNullOrEmpty($Location))
{
$table["AZURE_VM_TEST_LOCATION"] = $Location;
}

Write-Host "Environment Variables :";
Write-Host "-----------------------------------------";
foreach ($key in $table.Keys) {
$value = $table[$key];
[Environment]::SetEnvironmentVariable($key, $value, "Process");
}

foreach ($key in $table.Keys) {
Write-Host ("$key = " + [Environment]::GetEnvironmentVariable($key));
}

Write-Host "=========================================";
Write-Host "Setup Finished; Opening File ${SolutionFile}...";
Invoke-Item $SolutionFile;
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -313,7 +313,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -511,7 +511,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -687,7 +687,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -870,7 +870,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -1058,7 +1058,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -1251,7 +1251,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ internal DedicatedHostGroupsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -333,7 +333,7 @@ internal DedicatedHostGroupsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -531,7 +531,7 @@ internal DedicatedHostGroupsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -707,7 +707,7 @@ internal DedicatedHostGroupsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -896,7 +896,7 @@ internal DedicatedHostGroupsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -1076,7 +1076,7 @@ internal DedicatedHostGroupsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ internal DedicatedHostsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -389,7 +389,7 @@ internal DedicatedHostsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -601,7 +601,7 @@ internal DedicatedHostsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -836,7 +836,7 @@ internal DedicatedHostsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -1043,7 +1043,7 @@ internal DedicatedHostsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-03-01";
string apiVersion = "2019-07-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public partial interface IResourceSkusOperations
/// Gets the list of Microsoft.Compute SKUs available for your
/// Subscription.
/// </summary>
/// <param name='filter'>
/// The filter to apply on the operation.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
Expand All @@ -42,7 +45,7 @@ public partial interface IResourceSkusOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<IPage<ResourceSku>>> ListWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<IPage<ResourceSku>>> ListWithHttpMessagesAsync(string filter = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Gets the list of Microsoft.Compute SKUs available for your
/// Subscription.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,28 @@ public partial interface IVirtualMachinesOperations
/// </exception>
Task<AzureOperationResponse> PowerOffWithHttpMessagesAsync(string resourceGroupName, string vmName, bool? skipShutdown = false, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// The operation to reapply a virtual machine's state.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='vmName'>
/// The name of the virtual machine.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse> ReapplyWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// The operation to restart a virtual machine.
/// </summary>
/// <param name='resourceGroupName'>
Expand Down Expand Up @@ -709,6 +731,28 @@ public partial interface IVirtualMachinesOperations
/// </exception>
Task<AzureOperationResponse> BeginPowerOffWithHttpMessagesAsync(string resourceGroupName, string vmName, bool? skipShutdown = false, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// The operation to reapply a virtual machine's state.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='vmName'>
/// The name of the virtual machine.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse> BeginReapplyWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// The operation to restart a virtual machine.
/// </summary>
/// <param name='resourceGroupName'>
Expand Down
Loading