Skip to content

Odd id argument in the hosts.reports_last method #87

@miarmak

Description

@miarmak

There is a method of foreman.client.Foreman(): hosts.reports_last.

The help function output for it states, that the method takes 2 arguments: host_id and id, that are both required:

Help on method reports_last in module aiccliforeman.foreman_api.foreman.client:

reports_last(self, host_id, id) method of aiccliforeman.foreman_api.foreman.client.Hosts instance
    Show the last report for a host

    :param host_id: <no description>;  (REQUIRED)
    :param id: <no description>; Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space. (REQUIRED)

Indicating different values in this argument lead to the same results. And also official Foreman API documentation states, that this method takes only 1 parameter - host_id: https://theforeman.org/api/1.8/apidoc/v2/reports/last.html. But I can see similar description in that doc and this method here for 'id' parameter. In this case I assume it could incorrectly generated.

Foreman version: 1.11.4
python-foreman: 0.4.19

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