{"action":"created","comment":{"url":"https://api.github.com/repos/Normation/ncf/pulls/comments/26295790","id":26295790,"diff_hunk":"@@ -489,3 +424,114 @@ def generate_technique_content(technique_metadata):\n \n   return result\n \n+\n+# FUNCTIONS called directly by the API code\n+###########################################\n+\n+def get_all_techniques_metadata(include_methods_calls = True, alt_path = ''):\n+  all_metadata = {}\n+\n+  if alt_path != '': sys.stderr.write(\"INFO: Alternative source path added: %s\\n\" % alt_path)\n+\n+  filenames = get_all_techniques_filenames(alt_path)\n+  errors = []\n+\n+  for file in filenames:\n+            \n+    content = open(file).read()\n+    try:\n+      metadata = parse_technique_metadata(content)\n+      all_metadata[metadata['bundle_name']] = metadata\n+\n+      if include_methods_calls:\n+        method_calls = parse_technique_methods(file)\n+        all_metadata[metadata['bundle_name']]['method_calls'] = method_calls\n+    except NcfError as e:\n+      errors.append(e)","path":"tools/ncf.py","position":364,"original_position":364,"commit_id":"7c57643f807efc3abd340f992960578ff4192560","original_commit_id":"7c57643f807efc3abd340f992960578ff4192560","user":{"login":"VinceMacBuche","id":1238978,"avatar_url":"https://avatars.githubusercontent.com/u/1238978?v=3","gravatar_id":"","url":"https://api.github.com/users/VinceMacBuche","html_url":"https://github.com/VinceMacBuche","followers_url":"https://api.github.com/users/VinceMacBuche/followers","following_url":"https://api.github.com/users/VinceMacBuche/following{/other_user}","gists_url":"https://api.github.com/users/VinceMacBuche/gists{/gist_id}","starred_url":"https://api.github.com/users/VinceMacBuche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VinceMacBuche/subscriptions","organizations_url":"https://api.github.com/users/VinceMacBuche/orgs","repos_url":"https://api.github.com/users/VinceMacBuche/repos","events_url":"https://api.github.com/users/VinceMacBuche/events{/privacy}","received_events_url":"https://api.github.com/users/VinceMacBuche/received_events","type":"User","site_admin":false},"body":"That would be awesome if the filename can be added:\r\n\r\n      error = NcfError(\"Could not parse Technique file \" + file+\", cause is: \"+ e.message, e.details)\r\n      errors.append(error)","created_at":"2015-03-12T12:00:11Z","updated_at":"2015-03-12T12:00:11Z","html_url":"https://github.com/Normation/ncf/pull/177#discussion_r26295790","pull_request_url":"https://api.github.com/repos/Normation/ncf/pulls/177","_links":{"self":{"href":"https://api.github.com/repos/Normation/ncf/pulls/comments/26295790"},"html":{"href":"https://github.com/Normation/ncf/pull/177#discussion_r26295790"},"pull_request":{"href":"https://api.github.com/repos/Normation/ncf/pulls/177"}}},"pull_request":{"url":"https://api.github.com/repos/Normation/ncf/pulls/177","id":30786685,"html_url":"https://github.com/Normation/ncf/pull/177","diff_url":"https://github.com/Normation/ncf/pull/177.diff","patch_url":"https://github.com/Normation/ncf/pull/177.patch","issue_url":"https://api.github.com/repos/Normation/ncf/issues/177","number":177,"state":"open","locked":false,"title":"Fixes #6376: Properly catch all error in ncf api","user":{"login":"peckpeck","id":7976666,"avatar_url":"https://avatars.githubusercontent.com/u/7976666?v=3","gravatar_id":"","url":"https://api.github.com/users/peckpeck","html_url":"https://github.com/peckpeck","followers_url":"https://api.github.com/users/peckpeck/followers","following_url":"https://api.github.com/users/peckpeck/following{/other_user}","gists_url":"https://api.github.com/users/peckpeck/gists{/gist_id}","starred_url":"https://api.github.com/users/peckpeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peckpeck/subscriptions","organizations_url":"https://api.github.com/users/peckpeck/orgs","repos_url":"https://api.github.com/users/peckpeck/repos","events_url":"https://api.github.com/users/peckpeck/events{/privacy}","received_events_url":"https://api.github.com/users/peckpeck/received_events","type":"User","site_admin":false},"body":"http://www.rudder-project.org/redmine/issues/6376","created_at":"2015-03-09T18:27:32Z","updated_at":"2015-03-12T12:00:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b1331fa05ee8c99e556613ec850a9312fd965042","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Normation/ncf/pulls/177/commits","review_comments_url":"https://api.github.com/repos/Normation/ncf/pulls/177/comments","review_comment_url":"https://api.github.com/repos/Normation/ncf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Normation/ncf/issues/177/comments","statuses_url":"https://api.github.com/repos/Normation/ncf/statuses/7c57643f807efc3abd340f992960578ff4192560","head":{"label":"peckpeck:bug_6376/properly_catch_all_error_in_ncf_api","ref":"bug_6376/properly_catch_all_error_in_ncf_api","sha":"7c57643f807efc3abd340f992960578ff4192560","user":{"login":"peckpeck","id":7976666,"avatar_url":"https://avatars.githubusercontent.com/u/7976666?v=3","gravatar_id":"","url":"https://api.github.com/users/peckpeck","html_url":"https://github.com/peckpeck","followers_url":"https://api.github.com/users/peckpeck/followers","following_url":"https://api.github.com/users/peckpeck/following{/other_user}","gists_url":"https://api.github.com/users/peckpeck/gists{/gist_id}","starred_url":"https://api.github.com/users/peckpeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peckpeck/subscriptions","organizations_url":"https://api.github.com/users/peckpeck/orgs","repos_url":"https://api.github.com/users/peckpeck/repos","events_url":"https://api.github.com/users/peckpeck/events{/privacy}","received_events_url":"https://api.github.com/users/peckpeck/received_events","type":"User","site_admin":false},"repo":{"id":22761557,"name":"ncf","full_name":"peckpeck/ncf","owner":{"login":"peckpeck","id":7976666,"avatar_url":"https://avatars.githubusercontent.com/u/7976666?v=3","gravatar_id":"","url":"https://api.github.com/users/peckpeck","html_url":"https://github.com/peckpeck","followers_url":"https://api.github.com/users/peckpeck/followers","following_url":"https://api.github.com/users/peckpeck/following{/other_user}","gists_url":"https://api.github.com/users/peckpeck/gists{/gist_id}","starred_url":"https://api.github.com/users/peckpeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peckpeck/subscriptions","organizations_url":"https://api.github.com/users/peckpeck/orgs","repos_url":"https://api.github.com/users/peckpeck/repos","events_url":"https://api.github.com/users/peckpeck/events{/privacy}","received_events_url":"https://api.github.com/users/peckpeck/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/peckpeck/ncf","description":"ncf is a framework that runs in pure CFEngine language, to help structure your CFEngine policy and provide reusable, single purpose components distributed under the GPLv3 license.","fork":true,"url":"https://api.github.com/repos/peckpeck/ncf","forks_url":"https://api.github.com/repos/peckpeck/ncf/forks","keys_url":"https://api.github.com/repos/peckpeck/ncf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peckpeck/ncf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peckpeck/ncf/teams","hooks_url":"https://api.github.com/repos/peckpeck/ncf/hooks","issue_events_url":"https://api.github.com/repos/peckpeck/ncf/issues/events{/number}","events_url":"https://api.github.com/repos/peckpeck/ncf/events","assignees_url":"https://api.github.com/repos/peckpeck/ncf/assignees{/user}","branches_url":"https://api.github.com/repos/peckpeck/ncf/branches{/branch}","tags_url":"https://api.github.com/repos/peckpeck/ncf/tags","blobs_url":"https://api.github.com/repos/peckpeck/ncf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peckpeck/ncf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peckpeck/ncf/git/refs{/sha}","trees_url":"https://api.github.com/repos/peckpeck/ncf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peckpeck/ncf/statuses/{sha}","languages_url":"https://api.github.com/repos/peckpeck/ncf/languages","stargazers_url":"https://api.github.com/repos/peckpeck/ncf/stargazers","contributors_url":"https://api.github.com/repos/peckpeck/ncf/contributors","subscribers_url":"https://api.github.com/repos/peckpeck/ncf/subscribers","subscription_url":"https://api.github.com/repos/peckpeck/ncf/subscription","commits_url":"https://api.github.com/repos/peckpeck/ncf/commits{/sha}","git_commits_url":"https://api.github.com/repos/peckpeck/ncf/git/commits{/sha}","comments_url":"https://api.github.com/repos/peckpeck/ncf/comments{/number}","issue_comment_url":"https://api.github.com/repos/peckpeck/ncf/issues/comments{/number}","contents_url":"https://api.github.com/repos/peckpeck/ncf/contents/{+path}","compare_url":"https://api.github.com/repos/peckpeck/ncf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peckpeck/ncf/merges","archive_url":"https://api.github.com/repos/peckpeck/ncf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peckpeck/ncf/downloads","issues_url":"https://api.github.com/repos/peckpeck/ncf/issues{/number}","pulls_url":"https://api.github.com/repos/peckpeck/ncf/pulls{/number}","milestones_url":"https://api.github.com/repos/peckpeck/ncf/milestones{/number}","notifications_url":"https://api.github.com/repos/peckpeck/ncf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peckpeck/ncf/labels{/name}","releases_url":"https://api.github.com/repos/peckpeck/ncf/releases{/id}","created_at":"2014-08-08T15:05:08Z","updated_at":"2014-09-17T08:52:40Z","pushed_at":"2015-03-11T17:47:48Z","git_url":"git://github.com/peckpeck/ncf.git","ssh_url":"git@github.com:peckpeck/ncf.git","clone_url":"https://github.com/peckpeck/ncf.git","svn_url":"https://github.com/peckpeck/ncf","homepage":"http://www.ncf.io","size":2044,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Normation:master","ref":"master","sha":"e53b99939b5feb409d3e91dfa6cf7f038b6346ce","user":{"login":"Normation","id":695105,"avatar_url":"https://avatars.githubusercontent.com/u/695105?v=3","gravatar_id":"","url":"https://api.github.com/users/Normation","html_url":"https://github.com/Normation","followers_url":"https://api.github.com/users/Normation/followers","following_url":"https://api.github.com/users/Normation/following{/other_user}","gists_url":"https://api.github.com/users/Normation/gists{/gist_id}","starred_url":"https://api.github.com/users/Normation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Normation/subscriptions","organizations_url":"https://api.github.com/users/Normation/orgs","repos_url":"https://api.github.com/users/Normation/repos","events_url":"https://api.github.com/users/Normation/events{/privacy}","received_events_url":"https://api.github.com/users/Normation/received_events","type":"Organization","site_admin":false},"repo":{"id":12734168,"name":"ncf","full_name":"Normation/ncf","owner":{"login":"Normation","id":695105,"avatar_url":"https://avatars.githubusercontent.com/u/695105?v=3","gravatar_id":"","url":"https://api.github.com/users/Normation","html_url":"https://github.com/Normation","followers_url":"https://api.github.com/users/Normation/followers","following_url":"https://api.github.com/users/Normation/following{/other_user}","gists_url":"https://api.github.com/users/Normation/gists{/gist_id}","starred_url":"https://api.github.com/users/Normation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Normation/subscriptions","organizations_url":"https://api.github.com/users/Normation/orgs","repos_url":"https://api.github.com/users/Normation/repos","events_url":"https://api.github.com/users/Normation/events{/privacy}","received_events_url":"https://api.github.com/users/Normation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Normation/ncf","description":"ncf is a framework that runs in pure CFEngine language, to help structure your CFEngine policy and provide reusable, single purpose components distributed under the GPLv3 license.","fork":false,"url":"https://api.github.com/repos/Normation/ncf","forks_url":"https://api.github.com/repos/Normation/ncf/forks","keys_url":"https://api.github.com/repos/Normation/ncf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Normation/ncf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Normation/ncf/teams","hooks_url":"https://api.github.com/repos/Normation/ncf/hooks","issue_events_url":"https://api.github.com/repos/Normation/ncf/issues/events{/number}","events_url":"https://api.github.com/repos/Normation/ncf/events","assignees_url":"https://api.github.com/repos/Normation/ncf/assignees{/user}","branches_url":"https://api.github.com/repos/Normation/ncf/branches{/branch}","tags_url":"https://api.github.com/repos/Normation/ncf/tags","blobs_url":"https://api.github.com/repos/Normation/ncf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Normation/ncf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Normation/ncf/git/refs{/sha}","trees_url":"https://api.github.com/repos/Normation/ncf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Normation/ncf/statuses/{sha}","languages_url":"https://api.github.com/repos/Normation/ncf/languages","stargazers_url":"https://api.github.com/repos/Normation/ncf/stargazers","contributors_url":"https://api.github.com/repos/Normation/ncf/contributors","subscribers_url":"https://api.github.com/repos/Normation/ncf/subscribers","subscription_url":"https://api.github.com/repos/Normation/ncf/subscription","commits_url":"https://api.github.com/repos/Normation/ncf/commits{/sha}","git_commits_url":"https://api.github.com/repos/Normation/ncf/git/commits{/sha}","comments_url":"https://api.github.com/repos/Normation/ncf/comments{/number}","issue_comment_url":"https://api.github.com/repos/Normation/ncf/issues/comments{/number}","contents_url":"https://api.github.com/repos/Normation/ncf/contents/{+path}","compare_url":"https://api.github.com/repos/Normation/ncf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Normation/ncf/merges","archive_url":"https://api.github.com/repos/Normation/ncf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Normation/ncf/downloads","issues_url":"https://api.github.com/repos/Normation/ncf/issues{/number}","pulls_url":"https://api.github.com/repos/Normation/ncf/pulls{/number}","milestones_url":"https://api.github.com/repos/Normation/ncf/milestones{/number}","notifications_url":"https://api.github.com/repos/Normation/ncf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Normation/ncf/labels{/name}","releases_url":"https://api.github.com/repos/Normation/ncf/releases{/id}","created_at":"2013-09-10T16:02:33Z","updated_at":"2015-03-05T11:44:09Z","pushed_at":"2015-03-05T11:44:08Z","git_url":"git://github.com/Normation/ncf.git","ssh_url":"git@github.com:Normation/ncf.git","clone_url":"https://github.com/Normation/ncf.git","svn_url":"https://github.com/Normation/ncf","homepage":"http://www.ncf.io","size":3917,"stargazers_count":24,"watchers_count":24,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":13,"forks":19,"open_issues":13,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Normation/ncf/pulls/177"},"html":{"href":"https://github.com/Normation/ncf/pull/177"},"issue":{"href":"https://api.github.com/repos/Normation/ncf/issues/177"},"comments":{"href":"https://api.github.com/repos/Normation/ncf/issues/177/comments"},"review_comments":{"href":"https://api.github.com/repos/Normation/ncf/pulls/177/comments"},"review_comment":{"href":"https://api.github.com/repos/Normation/ncf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Normation/ncf/pulls/177/commits"},"statuses":{"href":"https://api.github.com/repos/Normation/ncf/statuses/7c57643f807efc3abd340f992960578ff4192560"}}}}