View gist:768c86badd7698bf0cbc
1 2 3 4 5 6 7 8
import itertools
# Get all OA4MP linked identities as a flat list
user_list = users.get_all_users() # Do this as a separate step because it's started timing out regularly
oauth_creds = itertools.chain.from_iterable([ user.credentials.get_all_credentials_of_type('oauth') for user in user_list if user.credentials.get_all_credentials_of_type('oauth')])
# Filter out bluewaters
bluewaters_creds = [ cred for cred in oauth_creds if cred['server'] == 'bluewaters.ncsa.illinois.edu' ]
# Update
for cred in bluewaters_creds: cred['server'] = 'oa4mp.ncsa.illinois.edu'; cred['id_index'] = "{0}_{1}".format(cred['oauth_username'], 'oa4mp.ncsa.illinois.edu'); cred.commit();
View gist:03dbad8c337caf14a1fd
1 2 3 4 5 6 7 8
287 2014-12-12_17:01:02.42105 Traceback (most recent call last):
288 2014-12-12_17:01:02.42107 File "/usr/share/gearbox/nexus/current/graph/lib/python2.7/site-packages/globusonline-RELEASE_2011_06_06-py2.7.egg/globusonline/graph/app.py", line 393, in __call__
289 2014-12-12_17:01:02.42108 return self.application(environ, start_response)
290 2014-12-12_17:01:02.42109 File "/usr/share/gearbox/nexus/current/graph/lib/python2.7/site-packages/globusonline-RELEASE_2011_06_06-py2.7.egg/globusonline/graph/request_id_middleware.py", line 24, in __call__
291 2014-12-12_17:01:02.42109 return self.application(environ, custom_start_response)
292 2014-12-12_17:01:02.42110 File "/usr/share/gearbox/nexus/current/graph/lib/python2.7/site-packages/globusonline-RELEASE_2011_06_06-py2.7.egg/globusonline/graph/app.py", line 426, in __call__
293 2014-12-12_17:01:02.42111 return self.application(environ, start_response)
294 2014-12-12_17:01:02.42112 File "/usr/share/gearbox/nexus/current/graph/lib/python
View gist:86538c5310b5a6d67155
1 2 3 4 5 6 7 8 9 10
======================================================================
ERROR: test_create_user_json_birn (globusonline.graph.tests.user_rest_test.TestUserGroup)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/mattias/globus_repos3/globusonline-graph/globusonline/graph/tests/user_rest_test.py", line 236, in test_create_user_json_birn
result2 = json.loads(self.test_app.get('/users/'+self.new_user['username']))
File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
View gist:258d2734f5c3a5341b20
1 2 3 4 5 6 7 8 9 10
In [28]: new_cf.truncate()
---------------------------------------------------------------------------
MaximumRetryException Traceback (most recent call last)
/usr/share/gearbox/nexus/versions/sandbox-JIRA-GRAPH-1480-2014-11-05_03-50-14/graph/lib/python2.7/site-packages/globusonline-RELEASE_2011_06_06-py2.7.egg/EGG-INFO/scripts/admin in <module>()
----> 1 new_cf.truncate()
 
/usr/share/gearbox/nexus/versions/sandbox-JIRA-GRAPH-1480-2014-11-05_03-50-14/graph/lib/python2.7/site-packages/pycassa/columnfamily.pyc in truncate(self)
991
992 """
--> 993 self.pool.execute('truncate', self.column_family)
View gist:8d4a8fa3e8f5ac62fc05
1 2 3 4 5 6 7 8 9 10
mattias@mattias:~/review_repos/globusonline-graph$ git checkout JIRA-GRAPH-1437
Switched to branch 'JIRA-GRAPH-1437'
Your branch is behind 'origin/JIRA-GRAPH-1437' by 50 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
mattias@mattias:~/review_repos/globusonline-graph$ git pull
Password for 'https://mattias-lidman@github.com':
Updating b6d2194..3e2b5d8
Fast-forward
_gb/gbtemplate/globusonline.yml.mustache | 4 ++
globusonline/graph/admin/admin | 6 +-
View gist:86dfa4bfcdedfd41aa82
1 2 3 4 5 6 7 8 9
a7cb44ef870f81fc16b83585baa82bc8647672c201032ee06927bfb4b9f4494e13e07564e727db97c2e37b')
2014-10-29_21:00:27.70408 Traceback (most recent call last):
2014-10-29_21:00:27.70420 File "/usr/share/gearbox/nexus/current/graph/lib/python2.7/site-packages/globusonline-RELEASE_2011_06_06-py2.7.egg/globusonline/graph/app.py", line 393, in __call__
2014-10-29_21:00:27.70433 return self.application(environ, start_response)
2014-10-29_21:00:27.70445 File "/usr/share/gearbox/nexus/current/graph/lib/python2.7/site-packages/globusonline-RELEASE_2011_06_06-py2.7.egg/globusonline/graph/request_id_middleware.py", line 24, in __call__
2014-10-29_21:00:27.70454 return self.application(environ, custom_start_response)
2014-10-29_21:00:27.70462 File "/usr/share/gearbox/nexus/current/graph/lib/python2.7/site-packages/globusonline-RELEASE_2011_06_06-py2.7.egg/globusonline/graph/app.py", line 424, in __call__
2014-10-29_21:00:27.70470 return self.application(environ, start_response)
2014-10-29_21:00:27.70477 File "
View gist:8e4b5c32fe55bad73ba4
1 2 3 4 5 6 7 8
d7a0daae (Mattias Lidman 2013-09-10 17:54:06 -0500)| 3 def ssh_pubkeys(self):
d7a0daae (Mattias Lidman 2013-09-10 17:54:06 -0500)| 2 creds = self.credentials.get_all_credentials_of_type('ssh2')
d7a0daae (Mattias Lidman 2013-09-10 17:54:06 -0500)| 1 creds_dict = []
d7a0daae (Mattias Lidman 2013-09-10 17:54:06 -0500)|493 # TODO: We're already getting type=ssh2, is this necessary?
d7a0daae (Mattias Lidman 2013-09-10 17:54:06 -0500)| 1 for cred in creds:
d7a0daae (Mattias Lidman 2013-09-10 17:54:06 -0500)| 2 if cred.attributes['credential_type'] == 'ssh2':
d7a0daae (Mattias Lidman 2013-09-10 17:54:06 -0500)| 3 creds_dict.append({'credential_type' : 'ssh2', 'ssh_key' : cred.attributes['ssh_key']})
d7a0daae (Mattias Lidman 2013-
View gist:228a4ce81fd9f2917d46
1 2 3 4 5 6 7 8 9 10
>>> ( x for x in [1,2,3] )
<generator object <genexpr> at 0x7f7de8dc6cd0>
>>> x
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'x' is not defined
>>> # OK, seems legit
>>> { x:x for x in [1,2,3] }
{1: 1, 2: 2, 3: 3}
>>> x
View gist:e6f5e3a79f76a22a32dc
1 2 3 4 5 6 7 8 9 10
>>> ( x for x in [1,2,3] )
<generator object <genexpr> at 0x7fcf3ed0ccd0>
>>> x
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'x' is not defined
>>> # OK, seems legit
... { x:x for x in [1,2,3] }
{1: 1, 2: 2, 3: 3}
>>> x
View gist:86b71bb444e0f1cd8b92
1 2 3 4 5 6 7 8 9 10
 
from globusonline.graph.policies.resources import PolicyOption
import uuid
 
def testfoo():
group = gm.create_group(name="Testing policy race condition", description="Delete me")
policy_options_factory = group._node.policy_options
for option_type in ['approval', 'group_member_visibility', 'group_visibility', 'join',
'invites', 'sign_up_fields', 'group_creation']:
Something went wrong with that request. Please try again.