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

Rename AzurePublicCloud -> AzurePublic #17733

Merged
merged 1 commit into from
Apr 26, 2022
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
1 change: 1 addition & 0 deletions sdk/azcore/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

### Breaking Changes
* Renamed `cloud.Configuration.LoginEndpoint` to `.ActiveDirectoryAuthorityHost`
* Renamed `cloud.AzurePublicCloud` to `cloud.AzurePublic`
* Removed `AuxiliaryTenants` field from `arm/ClientOptions` and `arm/policy/BearerTokenOptions`
* Removed `TokenRequestOptions.TenantID`
* `Poller[T].PollUntilDone()` now takes an `options *PollUntilDoneOptions` param instead of `freq time.Duration`
Expand Down
2 changes: 1 addition & 1 deletion sdk/azcore/arm/arm.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func init() {
Audience: "https://management.core.usgovcloudapi.net",
Endpoint: "https://management.usgovcloudapi.net",
}
cloud.AzurePublicCloud.Services[cloud.ResourceManager] = cloud.ServiceConfiguration{
cloud.AzurePublic.Services[cloud.ResourceManager] = cloud.ServiceConfiguration{
Audience: "https://management.core.windows.net/",
Endpoint: "https://management.azure.com",
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/azcore/arm/runtime/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func NewPipeline(module, version string, cred azcore.TokenCredential, plOpts azr
}

func getConfiguration(o *azpolicy.ClientOptions) (cloud.ServiceConfiguration, error) {
c := cloud.AzurePublicCloud
c := cloud.AzurePublic
if !reflect.ValueOf(o.Cloud).IsZero() {
c = o.Cloud
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/azcore/arm/runtime/pipeline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func TestPipelineWithCustomPolicies(t *testing.T) {
}

func TestPipelineAudience(t *testing.T) {
for _, c := range []cloud.Configuration{cloud.AzureChina, cloud.AzureGovernment, cloud.AzurePublicCloud} {
for _, c := range []cloud.Configuration{cloud.AzureChina, cloud.AzureGovernment, cloud.AzurePublic} {
srv, close := mock.NewServer()
defer close()
srv.AppendResponse(mock.WithStatusCode(200))
Expand Down
4 changes: 2 additions & 2 deletions sdk/azcore/cloud/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ var (
AzureGovernment = Configuration{
ActiveDirectoryAuthorityHost: "https://login.microsoftonline.us/", Services: map[ServiceName]ServiceConfiguration{},
}
// AzurePublicCloud contains configuration for Azure Public Cloud.
AzurePublicCloud = Configuration{
// AzurePublic contains configuration for Azure Public Cloud.
AzurePublic = Configuration{
ActiveDirectoryAuthorityHost: "https://login.microsoftonline.com/", Services: map[ServiceName]ServiceConfiguration{},
}
)
Expand Down
2 changes: 1 addition & 1 deletion sdk/azidentity/azidentity.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func setAuthorityHost(cc cloud.Configuration) (string, error) {
if len(cc.Services) > 0 {
return "", errors.New("missing ActiveDirectoryAuthorityHost for specified cloud")
}
host = cloud.AzurePublicCloud.ActiveDirectoryAuthorityHost
host = cloud.AzurePublic.ActiveDirectoryAuthorityHost
if envAuthorityHost := os.Getenv(azureAuthorityHost); envAuthorityHost != "" {
host = envAuthorityHost
}
Expand Down
4 changes: 2 additions & 2 deletions sdk/azidentity/azidentity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func setEnvironmentVariables(t *testing.T, vars map[string]string) {
}

func Test_WellKnownHosts(t *testing.T) {
for _, cloud := range []cloud.Configuration{cloud.AzureChina, cloud.AzureGovernment, cloud.AzurePublicCloud} {
for _, cloud := range []cloud.Configuration{cloud.AzureChina, cloud.AzureGovernment, cloud.AzurePublic} {
host, err := setAuthorityHost(cloud)
if err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -196,7 +196,7 @@ func Test_DefaultAuthorityHost(t *testing.T) {
if err != nil {
t.Fatal(err)
}
if authorityHost != cloud.AzurePublicCloud.ActiveDirectoryAuthorityHost {
if authorityHost != cloud.AzurePublic.ActiveDirectoryAuthorityHost {
t.Fatal("unexpected default host: " + authorityHost)
}
}
Expand Down