Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
2d420a9b
Commit
2d420a9b
authored
Sep 17, 2015
by
Abhijit Menon-Sen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow hexadecimal ranges in IPv6 addresses, not only 0-9
parent
cc460125
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletions
+9
-1
lib/ansible/parsing/utils/addresses.py
+8
-1
test/units/parsing/test_addresses.py
+1
-0
No files found.
lib/ansible/parsing/utils/addresses.py
View file @
2d420a9b
...
...
@@ -31,6 +31,13 @@ numeric_range = r'''
\]
'''
hexadecimal_range
=
r'''
\[
(?:[0-9a-f]+:[0-9a-f]+) # hexadecimal begin:end
(?::[0-9]+)? # numeric :step (optional)
\]
'''
alphanumeric_range
=
r'''
\[
(?:
...
...
@@ -50,7 +57,7 @@ ipv6_component = r'''
[0-9a-f]{{1,4}}| # 0..ffff
{range} # or a numeric range
)
'''
.
format
(
range
=
numeric
_range
)
'''
.
format
(
range
=
hexadecimal
_range
)
ipv4_component
=
r'''
(?:
...
...
test/units/parsing/test_addresses.py
View file @
2d420a9b
...
...
@@ -43,6 +43,7 @@ class TestParseAddress(unittest.TestCase):
'192.0.2.[3:10]:23'
:
[
'192.0.2.[3:10]'
,
23
],
'abcd:ef98::7654:[1:9]'
:
[
'abcd:ef98::7654:[1:9]'
,
None
],
'[abcd:ef98::7654:[6:32]]:2222'
:
[
'abcd:ef98::7654:[6:32]'
,
2222
],
'[abcd:ef98::7654:[9ab3:fcb7]]:2222'
:
[
'abcd:ef98::7654:[9ab3:fcb7]'
,
2222
],
u'fóöb[a:c]r.éxàmplê.com:632'
:
[
u'fóöb[a:c]r.éxàmplê.com'
,
632
],
'[a:b]foo.com'
:
[
'[a:b]foo.com'
,
None
],
'foo[a:b].com'
:
[
'foo[a:b].com'
,
None
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment