Unsolved
This post is more than 5 years old
274.2K Posts
0
569
Howto use performSearchBy with the ViPR JavaClient
Hi,
I am trying to develop CSV interfaces for loading hosts / Initiators easily into ViPR.
And for the initiators, I need to look for HostID.
HostID = client.hosts().performSearchBy("HostName", elt.getHostName()).get(1).getId();
With This line, I am Trying to find the first host corresponding to my criterias.
But every time I am getting :
Error 1008 (http: 400): Parameter was provided but invalid. Unknown parameter for search: {HostName=[OGUY_TEST_1]}
How is working the search functionnality ?
regs,
Olivier Guyot
Anonymous
274.2K Posts
0
March 5th, 2015 03:00
Hi Olivier,
I am not very sure, I understood your question. As far my assumption, this what you are trying to do.
1) Get host
2) Get initiators.
List hostURIs = client.host().listBulkIds(); //This should provide all host URIs
for(hostURI:hostURIs) {
if(this is your host) {
client.initiators().getByHost(hostURI);
}
}
I do not know if we support performSearchBy() for host.
Thanks,
Alik