def machines(self, machine_type=None, name=None, dataset=None, state=None, <EOL>memory=None, tombstone=None, tags=None, credentials=False, <EOL>paged=False, limit=None, offset=None):
params = {}<EOL>if machine_type:<EOL><INDENT>params['<STR_LIT:type>'] = machine_type<EOL><DEDENT>if name:<EOL><INDENT>params['<STR_LIT:name>'] = name<EOL><DEDENT>if dataset:<EOL><INDENT>if isinstance(dataset, dict):<EOL><INDENT>dataset = dataset.get('<STR_LIT>', dataset['<STR_LIT:id>'])<EOL><DEDENT>params['<STR_LIT>'] = dataset<EOL><DEDENT>if state:<EOL><INDENT>params['<STR_LIT:state>'] = state<EOL><DEDENT>if memory:<EOL><INDENT>params['<STR_LIT>'] = memory<EOL><DEDENT>if tombstone:<EOL><INDENT>params['<STR_LIT>'] = tombstone<EOL><DEDENT>if tags:<EOL><INDENT>for k, v in tags.items():<EOL><INDENT>params['<STR_LIT>' + str(k)] = v<EOL><DEDENT><DEDENT>if credentials:<EOL><INDENT>params['<STR_LIT>'] = True<EOL><DEDENT>if limit:<EOL><INDENT>params['<STR_LIT>'] = limit<EOL><DEDENT>else:<EOL><INDENT>limit = <NUM_LIT:1000><EOL><DEDENT>if offset:<EOL><INDENT>params['<STR_LIT>'] = offset<EOL><DEDENT>else:<EOL><INDENT>offset = <NUM_LIT:0><EOL><DEDENT>machines = []<EOL>while True:<EOL><INDENT>j, r = self.request('<STR_LIT:GET>', '<STR_LIT>', params=params)<EOL>machines.extend(j)<EOL>if not paged:<EOL><INDENT>query_limit = int(r.headers['<STR_LIT>'])<EOL>resource_count = int(r.headers['<STR_LIT>'])<EOL>if resource_count > query_limit:<EOL><INDENT>data['<STR_LIT>'] = (params.get('<STR_LIT>', offset) + <EOL>params.get('<STR_LIT>', limit)    )<EOL><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>return [Machine(datacenter=self, data=m) for m in machines]<EOL>
::

    GET /:login/machines

Query for machines in the current DataCenter matching the input 
criteria, returning a :py:class:`list` of instantiated 
:py:class:`smartdc.machine.Machine` objects.

:param machine_type: virtualmachine or smartmachine
:type machine_type: :py:class:`basestring`

:param name: machine name to find (will make the return list size 
    1 or 0)
:type name: :py:class:`basestring`

:param dataset: unique ID or URN for a dataset
:type dataset: :py:class:`basestring` or :py:class:`dict`

:param state: current running state
:type state: :py:class:`basestring`

:param memory: current size of the RAM deployed for the machine (Mb)
:type memory: :py:class:`int`

:param tombstone: include machines destroyed in the last N minutes
:type tombstone: :py:class:`int`

:param tags: keys and values to query in the machines' tag space
:type tags: :py:class:`dict`

:param credentials: whether to include the generated credentials for 
    machines, if present
:type credentials: :py:class:`bool`

:param paged: whether to return in pages
:type paged: :py:class:`bool`

:param limit: return N machines
:type limit: :py:class:`int`

:param offset: get the next `limit` of machines starting at this point
:type offset: :py:class:`int`

:rtype: :py:class:`list` of :py:class:`smartdc.machine.Machine`\s

The `limit` and `offset` are the REST API's raw paging mechanism. 
Alternatively, one can let `paged` remain `False`, and let the method 
call attempt to collect all of the machines in multiple calls.