'Ensure that NFS share is mounted on the host.
Unlike the parent method this one accepts mount_path as an optional
parameter and uses it as a mount point if provided.
:param nfs_share: NFS share name
:param mount_path: mount path on the host'

def _ensure_share_mounted(self, nfs_share, mount_path=None):

    mnt_flags = []
    if (self.shares.get(nfs_share) is not None):
        mnt_flags = self.shares[nfs_share].split()
    num_attempts = max(1, self.configuration.nfs_mount_attempts)
    for attempt in range(num_attempts):
        try:
            if (mount_path is None):
                self._remotefsclient.mount(nfs_share, mnt_flags)
            else:
                if (mount_path in self._remotefsclient._read_mounts()):
                    LOG.info('Already    mounted:    %s', mount_path)
                    return
                self._execute('mkdir', '-p', mount_path, check_exit_code=False)
                self._remotefsclient._mount_nfs(nfs_share, mount_path, mnt_flags)
            return
        except Exception as e:
            if (attempt == (num_attempts - 1)):
                LOG.error('Mount    failure    for    %(share)s    after    %(count)d    attempts.', {'share': nfs_share, 'count': num_attempts})
                raise exception.NfsException(six.text_type(e))
            LOG.warning('Mount    attempt    %(attempt)d    failed:    %(error)s.    Retrying    mount    ...', {'attempt': attempt, 'error': e})
            greenthread.sleep(1)
