'Check if vf has macvtap interface assigned
Parses the output of ip link show command and checks
if macvtap[0-9]+@<vf interface> regex matches the
output.
@param ifname: vf interface name
@param ip_link_show_output: \'ip link show\' result to parse
@return: True on match otherwise False'

@classmethod
def is_macvtap_assigned(cls, ifname, ip_link_show_output):

    for line in ip_link_show_output.splitlines():
        pattern_match = cls.MACVTAP_REG_EX.match(line)
        if pattern_match:
            if (ifname == pattern_match.group('vf_interface')):
                return True
    return False
