author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Sun, 16 Jun 2013 23:36:06 +0200 | |
changeset 9446 | 18a186b02970 |
parent 8675 | b60329e40e26 |
permissions | -rw-r--r-- |
8675
b60329e40e26
[rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
1 |
sync_schema_props_perms('EmailAddress') |
b60329e40e26
[rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
2 |
|
b60329e40e26
[rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
3 |
for source in rql('CWSource X WHERE X type "pyrorql"').entities(): |
b60329e40e26
[rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
4 |
sconfig = source.dictconfig |
b60329e40e26
[rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
5 |
nsid = sconfig.pop('pyro-ns-id', config.appid) |
b60329e40e26
[rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
6 |
nshost = sconfig.pop('pyro-ns-host', '') |
b60329e40e26
[rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
7 |
nsgroup = sconfig.pop('pyro-ns-group', ':cubicweb') |
b60329e40e26
[rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
8 |
if nsgroup: |
b60329e40e26
[rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
9 |
nsgroup += '.' |
b60329e40e26
[rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
10 |
source.cw_set(url=u'pyro://%s/%s%s' % (nshost, nsgroup, nsid)) |
b60329e40e26
[rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
11 |
source.update_config(skip_unknown=True, **sconfig) |
b60329e40e26
[rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
12 |
|
b60329e40e26
[rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
13 |
commit() |