'Validate vf capability support
Checks if given vf capability (and sub capability
if given) supported
:param vf_section: vf Num block content
:param capability: for example: vlan, rate, spoofchk, state
:param subcapability: for example: qos'

@classmethod
def vf_mgmt_capability_supported(cls, vf_section, capability, subcapability=None):

    if (not vf_section):
        return False
    if subcapability:
        regex = (cls.SUB_CAPABILITY_REGEX % {'cap': capability, 'subcap': subcapability})
    else:
        regex = (cls.CAPABILITY_REGEX % capability)
    pattern_match = re.search(regex, vf_section, (re.DOTALL | re.MULTILINE))
    return (pattern_match is not None)
