{"action":"created","comment":{"url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments/31496461","id":31496461,"diff_hunk":"@@ -0,0 +1,283 @@\n+########################################################################\n+# File :   GlobusComputingElement.py\n+# Author : A.S.\n+########################################################################\n+\n+\"\"\" Globus Computing Element\n+\n+   Allows direct submission to Globus Computing Elements with a SiteDirector Agent\n+\n+\"\"\"\n+\n+__RCSID__ = \"$Id$\"\n+\n+from DIRAC.Resources.Computing.ComputingElement          import ComputingElement\n+from DIRAC.Core.Utilities.Grid                           import executeGridCommand\n+from DIRAC                                               import S_OK, S_ERROR\n+\n+from DIRAC.ConfigurationSystem.Client.Helpers.Registry   import getGroupOption\n+from DIRAC.FrameworkSystem.Client.ProxyManagerClient     import gProxyManager\n+from DIRAC.WorkloadManagementSystem.DB.PilotAgentsDB     import PilotAgentsDB\n+\n+\n+import os, tempfile\n+\n+CE_NAME = 'Globus'\n+MANDATORY_PARAMETERS = [ 'Queue' ]\n+\n+class GlobusComputingElement( ComputingElement ):\n+  \"\"\"Globus computing element class\n+  implementing the functions jobSubmit, getJobOutput \"\"\"\n+\n+  #############################################################################\n+  def __init__( self, ceUniqueID ):\n+    \"\"\" Standard constructor.\n+    \"\"\"\n+    ComputingElement.__init__( self, ceUniqueID )","path":"Resources/Computing/GlobusComputingElement.py","position":40,"original_position":36,"commit_id":"bafbdad0e1a18e2afb0fc851bf32cfae316c5dd2","original_commit_id":"bdc67e2ea39fd3216882910adb54efeab3dfa1f2","user":{"login":"andresailer","id":2115797,"avatar_url":"https://avatars.githubusercontent.com/u/2115797?v=3","gravatar_id":"","url":"https://api.github.com/users/andresailer","html_url":"https://github.com/andresailer","followers_url":"https://api.github.com/users/andresailer/followers","following_url":"https://api.github.com/users/andresailer/following{/other_user}","gists_url":"https://api.github.com/users/andresailer/gists{/gist_id}","starred_url":"https://api.github.com/users/andresailer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andresailer/subscriptions","organizations_url":"https://api.github.com/users/andresailer/orgs","repos_url":"https://api.github.com/users/andresailer/repos","events_url":"https://api.github.com/users/andresailer/events{/privacy}","received_events_url":"https://api.github.com/users/andresailer/received_events","type":"User","site_admin":false},"body":"Because old and new style classes are different, and old-style classes don't have super\r\n```\r\nclass ClassN(object):\r\n    def __init__(self):\r\n        self.var = \"N1\"\r\n\r\nclass ClassNI(ClassN):\r\n    def __init__(self):\r\n        super(ClassNI, self).__init__()\r\n\r\nclass ClassO:\r\n    def __init__(self):\r\n        self.var = \"N1\"\r\n\r\nclass ClassOI(ClassO):\r\n    def __init__(self):\r\n        super(ClassOI, self).__init__()\r\n\r\nif __name__ == \"__main__\":\r\n    n = ClassNI()\r\n    o = ClassOI()\r\n```\r\nLeads to\r\n```\r\nTraceback (most recent call last):\r\n  File \"OldvsNew.py\", line 19, in <module>\r\n    o = ClassOI()\r\n  File \"OldvsNew.py\", line 15, in __init__\r\n    super(ClassOI, self).__init__()\r\nTypeError: must be type, not classobj\r\n```\r\nSee for example: http://stackoverflow.com/questions/9698614/super-raises-typeerror-must-be-type-not-classobj-for-new-style-class","created_at":"2015-06-02T06:51:27Z","updated_at":"2015-06-02T06:51:27Z","html_url":"https://github.com/DIRACGrid/DIRAC/pull/2394#discussion_r31496461","pull_request_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2394","_links":{"self":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments/31496461"},"html":{"href":"https://github.com/DIRACGrid/DIRAC/pull/2394#discussion_r31496461"},"pull_request":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2394"}}},"pull_request":{"url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2394","id":36514799,"html_url":"https://github.com/DIRACGrid/DIRAC/pull/2394","diff_url":"https://github.com/DIRACGrid/DIRAC/pull/2394.diff","patch_url":"https://github.com/DIRACGrid/DIRAC/pull/2394.patch","issue_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/2394","number":2394,"state":"open","locked":false,"title":"[v6r11] Add first implementation for GlobusComputingElement","user":{"login":"andresailer","id":2115797,"avatar_url":"https://avatars.githubusercontent.com/u/2115797?v=3","gravatar_id":"","url":"https://api.github.com/users/andresailer","html_url":"https://github.com/andresailer","followers_url":"https://api.github.com/users/andresailer/followers","following_url":"https://api.github.com/users/andresailer/following{/other_user}","gists_url":"https://api.github.com/users/andresailer/gists{/gist_id}","starred_url":"https://api.github.com/users/andresailer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andresailer/subscriptions","organizations_url":"https://api.github.com/users/andresailer/orgs","repos_url":"https://api.github.com/users/andresailer/repos","events_url":"https://api.github.com/users/andresailer/events{/privacy}","received_events_url":"https://api.github.com/users/andresailer/received_events","type":"User","site_admin":false},"body":"Implemented and tested functions:\r\njobSubmit\r\ngetJobOutput\r\n\r\nImplemented functions:\r\ngetCEStatus (empty implementation)\r\nkillJob (not sure where this is called from)\r\n\r\n","created_at":"2015-05-29T15:10:41Z","updated_at":"2015-06-02T06:51:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5f6414bf15f0d14e18cb91c04c835b41adc81fbc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2394/commits","review_comments_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2394/comments","review_comment_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/2394/comments","statuses_url":"https://api.github.com/repos/DIRACGrid/DIRAC/statuses/bafbdad0e1a18e2afb0fc851bf32cfae316c5dd2","head":{"label":"andresailer:GlobusCE","ref":"GlobusCE","sha":"bafbdad0e1a18e2afb0fc851bf32cfae316c5dd2","user":{"login":"andresailer","id":2115797,"avatar_url":"https://avatars.githubusercontent.com/u/2115797?v=3","gravatar_id":"","url":"https://api.github.com/users/andresailer","html_url":"https://github.com/andresailer","followers_url":"https://api.github.com/users/andresailer/followers","following_url":"https://api.github.com/users/andresailer/following{/other_user}","gists_url":"https://api.github.com/users/andresailer/gists{/gist_id}","starred_url":"https://api.github.com/users/andresailer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andresailer/subscriptions","organizations_url":"https://api.github.com/users/andresailer/orgs","repos_url":"https://api.github.com/users/andresailer/repos","events_url":"https://api.github.com/users/andresailer/events{/privacy}","received_events_url":"https://api.github.com/users/andresailer/received_events","type":"User","site_admin":false},"repo":{"id":18591320,"name":"DIRAC","full_name":"andresailer/DIRAC","owner":{"login":"andresailer","id":2115797,"avatar_url":"https://avatars.githubusercontent.com/u/2115797?v=3","gravatar_id":"","url":"https://api.github.com/users/andresailer","html_url":"https://github.com/andresailer","followers_url":"https://api.github.com/users/andresailer/followers","following_url":"https://api.github.com/users/andresailer/following{/other_user}","gists_url":"https://api.github.com/users/andresailer/gists{/gist_id}","starred_url":"https://api.github.com/users/andresailer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andresailer/subscriptions","organizations_url":"https://api.github.com/users/andresailer/orgs","repos_url":"https://api.github.com/users/andresailer/repos","events_url":"https://api.github.com/users/andresailer/events{/privacy}","received_events_url":"https://api.github.com/users/andresailer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andresailer/DIRAC","description":"DIRAC Grid","fork":true,"url":"https://api.github.com/repos/andresailer/DIRAC","forks_url":"https://api.github.com/repos/andresailer/DIRAC/forks","keys_url":"https://api.github.com/repos/andresailer/DIRAC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andresailer/DIRAC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andresailer/DIRAC/teams","hooks_url":"https://api.github.com/repos/andresailer/DIRAC/hooks","issue_events_url":"https://api.github.com/repos/andresailer/DIRAC/issues/events{/number}","events_url":"https://api.github.com/repos/andresailer/DIRAC/events","assignees_url":"https://api.github.com/repos/andresailer/DIRAC/assignees{/user}","branches_url":"https://api.github.com/repos/andresailer/DIRAC/branches{/branch}","tags_url":"https://api.github.com/repos/andresailer/DIRAC/tags","blobs_url":"https://api.github.com/repos/andresailer/DIRAC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andresailer/DIRAC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andresailer/DIRAC/git/refs{/sha}","trees_url":"https://api.github.com/repos/andresailer/DIRAC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andresailer/DIRAC/statuses/{sha}","languages_url":"https://api.github.com/repos/andresailer/DIRAC/languages","stargazers_url":"https://api.github.com/repos/andresailer/DIRAC/stargazers","contributors_url":"https://api.github.com/repos/andresailer/DIRAC/contributors","subscribers_url":"https://api.github.com/repos/andresailer/DIRAC/subscribers","subscription_url":"https://api.github.com/repos/andresailer/DIRAC/subscription","commits_url":"https://api.github.com/repos/andresailer/DIRAC/commits{/sha}","git_commits_url":"https://api.github.com/repos/andresailer/DIRAC/git/commits{/sha}","comments_url":"https://api.github.com/repos/andresailer/DIRAC/comments{/number}","issue_comment_url":"https://api.github.com/repos/andresailer/DIRAC/issues/comments{/number}","contents_url":"https://api.github.com/repos/andresailer/DIRAC/contents/{+path}","compare_url":"https://api.github.com/repos/andresailer/DIRAC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andresailer/DIRAC/merges","archive_url":"https://api.github.com/repos/andresailer/DIRAC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andresailer/DIRAC/downloads","issues_url":"https://api.github.com/repos/andresailer/DIRAC/issues{/number}","pulls_url":"https://api.github.com/repos/andresailer/DIRAC/pulls{/number}","milestones_url":"https://api.github.com/repos/andresailer/DIRAC/milestones{/number}","notifications_url":"https://api.github.com/repos/andresailer/DIRAC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andresailer/DIRAC/labels{/name}","releases_url":"https://api.github.com/repos/andresailer/DIRAC/releases{/id}","created_at":"2014-04-09T09:03:13Z","updated_at":"2015-01-21T09:44:09Z","pushed_at":"2015-06-01T09:47:37Z","git_url":"git://github.com/andresailer/DIRAC.git","ssh_url":"git@github.com:andresailer/DIRAC.git","clone_url":"https://github.com/andresailer/DIRAC.git","svn_url":"https://github.com/andresailer/DIRAC","homepage":"http://diracgrid.org","size":26520,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"integration"}},"base":{"label":"DIRACGrid:rel-v6r11","ref":"rel-v6r11","sha":"3d51763a822f25a67f6879a2dcc26e1f4f953e4c","user":{"login":"DIRACGrid","id":694842,"avatar_url":"https://avatars.githubusercontent.com/u/694842?v=3","gravatar_id":"","url":"https://api.github.com/users/DIRACGrid","html_url":"https://github.com/DIRACGrid","followers_url":"https://api.github.com/users/DIRACGrid/followers","following_url":"https://api.github.com/users/DIRACGrid/following{/other_user}","gists_url":"https://api.github.com/users/DIRACGrid/gists{/gist_id}","starred_url":"https://api.github.com/users/DIRACGrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DIRACGrid/subscriptions","organizations_url":"https://api.github.com/users/DIRACGrid/orgs","repos_url":"https://api.github.com/users/DIRACGrid/repos","events_url":"https://api.github.com/users/DIRACGrid/events{/privacy}","received_events_url":"https://api.github.com/users/DIRACGrid/received_events","type":"Organization","site_admin":false},"repo":{"id":1576831,"name":"DIRAC","full_name":"DIRACGrid/DIRAC","owner":{"login":"DIRACGrid","id":694842,"avatar_url":"https://avatars.githubusercontent.com/u/694842?v=3","gravatar_id":"","url":"https://api.github.com/users/DIRACGrid","html_url":"https://github.com/DIRACGrid","followers_url":"https://api.github.com/users/DIRACGrid/followers","following_url":"https://api.github.com/users/DIRACGrid/following{/other_user}","gists_url":"https://api.github.com/users/DIRACGrid/gists{/gist_id}","starred_url":"https://api.github.com/users/DIRACGrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DIRACGrid/subscriptions","organizations_url":"https://api.github.com/users/DIRACGrid/orgs","repos_url":"https://api.github.com/users/DIRACGrid/repos","events_url":"https://api.github.com/users/DIRACGrid/events{/privacy}","received_events_url":"https://api.github.com/users/DIRACGrid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DIRACGrid/DIRAC","description":"DIRAC Grid","fork":false,"url":"https://api.github.com/repos/DIRACGrid/DIRAC","forks_url":"https://api.github.com/repos/DIRACGrid/DIRAC/forks","keys_url":"https://api.github.com/repos/DIRACGrid/DIRAC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DIRACGrid/DIRAC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DIRACGrid/DIRAC/teams","hooks_url":"https://api.github.com/repos/DIRACGrid/DIRAC/hooks","issue_events_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/events{/number}","events_url":"https://api.github.com/repos/DIRACGrid/DIRAC/events","assignees_url":"https://api.github.com/repos/DIRACGrid/DIRAC/assignees{/user}","branches_url":"https://api.github.com/repos/DIRACGrid/DIRAC/branches{/branch}","tags_url":"https://api.github.com/repos/DIRACGrid/DIRAC/tags","blobs_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/refs{/sha}","trees_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DIRACGrid/DIRAC/statuses/{sha}","languages_url":"https://api.github.com/repos/DIRACGrid/DIRAC/languages","stargazers_url":"https://api.github.com/repos/DIRACGrid/DIRAC/stargazers","contributors_url":"https://api.github.com/repos/DIRACGrid/DIRAC/contributors","subscribers_url":"https://api.github.com/repos/DIRACGrid/DIRAC/subscribers","subscription_url":"https://api.github.com/repos/DIRACGrid/DIRAC/subscription","commits_url":"https://api.github.com/repos/DIRACGrid/DIRAC/commits{/sha}","git_commits_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/commits{/sha}","comments_url":"https://api.github.com/repos/DIRACGrid/DIRAC/comments{/number}","issue_comment_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/comments{/number}","contents_url":"https://api.github.com/repos/DIRACGrid/DIRAC/contents/{+path}","compare_url":"https://api.github.com/repos/DIRACGrid/DIRAC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DIRACGrid/DIRAC/merges","archive_url":"https://api.github.com/repos/DIRACGrid/DIRAC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DIRACGrid/DIRAC/downloads","issues_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues{/number}","pulls_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls{/number}","milestones_url":"https://api.github.com/repos/DIRACGrid/DIRAC/milestones{/number}","notifications_url":"https://api.github.com/repos/DIRACGrid/DIRAC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DIRACGrid/DIRAC/labels{/name}","releases_url":"https://api.github.com/repos/DIRACGrid/DIRAC/releases{/id}","created_at":"2011-04-06T11:47:53Z","updated_at":"2015-05-07T06:39:51Z","pushed_at":"2015-06-01T10:52:11Z","git_url":"git://github.com/DIRACGrid/DIRAC.git","ssh_url":"git@github.com:DIRACGrid/DIRAC.git","clone_url":"https://github.com/DIRACGrid/DIRAC.git","svn_url":"https://github.com/DIRACGrid/DIRAC","homepage":"http://diracgrid.org","size":64357,"stargazers_count":42,"watchers_count":42,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":77,"mirror_url":null,"open_issues_count":108,"forks":77,"open_issues":108,"watchers":42,"default_branch":"integration"}},"_links":{"self":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2394"},"html":{"href":"https://github.com/DIRACGrid/DIRAC/pull/2394"},"issue":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/2394"},"comments":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/2394/comments"},"review_comments":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2394/comments"},"review_comment":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2394/commits"},"statuses":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/statuses/bafbdad0e1a18e2afb0fc851bf32cfae316c5dd2"}}}}