{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-cli/issues/1148","labels_url":"https://api.github.com/repos/aws/aws-cli/issues/1148/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-cli/issues/1148/comments","events_url":"https://api.github.com/repos/aws/aws-cli/issues/1148/events","html_url":"https://github.com/aws/aws-cli/pull/1148","id":57631465,"number":1148,"title":"Add ``lineage_names`` to commands","user":{"login":"kyleknap","id":4605355,"avatar_url":"https://avatars.githubusercontent.com/u/4605355?v=3","gravatar_id":"","url":"https://api.github.com/users/kyleknap","html_url":"https://github.com/kyleknap","followers_url":"https://api.github.com/users/kyleknap/followers","following_url":"https://api.github.com/users/kyleknap/following{/other_user}","gists_url":"https://api.github.com/users/kyleknap/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleknap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleknap/subscriptions","organizations_url":"https://api.github.com/users/kyleknap/orgs","repos_url":"https://api.github.com/users/kyleknap/repos","events_url":"https://api.github.com/users/kyleknap/events{/privacy}","received_events_url":"https://api.github.com/users/kyleknap/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-13T17:55:42Z","updated_at":"2015-02-18T19:53:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aws/aws-cli/pulls/1148","html_url":"https://github.com/aws/aws-cli/pull/1148","diff_url":"https://github.com/aws/aws-cli/pull/1148.diff","patch_url":"https://github.com/aws/aws-cli/pull/1148.patch"},"body":"It is a convenience attribute to get the names of all of the commands in a lineage without having to iterate through the lineage each time. This saves us from a lot of duplicate code.\r\n\r\nSo for a ``lineage`` attribute, you get the elements in the list in terms of command objects. For the ``lineage_names`` attribute, you get the elements in the list in terms of the names of command objects. This attribute I could see really useful for at least two scenarios:\r\n\r\n1) Generating event names. All you would have to do to get the command's representation in the event name is ``'.'.join(cmd.lineage_names)``\r\n\r\n2) Looking for related command tags in the ``TagTopicDB``. All of the ``related command`` tag values follow the format of ``<service> [operation] ...``. To look for these values, all you would have to do is \r\n``' '.join(cmd.lineage_names)``. \r\n\r\nI also considered making it a utils function, but it would be pretty annoying to have to import it each time you need to use it. Let me know what you think.\r\n\r\ncc @jamesls @danielgtaylor "},"comment":{"url":"https://api.github.com/repos/aws/aws-cli/issues/comments/74935270","html_url":"https://github.com/aws/aws-cli/pull/1148#issuecomment-74935270","issue_url":"https://api.github.com/repos/aws/aws-cli/issues/1148","id":74935270,"user":{"login":"jamesls","id":368057,"avatar_url":"https://avatars.githubusercontent.com/u/368057?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesls","html_url":"https://github.com/jamesls","followers_url":"https://api.github.com/users/jamesls/followers","following_url":"https://api.github.com/users/jamesls/following{/other_user}","gists_url":"https://api.github.com/users/jamesls/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesls/subscriptions","organizations_url":"https://api.github.com/users/jamesls/orgs","repos_url":"https://api.github.com/users/jamesls/repos","events_url":"https://api.github.com/users/jamesls/events{/privacy}","received_events_url":"https://api.github.com/users/jamesls/received_events","type":"User","site_admin":false},"created_at":"2015-02-18T19:53:23Z","updated_at":"2015-02-18T19:53:23Z","body":"Given the link to #1151, I think this seems reasonable.  Just had one small question about the tests but otherwise, :shipit:"}}