[ECODP-dev] Fwd: Ckan management scripts

John Glover john.glover at okfn.org
Tue Dec 18 11:42:17 UTC 2012


Hi Dimitrios,

Sorry I meant that I didn't have the full command so I wasn't sure what
parameters were being passed to the script, and so I'm not sure if the
correct case is being specified for the users and groups.

Regarding output: the paster command to add a user is run directly and so
that output is returned as expected. However, the output from returning the
user object (line 25) and running the group update (line 40) is saved to
the variables $USERDESC and $GroupUpdate2 respectively, and not actually
output to the console.

For example if I run: ./ckan_create_publ_user.sh johng unicef asdf
http://odp.tenforce.com
on the tenforce test server from the ckan_management directory, I get the
CKAN user object back from the initial create user command, but I do not
get the response from the call to member_create telling me that access is
denied (as I have given an invalid api key in this case).

If you simply add: "echo $GroupUpdate2" to the end of the script then this
information is returned.

So the immediate actions would be:
1. Make sure that the names (and cases) of the parameters supplied to the
ckan_create_publ_user command are indeed correct.
2. Edit the scripts to output the responses from CKAN so that the users can
see if anything goes wrong.

We can then get more feedback as to what is happening. I would expect CKAN
to be giving an error message as the users are not being added to the
groups. It is possible that the script output is correct and that there is
a CKAN issue, but we need to see the output from CKAN first to confirm.

Thanks,
John


On 18 December 2012 11:53, Dimitrios Mexis <dimitrios.mexis at tenforce.com>wrote:

> Hi John,
> the script commands that I pasted on goto meeting, is the
> ckan_create_publ_user.sh in the package.
>
> as an example:
> If you give a name that is already inside the database, a responce is
> returned that the user login exists for example.
> if you use a api key that is wrong then a command similar to this tuple :
> 'Name': 'That login name is not available.'
>
> One effort from myside:
> I tried also to generate a new association between group and username with
> erroneous api:
> first I had a message that the login name is not accessible, the
> association was never created and the nickname still can add dataset to the
> original groups it is supposed to be bound...
>
> Waiting for your results, if there is something that I can provide
> assistance notify me with details
> Regards,
> Dimitrios
>
> On Tue, Dec 18, 2012 at 11:40 AM, John Glover <john.glover at okfn.org>wrote:
>
>> Hi Dimitrios,
>>
>> CKAN names/IDs are case sensitive, so yes that will be a problem if the
>> case is different. I forgot to copy the command from gotomeeting and it
>> doesn't seem to save chat history like Skype so I can't remember the full
>> command that is being run on the production server to add the user to the
>> group.
>>
>> I'm still reviewing the CKAN command shell scripts, but it looks to me
>> like the command doesn't actually give the output from the server so the
>> user doesn't know if something has gone wrong. It should be updated to
>> print the server response to the terminal at least so that problems are
>> known immediately.
>>
>> Thanks,
>> John
>>
>>
>> On 18 December 2012 11:24, Dimitrios Mexis <dimitrios.mexis at tenforce.com>wrote:
>>
>>>  Hello John and Darwin,
>>>
>>> I wanted to give a tip:
>>> If the usernames are mixed lettered capitals and small ones, what is the
>>> impact ?
>>> If the groups are ok, and users are created according to the groups and
>>> with the scripts, the only difference is the capitalization of the words.
>>>
>>> Regards
>>> Dimitrios
>>>
>>> On 18/12/12 11:00, Darwin Peltan wrote:
>>>
>>>
>>> Darwin Peltan
>>> Project Manager
>>>
>>>  The Open Knowledge Foundation
>>> http://www.okfn.org
>>>
>>>  Skype: darwinp
>>> Twitter: @darwin
>>>
>>>
>>>
>>> ---------- Forwarded message ----------
>>> From: Dimitrios Mexis <dimitrios.mexis at tenforce.com>
>>> Date: 17 December 2012 16:06
>>> Subject: Ckan management scripts
>>> To: Darwin Peltan <darwin.peltan at okfn.org>
>>> Cc: Bert Van Nuffelen <bert.van.nuffelen at tenforce.com>
>>>
>>>
>>> Hello,
>>>
>>>  this is the scripts about ckan management from terminal.
>>>
>>>  Fyi as requested,
>>>
>>>  Best regards,
>>> Dimitrios
>>>
>>>
>>>
>>> _______________________________________________
>>> Ecodp-dev mailing listEcodp-dev at lists.okfn.orghttp://lists.okfn.org/mailman/listinfo/ecodp-dev
>>>
>>>
>>>
>>> _______________________________________________
>>> Ecodp-dev mailing list
>>> Ecodp-dev at lists.okfn.org
>>> http://lists.okfn.org/mailman/listinfo/ecodp-dev
>>>
>>>
>>
>> _______________________________________________
>> Ecodp-dev mailing list
>> Ecodp-dev at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/ecodp-dev
>>
>>
>
> _______________________________________________
> Ecodp-dev mailing list
> Ecodp-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ecodp-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.okfn.org/mailman/private/ecodp-dev/attachments/20121218/573e9e0e/attachment.html>


More information about the ecodp-dev mailing list