add FIXMEs for full grammar parsing

@tserong will probably have to fix these if he wants to incorporate this
class hierarchy into Hawk ;-) But of course we'd first need to split it
off into a separate gem (which should be easy - I've deliberately kept
the code fairly cleanly separated).
This commit is contained in:
Adam Spiers 2014-03-21 17:25:59 +00:00
parent 21f3231732
commit 3bb5d93b80
3 changed files with 7 additions and 0 deletions

View File

@ -11,6 +11,9 @@ class Pacemaker::Constraint::Colocation < Pacemaker::Constraint
end
def parse_definition
# FIXME: this is incomplete. It probably doesn't handle resource
# sets correctly, and certainly doesn't handle node attributes.
# See the crm(8) man page for the official BNF grammar.
unless definition =~ /^#{self.class::TYPE} (\S+) (\d+|[-+]?inf): (.+?)\s*$/
raise Pacemaker::CIBObject::DefinitionParseError, \
"Couldn't parse definition '#{definition}'"

View File

@ -7,6 +7,8 @@ class Pacemaker::Resource::Clone < Pacemaker::Resource
include Pacemaker::Mixins::Resource::Meta
# FIXME: need to handle params as well as meta
attr_accessor :rsc
def self.attrs_to_copy_from_chef

View File

@ -7,6 +7,8 @@ class Pacemaker::Resource::Group < Pacemaker::Resource
include Pacemaker::Mixins::Resource::Meta
# FIXME: need to handle params as well as meta
attr_accessor :members
def self.attrs_to_copy_from_chef