Feedback wanted: Replacing backend_searchIdents, getClients_listOfHashes and getClientIds_list

The place for development of / with / for opsi.
Post your API questions here!
Benutzeravatar
n.wenselowski
uib-Team
Beiträge: 3188
Registriert: 04 Apr 2013, 12:15

Feedback wanted: Replacing backend_searchIdents, getClients_listOfHashes and getClientIds_list

Beitragvon n.wenselowski » 20 Mai 2019, 15:42

Hello everyone,

For opsi 4.2 I want to replace the methods backend_searchIdents, getClients_listOfHashes, getClientIds_list by specialized methods.

Based on initial feedback collected from our team at uib I suggest the following methods as replacements:
  • getClients (no parameters): returns a list of client hashes. These hashes do not include the attributes "type" and "ident" so they can act as an replacement for getClients_listOfHashes.
  • getClientIDs (no parameters): returns a list of client IDs and can replace getClientIds_list
  • getClientsOnDepot (parameter: depotIds (list of depot IDs)): returns a list of client IDs that can be found on the given depots. Can act as an replacement for getClientIds_list.
  • getClientsWithProducts (parameter: productIds (list of product IDs), optional parameter installationStatus (string)): Returns a list of IDs of all clients with the product independent from installationStatus. If the optional parameter installationStatus is given then only clients with a matching status are returned. Can act as a replacement for getClientIds_list

Do you use any of the methods to be deprecated?
Are your use cases covered by the suggested replacements?
What are your thoughts on this?


Kind regards

Niko
opsi development - uib gmbh
For productive opsi installations we recommend support contracts.

r4tzeblitz
Beiträge: 56
Registriert: 17 Sep 2015, 17:55

Re: Feedback wanted: Replacing backend_searchIdents, getClients_listOfHashes and getClientIds_list

Beitragvon r4tzeblitz » 07 Jun 2019, 10:25

Hi Niko,

currently we use the method "getClientIds_list to get a list of all clients with outstanding actions (Setup, update, uninstall).

Code: Alles auswählen

getClientIds_list null null null null null '["uninstall","setup","update"]

this is important for our WakeOnLAN handling.
Is there an equal way to get the same output?

Regards

Stefan

Benutzeravatar
n.wenselowski
uib-Team
Beiträge: 3188
Registriert: 04 Apr 2013, 12:15

Re: Feedback wanted: Replacing backend_searchIdents, getClients_listOfHashes and getClientIds_list

Beitragvon n.wenselowski » 17 Jun 2019, 12:44

Hi Stefan,

r4tzeblitz hat geschrieben:currently we use the method "getClientIds_list to get a list of all clients with outstanding actions (Setup, update, uninstall).

Code: Alles auswählen

getClientIds_list null null null null null '["uninstall","setup","update"]

this is important for our WakeOnLAN handling.
Is there an equal way to get the same output?

There isn't an easy replacement for this yet.

I think I would like to handle this with a new function:
getClientsWithActionRequest (parameter: actionRequests (list of action requests)): Returns a list of client IDs that have the given actionRequests set. Each client will only be present once in the list of one of the given action requests match.

What do you think about this?


Kind regards

Niko
opsi development - uib gmbh
For productive opsi installations we recommend support contracts.

r4tzeblitz
Beiträge: 56
Registriert: 17 Sep 2015, 17:55

Re: Feedback wanted: Replacing backend_searchIdents, getClients_listOfHashes and getClientIds_list

Beitragvon r4tzeblitz » 02 Jul 2019, 17:04

This should be a good alternative method. I think we can use it for our purposes.

Benutzeravatar
n.wenselowski
uib-Team
Beiträge: 3188
Registriert: 04 Apr 2013, 12:15

Re: Feedback wanted: Replacing backend_searchIdents, getClients_listOfHashes and getClientIds_list

Beitragvon n.wenselowski » 08 Jul 2019, 14:06

Hi,

all proposed methods are available since python-opsi 4.1.1.69-1.
This version can currently be found in the experimental branch.

Looking forward to your feedback!


Kind regards

Niko
opsi development - uib gmbh
For productive opsi installations we recommend support contracts.