{"action":"created","issue":{"url":"https://api.github.com/repos/Katello/katello-packaging/issues/238","repository_url":"https://api.github.com/repos/Katello/katello-packaging","labels_url":"https://api.github.com/repos/Katello/katello-packaging/issues/238/labels{/name}","comments_url":"https://api.github.com/repos/Katello/katello-packaging/issues/238/comments","events_url":"https://api.github.com/repos/Katello/katello-packaging/issues/238/events","html_url":"https://github.com/Katello/katello-packaging/issues/238","id":160604879,"number":238,"title":"Better katello-service list output","user":{"login":"ericzolf","id":3105685,"avatar_url":"https://avatars.githubusercontent.com/u/3105685?v=3","gravatar_id":"","url":"https://api.github.com/users/ericzolf","html_url":"https://github.com/ericzolf","followers_url":"https://api.github.com/users/ericzolf/followers","following_url":"https://api.github.com/users/ericzolf/following{/other_user}","gists_url":"https://api.github.com/users/ericzolf/gists{/gist_id}","starred_url":"https://api.github.com/users/ericzolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericzolf/subscriptions","organizations_url":"https://api.github.com/users/ericzolf/orgs","repos_url":"https://api.github.com/users/ericzolf/repos","events_url":"https://api.github.com/users/ericzolf/events{/privacy}","received_events_url":"https://api.github.com/users/ericzolf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-16T08:26:28Z","updated_at":"2016-08-26T12:15:22Z","closed_at":null,"body":"The current output of the 'list' command just tells if the unit exists and is enabled, it doesn't tell if the service is running or not (whereas the output of 'status' is unreadable).\r\n\r\nI suggest the following slight change to the `list_services` function:\r\n\r\n```\r\n    regex = services_by_priority.map { |service| \"^[^a-z_-]*#{service}.service\" }.join('\\|')\r\n    puts `systemctl list-units --all \\*.service | grep -e '#{regex}' -e '^ *UNIT'`\r\n```\r\n\r\nThe output then looks as follows (with systemctl), which is much more informative while remaining readable:\r\n\r\n```\r\n# katello-service list\r\n  UNIT                                   LOAD      ACTIVE   SUB     DESCRIPTION\r\n  foreman-proxy.service                  loaded    inactive dead    Foreman Proxy\r\n  foreman-tasks.service                  loaded    inactive dead    Foreman jobs daemon\r\n  httpd.service                          loaded    active   running The Apache HTTP Server\r\n  mongod.service                         loaded    active   running High-performance, schema-free document-oriented database\r\n  postgresql.service                     loaded    active   running PostgreSQL database server\r\n  pulp_celerybeat.service                loaded    active   running Pulp's Celerybeat\r\n  pulp_resource_manager.service          loaded    active   running Pulp Resource Manager\r\n  pulp_workers.service                   loaded    active   exited  Pulp Celery Workers\r\n  qdrouterd.service                      loaded    active   running Qpid Dispatch router daemon\r\n  qpidd.service                          loaded    active   running An AMQP message broker daemon.\r\n  tomcat.service                         loaded    active   running Apache Tomcat Web Application Container\r\n```"},"comment":{"url":"https://api.github.com/repos/Katello/katello-packaging/issues/comments/242719680","html_url":"https://github.com/Katello/katello-packaging/issues/238#issuecomment-242719680","issue_url":"https://api.github.com/repos/Katello/katello-packaging/issues/238","id":242719680,"user":{"login":"ehelms","id":293363,"avatar_url":"https://avatars.githubusercontent.com/u/293363?v=3","gravatar_id":"","url":"https://api.github.com/users/ehelms","html_url":"https://github.com/ehelms","followers_url":"https://api.github.com/users/ehelms/followers","following_url":"https://api.github.com/users/ehelms/following{/other_user}","gists_url":"https://api.github.com/users/ehelms/gists{/gist_id}","starred_url":"https://api.github.com/users/ehelms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehelms/subscriptions","organizations_url":"https://api.github.com/users/ehelms/orgs","repos_url":"https://api.github.com/users/ehelms/repos","events_url":"https://api.github.com/users/ehelms/events{/privacy}","received_events_url":"https://api.github.com/users/ehelms/received_events","type":"User","site_admin":false},"created_at":"2016-08-26T12:15:22Z","updated_at":"2016-08-26T12:15:22Z","body":"@ericzolf would you like to open a PR with your proposed changes? We are happy to open a PR with the patch ourselves, however, this gives you an opportunity to author and own a change within the project!"}}
{"actor":{"display_login":"ehelms"}}