-
Notifications
You must be signed in to change notification settings - Fork 7
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
Classless zone (RFC 2317) name format #65
Comments
Dang. This is really an issue of a specific string type used with only the zone name that is found in ISC Bind9 (as opposed to using valid DNS or IP-address convention). In the string charset of its zone name, slash (and backslash) characters are prohibited in It is allowed in the ISC code base but it became (oh, I remember now) problematic for it is the PyParsing that is NOT ALLOWING slash/backslash charsetr in a Python string index names (as well as variable names). Such example of Python string index name is:
would NOT work because slash character does not work in Python index string. But this one should work:
Downside to a workaround is to remap the unsupported characters for usability within its Python index naming convention. Additional studies tells me that this will be a hindrance in order to gain parsing capability of Bind9 ... with PyParsing and Python. Simply remaping Pray tell, are you using some kind of automated tools that is generating these "esoteric" (but valid) zone names? |
I came upon this zone format for a migration project of mine. This notation was most likely entered by a human. But Infoblox is also compliant with this naming (with slash). They use ISC BIND in the backend of their solution.
There probably should be some kind of error thrown for this saying something in the lines of "we do not support / in classless zone format, please replace with -". Or automate this transformation. At least the documentation should probably reflect this limitation. |
Current design document
|
See StackOverflow by extraordinaire Paul McGuire (@ptmcg): expr = Literal("/").setParseAction(replaceWith("_")) + "/"
print expr.parseString("zone "128/27.0.0.1 {};").asList() More of those |
I would change the slash ( / ) to a dash ( - ) for the nomination to be valid for Bind. I don't think underscore ( _ ) would parse properly in Bind. |
Underscore works well for zone name. Even square brackets too!!! But i ran into some issues with other non-alphanum characters, and need to recheck on the minus symbol for used within this one named index used in Python array variables. |
There are 3 different format for sub class C arpa (reverse) zones.
I have an error parsing the following:
This is the error:
Where the zone is something like this:
If I change the slash to a dash, it is parsed properly.
So the following notation works
But I was expecting the previous one to also work.
The 3rd annotation also works.
The text was updated successfully, but these errors were encountered: