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

fix(firewalls): enable retrieval of all firewalls in an account+region #793

Merged
merged 2 commits into from
May 15, 2019
Merged

fix(firewalls): enable retrieval of all firewalls in an account+region #793

merged 2 commits into from
May 15, 2019

Conversation

anotherchrisberry
Copy link
Contributor

The firewalls endpoint claims you can get a list of firewalls filtered by account and region using a URL like this: https://gate/firewalls/myaccount?region=us-east-1

But that blows up because, when you add that query parameter Clouddriver returns a List, not a Map, but Gate expects a Map.

Obviously nobody is using the query parameter method, since it's never worked, so this is a good time to introduce a new endpoint (I'd like to use it in Deck to try to get away from some of the caching we're doing there).

Map getSecurityGroups(@Path("account") String account, @Path("type") String type, @Query("region") String region)
Map getSecurityGroups(@Path("account") String account, @Path("type") String type)

@GET('/securityGroups/{account}/{type}')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Different path here than for getSecurityGroups?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same path, but with a query param (Clouddriver's API is not designed very well)

@anotherchrisberry anotherchrisberry merged commit c25fd51 into spinnaker:master May 15, 2019
@anotherchrisberry anotherchrisberry deleted the firewalls-region branch May 15, 2019 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants