You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Zack Shoylev <no...@github.com> on 2017/01/03 22:55:12 UTC
[jclouds/jclouds] Allow ipv6 address blocks (#1047)
https://issues.apache.org/jira/browse/JCLOUDS-1100
You can view, comment on, or merge this pull request online at:
https://github.com/jclouds/jclouds/pull/1047
-- Commit Summary --
* Allow ipv6 address blocks
-- File Changes --
M core/src/main/java/org/jclouds/util/Strings2.java (31)
M core/src/test/java/org/jclouds/util/Strings2Test.java (3)
-- Patch Links --
https://github.com/jclouds/jclouds/pull/1047.patch
https://github.com/jclouds/jclouds/pull/1047.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1047
Re: [jclouds/jclouds] Allow ipv6 address blocks (#1047)
Posted by Zack Shoylev <no...@github.com>.
merged and backported to 2.0.x
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1047#issuecomment-271697664
Re: [jclouds/jclouds] Allow ipv6 address blocks (#1047)
Posted by Ignasi Barrera <no...@github.com>.
Yes, I see, but it is still more readable/maintainable than the regexp I think.
Thanks for the change!
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1047#issuecomment-271685037
Re: [jclouds/jclouds] Allow ipv6 address blocks (#1047)
Posted by Zack Shoylev <no...@github.com>.
@zack-shoylev pushed 1 commit.
8f39e36 More testing
--
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds/pull/1047/files/aebaaa375376759da49741f4c06d9ea0e4278666..8f39e36da24fb69acf82d1f574789c83852d31aa
Re: [jclouds/jclouds] Allow ipv6 address blocks (#1047)
Posted by Zack Shoylev <no...@github.com>.
Closed #1047.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1047#event-918173596
Re: [jclouds/jclouds] Allow ipv6 address blocks (#1047)
Posted by Ignasi Barrera <no...@github.com>.
nacx commented on this pull request.
> + + "((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|"
+ + "(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|"
+ + "((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|"
+ + "(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|"
+ + ":((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|"
+ + "(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|"
+ + "((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|"
+ + "(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|"
+ + "((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|"
+ + "(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|"
+ + "((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|"
+ + "(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|"
+ + "((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|"
+ + "(:(((:[0-9A-Fa-f]{1,4}){1,7})|"
+ + "((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)"
+ + "(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*(\\/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))?$");
Can we better use Guava's [InetAddresses#isInetAddress](https://google.github.io/guava/releases/19.0/api/docs/com/google/common/net/InetAddresses.html#isInetAddress(java.lang.String)) or the `forString` methods? This looks too error-prone and difficult to read/fix/maintain. Perhaps we could manually split the mask, and validate the address part and then the mask?
> @@ -42,9 +42,10 @@ public void testUrlEncodeDecodeShouldGiveTheSameString() {
public void testIsCidrFormat() {
assert Strings2.isCidrFormat("1.2.3.4/5");
assert Strings2.isCidrFormat("0.0.0.0/0");
+ assert Strings2.isCidrFormat("fdab:43a4:b3a2:f140::/64");
We should add more tests to verify the IPv6 format
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1047#pullrequestreview-15040609
Re: [jclouds/jclouds] Allow ipv6 address blocks (#1047)
Posted by Zack Shoylev <no...@github.com>.
@nacx Is this what you had in mind? I am asking because the logic needed to avoid the regex was a little bit more complex than just splitting.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1047#issuecomment-271667868
Re: [jclouds/jclouds] Allow ipv6 address blocks (#1047)
Posted by Zack Shoylev <no...@github.com>.
@zack-shoylev pushed 1 commit.
96a1cfe One more test, review changes.
--
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds/pull/1047/files/8f39e36da24fb69acf82d1f574789c83852d31aa..96a1cfeaedcda3249d6894edbeb2e2477af904fc