@@ -17,7 +17,6 @@ import (
1717 azstorage "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage"
1818 "github.com/Azure/go-autorest/autorest/to"
1919 "k8s.io/apimachinery/pkg/util/sets"
20- "k8s.io/utils/ptr"
2120)
2221
2322//go:generate mockgen -source=./client.go -destination=mock/azureclient_generated.go -package=mock
@@ -44,12 +43,8 @@ type API interface {
4443 GetAvailabilityZones (ctx context.Context , region string , instanceType string ) ([]string , error )
4544 GetLocationInfo (ctx context.Context , region string , instanceType string ) (* azenc.ResourceSkuLocationInfo , error )
4645 CheckIfExistsStorageAccount (ctx context.Context , resourceGroup , storageAccountName , region string ) error
47- CheckIfARO (ctx context.Context , groupName string ) (bool , error )
4846}
4947
50- var aro * bool
51- var aroTag = "installer-aro"
52-
5348// Client makes calls to the Azure API.
5449type Client struct {
5550 ssn * Session
@@ -248,30 +243,6 @@ func (c *Client) GetGroup(ctx context.Context, groupName string) (*azres.Group,
248243 return & res , nil
249244}
250245
251- // CheckIfARO checks the existing resource group provided for specific tag
252- // to see if the value set is to ARO. If set, the installer will ignore multiple
253- // checks/validations and perform ARO specific tasks.
254- func (c * Client ) CheckIfARO (ctx context.Context , groupName string ) (bool , error ) {
255- if aro != nil {
256- return * aro , nil
257- }
258- if groupName == "" {
259- return false , nil
260- }
261- group , err := c .GetGroup (ctx , groupName )
262- if err != nil {
263- return false , err
264- }
265- rgTags := group .Tags
266- aro = ptr .To (false )
267- if value , ok := rgTags [aroTag ]; ok {
268- if value != nil && * value == "owned" {
269- aro = ptr .To (true )
270- }
271- }
272- return * aro , nil
273- }
274-
275246// ListResourceIDsByGroup returns a list of resource IDs for resource group groupName.
276247func (c * Client ) ListResourceIDsByGroup (ctx context.Context , groupName string ) ([]string , error ) {
277248 client := azres .NewClientWithBaseURI (c .ssn .Environment .ResourceManagerEndpoint , c .ssn .Credentials .SubscriptionID )
0 commit comments