'Return space available on remote device.'

def remote_space_available(self, search_pattern=u'bytes    total    \\((.*)    bytes    free\\)'):

    remote_cmd = u'dir    {0}'.format(self.file_system)
    remote_output = self.ssh_ctl_chan.send_command_expect(remote_cmd)
    match = re.search(search_pattern, remote_output)
    return int(match.group(1))
