Commvault / cvpysdk

Developer SDK - Python
https://commvault.github.io/cvpysdk/
Apache License 2.0
54 stars 41 forks source link

Get all clients filtered by agent type #126

Closed rantanevich closed 3 years ago

rantanevich commented 3 years ago

Hi,

Is there opportunity to get all client filtered by agent type? For instance, I'd like to take all Oracle agents.

I found a function that could do this in theory. Could you clarify all available url_params options or advice another way?

https://github.com/Commvault/cvpysdk/blob/56d878377b06d9a068cd89a917cc2622647f5193/cvpysdk/client.py#L4741-L4759

iamthemananiket commented 3 years ago

Hi. We'll soon be adding support for retrieving the list of clients of a particular agent type. -Thanks

rantanevich commented 3 years ago

Thank you! Can you say it will be added in SP23 or next SP?

iamthemananiket commented 3 years ago

We'll let you know as soon as it is ready. Until then please see if you can try this work around to retrieve the clients of a particular agent -

# Create a Commcell object and use the request() https://github.com/Commvault/cvpysdk/blob/56d878377b06d9a068cd89a917cc2622647f5193/cvpysdk/commcell.py#L1483 function in Commcell class to make request

#In this example applicationId - 22 is for Oracle agents
resp = cc_obj.request('GET', 'Client?applicationId=22')

#The json() function will return the response as a dictionary
resp.json()

Please let us know the specific agents that you want to filter and retrieve. We can share with you it's respective applicationid.

rantanevich commented 3 years ago

Yep, it works fine. I'd like to know AppId for file system (Linux, Windows) and database (PostgreSQL, MySQL, SQL).

iamthemananiket commented 3 years ago

Please try these values -

Agent ApplicationId
Windows File System 33
Unix File System 29
PostgreSQL 125
MySQL 104
MS SQL 81
rantanevich commented 3 years ago

Great! All values are correct. Thank you!