From: Karsten Keil Date: Tue, 14 Apr 2009 15:06:30 +0000 (+0200) Subject: Fix compatibility with DRBD 8.2 X-Git-Tag: v2.0.1~6^2~29 X-Git-Url: https://code.grnet.gr/git/ganeti-local/commitdiff_plain/34e71feabfc1a4516ddfd207579f997efcabb4c5 Fix compatibility with DRBD 8.2 This patch adds (and suppresses) the extra ipv4/ipv6 words before the actual address that newer DRBD versions add. [iustin@google.com: slightly changed the patch to conform to style guide, and changed the commit message] Signed-off-by: Iustin Pop Reviewed-by: Iustin Pop --- diff --git a/lib/bdev.py b/lib/bdev.py index 545cc0b..94e8ab8 100644 --- a/lib/bdev.py +++ b/lib/bdev.py @@ -896,8 +896,10 @@ class DRBD8(BaseDRBD): # value types value = pyp.Word(pyp.alphanums + '_-/.:') quoted = dbl_quote + pyp.CharsNotIn('"') + dbl_quote - addr_port = (pyp.Word(pyp.nums + '.') + pyp.Literal(':').suppress() + - number) + addr_type = (pyp.Optional(pyp.Literal("ipv4")).suppress() + + pyp.Optional(pyp.Literal("ipv6")).suppress()) + addr_port = (addr_type + pyp.Word(pyp.nums + '.') + + pyp.Literal(':').suppress() + number) # meta device, extended syntax meta_value = ((value ^ quoted) + pyp.Literal('[').suppress() + number + pyp.Word(']').suppress())