Skip to content

Commit

Permalink
Filter out unwanted data from azure list geneva action (Azure#1969)
Browse files Browse the repository at this point in the history
* filter our Microsoft.Compute/snapshots from azure list geneva action

* change filter input for test
  • Loading branch information
ArielLima authored and ellis-johnson committed Jun 3, 2022
1 parent b70bd3f commit 89e4f16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/frontend/adminactions/resources_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
func (a *azureActions) ResourcesList(ctx context.Context) ([]byte, error) {
clusterRGName := stringutils.LastTokenByte(a.oc.Properties.ClusterProfile.ResourceGroupID, '/')

resources, err := a.resources.ListByResourceGroup(ctx, clusterRGName, "", "", nil)
resources, err := a.resources.ListByResourceGroup(ctx, clusterRGName, "resourceType ne 'Microsoft.Compute/snapshots'", "", nil)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/frontend/adminactions/resources_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
)

func validListByResourceGroupMock(resources *mock_features.MockResourcesClient) {
resources.EXPECT().ListByResourceGroup(gomock.Any(), "test-cluster", "", "", nil).Return([]mgmtfeatures.GenericResourceExpanded{
resources.EXPECT().ListByResourceGroup(gomock.Any(), "test-cluster", "resourceType ne 'Microsoft.Compute/snapshots'", "", nil).Return([]mgmtfeatures.GenericResourceExpanded{
{
Name: to.StringPtr("vm-1"),
ID: to.StringPtr("/subscriptions/id"),
Expand Down

0 comments on commit 89e4f16

Please sign in to comment.