{"action":"created","issue":{"url":"https://api.github.com/repos/linux-nvme/nvme-cli/issues/36","labels_url":"https://api.github.com/repos/linux-nvme/nvme-cli/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/linux-nvme/nvme-cli/issues/36/comments","events_url":"https://api.github.com/repos/linux-nvme/nvme-cli/issues/36/events","html_url":"https://github.com/linux-nvme/nvme-cli/pull/36","id":109241116,"number":36,"title":"annotate-list-ns.py to annotate list-ns output.","user":{"login":"ymmt2005","id":1461515,"avatar_url":"https://avatars.githubusercontent.com/u/1461515?v=3","gravatar_id":"","url":"https://api.github.com/users/ymmt2005","html_url":"https://github.com/ymmt2005","followers_url":"https://api.github.com/users/ymmt2005/followers","following_url":"https://api.github.com/users/ymmt2005/following{/other_user}","gists_url":"https://api.github.com/users/ymmt2005/gists{/gist_id}","starred_url":"https://api.github.com/users/ymmt2005/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ymmt2005/subscriptions","organizations_url":"https://api.github.com/users/ymmt2005/orgs","repos_url":"https://api.github.com/users/ymmt2005/repos","events_url":"https://api.github.com/users/ymmt2005/events{/privacy}","received_events_url":"https://api.github.com/users/ymmt2005/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-01T06:55:09Z","updated_at":"2015-10-01T14:03:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/linux-nvme/nvme-cli/pulls/36","html_url":"https://github.com/linux-nvme/nvme-cli/pull/36","diff_url":"https://github.com/linux-nvme/nvme-cli/pull/36.diff","patch_url":"https://github.com/linux-nvme/nvme-cli/pull/36.patch"},"body":"Hi, team.  Thanks for the great tool.\r\n\r\nI am willing to contribute a small script to annotate list-ns command\r\noutput for humans.  The script annotates IDENTIFY NAMESPACE\r\nresult according to the version 1.2 of the NVMe specifications.\r\n\r\nThe script works well for both Python 2.7 & Python 3.4.\r\n\r\nThe result looks like:\r\n```\r\n# of logical blocks: 781422768\r\n# of logical blocks after format: 781422768\r\n# of logical blocks in use: 0\r\nSupport for deallocated or unwritten logical block error: False\r\nSupport for NAWUN/NAWUPF/NACWU: False\r\nSupport for thin provisioning: False\r\n# of LBA formats: 4\r\nMetadata at the end of LBA: True\r\nLBA format ID (LBAF): 0\r\nMetadata transfer using a separate buffer: True\r\nMetadata transfer using extended data LBA: True\r\nSupport for PI transfer at the tail of metadata: True\r\nSupport for PI transfer at the head of metadata: True\r\nSupport for protection information Type 3: True\r\nSupport for protection information Type 2: True\r\nSupport for protection information Type 1: True\r\nProtection information is not enabled.\r\nShared namespace: No\r\nReservation is not supported.\r\nSupport for format progress indicator: False\r\n% remains to be formatted: 0\r\nNamespace Atomic Write Unit Normal (NAWUN): 0\r\nNamespace Atomic Write Unit Power Fail (NAWUPF): 0\r\nNamespace Atomic Compare & Write Unit (NACWU): 0\r\nNamespace Atomic Boundary Size Normal (NABSN): 0\r\nNamespace Atomic Boundary Offset (NABO): 0\r\nNamespace Atomic Boundary Size Power Fail (NABSPF): 0\r\nNVM capacity in bytes: 0\r\nNamespace GUID: 00000000000000000000000000000000\r\nNamespace EUI64: 0000000000000000\r\nLBAF0\r\n    Relative performance: Good\r\n    LBA data size: 512\r\n    Metadata size: 0\r\nLBAF1\r\n    Relative performance: Degraded\r\n    LBA data size: 512\r\n    Metadata size: 8\r\nLBAF2\r\n    Relative performance: Best\r\n    LBA data size: 4096\r\n    Metadata size: 0\r\nLBAF3\r\n    Relative performance: Better\r\n    LBA data size: 4096\r\n    Metadata size: 8\r\n```"},"comment":{"url":"https://api.github.com/repos/linux-nvme/nvme-cli/issues/comments/144735890","html_url":"https://github.com/linux-nvme/nvme-cli/pull/36#issuecomment-144735890","issue_url":"https://api.github.com/repos/linux-nvme/nvme-cli/issues/36","id":144735890,"user":{"login":"keithbusch","id":4249494,"avatar_url":"https://avatars.githubusercontent.com/u/4249494?v=3","gravatar_id":"","url":"https://api.github.com/users/keithbusch","html_url":"https://github.com/keithbusch","followers_url":"https://api.github.com/users/keithbusch/followers","following_url":"https://api.github.com/users/keithbusch/following{/other_user}","gists_url":"https://api.github.com/users/keithbusch/gists{/gist_id}","starred_url":"https://api.github.com/users/keithbusch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keithbusch/subscriptions","organizations_url":"https://api.github.com/users/keithbusch/orgs","repos_url":"https://api.github.com/users/keithbusch/repos","events_url":"https://api.github.com/users/keithbusch/events{/privacy}","received_events_url":"https://api.github.com/users/keithbusch/received_events","type":"User","site_admin":false},"created_at":"2015-10-01T14:03:08Z","updated_at":"2015-10-01T14:03:08Z","body":"It's been a while since I've read python code, but I think the usage is wrong, or your controller doesn't actually support the command correctly.\r\n\r\n ` nvme list-ns -n 1 | annotate-list-ns.py`\r\n\r\nThe \"`list-ns`\" sub-command shouldn't do what the program thinks it does. It should return an array of namespace identifiers instead.\r\n\r\nI actually can't even figure out what input the program is expecting in order for this to work. :)\r\n\r\nThe output example you've provided also looks similar to the \"`id-ns`\" subcommand when using the verbose option \"`--human-readable`\". Maybe we can improve that output instead of bringing in a new script?"}}