{"action":"created","comment":{"url":"https://api.github.com/repos/RedHatInsights/insights-core/pulls/comments/204402061","pull_request_review_id":139474141,"id":204402061,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDQwMjA2MQ==","diff_hunk":"@@ -0,0 +1,48 @@\n+from functools import partial\n+from insights.specs import Specs\n+from insights.core.plugins import datasource\n+from insights.core.context import JDRContext\n+from insights.core.spec_factory import simple_file, foreach_collect, first_file, glob_file, listdir\n+\n+first_file = partial(first_file, context=JDRContext)\n+glob_file = partial(glob_file, context=JDRContext)\n+simple_file = partial(simple_file, context=JDRContext)\n+\n+\n+class JDRSpecs(Specs):\n+    # Here use glob_file is to return list type result to keep same with  jboss specs default.py\n+    # jdr just collect files under one jboss home,\n+    # For insights-client, we will collect files under different jboss home, return list is necessary.\n+    jboss_standalone_server_log = glob_file(\"JBOSS_HOME/standalone/log/server.log\")\n+\n+    @datasource(jboss_standalone_server_log, context=JDRContext, multi_output=True)\n+    def jboss_standlone_conf_file(broker):\n+        # read the server.log to detect if specific xml is using in the startup command\n+        # the server.log maybe overwrite,  so just return []\n+        log_files = broker[JDRSpecs.jboss_standalone_server_log]\n+        if log_files:\n+            log_content = log_files[-1].content\n+            results = []\n+            for line in log_content:\n+                if \"sun.java.command =\" in line and \".jdr\" not in line and \"-Djboss.server.base.dir\" in line:\n+                    results.append(line)\n+            if results:\n+                # default is standalone.xml\n+                config_xml = 'standalone.xml'\n+                java_command = results[-1]\n+                if '--server-config' in java_command:\n+                    config_xml = java_command.split('--server-config=')[1].split()[0]\n+                elif '-c ' in java_command:\n+                    config_xml = java_command.split('-c ')[1].split()[0]\n+                return config_xml","path":"insights/specs/jdr_archive.py","position":37,"original_position":37,"commit_id":"be2b36901d06f359414f432132cc756fcd8fc19d","original_commit_id":"be2b36901d06f359414f432132cc756fcd8fc19d","user":{"login":"csams","id":1062274,"node_id":"MDQ6VXNlcjEwNjIyNzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1062274?v=4","gravatar_id":"","url":"https://api.github.com/users/csams","html_url":"https://github.com/csams","followers_url":"https://api.github.com/users/csams/followers","following_url":"https://api.github.com/users/csams/following{/other_user}","gists_url":"https://api.github.com/users/csams/gists{/gist_id}","starred_url":"https://api.github.com/users/csams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csams/subscriptions","organizations_url":"https://api.github.com/users/csams/orgs","repos_url":"https://api.github.com/users/csams/repos","events_url":"https://api.github.com/users/csams/events{/privacy}","received_events_url":"https://api.github.com/users/csams/received_events","type":"User","site_admin":false},"body":"This should return a list like `[config_xml]` for consistency with the default return value `[]` and use in a `foreach_collect`.","created_at":"2018-07-23T13:34:36Z","updated_at":"2018-07-23T13:48:11Z","html_url":"https://github.com/RedHatInsights/insights-core/pull/1274#discussion_r204402061","pull_request_url":"https://api.github.com/repos/RedHatInsights/insights-core/pulls/1274","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/RedHatInsights/insights-core/pulls/comments/204402061"},"html":{"href":"https://github.com/RedHatInsights/insights-core/pull/1274#discussion_r204402061"},"pull_request":{"href":"https://api.github.com/repos/RedHatInsights/insights-core/pulls/1274"}}},"pull_request":{"url":"https://api.github.com/repos/RedHatInsights/insights-core/pulls/1274","id":202149275,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyMTQ5Mjc1","html_url":"https://github.com/RedHatInsights/insights-core/pull/1274","diff_url":"https://github.com/RedHatInsights/insights-core/pull/1274.diff","patch_url":"https://github.com/RedHatInsights/insights-core/pull/1274.patch","issue_url":"https://api.github.com/repos/RedHatInsights/insights-core/issues/1274","number":1274,"state":"open","locked":false,"title":"Add jdr_archive.py and three specs","user":{"login":"chenlizhong","id":18368834,"node_id":"MDQ6VXNlcjE4MzY4ODM0","avatar_url":"https://avatars3.githubusercontent.com/u/18368834?v=4","gravatar_id":"","url":"https://api.github.com/users/chenlizhong","html_url":"https://github.com/chenlizhong","followers_url":"https://api.github.com/users/chenlizhong/followers","following_url":"https://api.github.com/users/chenlizhong/following{/other_user}","gists_url":"https://api.github.com/users/chenlizhong/gists{/gist_id}","starred_url":"https://api.github.com/users/chenlizhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenlizhong/subscriptions","organizations_url":"https://api.github.com/users/chenlizhong/orgs","repos_url":"https://api.github.com/users/chenlizhong/repos","events_url":"https://api.github.com/users/chenlizhong/events{/privacy}","received_events_url":"https://api.github.com/users/chenlizhong/received_events","type":"User","site_admin":false},"body":"- jdr_archive.py is specs file for archive from JBoss Diagnostic Reporter","created_at":"2018-07-18T06:22:51Z","updated_at":"2018-07-23T13:48:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f9de2bb79f13864e046e2ddb3922e7a56f70e4e2","assignee":null,"assignees":[],"requested_reviewers":[{"login":"xiangce","id":16770981,"node_id":"MDQ6VXNlcjE2NzcwOTgx","avatar_url":"https://avatars2.githubusercontent.com/u/16770981?v=4","gravatar_id":"","url":"https://api.github.com/users/xiangce","html_url":"https://github.com/xiangce","followers_url":"https://api.github.com/users/xiangce/followers","following_url":"https://api.github.com/users/xiangce/following{/other_user}","gists_url":"https://api.github.com/users/xiangce/gists{/gist_id}","starred_url":"https://api.github.com/users/xiangce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiangce/subscriptions","organizations_url":"https://api.github.com/users/xiangce/orgs","repos_url":"https://api.github.com/users/xiangce/repos","events_url":"https://api.github.com/users/xiangce/events{/privacy}","received_events_url":"https://api.github.com/users/xiangce/received_events","type":"User","site_admin":false},{"login":"bfahr","id":20520336,"node_id":"MDQ6VXNlcjIwNTIwMzM2","avatar_url":"https://avatars2.githubusercontent.com/u/20520336?v=4","gravatar_id":"","url":"https://api.github.com/users/bfahr","html_url":"https://github.com/bfahr","followers_url":"https://api.github.com/users/bfahr/followers","following_url":"https://api.github.com/users/bfahr/following{/other_user}","gists_url":"https://api.github.com/users/bfahr/gists{/gist_id}","starred_url":"https://api.github.com/users/bfahr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfahr/subscriptions","organizations_url":"https://api.github.com/users/bfahr/orgs","repos_url":"https://api.github.com/users/bfahr/repos","events_url":"https://api.github.com/users/bfahr/events{/privacy}","received_events_url":"https://api.github.com/users/bfahr/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/RedHatInsights/insights-core/pulls/1274/commits","review_comments_url":"https://api.github.com/repos/RedHatInsights/insights-core/pulls/1274/comments","review_comment_url":"https://api.github.com/repos/RedHatInsights/insights-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RedHatInsights/insights-core/issues/1274/comments","statuses_url":"https://api.github.com/repos/RedHatInsights/insights-core/statuses/be2b36901d06f359414f432132cc756fcd8fc19d","head":{"label":"RedHatInsights:add_jdr_archive_spec_file","ref":"add_jdr_archive_spec_file","sha":"be2b36901d06f359414f432132cc756fcd8fc19d","user":{"login":"RedHatInsights","id":24939818,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0OTM5ODE4","avatar_url":"https://avatars2.githubusercontent.com/u/24939818?v=4","gravatar_id":"","url":"https://api.github.com/users/RedHatInsights","html_url":"https://github.com/RedHatInsights","followers_url":"https://api.github.com/users/RedHatInsights/followers","following_url":"https://api.github.com/users/RedHatInsights/following{/other_user}","gists_url":"https://api.github.com/users/RedHatInsights/gists{/gist_id}","starred_url":"https://api.github.com/users/RedHatInsights/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RedHatInsights/subscriptions","organizations_url":"https://api.github.com/users/RedHatInsights/orgs","repos_url":"https://api.github.com/users/RedHatInsights/repos","events_url":"https://api.github.com/users/RedHatInsights/events{/privacy}","received_events_url":"https://api.github.com/users/RedHatInsights/received_events","type":"Organization","site_admin":false},"repo":{"id":92518221,"node_id":"MDEwOlJlcG9zaXRvcnk5MjUxODIyMQ==","name":"insights-core","full_name":"RedHatInsights/insights-core","owner":{"login":"RedHatInsights","id":24939818,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0OTM5ODE4","avatar_url":"https://avatars2.githubusercontent.com/u/24939818?v=4","gravatar_id":"","url":"https://api.github.com/users/RedHatInsights","html_url":"https://github.com/RedHatInsights","followers_url":"https://api.github.com/users/RedHatInsights/followers","following_url":"https://api.github.com/users/RedHatInsights/following{/other_user}","gists_url":"https://api.github.com/users/RedHatInsights/gists{/gist_id}","starred_url":"https://api.github.com/users/RedHatInsights/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RedHatInsights/subscriptions","organizations_url":"https://api.github.com/users/RedHatInsights/orgs","repos_url":"https://api.github.com/users/RedHatInsights/repos","events_url":"https://api.github.com/users/RedHatInsights/events{/privacy}","received_events_url":"https://api.github.com/users/RedHatInsights/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RedHatInsights/insights-core","description":"Insights Core is a data collection and processing framework used by Red Hat Insights","fork":false,"url":"https://api.github.com/repos/RedHatInsights/insights-core","forks_url":"https://api.github.com/repos/RedHatInsights/insights-core/forks","keys_url":"https://api.github.com/repos/RedHatInsights/insights-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RedHatInsights/insights-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RedHatInsights/insights-core/teams","hooks_url":"https://api.github.com/repos/RedHatInsights/insights-core/hooks","issue_events_url":"https://api.github.com/repos/RedHatInsights/insights-core/issues/events{/number}","events_url":"https://api.github.com/repos/RedHatInsights/insights-core/events","assignees_url":"https://api.github.com/repos/RedHatInsights/insights-core/assignees{/user}","branches_url":"https://api.github.com/repos/RedHatInsights/insights-core/branches{/branch}","tags_url":"https://api.github.com/repos/RedHatInsights/insights-core/tags","blobs_url":"https://api.github.com/repos/RedHatInsights/insights-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RedHatInsights/insights-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RedHatInsights/insights-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/RedHatInsights/insights-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RedHatInsights/insights-core/statuses/{sha}","languages_url":"https://api.github.com/repos/RedHatInsights/insights-core/languages","stargazers_url":"https://api.github.com/repos/RedHatInsights/insights-core/stargazers","contributors_url":"https://api.github.com/repos/RedHatInsights/insights-core/contributors","subscribers_url":"https://api.github.com/repos/RedHatInsights/insights-core/subscribers","subscription_url":"https://api.github.com/repos/RedHatInsights/insights-core/subscription","commits_url":"https://api.github.com/repos/RedHatInsights/insights-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/RedHatInsights/insights-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/RedHatInsights/insights-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/RedHatInsights/insights-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/RedHatInsights/insights-core/contents/{+path}","compare_url":"https://api.github.com/repos/RedHatInsights/insights-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RedHatInsights/insights-core/merges","archive_url":"https://api.github.com/repos/RedHatInsights/insights-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RedHatInsights/insights-core/downloads","issues_url":"https://api.github.com/repos/RedHatInsights/insights-core/issues{/number}","pulls_url":"https://api.github.com/repos/RedHatInsights/insights-core/pulls{/number}","milestones_url":"https://api.github.com/repos/RedHatInsights/insights-core/milestones{/number}","notifications_url":"https://api.github.com/repos/RedHatInsights/insights-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RedHatInsights/insights-core/labels{/name}","releases_url":"https://api.github.com/repos/RedHatInsights/insights-core/releases{/id}","deployments_url":"https://api.github.com/repos/RedHatInsights/insights-core/deployments","created_at":"2017-05-26T14:23:11Z","updated_at":"2018-07-23T13:41:13Z","pushed_at":"2018-07-23T13:46:22Z","git_url":"git://github.com/RedHatInsights/insights-core.git","ssh_url":"git@github.com:RedHatInsights/insights-core.git","clone_url":"https://github.com/RedHatInsights/insights-core.git","svn_url":"https://github.com/RedHatInsights/insights-core","homepage":"https://access.redhat.com/insights","size":6209,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"open_issues_count":90,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":18,"open_issues":90,"watchers":12,"default_branch":"master"}},"base":{"label":"RedHatInsights:master","ref":"master","sha":"b780ab6126645919997e86ada755fca015f0af76","user":{"login":"RedHatInsights","id":24939818,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0OTM5ODE4","avatar_url":"https://avatars2.githubusercontent.com/u/24939818?v=4","gravatar_id":"","url":"https://api.github.com/users/RedHatInsights","html_url":"https://github.com/RedHatInsights","followers_url":"https://api.github.com/users/RedHatInsights/followers","following_url":"https://api.github.com/users/RedHatInsights/following{/other_user}","gists_url":"https://api.github.com/users/RedHatInsights/gists{/gist_id}","starred_url":"https://api.github.com/users/RedHatInsights/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RedHatInsights/subscriptions","organizations_url":"https://api.github.com/users/RedHatInsights/orgs","repos_url":"https://api.github.com/users/RedHatInsights/repos","events_url":"https://api.github.com/users/RedHatInsights/events{/privacy}","received_events_url":"https://api.github.com/users/RedHatInsights/received_events","type":"Organization","site_admin":false},"repo":{"id":92518221,"node_id":"MDEwOlJlcG9zaXRvcnk5MjUxODIyMQ==","name":"insights-core","full_name":"RedHatInsights/insights-core","owner":{"login":"RedHatInsights","id":24939818,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0OTM5ODE4","avatar_url":"https://avatars2.githubusercontent.com/u/24939818?v=4","gravatar_id":"","url":"https://api.github.com/users/RedHatInsights","html_url":"https://github.com/RedHatInsights","followers_url":"https://api.github.com/users/RedHatInsights/followers","following_url":"https://api.github.com/users/RedHatInsights/following{/other_user}","gists_url":"https://api.github.com/users/RedHatInsights/gists{/gist_id}","starred_url":"https://api.github.com/users/RedHatInsights/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RedHatInsights/subscriptions","organizations_url":"https://api.github.com/users/RedHatInsights/orgs","repos_url":"https://api.github.com/users/RedHatInsights/repos","events_url":"https://api.github.com/users/RedHatInsights/events{/privacy}","received_events_url":"https://api.github.com/users/RedHatInsights/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RedHatInsights/insights-core","description":"Insights Core is a data collection and processing framework used by Red Hat Insights","fork":false,"url":"https://api.github.com/repos/RedHatInsights/insights-core","forks_url":"https://api.github.com/repos/RedHatInsights/insights-core/forks","keys_url":"https://api.github.com/repos/RedHatInsights/insights-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RedHatInsights/insights-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RedHatInsights/insights-core/teams","hooks_url":"https://api.github.com/repos/RedHatInsights/insights-core/hooks","issue_events_url":"https://api.github.com/repos/RedHatInsights/insights-core/issues/events{/number}","events_url":"https://api.github.com/repos/RedHatInsights/insights-core/events","assignees_url":"https://api.github.com/repos/RedHatInsights/insights-core/assignees{/user}","branches_url":"https://api.github.com/repos/RedHatInsights/insights-core/branches{/branch}","tags_url":"https://api.github.com/repos/RedHatInsights/insights-core/tags","blobs_url":"https://api.github.com/repos/RedHatInsights/insights-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RedHatInsights/insights-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RedHatInsights/insights-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/RedHatInsights/insights-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RedHatInsights/insights-core/statuses/{sha}","languages_url":"https://api.github.com/repos/RedHatInsights/insights-core/languages","stargazers_url":"https://api.github.com/repos/RedHatInsights/insights-core/stargazers","contributors_url":"https://api.github.com/repos/RedHatInsights/insights-core/contributors","subscribers_url":"https://api.github.com/repos/RedHatInsights/insights-core/subscribers","subscription_url":"https://api.github.com/repos/RedHatInsights/insights-core/subscription","commits_url":"https://api.github.com/repos/RedHatInsights/insights-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/RedHatInsights/insights-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/RedHatInsights/insights-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/RedHatInsights/insights-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/RedHatInsights/insights-core/contents/{+path}","compare_url":"https://api.github.com/repos/RedHatInsights/insights-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RedHatInsights/insights-core/merges","archive_url":"https://api.github.com/repos/RedHatInsights/insights-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RedHatInsights/insights-core/downloads","issues_url":"https://api.github.com/repos/RedHatInsights/insights-core/issues{/number}","pulls_url":"https://api.github.com/repos/RedHatInsights/insights-core/pulls{/number}","milestones_url":"https://api.github.com/repos/RedHatInsights/insights-core/milestones{/number}","notifications_url":"https://api.github.com/repos/RedHatInsights/insights-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RedHatInsights/insights-core/labels{/name}","releases_url":"https://api.github.com/repos/RedHatInsights/insights-core/releases{/id}","deployments_url":"https://api.github.com/repos/RedHatInsights/insights-core/deployments","created_at":"2017-05-26T14:23:11Z","updated_at":"2018-07-23T13:41:13Z","pushed_at":"2018-07-23T13:46:22Z","git_url":"git://github.com/RedHatInsights/insights-core.git","ssh_url":"git@github.com:RedHatInsights/insights-core.git","clone_url":"https://github.com/RedHatInsights/insights-core.git","svn_url":"https://github.com/RedHatInsights/insights-core","homepage":"https://access.redhat.com/insights","size":6209,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"open_issues_count":90,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":18,"open_issues":90,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RedHatInsights/insights-core/pulls/1274"},"html":{"href":"https://github.com/RedHatInsights/insights-core/pull/1274"},"issue":{"href":"https://api.github.com/repos/RedHatInsights/insights-core/issues/1274"},"comments":{"href":"https://api.github.com/repos/RedHatInsights/insights-core/issues/1274/comments"},"review_comments":{"href":"https://api.github.com/repos/RedHatInsights/insights-core/pulls/1274/comments"},"review_comment":{"href":"https://api.github.com/repos/RedHatInsights/insights-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RedHatInsights/insights-core/pulls/1274/commits"},"statuses":{"href":"https://api.github.com/repos/RedHatInsights/insights-core/statuses/be2b36901d06f359414f432132cc756fcd8fc19d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"csams"}}