{"action":"created","comment":{"url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments/40298370","id":40298370,"diff_hunk":"@@ -1,13 +1,62 @@\n \"\"\" File catalog class. This is a simple dispatcher for the file catalog plug-ins.\n     It ensures that all operations are performed on the desired catalogs.\n+\n+    The File Catalog plug-ins are supposed to implement all or some of the\n+    methods described below. In all the methods the LFNs argument can have one\n+    of the following forms:\n+\n+    - string: just a single LFN itself\n+    - list: a list of LFN strings\n+    - dictionary: the keys are LFN strings, the values are LFN specific parameters\n+                  needed by the method\n+\n+    All the methods are returning a standard DIRAC bulk result structure. If the\n+    call is successful, the Successful and Failed dictionaries have LFNs as keys\n+    and specific results of operation as values.\n+\n+    The FileCatalog methods:\n+\n+    exists( LFNs ) - check the existence of the LFNs\n+\n+    addFile( LFNs )\n+    removeFile\n+    isFile( LFNs )\n+    setFileStatus\n+    getFileMetadata\n+    getFileSize\n+\n+    createDirectory\n+    removeDirectory\n+    isDirectory\n+    setDirectoryStatus\n+    listDirectory\n+    getDirectoryMetadata\n+    getDirectorySize\n+    getDirectoryContents\n+\n+    addReplica\n+    removeReplica\n+    setReplicaStatus\n+    setReplicaHost\n+    setReplicaProblematic\n+    getReplicas\n+    getReplicaStatus\n+    getDirectoryReplicas\n+\n+    createLink\n+    removeLink\n+    isLink\n+    readLink\n+\n+\n \"\"\"\n \n-import types, re\n+import re\n \n from DIRAC  import gLogger, gConfig, S_OK, S_ERROR\n from DIRAC.ConfigurationSystem.Client.Helpers.Operations    import Operations\n from DIRAC.Core.Security.ProxyInfo                          import getVOfromProxyGroup\n-from DIRAC.Resources.Utilities                              import checkArgumentFormat\n+from DIRAC.DataManagementSystem.DB.FileCatalogComponents.Utilities import checkArgumentFormat","path":"Resources/Catalog/FileCatalog.py","position":61,"original_position":61,"commit_id":"debc1e25201aa11320ac6bb0125e9eb77d0e2882","original_commit_id":"debc1e25201aa11320ac6bb0125e9eb77d0e2882","user":{"login":"chaen","id":3728211,"avatar_url":"https://avatars.githubusercontent.com/u/3728211?v=3","gravatar_id":"","url":"https://api.github.com/users/chaen","html_url":"https://github.com/chaen","followers_url":"https://api.github.com/users/chaen/followers","following_url":"https://api.github.com/users/chaen/following{/other_user}","gists_url":"https://api.github.com/users/chaen/gists{/gist_id}","starred_url":"https://api.github.com/users/chaen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaen/subscriptions","organizations_url":"https://api.github.com/users/chaen/orgs","repos_url":"https://api.github.com/users/chaen/repos","events_url":"https://api.github.com/users/chaen/events{/privacy}","received_events_url":"https://api.github.com/users/chaen/received_events","type":"User","site_admin":false},"body":"DataManagement/Utilities ? ","created_at":"2015-09-24T09:03:41Z","updated_at":"2015-09-24T09:03:41Z","html_url":"https://github.com/DIRACGrid/DIRAC/pull/2617#discussion_r40298370","pull_request_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2617","_links":{"self":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments/40298370"},"html":{"href":"https://github.com/DIRACGrid/DIRAC/pull/2617#discussion_r40298370"},"pull_request":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2617"}}},"pull_request":{"url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2617","id":45822660,"html_url":"https://github.com/DIRACGrid/DIRAC/pull/2617","diff_url":"https://github.com/DIRACGrid/DIRAC/pull/2617.diff","patch_url":"https://github.com/DIRACGrid/DIRAC/pull/2617.patch","issue_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/2617","number":2617,"state":"open","locked":false,"title":"[v6r15] Streamlining FileCatalog objects","user":{"login":"atsareg","id":679892,"avatar_url":"https://avatars.githubusercontent.com/u/679892?v=3","gravatar_id":"","url":"https://api.github.com/users/atsareg","html_url":"https://github.com/atsareg","followers_url":"https://api.github.com/users/atsareg/followers","following_url":"https://api.github.com/users/atsareg/following{/other_user}","gists_url":"https://api.github.com/users/atsareg/gists{/gist_id}","starred_url":"https://api.github.com/users/atsareg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atsareg/subscriptions","organizations_url":"https://api.github.com/users/atsareg/orgs","repos_url":"https://api.github.com/users/atsareg/repos","events_url":"https://api.github.com/users/atsareg/events{/privacy}","received_events_url":"https://api.github.com/users/atsareg/received_events","type":"User","site_admin":false},"body":"Redone to replace #2586\r\n\r\nThis PR is simplifying the relations of various File Catalog objects. FileCatalog container has an explicit list of methods operating on a LFN dictionary to check this argument only for those methods.\r\nEach catalog object can report if a given method is implemented, only implemented methods are called. This avoids making fake methods just to be \"as others\".\r\nThe original LFNs are kept while the service call and restored in the final result. This avoids problems of different LFNs in the input arguments and in the result due to the LFN normalization.\r\nThe FileCatalogueBase object is dropped. All the core FileCatalogClient's are updated ( Lcg, DFC, Transformation ). The TransformationClient and the corresponding service are cleaned from the fake methods.\r\n\r\nThis PR necessitates update of catalog clients in extensions, e.g. BookkeepingClient of LHCb.\r\n","created_at":"2015-09-23T19:47:02Z","updated_at":"2015-09-24T09:03:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7780d21dc803d2619d21062c462e3d119f2dd5d7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2617/commits","review_comments_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2617/comments","review_comment_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/2617/comments","statuses_url":"https://api.github.com/repos/DIRACGrid/DIRAC/statuses/debc1e25201aa11320ac6bb0125e9eb77d0e2882","head":{"label":"atsareg:dev-fc","ref":"dev-fc","sha":"debc1e25201aa11320ac6bb0125e9eb77d0e2882","user":{"login":"atsareg","id":679892,"avatar_url":"https://avatars.githubusercontent.com/u/679892?v=3","gravatar_id":"","url":"https://api.github.com/users/atsareg","html_url":"https://github.com/atsareg","followers_url":"https://api.github.com/users/atsareg/followers","following_url":"https://api.github.com/users/atsareg/following{/other_user}","gists_url":"https://api.github.com/users/atsareg/gists{/gist_id}","starred_url":"https://api.github.com/users/atsareg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atsareg/subscriptions","organizations_url":"https://api.github.com/users/atsareg/orgs","repos_url":"https://api.github.com/users/atsareg/repos","events_url":"https://api.github.com/users/atsareg/events{/privacy}","received_events_url":"https://api.github.com/users/atsareg/received_events","type":"User","site_admin":false},"repo":{"id":1661846,"name":"DIRAC","full_name":"atsareg/DIRAC","owner":{"login":"atsareg","id":679892,"avatar_url":"https://avatars.githubusercontent.com/u/679892?v=3","gravatar_id":"","url":"https://api.github.com/users/atsareg","html_url":"https://github.com/atsareg","followers_url":"https://api.github.com/users/atsareg/followers","following_url":"https://api.github.com/users/atsareg/following{/other_user}","gists_url":"https://api.github.com/users/atsareg/gists{/gist_id}","starred_url":"https://api.github.com/users/atsareg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atsareg/subscriptions","organizations_url":"https://api.github.com/users/atsareg/orgs","repos_url":"https://api.github.com/users/atsareg/repos","events_url":"https://api.github.com/users/atsareg/events{/privacy}","received_events_url":"https://api.github.com/users/atsareg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/atsareg/DIRAC","description":"DIRAC Grid","fork":true,"url":"https://api.github.com/repos/atsareg/DIRAC","forks_url":"https://api.github.com/repos/atsareg/DIRAC/forks","keys_url":"https://api.github.com/repos/atsareg/DIRAC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atsareg/DIRAC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atsareg/DIRAC/teams","hooks_url":"https://api.github.com/repos/atsareg/DIRAC/hooks","issue_events_url":"https://api.github.com/repos/atsareg/DIRAC/issues/events{/number}","events_url":"https://api.github.com/repos/atsareg/DIRAC/events","assignees_url":"https://api.github.com/repos/atsareg/DIRAC/assignees{/user}","branches_url":"https://api.github.com/repos/atsareg/DIRAC/branches{/branch}","tags_url":"https://api.github.com/repos/atsareg/DIRAC/tags","blobs_url":"https://api.github.com/repos/atsareg/DIRAC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atsareg/DIRAC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atsareg/DIRAC/git/refs{/sha}","trees_url":"https://api.github.com/repos/atsareg/DIRAC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atsareg/DIRAC/statuses/{sha}","languages_url":"https://api.github.com/repos/atsareg/DIRAC/languages","stargazers_url":"https://api.github.com/repos/atsareg/DIRAC/stargazers","contributors_url":"https://api.github.com/repos/atsareg/DIRAC/contributors","subscribers_url":"https://api.github.com/repos/atsareg/DIRAC/subscribers","subscription_url":"https://api.github.com/repos/atsareg/DIRAC/subscription","commits_url":"https://api.github.com/repos/atsareg/DIRAC/commits{/sha}","git_commits_url":"https://api.github.com/repos/atsareg/DIRAC/git/commits{/sha}","comments_url":"https://api.github.com/repos/atsareg/DIRAC/comments{/number}","issue_comment_url":"https://api.github.com/repos/atsareg/DIRAC/issues/comments{/number}","contents_url":"https://api.github.com/repos/atsareg/DIRAC/contents/{+path}","compare_url":"https://api.github.com/repos/atsareg/DIRAC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atsareg/DIRAC/merges","archive_url":"https://api.github.com/repos/atsareg/DIRAC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atsareg/DIRAC/downloads","issues_url":"https://api.github.com/repos/atsareg/DIRAC/issues{/number}","pulls_url":"https://api.github.com/repos/atsareg/DIRAC/pulls{/number}","milestones_url":"https://api.github.com/repos/atsareg/DIRAC/milestones{/number}","notifications_url":"https://api.github.com/repos/atsareg/DIRAC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atsareg/DIRAC/labels{/name}","releases_url":"https://api.github.com/repos/atsareg/DIRAC/releases{/id}","created_at":"2011-04-25T21:37:01Z","updated_at":"2014-06-23T16:33:39Z","pushed_at":"2015-09-23T21:07:51Z","git_url":"git://github.com/atsareg/DIRAC.git","ssh_url":"git@github.com:atsareg/DIRAC.git","clone_url":"https://github.com/atsareg/DIRAC.git","svn_url":"https://github.com/atsareg/DIRAC","homepage":"http://diracgrid.org","size":27384,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":16,"forks":0,"open_issues":16,"watchers":2,"default_branch":"develop"}},"base":{"label":"DIRACGrid:rel-v6r15","ref":"rel-v6r15","sha":"12a5ebe9a5ca0102aabcda2e813ff24fcda41b94","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-08-23T15:07:00Z","pushed_at":"2015-09-24T04:37:45Z","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":64317,"stargazers_count":44,"watchers_count":44,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":85,"mirror_url":null,"open_issues_count":115,"forks":85,"open_issues":115,"watchers":44,"default_branch":"integration"}},"_links":{"self":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2617"},"html":{"href":"https://github.com/DIRACGrid/DIRAC/pull/2617"},"issue":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/2617"},"comments":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/2617/comments"},"review_comments":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2617/comments"},"review_comment":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2617/commits"},"statuses":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/statuses/debc1e25201aa11320ac6bb0125e9eb77d0e2882"}}}}