Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SDK and test for BatchAI for GA #4153

Merged
merged 5 commits into from
Mar 27, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 7 additions & 0 deletions src/SDKs/BatchAI/AzSdk.RP.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--This file and it's contents are updated at build time moving or editing might result in build failure. Take due deligence while editing this file-->
<PropertyGroup>
<AzureApiTag />
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
</PropertyGroup>
</Project>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ public partial class BatchAIManagementClient : ServiceClient<BatchAIManagementCl
/// </summary>
public virtual IOperations Operations { get; private set; }

/// <summary>
/// Gets the IUsageOperations.
/// </summary>
public virtual IUsageOperations Usage { get; private set; }

/// <summary>
/// Gets the IClustersOperations.
/// </summary>
Expand Down Expand Up @@ -295,11 +300,12 @@ public BatchAIManagementClient(System.Uri baseUri, ServiceClientCredentials cred
private void Initialize()
{
Operations = new Operations(this);
Usage = new UsageOperations(this);
Clusters = new ClustersOperations(this);
Jobs = new JobsOperations(this);
FileServers = new FileServersOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
ApiVersion = "2017-09-01-preview";
ApiVersion = "2018-03-01";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ public partial interface IBatchAIManagementClient : System.IDisposable
/// </summary>
IOperations Operations { get; }

/// <summary>
/// Gets the IUsageOperations.
/// </summary>
IUsageOperations Usage { get; }

/// <summary>
/// Gets the IClustersOperations.
/// </summary>
Expand Down
12 changes: 6 additions & 6 deletions src/SDKs/BatchAI/Management.BatchAI/Generated/IJobsOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ public partial interface IJobsOperations
/// </exception>
Task<AzureOperationResponse<IPage<Job>>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, JobsListByResourceGroupOptions jobsListByResourceGroupOptions = default(JobsListByResourceGroupOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// List all files inside the given output directory (Only if the
/// output directory is on Azure File Share or Azure Storage
/// container).
/// List all directories and files inside the given directory of the
/// output directory (Only if the output directory is on Azure File
/// Share or Azure Storage container).
/// </summary>
/// <param name='resourceGroupName'>
/// Name of the resource group to which the resource belongs.
Expand Down Expand Up @@ -392,9 +392,9 @@ public partial interface IJobsOperations
/// </exception>
Task<AzureOperationResponse<IPage<Job>>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// List all files inside the given output directory (Only if the
/// output directory is on Azure File Share or Azure Storage
/// container).
/// List all directories and files inside the given directory of the
/// output directory (Only if the output directory is on Azure File
/// Share or Azure Storage container).
/// </summary>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
Expand Down
73 changes: 73 additions & 0 deletions src/SDKs/BatchAI/Management.BatchAI/Generated/IUsageOperations.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.BatchAI
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// UsageOperations operations.
/// </summary>
public partial interface IUsageOperations
{
/// <summary>
/// Gets the current usage information as well as limits for Batch AI
/// resources for given subscription.
/// </summary>
/// <param name='location'>
/// The location for which resource usage is queried.
/// </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.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<IPage<Usage>>> ListWithHttpMessagesAsync(string location, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Gets the current usage information as well as limits for Batch AI
/// resources for given subscription.
/// </summary>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </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.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<IPage<Usage>>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
20 changes: 16 additions & 4 deletions src/SDKs/BatchAI/Management.BatchAI/Generated/JobsOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1006,8 +1006,9 @@ internal JobsOperations(BatchAIManagementClient client)
}

/// <summary>
/// List all files inside the given output directory (Only if the output
/// directory is on Azure File Share or Azure Storage container).
/// List all directories and files inside the given directory of the output
/// directory (Only if the output directory is on Azure File Share or Azure
/// Storage container).
/// </summary>
/// <param name='resourceGroupName'>
/// Name of the resource group to which the resource belongs.
Expand Down Expand Up @@ -1094,6 +1095,11 @@ internal JobsOperations(BatchAIManagementClient client)
{
outputdirectoryid = jobsListOutputFilesOptions.Outputdirectoryid;
}
string directory = default(string);
if (jobsListOutputFilesOptions != null)
{
directory = jobsListOutputFilesOptions.Directory;
}
int? linkexpiryinminutes = default(int?);
if (jobsListOutputFilesOptions != null)
{
Expand All @@ -1114,6 +1120,7 @@ internal JobsOperations(BatchAIManagementClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("jobName", jobName);
tracingParameters.Add("outputdirectoryid", outputdirectoryid);
tracingParameters.Add("directory", directory);
tracingParameters.Add("linkexpiryinminutes", linkexpiryinminutes);
tracingParameters.Add("maxResults", maxResults);
tracingParameters.Add("cancellationToken", cancellationToken);
Expand All @@ -1134,6 +1141,10 @@ internal JobsOperations(BatchAIManagementClient client)
{
_queryParameters.Add(string.Format("outputdirectoryid={0}", System.Uri.EscapeDataString(outputdirectoryid)));
}
if (directory != null)
{
_queryParameters.Add(string.Format("directory={0}", System.Uri.EscapeDataString(directory)));
}
if (linkexpiryinminutes != null)
{
_queryParameters.Add(string.Format("linkexpiryinminutes={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(linkexpiryinminutes, Client.SerializationSettings).Trim('"'))));
Expand Down Expand Up @@ -2425,8 +2436,9 @@ internal JobsOperations(BatchAIManagementClient client)
}

/// <summary>
/// List all files inside the given output directory (Only if the output
/// directory is on Azure File Share or Azure Storage container).
/// List all directories and files inside the given directory of the output
/// directory (Only if the output directory is on Azure File Share or Azure
/// Storage container).
/// </summary>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,9 @@ public static void Terminate(this IJobsOperations operations, string resourceGro
}

/// <summary>
/// List all files inside the given output directory (Only if the output
/// directory is on Azure File Share or Azure Storage container).
/// List all directories and files inside the given directory of the output
/// directory (Only if the output directory is on Azure File Share or Azure
/// Storage container).
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
Expand All @@ -343,8 +344,9 @@ public static IPage<File> ListOutputFiles(this IJobsOperations operations, strin
}

/// <summary>
/// List all files inside the given output directory (Only if the output
/// directory is on Azure File Share or Azure Storage container).
/// List all directories and files inside the given directory of the output
/// directory (Only if the output directory is on Azure File Share or Azure
/// Storage container).
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
Expand Down Expand Up @@ -610,8 +612,9 @@ public static IPage<Job> ListByResourceGroupNext(this IJobsOperations operations
}

/// <summary>
/// List all files inside the given output directory (Only if the output
/// directory is on Azure File Share or Azure Storage container).
/// List all directories and files inside the given directory of the output
/// directory (Only if the output directory is on Azure File Share or Azure
/// Storage container).
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
Expand All @@ -625,8 +628,9 @@ public static IPage<File> ListOutputFilesNext(this IJobsOperations operations, s
}

/// <summary>
/// List all files inside the given output directory (Only if the output
/// directory is on Azure File Share or Azure Storage container).
/// List all directories and files inside the given directory of the output
/// directory (Only if the output directory is on Azure File Share or Azure
/// Storage container).
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.BatchAI.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;

/// <summary>
/// Specifies Azure Application Insights information for performance
/// counters reporting.
/// </summary>
public partial class AppInsightsReference
{
/// <summary>
/// Initializes a new instance of the AppInsightsReference class.
/// </summary>
public AppInsightsReference()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the AppInsightsReference class.
/// </summary>
/// <param name="component">Specifies the Azure Application Insights
/// component resource id.</param>
/// <param name="instrumentationKey">Value of the Azure Application
/// Insights instrumentation key.</param>
/// <param name="instrumentationKeySecretReference">Specifies a
/// KeyVault Secret containing Azure Application Insights
/// instrumentation key.</param>
public AppInsightsReference(ResourceId component, string instrumentationKey = default(string), KeyVaultSecretReference instrumentationKeySecretReference = default(KeyVaultSecretReference))
{
Component = component;
InstrumentationKey = instrumentationKey;
InstrumentationKeySecretReference = instrumentationKeySecretReference;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets specifies the Azure Application Insights component
/// resource id.
/// </summary>
[JsonProperty(PropertyName = "component")]
public ResourceId Component { get; set; }

/// <summary>
/// Gets or sets value of the Azure Application Insights
/// instrumentation key.
/// </summary>
[JsonProperty(PropertyName = "instrumentationKey")]
public string InstrumentationKey { get; set; }

/// <summary>
/// Gets or sets specifies a KeyVault Secret containing Azure
/// Application Insights instrumentation key.
/// </summary>
/// <remarks>
/// Specifies KeyVault Store and Secret which contains Azure
/// Application Insights instrumentation key. One of instumentationKey
/// or instrumentationKeySecretReference must be specified.
/// </remarks>
[JsonProperty(PropertyName = "instrumentationKeySecretReference")]
public KeyVaultSecretReference InstrumentationKeySecretReference { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Component == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Component");
}
if (Component != null)
{
Component.Validate();
}
if (InstrumentationKeySecretReference != null)
{
InstrumentationKeySecretReference.Validate();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ public AzureBlobFileSystemReference()
/// the Azure Blob file system will be mounted.
/// </summary>
/// <remarks>
/// Note that all blob file systems will be mounted under
/// $AZ_BATCHAI_MOUNT_ROOT location.
/// Note that all cluster level blob file systems will be mounted under
/// $AZ_BATCHAI_MOUNT_ROOT location and all job level blob file systems
/// will be mounted under $AZ_BATCHAI_JOB_MOUNT_ROOT.
/// </remarks>
[JsonProperty(PropertyName = "relativeMountPath")]
public string RelativeMountPath { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ public AzureFileShareReference()
/// the Azure file share will be mounted.
/// </summary>
/// <remarks>
/// Note that all file shares will be mounted under
/// $AZ_BATCHAI_MOUNT_ROOT location.
/// Note that all cluster level file shares will be mounted under
/// $AZ_BATCHAI_MOUNT_ROOT location and all job level file shares will
/// be mounted under $AZ_BATCHAI_JOB_MOUNT_ROOT.
/// </remarks>
[JsonProperty(PropertyName = "relativeMountPath")]
public string RelativeMountPath { get; set; }
Expand Down
Loading