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
network.Protocol doesn't support the list of AWS vpc protocols #291
Comments
Hi @pshafton, thanks for your feedback. This may not be a core issue, but dasein-cloud-aws. Would you have the stacktrace from the exception? Thanks. |
Yep. Here is the stack trace... ! java.lang.IllegalArgumentException: No enum constant org.dasein.cloud.network.Protocol.51 There are kind of 2 issues. The first is that to return a Firewall Object you also need to return a FirewallRule. In the aws code to parse the aws response it needs to create a FirewallRule and the FirewallRule includes a Protocol member variable. So the aws code will somehow have to map the ipProtocol response into a valid Protocol. This is kind of where I thought the core change would have to come in. The aws layer can only map into the valid list of enums that exist. The code in question lives in the toFirewallRules(@nonnull String securityGroupId, @nullable Node node, @nonnull Direction direction) method in the aws/network/SecurityGroup.java class and this is the code that handles the Protocol...
|
Thank you! |
In Amazon VPC regions the Firewalls support all of the following protocols...
http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
When you try to list the firewalls if one of them has included a protocol that is not in the current enum list
public enum Protocol {
/**
* The TCP protocol.
/
TCP,
/*
* The UDP datagram protocol.
/
UDP,
/*
* The ICMP protocol.
/
ICMP,
/*
* IPsec
/
IPSEC,
/*
* Any protocol
*/
ANY
}
Then an exception is thrown when we try to map this protocol value to an enum.
The text was updated successfully, but these errors were encountered: