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

Fix Live tests #21619

Merged
merged 1 commit into from
Jun 4, 2021
Merged
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
Expand Up @@ -49,7 +49,7 @@ Because Confidential Ledgers use self-signed certificates securely generated and

```C# Snippet:GetIdentity
Uri identityServiceUri = "<the identity service uri>";
var identityClient = new ConfidentialLedgerIdentityServiceClient(identityServiceUri, new Identity.DefaultAzureCredential());
var identityClient = new ConfidentialLedgerIdentityServiceClient(identityServiceUri);

// Get the ledger's TLS certificate for our ledger.
string ledgerId = "<the ledger id>"; // ex. "my-ledger" from "https://my-ledger.eastus.cloudapp.azure.com"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static partial class ConfidentialLedgerConstants
public partial class ConfidentialLedgerIdentityServiceClient
{
protected ConfidentialLedgerIdentityServiceClient() { }
public ConfidentialLedgerIdentityServiceClient(System.Uri identityServiceUri, Azure.Core.TokenCredential credential, Azure.Security.ConfidentialLedger.ConfidentialLedgerClientOptions options = null) { }
public ConfidentialLedgerIdentityServiceClient(System.Uri identityServiceUri, Azure.Security.ConfidentialLedger.ConfidentialLedgerClientOptions options = null) { }
public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
public virtual Azure.Response GetLedgerIdentity(string ledgerId, Azure.RequestOptions requestOptions = null) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> GetLedgerIdentityAsync(string ledgerId, Azure.RequestOptions requestOptions = null) { throw null; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Core.Pipeline;

namespace Azure.Security.ConfidentialLedger
{
[CodeGenSuppress("ConfidentialLedgerIdentityServiceClient", typeof(Uri), typeof(TokenCredential), typeof(ConfidentialLedgerClientOptions))]
public partial class ConfidentialLedgerIdentityServiceClient
{
/// <summary> Initializes a new instance of ConfidentialLedgerIdentityServiceClient. </summary>
/// <param name="identityServiceUri"> The Identity Service URL, for example https://identity.accledger.azure.com. </param>
/// <param name="options"> The options for configuring the client. </param>
public ConfidentialLedgerIdentityServiceClient(Uri identityServiceUri, ConfidentialLedgerClientOptions options = null)
{
if (identityServiceUri == null)
{
throw new ArgumentNullException(nameof(identityServiceUri));
}

// TODO: properly generate the client without a credential.
_tokenCredential = null;
if (_tokenCredential != null)
{
// Do nothing.
}
options ??= new ConfidentialLedgerClientOptions();
_clientDiagnostics = new ClientDiagnostics(options);
Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }, Array.Empty<HttpPipelinePolicy>(), new ResponseClassifier());
this.identityServiceUri = identityServiceUri;
apiVersion = options.Version;
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public void Setup()
IdentityClient = InstrumentClient(
new ConfidentialLedgerIdentityServiceClient(
TestEnvironment.ConfidentialLedgerIdentityUrl,
Credential,
InstrumentClientOptions(Options)));
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void HelloWorld()
#else
Uri identityServiceUri = TestEnvironment.ConfidentialLedgerIdentityUrl;
#endif
var identityClient = new ConfidentialLedgerIdentityServiceClient(identityServiceUri, new Identity.DefaultAzureCredential());
var identityClient = new ConfidentialLedgerIdentityServiceClient(identityServiceUri);

// Get the ledger's TLS certificate for our ledger.
#if SNIPPET
Expand Down