Skip to content

Commit 1b1719c

Browse files
authored
Rename AzurePublicCloud -> AzurePublic (Azure#17733)
1 parent a62335c commit 1b1719c

File tree

7 files changed

+9
-8
lines changed

7 files changed

+9
-8
lines changed

sdk/azcore/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
### Breaking Changes
88
* Renamed `cloud.Configuration.LoginEndpoint` to `.ActiveDirectoryAuthorityHost`
9+
* Renamed `cloud.AzurePublicCloud` to `cloud.AzurePublic`
910
* Removed `AuxiliaryTenants` field from `arm/ClientOptions` and `arm/policy/BearerTokenOptions`
1011
* Removed `TokenRequestOptions.TenantID`
1112
* `Poller[T].PollUntilDone()` now takes an `options *PollUntilDoneOptions` param instead of `freq time.Duration`

sdk/azcore/arm/arm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func init() {
1717
Audience: "https://management.core.usgovcloudapi.net",
1818
Endpoint: "https://management.usgovcloudapi.net",
1919
}
20-
cloud.AzurePublicCloud.Services[cloud.ResourceManager] = cloud.ServiceConfiguration{
20+
cloud.AzurePublic.Services[cloud.ResourceManager] = cloud.ServiceConfiguration{
2121
Audience: "https://management.core.windows.net/",
2222
Endpoint: "https://management.azure.com",
2323
}

sdk/azcore/arm/runtime/pipeline.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func NewPipeline(module, version string, cred azcore.TokenCredential, plOpts azr
4646
}
4747

4848
func getConfiguration(o *azpolicy.ClientOptions) (cloud.ServiceConfiguration, error) {
49-
c := cloud.AzurePublicCloud
49+
c := cloud.AzurePublic
5050
if !reflect.ValueOf(o.Cloud).IsZero() {
5151
c = o.Cloud
5252
}

sdk/azcore/arm/runtime/pipeline_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func TestPipelineWithCustomPolicies(t *testing.T) {
167167
}
168168

169169
func TestPipelineAudience(t *testing.T) {
170-
for _, c := range []cloud.Configuration{cloud.AzureChina, cloud.AzureGovernment, cloud.AzurePublicCloud} {
170+
for _, c := range []cloud.Configuration{cloud.AzureChina, cloud.AzureGovernment, cloud.AzurePublic} {
171171
srv, close := mock.NewServer()
172172
defer close()
173173
srv.AppendResponse(mock.WithStatusCode(200))

sdk/azcore/cloud/cloud.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ var (
1515
AzureGovernment = Configuration{
1616
ActiveDirectoryAuthorityHost: "https://login.microsoftonline.us/", Services: map[ServiceName]ServiceConfiguration{},
1717
}
18-
// AzurePublicCloud contains configuration for Azure Public Cloud.
19-
AzurePublicCloud = Configuration{
18+
// AzurePublic contains configuration for Azure Public Cloud.
19+
AzurePublic = Configuration{
2020
ActiveDirectoryAuthorityHost: "https://login.microsoftonline.com/", Services: map[ServiceName]ServiceConfiguration{},
2121
}
2222
)

sdk/azidentity/azidentity.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func setAuthorityHost(cc cloud.Configuration) (string, error) {
4242
if len(cc.Services) > 0 {
4343
return "", errors.New("missing ActiveDirectoryAuthorityHost for specified cloud")
4444
}
45-
host = cloud.AzurePublicCloud.ActiveDirectoryAuthorityHost
45+
host = cloud.AzurePublic.ActiveDirectoryAuthorityHost
4646
if envAuthorityHost := os.Getenv(azureAuthorityHost); envAuthorityHost != "" {
4747
host = envAuthorityHost
4848
}

sdk/azidentity/azidentity_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ func setEnvironmentVariables(t *testing.T, vars map[string]string) {
156156
}
157157

158158
func Test_WellKnownHosts(t *testing.T) {
159-
for _, cloud := range []cloud.Configuration{cloud.AzureChina, cloud.AzureGovernment, cloud.AzurePublicCloud} {
159+
for _, cloud := range []cloud.Configuration{cloud.AzureChina, cloud.AzureGovernment, cloud.AzurePublic} {
160160
host, err := setAuthorityHost(cloud)
161161
if err != nil {
162162
t.Fatal(err)
@@ -196,7 +196,7 @@ func Test_DefaultAuthorityHost(t *testing.T) {
196196
if err != nil {
197197
t.Fatal(err)
198198
}
199-
if authorityHost != cloud.AzurePublicCloud.ActiveDirectoryAuthorityHost {
199+
if authorityHost != cloud.AzurePublic.ActiveDirectoryAuthorityHost {
200200
t.Fatal("unexpected default host: " + authorityHost)
201201
}
202202
}

0 commit comments

Comments
 (0)