Set BGP max paths property on VRF address family.

        Args:
            vrf (str): The VRF for this BGP process.
            rbridge_id (str): The rbridge ID of the device on which BGP will be
                configured in a VCS fabric.
            paths (str): Number of paths for BGP ECMP (default: 8).
            afi (str): Address family to configure. (ipv4, ipv6)
            get (bool): Get config instead of editing config. (True, False)
            callback (function): A function executed upon completion of the
                method.  The only parameter passed to `callback` will be the
                ``ElementTree`` `config`.

        Returns:
            Return value of `callback`.

        Raises:
            ``AttributeError``: When `afi` is not one of ['ipv4', 'ipv6']

        Examples:
            >>> import pynos.device
            >>> conn = ('10.24.39.211', '22')
            >>> auth = ('admin', 'password')
            >>> with pynos.device.Device(conn=conn, auth=auth) as dev:
            ...     output = dev.bgp.vrf_max_paths(paths='8',
            ...     rbridge_id='225')
            ...     output = dev.bgp.vrf_max_paths(
            ...     rbridge_id='225', get=True)
            ...     output = dev.bgp.vrf_max_paths(paths='8',
            ...     rbridge_id='225', delete=True)
            ...     output = dev.bgp.vrf_max_paths(paths='8', afi='ipv6',
            ...     rbridge_id='225')
            ...     output = dev.bgp.vrf_max_paths(afi='ipv6',
            ...     rbridge_id='225', get=True)
            ...     output = dev.bgp.vrf_max_paths(paths='8', afi='ipv6',
            ...     rbridge_id='225', delete=True)
            ...     output = dev.bgp.vrf_max_paths(paths='8', afi='ipv5',
            ...     rbridge_id='225') # doctest: +IGNORE_EXCEPTION_DETAIL
            Traceback (most recent call last):
            AttributeError

def vrf_max_paths(self, **kwargs):
        """Set BGP max paths property on VRF address family.

        Args:
            vrf (str): The VRF for this BGP process.
            rbridge_id (str): The rbridge ID of the device on which BGP will be
                configured in a VCS fabric.
            paths (str): Number of paths for BGP ECMP (default: 8).
            afi (str): Address family to configure. (ipv4, ipv6)
            get (bool): Get config instead of editing config. (True, False)
            callback (function): A function executed upon completion of the
                method.  The only parameter passed to `callback` will be the
                ``ElementTree`` `config`.

        Returns:
            Return value of `callback`.

        Raises:
            ``AttributeError``: When `afi` is not one of ['ipv4', 'ipv6']

        Examples:
            >>> import pynos.device
            >>> conn = ('10.24.39.211', '22')
            >>> auth = ('admin', 'password')
            >>> with pynos.device.Device(conn=conn, auth=auth) as dev:
            ...     output = dev.bgp.vrf_max_paths(paths='8',
            ...     rbridge_id='225')
            ...     output = dev.bgp.vrf_max_paths(
            ...     rbridge_id='225', get=True)
            ...     output = dev.bgp.vrf_max_paths(paths='8',
            ...     rbridge_id='225', delete=True)
            ...     output = dev.bgp.vrf_max_paths(paths='8', afi='ipv6',
            ...     rbridge_id='225')
            ...     output = dev.bgp.vrf_max_paths(afi='ipv6',
            ...     rbridge_id='225', get=True)
            ...     output = dev.bgp.vrf_max_paths(paths='8', afi='ipv6',
            ...     rbridge_id='225', delete=True)
            ...     output = dev.bgp.vrf_max_paths(paths='8', afi='ipv5',
            ...     rbridge_id='225') # doctest: +IGNORE_EXCEPTION_DETAIL
            Traceback (most recent call last):
            AttributeError
        """
        afi = kwargs.pop('afi', 'ipv4')
        vrf = kwargs.pop('vrf', 'default')
        get_config = kwargs.pop('get', False)
        callback = kwargs.pop('callback', self._callback)
        if afi not in ['ipv4', 'ipv6']:
            raise AttributeError('Invalid AFI.')
        if "ipv4" in afi:
            if not get_config:
                args = dict(af_vrf_name=vrf,
                            rbridge_id=kwargs.pop('rbridge_id', '1'),
                            load_sharing_value=kwargs.pop('paths', '8'))
            else:
                args = dict(af_vrf_name=vrf,
                            rbridge_id=kwargs.pop('rbridge_id', '1'),
                            load_sharing_value='')
            max_paths = getattr(self._rbridge,
                                'rbridge_id_router_router_bgp_address_family_'
                                'ipv4_ipv4_unicast_af_vrf_maximum_paths_'
                                'load_sharing_value')
        elif "ipv6" in afi:
            if not get_config:
                args = dict(af_ipv6_vrf_name=vrf,
                            rbridge_id=kwargs.pop('rbridge_id', '1'),
                            load_sharing_value=kwargs.pop('paths', '8'))
            else:
                args = dict(af_ipv6_vrf_name=vrf,
                            rbridge_id=kwargs.pop('rbridge_id', '1'),
                            load_sharing_value='')
            max_paths = getattr(self._rbridge,
                                'rbridge_id_router_router_bgp_address_family_'
                                'ipv6_ipv6_unicast_af_ipv6_vrf_maximum_paths_'
                                'load_sharing_value')

        config = max_paths(**args)
        if get_config:
            output = callback(config, handler='get_config')
            if output.data.find('.//{*}load-sharing-value') is not None:
                max_path = output.data.find('.//{*}load-sharing-value').text
                result = {"vrf": vrf,
                          "max_path": max_path}
                return result
            else:
                return None
        if kwargs.pop('delete', False):
            config.find('.//*load-sharing-value').set('operation', 'delete')
        return callback(config)