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

[AutoPR azure-resourcemanager-storagecache] Resolve conflicts with the main branch #8872

Closed
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.10 (Unreleased)
## 1.0.0-beta.1 (2023-12-15)

- Azure Resource Manager StorageCache client library for Java. This package contains Microsoft Azure SDK for StorageCache Management SDK. Azure Managed Lustre provides a fully managed Lustre® file system, integrated with Blob storage, for use on demand. These operations create and manage Azure Managed Lustre file systems. Package tag package-preview-2023-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
10 changes: 6 additions & 4 deletions sdk/storagecache/azure-resourcemanager-storagecache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager StorageCache client library for Java.

This package contains Microsoft Azure SDK for StorageCache Management SDK. Azure Managed Lustre provides a fully managed Lustre® file system, integrated with Blob storage, for use on demand. These operations create and manage Azure Managed Lustre file systems. Package tag package-2023-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for StorageCache Management SDK. Azure Managed Lustre provides a fully managed Lustre® file system, integrated with Blob storage, for use on demand. These operations create and manage Azure Managed Lustre file systems. Package tag package-preview-2023-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## We'd love to hear your feedback

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-storagecache</artifactId>
<version>1.0.0-beta.9</version>
<version>1.0.0-beta.10</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand All @@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen

### Authentication

By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.
By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables.

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
Expand Down Expand Up @@ -94,7 +94,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
<!-- LINKS -->
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
[docs]: https://azure.github.io/azure-sdk-for-java/
[jdk]: https://docs.microsoft.com/java/azure/jdk/
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
Expand All @@ -103,3 +103,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fstoragecache%2Fazure-resourcemanager-storagecache%2FREADME.png)
835 changes: 255 additions & 580 deletions sdk/storagecache/azure-resourcemanager-storagecache/SAMPLE.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion sdk/storagecache/azure-resourcemanager-storagecache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for StorageCache Management</name>
<description>This package contains Microsoft Azure SDK for StorageCache Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Managed Lustre provides a fully managed Lustre® file system, integrated with Blob storage, for use on demand. These operations create and manage Azure Managed Lustre file systems. Package tag package-2023-05.</description>
<description>This package contains Microsoft Azure SDK for StorageCache Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Managed Lustre provides a fully managed Lustre® file system, integrated with Blob storage, for use on demand. These operations create and manage Azure Managed Lustre file systems. Package tag package-preview-2023-11.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand All @@ -45,6 +45,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<revapi.skip>true</revapi.skip>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@
import java.util.stream.Collectors;

/**
* Entry point to StorageCacheManager. Azure Managed Lustre provides a fully managed Lustre® file system, integrated
* with Blob storage, for use on demand. These operations create and manage Azure Managed Lustre file systems.
* Entry point to StorageCacheManager.
* Azure Managed Lustre provides a fully managed Lustre® file system, integrated with Blob storage, for use on demand.
* These operations create and manage Azure Managed Lustre file systems.
*/
public final class StorageCacheManager {
private AmlFilesystems amlFilesystems;
Expand Down Expand Up @@ -82,18 +83,14 @@ public final class StorageCacheManager {
private StorageCacheManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
this.clientObject =
new StorageCacheManagementClientBuilder()
.pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval)
.buildClient();
this.clientObject = new StorageCacheManagementClientBuilder().pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval).buildClient();
}

/**
* Creates an instance of StorageCache service API entry point.
*
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
* @return the StorageCache service API instance.
Expand All @@ -106,7 +103,7 @@ public static StorageCacheManager authenticate(TokenCredential credential, Azure

/**
* Creates an instance of StorageCache service API entry point.
*
*
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
* @param profile the Azure profile for client.
* @return the StorageCache service API instance.
Expand All @@ -119,14 +116,16 @@ public static StorageCacheManager authenticate(HttpPipeline httpPipeline, AzureP

/**
* Gets a Configurable instance that can be used to create StorageCacheManager with optional configuration.
*
*
* @return the Configurable instance allowing configurations.
*/
public static Configurable configure() {
return new StorageCacheManager.Configurable();
}

/** The Configurable allowing configurations to be set. */
/**
* The Configurable allowing configurations to be set.
*/
public static final class Configurable {
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);

Expand Down Expand Up @@ -198,8 +197,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {

/**
* Sets the retry options for the HTTP pipeline retry policy.
*
* <p>This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
* <p>
* This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
*
* @param retryOptions the retry options for the HTTP pipeline retry policy.
* @return the configurable object itself.
Expand All @@ -216,8 +215,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval =
Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
this.defaultPollInterval
= Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
throw LOGGER
.logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
Expand All @@ -237,21 +236,12 @@ public StorageCacheManager authenticate(TokenCredential credential, AzureProfile
Objects.requireNonNull(profile, "'profile' cannot be null.");

StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder
.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.storagecache")
.append("/")
.append("1.0.0-beta.9");
userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.storagecache")
.append("/").append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
.append("; ")
.append(Configuration.getGlobalConfiguration().get("os.name"))
.append("; ")
.append(Configuration.getGlobalConfiguration().get("os.version"))
.append("; auto-generated)");
userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version"))
.append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ")
.append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)");
} else {
userAgentBuilder.append(" (auto-generated)");
}
Expand All @@ -270,38 +260,25 @@ public StorageCacheManager authenticate(TokenCredential credential, AzureProfile
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
this
.policies
.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
.collect(Collectors.toList()));
policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
.collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies
.addAll(
this
.policies
.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList()));
policies.addAll(this.policies.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
new HttpPipelineBuilder()
.httpClient(httpClient)
.policies(policies.toArray(new HttpPipelinePolicy[0]))
.build();
HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
.policies(policies.toArray(new HttpPipelinePolicy[0])).build();
return new StorageCacheManager(httpPipeline, profile, defaultPollInterval);
}
}

/**
* Gets the resource collection API of AmlFilesystems. It manages AmlFilesystem.
*
*
* @return Resource collection API of AmlFilesystems.
*/
public AmlFilesystems amlFilesystems() {
Expand All @@ -313,7 +290,7 @@ public AmlFilesystems amlFilesystems() {

/**
* Gets the resource collection API of ResourceProviders.
*
*
* @return Resource collection API of ResourceProviders.
*/
public ResourceProviders resourceProviders() {
Expand All @@ -325,7 +302,7 @@ public ResourceProviders resourceProviders() {

/**
* Gets the resource collection API of Operations.
*
*
* @return Resource collection API of Operations.
*/
public Operations operations() {
Expand All @@ -337,7 +314,7 @@ public Operations operations() {

/**
* Gets the resource collection API of Skus.
*
*
* @return Resource collection API of Skus.
*/
public Skus skus() {
Expand All @@ -349,7 +326,7 @@ public Skus skus() {

/**
* Gets the resource collection API of UsageModels.
*
*
* @return Resource collection API of UsageModels.
*/
public UsageModels usageModels() {
Expand All @@ -361,7 +338,7 @@ public UsageModels usageModels() {

/**
* Gets the resource collection API of AscOperations.
*
*
* @return Resource collection API of AscOperations.
*/
public AscOperations ascOperations() {
Expand All @@ -373,7 +350,7 @@ public AscOperations ascOperations() {

/**
* Gets the resource collection API of AscUsages.
*
*
* @return Resource collection API of AscUsages.
*/
public AscUsages ascUsages() {
Expand All @@ -385,7 +362,7 @@ public AscUsages ascUsages() {

/**
* Gets the resource collection API of Caches. It manages Cache.
*
*
* @return Resource collection API of Caches.
*/
public Caches caches() {
Expand All @@ -397,7 +374,7 @@ public Caches caches() {

/**
* Gets the resource collection API of StorageTargets. It manages StorageTarget.
*
*
* @return Resource collection API of StorageTargets.
*/
public StorageTargets storageTargets() {
Expand All @@ -409,20 +386,22 @@ public StorageTargets storageTargets() {

/**
* Gets the resource collection API of StorageTargetOperations.
*
*
* @return Resource collection API of StorageTargetOperations.
*/
public StorageTargetOperations storageTargetOperations() {
if (this.storageTargetOperations == null) {
this.storageTargetOperations =
new StorageTargetOperationsImpl(clientObject.getStorageTargetOperations(), this);
this.storageTargetOperations
= new StorageTargetOperationsImpl(clientObject.getStorageTargetOperations(), this);
}
return storageTargetOperations;
}

/**
* @return Wrapped service client StorageCacheManagementClient providing direct access to the underlying
* auto-generated API implementation, based on Azure REST API.
* Gets wrapped service client StorageCacheManagementClient providing direct access to the underlying auto-generated
* API implementation, based on Azure REST API.
*
* @return Wrapped service client StorageCacheManagementClient.
*/
public StorageCacheManagementClient serviceClient() {
return this.clientObject;
Expand Down
Loading