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

Limit static route result to corresponding vpcId when a gwId is passed #90

Merged
merged 1 commit into from
Oct 6, 2016

Conversation

remibergsma
Copy link
Member

When a private gatewayId is passed, lookup its VPCid and return only static routes that belong to this VPC.

private Long retrieveVpcId() {
if (gatewayId != null) {
final VpcGateway gateway = _vpcService.getVpcPrivateGateway(gatewayId);
return gateway.getVpcId();
Copy link
Contributor

@borisroman borisroman Oct 4, 2016

Choose a reason for hiding this comment

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

gateway can be null here when a non existing private gateway id has been used. Please review @remibergsma

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @borisroman will have a look at it

Copy link
Member Author

Choose a reason for hiding this comment

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

@borisroman Invalid input is handled:

(local) 🐵 > list staticroutes gatewayid=9e037a7b-a2d6-4bc5-b2ae-65e3ab257801
Error 431: Unable to execute API command liststaticroutes due to invalid value. Invalid parameter gatewayid value=9e037a7b-a2d6-4bc5-b2ae-65e3ab257801 due to incorrect long value format, or entity does not exist or due to incorrect parameter annotation for the field in api cmd class.

@remibergsma
Copy link
Member Author

go build

1 similar comment
@remibergsma
Copy link
Member Author

go build

@bheuvel bheuvel merged commit 6f8d992 into master Oct 6, 2016
@bheuvel bheuvel deleted the fix/vpc-static-route-listing branch October 6, 2016 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants