8 Posts
0
962
June 23rd, 2021 08:00
namespace service not working with isilon onefs REST-API via Ansible uri module
Can anyone provide a working example of the syntax to access the 'namespace' service ?
I'm using Ansible uri module with session cookies. I know the module works because I can get the sessionID and use it to get 'platform' queries successfully, but when I try to do the same for the 'namespace' service, it doesn't work. A regular curl/get command does get me a reply from the both services so I suspect is something I'm missing in my ansible playbook. I do understand that I need to create 'namespaces' but the default /ifs is there and accessible by root and I can't even query that one.
This is the syntax I'm using (it's exactly the same as the one I use for the 'platform' service).
- name : Return the contents of a directory info from API
uri :
url : "{ { Isilon_IP }}/namespace/ifs/"
method : GET
return_content : no
validate_certs : no
headers :
Cookie : "isisessid={ { results_login.cookies.isisessid }}"
X-CSRF-Token : "{ { results_login.cookies.isicsrf }}"
x-isi-ifs-target-type : "container"
referer : "{ { Isilon_IP }}"
body_format : json
No Events found!
lhernand3z
8 Posts
1
July 6th, 2021 16:00
Thanks Bryan, I posted it in the Isilon community as well. I did figure out the problem: a bad formatted GET request. It looks like the namespace service is too sensitive to a null body. My original playbook was:
headers:
Cookie: "isisessid={ { results_login.cookies.isisessid }}"
X-CSRF-Token: "{ { results_login.cookies.isicsrf }}"
x-isi-ifs-target-type: "container"
referer: "{ { Isilon_IP }}"
body_format: json
The last line is not actually needed because I'm not sending anything in the GET body, I removed it and it is now working as expected. The 'platform' service is not as sensitive, the GET there still hast the NULL body and it still works.
bmcfeeters
1 Rookie
•
72 Posts
0
July 2nd, 2021 10:00
Hi lhernand3z,
I've reached out to some Isilon REST API subject matter experts for help on your query. In the mean time, you might also consider searching (and maybe posting) to the Isilon/PowerScale forum https://www.dell.com/community/Isilon/bd-p/isilon
Thanks
Bryan