ok: [162.243.95.241] => {"cache_control": "private", "changed": false, "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<ApiResponse Status=\"OK\" xmlns=\"http://api.namecheap.com/xml.response\">\r\n <Errors />\r\n <Warnings />\r\n <RequestedCommand>namecheap.domains.getList</RequestedCommand>\r\n <CommandResponse Type=\"namecheap.domains.getList\">\r\n <DomainGetListResult>\r\n <Domain ID=\"33320\" Name=\"asdfasdfasdfasdfasdfasdfasdfjk123.com\" User=\"username\" Created=\"11/19/2013\" Expires=\"11/19/2014\" IsExpired=\"false\" IsLocked=\"false\" AutoRenew=\"false\" WhoisGuard=\"NOTPRESENT\" />\r\n <Domain ID=\"33321\" Name=\"avd.com\" User=\"username\" Created=\"11/19/2013\" Expires=\"11/19/2014\" IsExpired=\"false\" IsLocked=\"false\" AutoRenew=\"false\" WhoisGuard=\"NOTPRESENT\" />\r\n <Domain ID=\"33319\" Name=\"domain.com\" User=\"username\" Created=\"11/19/2013\" Expires=\"11/19/2014\" IsExpired=\"false\" IsLocked=\"false\" AutoRenew=\"false\" WhoisGuard=\"NOTPRESENT\" />\r\n <Domain ID=\"33318\" Name=\"domain.com\" User=\"username\" Created=\"11/19/2013\" Expires=\"11/19/2014\" IsExpired=\"false\" IsLocked=\"false\" AutoRenew=\"false\" WhoisGuard=\"NOTPRESENT\" />\r\n <Domain ID=\"33322\" Name=\"domain11.com\" User=\"username\" Created=\"11/19/2013\" Expires=\"11/19/2014\" IsExpired=\"false\" IsLocked=\"false\" AutoRenew=\"false\" WhoisGuard=\"NOTPRESENT\" />\r\n <Domain ID=\"33323\" Name=\"domain 13.com\" User=\"username\" Created=\"11/19/2013\" Expires=\"11/19/2014\" IsExpired=\"false\" IsLocked=\"false\" AutoRenew=\"false\" WhoisGuard=\"NOTPRESENT\" />\r\n <Domain ID=\"32804\" Name=\"domain.com\" User=\"username\" Created=\"11/01/2013\" Expires=\"11/02/2014\" IsExpired=\"false\" IsLocked=\"false\" AutoRenew=\"false\" WhoisGuard=\"NOTPRESENT\" />\r\n <Domain ID=\"32805\" Name=\"domain3.com\" User=\"username\" Created=\"11/01/2013\" Expires=\"11/02/2014\" IsExpired=\"false\" IsLocked=\"false\" AutoRenew=\"false\" WhoisGuard=\"NOTPRESENT\" />\r\n <Domain ID=\"32806\" Name=\"domain 4.com\" User=\"username\" Created=\"11/01/2013\" Expires=\"11/02/2014\" IsExpired=\"false\" IsLocked=\"false\" AutoRenew=\"false\" WhoisGuard=\"NOTPRESENT\" />\r\n <Domain ID=\"33316\" Name=\"domain5.com\" User=\"username\" Created=\"11/19/2013\" Expires=\"11/19/2014\" IsExpired=\"false\" IsLocked=\"false\" AutoRenew=\"false\" WhoisGuard=\"NOTPRESENT\" />\r\n </DomainGetListResult>\r\n <Paging>\r\n <TotalItems>10</TotalItems>\r\n <CurrentPage>1</CurrentPage>\r\n <PageSize>20</PageSize>\r\n </Paging>\r\n </CommandResponse>\r\n <Server>WEB1-SANDBOX1</Server>\r\n <GMTTimeDifference>--5:00</GMTTimeDifference>\r\n <ExecutionTime>0.096</ExecutionTime>\r\n</ApiResponse>", "content_length": "2478", "content_location": "https://api.sandbox.namecheap.com/xml.response", "content_type": "text/xml; charset=utf-8", "date": "Wed, 20 Nov 2013 02:06:37 GMT", "item": "", "redirected": false, "server": "Microsoft-IIS/7.0", "status": 200, "x_aspnet_version": "4.0.30319", "x_powered_by": "ASP.NET"}
I'm interested in the XML inside the 'content' container. Is there any way to query this output so I know if the purchase was successful or not
--
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 ansible-proje...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
TypeError: argument of type 'StrictUndefined' is not iterable
--
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 ansible-proje...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/spNDlR4XTCg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
How do I manipulate the returned content?
--
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 ansible-proje...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
<ApiResponse Status=\"ERROR\"
and what that error is:
<Error Number=\"3028166\">540:Object exists</Error>
or a success
ApiResponse Status=\"OK\"
Thanks for the help guys.
Cheers,
David
ok: [162.243.95.241] => {
"domain_name_purchase.content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<ApiResponse Status=\"ERROR\" xmlns=\"http://api.namecheap.com/xml.response\">\r\n <Errors>\r\n <Error Number=\"4014104\">Possible duplicate create command for unavailable domain. Try again after 11/20/2013 7:29:46 AM UTC</Error>\r\n </Errors>\r\n <Warnings />\r\n <RequestedCommand>namecheap.domains.create</RequestedCommand>\r\n <CommandResponse Type=\"namecheap.domains.create\">\r\n <DomainCreateResult Domain=\"elitereceipt202321412341234.com\" ChargedAmount=\"0\" DomainID=\"0\" OrderID=\"0\" TransactionID=\"0\" WhoisguardEnable=\"false\" FreePositiveSSL=\"false\" NonRealTimeDomain=\"false\" />\r\n </CommandResponse>\r\n <Server>WEB1-SANDBOX1</Server>\r\n <GMTTimeDifference>--5:00</GMTTimeDifference>\r\n <ExecutionTime>0.02</ExecutionTime>\r\n</ApiResponse>",
"item": ""
}
I'm basically having the same issue I need to get from this :{"httpStatus" : 201,"detail" : "Request accepted.","estimatedSeconds" : 420,"purgeId" : "95b5a092-043f-4af0-843f-aaf0043faaf0","progressUri" : "/ccu/v2/purges/95b5a092-043f-4af0-843f-aaf0043faaf0","pingAfterSeconds" : 420,"supportId" : "17PY1321286429616716-211907680",}the pingAfterSeconds to use it in a wait_for task and the purgeid but this is a JSON so dunno if the process is similar to a string parsing?
--
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 ansible-proje...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
if 'content_type' in uresp:if uresp['content_type'].startswith('application/json'):try:js = json.loads(content)uresp['json'] = jsexcept:passI'm not quite sure why it doesn't think it's valid json though. You'll have to debug that a bit more. It looks like it should work though....
Romeo