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 typos #6234

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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,23 +49,23 @@ AttestationAdministrationClient::AttestationAdministrationClient(
"azure-security-attestation-cpp",
PackageVersion::ToString()}
{
std::vector<std::unique_ptr<HttpPolicy>> perRetrypolicies;
std::vector<std::unique_ptr<HttpPolicy>> perRetryPolicies;
if (credential)
{
Azure::Core::Credentials::TokenRequestContext tokenContext;
tokenContext.Scopes = {"https://attest.azure.net/.default"};

perRetrypolicies.emplace_back(
perRetryPolicies.emplace_back(
std::make_unique<BearerTokenAuthenticationPolicy>(credential, tokenContext));
}
std::vector<std::unique_ptr<HttpPolicy>> perCallpolicies;
std::vector<std::unique_ptr<HttpPolicy>> perCallPolicies;

m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
"security.attestation",
PackageVersion::ToString(),
std::move(perRetrypolicies),
std::move(perCallpolicies));
std::move(perRetryPolicies),
std::move(perCallPolicies));
}

AttestationAdministrationClient AttestationAdministrationClient::Create(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,23 @@ AttestationClient::AttestationClient(
"azure-security-attestation-cpp",
PackageVersion::ToString()}
{
std::vector<std::unique_ptr<HttpPolicy>> perRetrypolicies;
std::vector<std::unique_ptr<HttpPolicy>> perRetryPolicies;
if (credential)
{
Azure::Core::Credentials::TokenRequestContext tokenContext;
tokenContext.Scopes = {"https://attest.azure.net/.default"};

perRetrypolicies.emplace_back(
perRetryPolicies.emplace_back(
std::make_unique<BearerTokenAuthenticationPolicy>(credential, tokenContext));
}
std::vector<std::unique_ptr<HttpPolicy>> perCallpolicies;
std::vector<std::unique_ptr<HttpPolicy>> perCallPolicies;

m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
"security.attestation",
PackageVersion::ToString(),
std::move(perRetrypolicies),
std::move(perCallpolicies));
std::move(perRetryPolicies),
std::move(perCallPolicies));
}

Azure::Response<OpenIdMetadata> AttestationClient::GetOpenIdMetadata(
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/azure-core/inc/azure/core/dll_import_export.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
// endif()
//
// And if the SDK is being consumed using the neither option from the above (neither cmake
// fetchcontent nor a package, but some custom build process that is unknown to us, yet uncapable of
// fetchcontent nor a package, but some custom build process that is unknown to us, yet incapable of
// handling AZ_xxx_BUILT_AS_DLL correctly), there is always an option for th consumer to define
// AZ_xxx_DLL manually.
// --
Expand Down
4 changes: 2 additions & 2 deletions sdk/core/azure-core/src/http/curl/curl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ void CurlSession::ParseChunkSize(Context const& context)
if (index + 1 == this->m_innerBufferSize)
{
/*
* index + 1 represents the next possition to Read. If that's equal to the inner buffer
* index + 1 represents the next position to Read. If that's equal to the inner buffer
* size it means that there is no more data and we need to fetch more from network. And
* whatever we fetch will be the start of the chunk data. The bodyStart is set to 0 to
* indicate the the next read call should read from the inner buffer start.
Expand Down Expand Up @@ -2562,7 +2562,7 @@ CurlConnection::CurlConnection(
if (result != CURLE_OK)
{
throw Http::TransportException(
"Broken connection. Couldn't get the active sockect for it."
"Broken connection. Couldn't get the active socket for it."
+ std::string(curl_easy_strerror(result)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ namespace Azure { namespace Core {
constexpr static int32_t DefaultCleanerIntervalMilliseconds = 1000 * 90;
// 60 sec -> expired connection is when it waits for 60 sec or more and it's not re-used
constexpr static int32_t DefaultConnectionExpiredMilliseconds = 1000 * 60;
// Define the maximun allowed connections per host-index in the pool. If this number is
// Define the maximum allowed connections per host-index in the pool. If this number is
// reached for the host-index, next connections trying to be added to the pool will be
// ignored.
constexpr static int32_t MaxConnectionsPerIndex = 1024;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ namespace Azure { namespace Messaging { namespace EventHubs {
{
if (!options.PartitionId.empty() && !options.PartitionKey.empty())
{
throw std::runtime_error("Either PartionID or PartitionKey can be set, but not both.");
throw std::runtime_error("Either PartitionID or PartitionKey can be set, but not both.");
}

if (options.PartitionId.empty())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,15 @@ std::vector<Ownership> ProcessorLoadBalancer::GreedyLoadBalancer(
(void)context;
std::vector<Models::Ownership> ours = loadBalancerInfo.Current;
// try claiming from the completely unowned or expires ownerships _first_
std::vector<Models::Ownership> randomOwneships = GetRandomOwnerships(
std::vector<Models::Ownership> randomOwnerships = GetRandomOwnerships(
loadBalancerInfo.UnownedOrExpired, loadBalancerInfo.MaxAllowed - ours.size());
ours.insert(ours.end(), randomOwneships.begin(), randomOwneships.end());
ours.insert(ours.end(), randomOwnerships.begin(), randomOwnerships.end());

if (ours.size() < loadBalancerInfo.MaxAllowed)
{ // try claiming from the completely unowned or expires ownerships _first_
std::vector<Models::Ownership> randomOwnerships
std::vector<Models::Ownership> additionalRandomOwnerships
= GetRandomOwnerships(loadBalancerInfo.AboveMax, loadBalancerInfo.MaxAllowed - ours.size());
ours.insert(ours.end(), randomOwnerships.begin(), randomOwnerships.end());
ours.insert(ours.end(), additionalRandomOwnerships.begin(), additionalRandomOwnerships.end());
}
for (Models::Ownership& ownership : ours)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,24 @@ namespace Azure { namespace Messaging { namespace EventHubs { namespace Test {
{

Azure::Core::_internal::ClientOptions options;
std::vector<std::unique_ptr<Azure::Core::Http::Policies::HttpPolicy>> perRetrypolicies;
std::vector<std::unique_ptr<Azure::Core::Http::Policies::HttpPolicy>> perRetryPolicies;

{
Azure::Core::Credentials::TokenRequestContext tokenContext;
tokenContext.Scopes = {"https://management.azure.com/.default"};
perRetrypolicies.emplace_back(
perRetryPolicies.emplace_back(
std::make_unique<Azure::Core::Http::Policies::_internal::BearerTokenAuthenticationPolicy>(
credential, tokenContext));
}
std::vector<std::unique_ptr<Azure::Core::Http::Policies::HttpPolicy>> perCallpolicies;
std::vector<std::unique_ptr<Azure::Core::Http::Policies::HttpPolicy>> perCallPolicies;
options.Telemetry.ApplicationId = "eventhubs.test";

m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
"eventhubs.test",
"1.0.0",
std::move(perRetrypolicies),
std::move(perCallpolicies));
std::move(perRetryPolicies),
std::move(perCallPolicies));
}

EventHubsManagement::EventHubsCreateOrUpdateOperation EventHubsManagement::CreateNamespace(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ namespace Azure { namespace Messaging { namespace EventHubs { namespace Test {
EXPECT_TRUE(ownerships[0].PartitionId == "1" || ownerships[0].PartitionId == "2");
EXPECT_TRUE(ownerships[1].PartitionId == "1" || ownerships[1].PartitionId == "2");

auto finalOwneships = loadBalancer.m_checkpointStore->ListOwnership(
auto finalOwnerships = loadBalancer.m_checkpointStore->ListOwnership(
testEventHubFQDN, testEventHubName, testConsumerGroup);
EXPECT_EQ(finalOwneships.size(), 4ul);
EXPECT_EQ(finalOwnerships.size(), 4ul);
}

TEST_F(ProcessorLoadBalancerTest, Balanced_UnownedPartitions)
Expand Down Expand Up @@ -183,9 +183,9 @@ namespace Azure { namespace Messaging { namespace EventHubs { namespace Test {
auto ownerships = loadBalancer.LoadBalance(std::vector<std::string>{"0", "1", "2", "3"});

EXPECT_FALSE(ownerships.size() == 0);
auto finalOwneships = loadBalancer.m_checkpointStore->ListOwnership(
auto finalOwnerships = loadBalancer.m_checkpointStore->ListOwnership(
testEventHubFQDN, testEventHubName, testConsumerGroup);
auto ownersMap = GroupByOwner(finalOwneships);
auto ownersMap = GroupByOwner(finalOwnerships);
auto commons = FindCommon(ownersMap);
EXPECT_EQ(commons.size(), 0ul);
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/identity/azure-identity/src/azure_cli_credential.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ AccessToken AzureCliCredential::GetToken(
// json::exception gets thrown when a string we provided for parsing is not a json object.
// It should not get thrown if the string is a valid JSON, but there are specific problems
// with the token JSON object - missing property, failure to parse a specific property etc.
// I.e. this means that the az commnd has rather printed some error message
// I.e. this means that the az command has rather printed some error message
// (such as "ERROR: Please run az login to setup account.") instead of producing a JSON
// object output. In this case, we want the exception to be thrown with the output from the
// command (which is likely the error message) and not with the details of the exception
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ using Azure::Identity::_detail::TenantIdResolver;
using Azure::Identity::_detail::TokenCredentialImpl;

// The authority host used by the credentials is in the following order of precedence:
// 1. AuthorityHost option set/overriden by the user.
// 1. AuthorityHost option set/overridden by the user.
// 2. The value of AZURE_AUTHORITY_HOST environment variable, which is the default value of the
// option.
// 3. If that environment variable isn't set or is empty, use Azure Public Cloud.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ DefaultAzureCredential::DefaultAzureCredential(
IdentityLog::Write(
IdentityLog::Level::Verbose,
"Creating " + GetCredentialName()
+ " which combines mutiple parameterless credentials into a single one.\n"
+ " which combines multiple parameterless credentials into a single one.\n"
+ GetCredentialName()
+ " is only recommended for the early stages of development, "
"and not for usage in production environment."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ TEST(DefaultAzureCredential, LogMessages)
EXPECT_EQ(
log[0].second,
"Identity: Creating DefaultAzureCredential which combines "
"mutiple parameterless credentials into a single one."
"multiple parameterless credentials into a single one."
"\nDefaultAzureCredential is only recommended for the early stages of development, "
"and not for usage in production environment."
"\nOnce the developer focuses on the Credentials and Authentication aspects of their "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Administra

/**
* @brief Only friend classes are permitted to construct a BackupOperation. This is
* because a KeyVaultPipelne is required and it is not exposed to customers.
* because a KeyVaultPipeline is required and it is not exposed to customers.
*
* @param backupClient A #BackupClient that is used for getting status updates.
* @param status A BackupOperationStatus object.
Expand All @@ -59,7 +59,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Administra
m_isBackupOperation{isBackupOperation} {};
/**
* @brief Only friend classes are permitted to construct a BackupOperation. This is
* because a KeyVaultPipelne is required and it is not exposed to customers.
* because a KeyVaultPipeline is required and it is not exposed to customers.
* @param backupClient A BackupClient that is used for getting status updates.
* @param continuationToken A string that is used to resume the operation.
* @param isBackupOperation A boolean indicating if the operation is a backup operation or a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@ BackupClient::BackupClient(
BackupClientOptions options)
: m_vaultBaseUrl(vaultUrl), m_apiVersion(options.ApiVersion)
{
std::vector<std::unique_ptr<HttpPolicy>> perRetrypolicies;
std::vector<std::unique_ptr<HttpPolicy>> perRetryPolicies;
{
Azure::Core::Credentials::TokenRequestContext tokenContext;
tokenContext.Scopes = {_internal::UrlScope::GetScopeFromUrl(m_vaultBaseUrl)};

perRetrypolicies.emplace_back(
perRetryPolicies.emplace_back(
std::make_unique<_internal::KeyVaultChallengeBasedAuthenticationPolicy>(
credential, std::move(tokenContext)));
}
std::vector<std::unique_ptr<HttpPolicy>> perCallpolicies;
std::vector<std::unique_ptr<HttpPolicy>> perCallPolicies;

m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
_detail::KeyVaultServicePackageName,
_detail::PackageVersion::ToString(),
std::move(perRetrypolicies),
std::move(perCallpolicies));
std::move(perRetryPolicies),
std::move(perCallPolicies));
}

Azure::Response<BackupOperation> BackupClient::FullBackup(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,23 @@ SettingsClient::SettingsClient(
{
auto apiVersion = options.ApiVersion;

std::vector<std::unique_ptr<HttpPolicy>> perRetrypolicies;
std::vector<std::unique_ptr<HttpPolicy>> perRetryPolicies;
{
Azure::Core::Credentials::TokenRequestContext tokenContext;
tokenContext.Scopes = {_internal::UrlScope::GetScopeFromUrl(m_vaultUrl)};

perRetrypolicies.emplace_back(
perRetryPolicies.emplace_back(
std::make_unique<_internal::KeyVaultChallengeBasedAuthenticationPolicy>(
credential, std::move(tokenContext)));
}
std::vector<std::unique_ptr<HttpPolicy>> perCallpolicies;
std::vector<std::unique_ptr<HttpPolicy>> perCallPolicies;

m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
_detail::KeyVaultServicePackageName,
_detail::PackageVersion::ToString(),
std::move(perRetrypolicies),
std::move(perCallpolicies));
std::move(perRetryPolicies),
std::move(perCallPolicies));
}

Azure::Response<Setting> SettingsClient::UpdateSetting(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,23 @@ CertificateClient::CertificateClient(
{
auto apiVersion = options.ApiVersion;

std::vector<std::unique_ptr<HttpPolicy>> perRetrypolicies;
std::vector<std::unique_ptr<HttpPolicy>> perRetryPolicies;
{
Azure::Core::Credentials::TokenRequestContext tokenContext;
tokenContext.Scopes = {_internal::UrlScope::GetScopeFromUrl(m_vaultUrl)};

perRetrypolicies.emplace_back(
perRetryPolicies.emplace_back(
std::make_unique<_internal::KeyVaultChallengeBasedAuthenticationPolicy>(
credential, std::move(tokenContext)));
}
std::vector<std::unique_ptr<HttpPolicy>> perCallpolicies;
std::vector<std::unique_ptr<HttpPolicy>> perCallPolicies;

m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
KeyVaultServicePackageName,
PackageVersion::ToString(),
std::move(perRetrypolicies),
std::move(perCallpolicies));
std::move(perRetryPolicies),
std::move(perCallPolicies));
}

Response<KeyVaultCertificateWithPolicy> CertificateClient::GetCertificate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Certificat
CertificateContactsSerializer() = delete;

public:
static std::string Serialize(std::vector<CertificateContact> const& constacts);
static std::string Serialize(std::vector<CertificateContact> const& contacts);
static CertificateContactsResult Deserialize(
Azure::Core::Http::RawResponse const& rawResponse);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys {

/*
* Only friend classes are permitted to construct a DeleteOperation. This is because a
* KeyVaultPipelne is required and it is not exposed to customers.
* KeyVaultPipeline is required and it is not exposed to customers.
*
* Since C++ doesn't offer `internal` access, we use friends-only instead.
*/
Expand Down Expand Up @@ -951,7 +951,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys {

/*
* Only friend classes are permitted to construct a RecoverDeletedKeyOperation. This is
* because a KeyVaultPipelne is required and it is not exposed to customers.
* because a KeyVaultPipeline is required and it is not exposed to customers.
*
* Since C++ doesn't offer `internal` access, we use friends-only instead.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,23 +99,23 @@ CryptographyClient::CryptographyClient(
CryptographyClientOptions const& options)
: m_keyId(Azure::Core::Url(keyId)), m_apiVersion(options.Version)
{
std::vector<std::unique_ptr<HttpPolicy>> perRetrypolicies;
std::vector<std::unique_ptr<HttpPolicy>> perRetryPolicies;
{
Azure::Core::Credentials::TokenRequestContext tokenContext;
tokenContext.Scopes = {_internal::UrlScope::GetScopeFromUrl(m_keyId)};

perRetrypolicies.emplace_back(
perRetryPolicies.emplace_back(
std::make_unique<_internal::KeyVaultChallengeBasedAuthenticationPolicy>(
std::move(credential), tokenContext));
}
std::vector<std::unique_ptr<HttpPolicy>> perCallpolicies;
std::vector<std::unique_ptr<HttpPolicy>> perCallPolicies;

m_pipeline = std::make_shared<Azure::Core::Http::_internal::HttpPipeline>(
options,
KeyVaultServicePackageName,
PackageVersion::ToString(),
std::move(perRetrypolicies),
std::move(perCallpolicies));
std::move(perRetryPolicies),
std::move(perCallPolicies));
}

Azure::Response<EncryptResult> CryptographyClient::Encrypt(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace Azure {
{
return std::make_unique<Azure::Core::Cryptography::_internal::Sha512Hash>();
}
throw std::runtime_error("Unkown Hash algorithm for: " + m_value);
throw std::runtime_error("Unknown Hash algorithm for: " + m_value);
}

}}}}} // namespace Azure::Security::KeyVault::Keys::Cryptography
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Azure::Security::KeyVault::Keys::DeleteKeyOperation::PollInternal(
}

// To ensure the success of calling Poll multiple times, even after operation is completed, a
// copy of the raw HTTP response is returned instead of transfering the ownership of the raw
// copy of the raw HTTP response is returned instead of transferring the ownership of the raw
// response inside the Operation.
return rawResponse;
}
Expand Down
Loading