> I assume the two lines below the import line have to be
on a single line?
yep.
> Then I see a lot of, maybe only in my eyes, magic
numbers, e.g.:
> permissions = [ { 'operations' : 'rw',
> 'targetObjectId' : 970990 },
> { 'operations' : 'rw',
> 'targetObjectId' : 11530 } ]
> are 11530 and 970990 object ID values of accounts or
teams in ogo?
Teams; these permissions "rw" for teams 970990
& 11530 are set on all
imported values. Obviously that would be different or
unnecessary
depending on the site. They can be objectIds of accounts or
teams.
> then, a little bit later when creating the Enterprise:
> ...
> '_ACCESS' : permissions,
> '_COMPANYVALUES' : [ { 'attribute' :
'division',
> 'value' : 'WYC'
},
> { 'attribute' :
'salesperson',
> 'value' :
row[0] },
> ...
> I assume this will create all companies with a
"division" attribute with
> value WYC?
Yep.
> also, I don't think that this is really relevant, but
I'm wondering, what is
> the reason for this statement at the end of the
script:
> if counter == 250:
> time.sleep(5)
> counter = 0
> else:
> time.sleep(0.2)
> counter = counter + 1
Just to pause the load; on a production server we always
pause the load
so the load process doesn't consume an entire instance.
This keeps the
request queue from getting so deep that interactive user
applications
notice a slow down. Modern workstations can fire requests
at a server
at a pretty amazing rate, even from a scripting language
like Python.
> Do I can use ZOGi from within a different (scripting)
language,
Sure, any language that supports XML-RPC (Java, Jython, C#,
C, Perl,
PHP, etc...)
> e.g. just a shell script?
Probably not.
> If so, are there example scripts available somewhere
too?
There are examples for Python, PHP, and Jython.
http://code.go
ogle.com/p/zogi/wiki/PHP
http://code
.google.com/p/zogi/wiki/Jython
--
OpenGroupware.org XML-RPC
xmlrpc opengroupware.org
http://mail.opengroupware.org/mailman/listinfo/xmlrpc
|