Skip to content

Commit d1dd6cb

Browse files
authored
Merge pull request kubernetes#87555 from feiskyer/client-cleanup
Cleanup unused Azure client interfaces
2 parents 51bb323 + d7650e5 commit d1dd6cb

File tree

5 files changed

+22
-157
lines changed

5 files changed

+22
-157
lines changed

staging/src/k8s.io/legacy-cloud-providers/azure/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ go_library(
1313
"azure_backoff.go",
1414
"azure_blobDiskController.go",
1515
"azure_cache.go",
16-
"azure_client.go",
1716
"azure_config.go",
1817
"azure_controller_common.go",
1918
"azure_controller_standard.go",

staging/src/k8s.io/legacy-cloud-providers/azure/azure.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -227,21 +227,21 @@ type Cloud struct {
227227
Config
228228
Environment azure.Environment
229229

230-
RoutesClient RoutesClient
231-
SubnetsClient SubnetsClient
232-
InterfacesClient InterfacesClient
233-
RouteTablesClient RouteTablesClient
234-
LoadBalancerClient LoadBalancersClient
235-
PublicIPAddressesClient PublicIPAddressesClient
236-
SecurityGroupsClient SecurityGroupsClient
237-
VirtualMachinesClient VirtualMachinesClient
238-
StorageAccountClient StorageAccountClient
239-
DisksClient DisksClient
240-
SnapshotsClient SnapshotsClient
230+
RoutesClient routeclient.Interface
231+
SubnetsClient subnetclient.Interface
232+
InterfacesClient interfaceclient.Interface
233+
RouteTablesClient routetableclient.Interface
234+
LoadBalancerClient loadbalancerclient.Interface
235+
PublicIPAddressesClient publicipclient.Interface
236+
SecurityGroupsClient securitygroupclient.Interface
237+
VirtualMachinesClient vmclient.Interface
238+
StorageAccountClient storageaccountclient.Interface
239+
DisksClient diskclient.Interface
240+
SnapshotsClient snapshotclient.Interface
241241
FileClient FileClient
242-
VirtualMachineScaleSetsClient VirtualMachineScaleSetsClient
243-
VirtualMachineScaleSetVMsClient VirtualMachineScaleSetVMsClient
244-
VirtualMachineSizesClient VirtualMachineSizesClient
242+
VirtualMachineScaleSetsClient vmssclient.Interface
243+
VirtualMachineScaleSetVMsClient vmssvmclient.Interface
244+
VirtualMachineSizesClient vmsizeclient.Interface
245245

246246
ResourceRequestBackoff wait.Backoff
247247
metadata *InstanceMetadataService

staging/src/k8s.io/legacy-cloud-providers/azure/azure_client.go

Lines changed: 0 additions & 142 deletions
This file was deleted.

staging/src/k8s.io/legacy-cloud-providers/azure/azure_utils.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ limitations under the License.
1919
package azure
2020

2121
import (
22+
"context"
2223
"sync"
2324
)
2425

@@ -69,3 +70,7 @@ func (lm *lockMap) lockEntry(entry string) {
6970
func (lm *lockMap) unlockEntry(entry string) {
7071
lm.mutexMap[entry].Unlock()
7172
}
73+
74+
func getContextWithCancel() (context.Context, context.CancelFunc) {
75+
return context.WithCancel(context.Background())
76+
}

staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ import (
4040
)
4141

4242
var (
43+
// virtualMachineScaleSetsDeallocating indicates VMSS instances are in Deallocating state.
44+
virtualMachineScaleSetsDeallocating = "Deallocating"
45+
4346
// ErrorNotVmssInstance indicates an instance is not belongint to any vmss.
4447
ErrorNotVmssInstance = errors.New("not a vmss instance")
4548

0 commit comments

Comments
 (0)