Skip to content

Issue with glpi.list_computers method #10

@iceman94

Description

@iceman94

Hi everyone,

First of all, let me state that I am far from being an expert with Python but the more I can get my hands on, the more I love it !

I am using the glpi.list_computers method and I have a small issue : I can only get a total of 15 computers, even though my GLPI CMDB has 97 of them.

Is there some obvious behavior I am not aware of, which would limit the list of computers to 15 (which seems to be the # of computers on a given page on the web interface) ?

And on top of that, I can't access all informations for a given computer :

$ python list_computers.py
list_computers.py:25: RuntimeWarning: GLPI environment variables not locally set
  warnings.warn("GLPI environment variables not locally set", RuntimeWarning)
Enter your GLPI hostname: URL_TO_GLPI/glpi/
Enter your GLPI username: FIRSTNAME.LASTNAME
Enter your password: 
True
[{u'entities_id': u'14',
  u'entities_name': u'Test_Entity',
  u'id': u'1',
  u'locations_name': None,
  u'name': u'SERVER1',
  u'otherserial': None,
  u'serial': u'123456A'},
[...]

Thanks in advance and, of course, long live Python (and GLPI).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions