'Validates output from "pcs status", ensuring that each master
provided is online.
Ex: data = (\'...\',
\'PCSD Status:\',
\'master1.example.com: Online\',
\'master2.example.com: Online\',
\'master3.example.com: Online\',
masters = [\'master1.example.com\',
\'master2.example.com\',
\'master3.example.com\']
returns True'

@staticmethod
def validate_pcs_cluster(data, masters=None):

    if (not issubclass(type(data), string_types)):
        raise errors.AnsibleFilterError('|failed    expects    data    is    a    string    or    unicode')
    if (not issubclass(type(masters), list)):
        raise errors.AnsibleFilterError('|failed    expects    masters    is    a    list')
    valid = True
    for master in masters:
        if ('{0}:    Online'.format(master) not in data):
            valid = False
    return valid
