HI Team

I am having a tough time on changing the mgmt ip address via URI module and 
even properly having login info, logout and updating headers.
Still I get "HTTP Error 401"

The URL which I update is via POST
"https://<unity_ip>/api/instances/mgmtInterfaces/mgmt_ipv4/action/modify"

request your thoughts

thanks

regds
Vj

On Sunday, September 22, 2019 at 11:55:38 AM UTC+5:30, Vladimir Botka wrote:
>
> On Sat, 21 Sep 2019 20:23:13 -0700 (PDT) 
> Tanisha Mishra <[email protected] <javascript:>> wrote: 
>
> > Using the python module 
> > 
> https://github.com/jialehuo/ansible-dellemc-unity/blob/master/library/dellemc_unity.py
>  
> , 
> > [...] 
> >     - name: Updates 
> >       dellemc_unity: 
> >         unity_hostname: "165.114.74.40" 
> >         unity_username: "{{ user }}" 
> >         unity_password: "{{ password }}" 
> >         unity_updates: 
> >           - { resource_type: storageResource, fields: 'name:{{ lun_name 
> }}, 
> > lunParameters:{pool: {id: "{{ pool_id }}"}, size: "{{ lun_size }}", 
> > isThinEnabled:"true", isDataReductionEnabled:"false"}', action: 
> 'createLun' 
> > } 
> > [...] 
> > *                    "en-US": "Request body is not correct. There may be 
> > duplicate parameters, wrong parameter name. Please refer to API 
> > documentation page and ensure the body is correct. (Error 
> Code:0x7d13035)"* 
>
> The parameter "unity_updates" seems to be wrong. Make sure the 
> parenthesis, 
> quotation and other items are correct. Try to create the list (if 
> "unity_updates" is really a list) of dictionaries first and take a look at 
> the debug whether this is what you want. For example, or rather as a 
> demonstration of the proposal (I have no idea of the module's details) 
>
>     - set_fact: 
>         unity_updates: "{{ unity_updates|default([]) + 
>            [{resource_type: storageResource, 
>              fields: 'name:{{ lun_name }}, 
>              lunParameters: {pool: {id: "{{ pool_id }}"}}, 
>              size: "{{ lun_size }}", 
>              isThinEnabled:"true", 
>              isDataReductionEnabled:"false"}', 
>              action: 'createLun'}] }}" 
>     - debug: 
>         var: unity_updates 
>
> Cheers, 
>
>         -vlado 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e3dd1344-27f5-44f8-8209-b670b0d09de9%40googlegroups.com.

Reply via email to