I'm guessing that the workflow is to login, which returns a jsonpickle
string and then pass that into the logout module?

If so, you seem to be missing some jsonpickle decode functionality in the
logout module to turn it back into a UcsHandle.

I don't have any familiarity with UCS, but it seems weird to have a
login/logout module. Wouldn't a login without a logout just disconnect when
python exits and leave you logged out?  Unless you are trying to destroy
whatever session may be stored on the remote side?

I'd probably just have each individual module do a login/logout, and not
try passing around a UcsModule through pickling.


On Sun, Jan 8, 2017 at 1:08 PM brian hopkins <[email protected]> wrote:

> Hello Everyone,
>
> I'm working on my first Ansible module to interact with UCS and will be
> hopefully creating more of these to do new builds of UCS servers.  I have
> the following code already https://github.com/btotharye/ansible-ucs and
> the login process is working fine but for some reason I'm having issues
> with the logout.  I'm not sure what is going on yet but as far as the UCS
> Python SDK goes UcsHandle.logout() should work and as far as I can tell I'm
> getting the handle right but having issues.
>
> If anyone could offer links or suggestions on how to debug the logout part
> that is failing I would appreciate it, right now I'm hitting line 19 of the
> logout script ucs_logout.py and its generating the module.fail_json message
> but I'm not sure whats causing the exception.  Login process is working
> fine and I would think it would just be a matter of passing in the handle
> and logging it out but for some reason that isn't working.
>
> Documentation to the UCS Python SDK:
> https://ciscoucs.github.io/ucsmsdk_docs/ucsmsdk_ug.html#getting-started
>
> Thanks
>
>
>
>
>
>
>
>
> --
>
>
> 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 post to this group, send email to [email protected].
>
>
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/2bd829bd-983e-4898-abc2-b2288e41774c%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/2bd829bd-983e-4898-abc2-b2288e41774c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAD8N0v_Dc5TThWNT3TBzF27ffMzuhHdXH36-s4aFtqpyXGkCDg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to