)]}'
{"manilaclient/v1/shell.py":[{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"7e0c41ec67bc0b30dbd31d8c726080e801900039","unresolved":false,"context_lines":[{"line_number":920,"context_line":"    default\u003dNone,"},{"line_number":921,"context_line":"    help\u003d\u0027Columns to be added(+column_name) or \u0027"},{"line_number":922,"context_line":"         \u0027removed(-column_name) from display. \u0027"},{"line_number":923,"context_line":"         \u0027e.g. \"+export location,-is public\"\u0027)"},{"line_number":924,"context_line":"@cliutils.service_type(\u0027sharev2\u0027)"},{"line_number":925,"context_line":"def do_list(cs, args):"},{"line_number":926,"context_line":"    \"\"\"List NAS shares with filters.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_1d11db52","line":923,"updated":"2015-11-04 00:54:39.000000000","message":"I realize you did what I asked, but I think it would also be OK if the value of --columns was used to simply override list_of_keys.  Then you wouldn\u0027t need complete_list_of_keys at all.","commit_id":"ffaf6ad064b8b81cc74e3d49045b2825ab5390f3"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"7e0c41ec67bc0b30dbd31d8c726080e801900039","unresolved":false,"context_lines":[{"line_number":925,"context_line":"def do_list(cs, args):"},{"line_number":926,"context_line":"    \"\"\"List NAS shares with filters.\"\"\""},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"    complete_list_of_keys \u003d ["},{"line_number":929,"context_line":"        \u0027ID\u0027, \u0027Name\u0027, \u0027Size\u0027, \u0027Share Proto\u0027, \u0027Status\u0027, \u0027Is Public\u0027,"},{"line_number":930,"context_line":"        \u0027Share Type\u0027, \u0027Export Location\u0027, \u0027Host\u0027, \u0027Availability Zone\u0027"},{"line_number":931,"context_line":"    ]"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_6272c2e7","line":928,"updated":"2015-11-04 00:54:39.000000000","message":"The problem here is that this list isn\u0027t complete, and the client must be updated any time a new field is added to the share object.\n\nYou could try moving the column handling code after you get the share data, and then generate complete_list_of_keys dynamically from the contents of the returned data.  Of course, you\u0027ll have to handle the case where no data is returned.\n\nAlternatively, and I think this is my preference, you could just omit complete_list_of_keys and blindly accept whatever is provided in --columns as the value of list_of_keys.  You would just have to make sure that an invalid key printed an empty column instead of blowing up.  This would be a significant simplification that still meets the basic requirement to fully customize the output of \u0027manila list\u0027.","commit_id":"ffaf6ad064b8b81cc74e3d49045b2825ab5390f3"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"7e0c41ec67bc0b30dbd31d8c726080e801900039","unresolved":false,"context_lines":[{"line_number":931,"context_line":"    ]"},{"line_number":932,"context_line":"    list_of_keys \u003d ["},{"line_number":933,"context_line":"        \u0027ID\u0027, \u0027Name\u0027, \u0027Size\u0027, \u0027Share Proto\u0027, \u0027Status\u0027, \u0027Is Public\u0027,"},{"line_number":934,"context_line":"        \u0027Share Type\u0027, \u0027Host\u0027, \u0027Availability Zone\u0027"},{"line_number":935,"context_line":"    ]"},{"line_number":936,"context_line":"    columns \u003d args.columns"},{"line_number":937,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_a268aaf6","line":934,"updated":"2015-11-04 00:54:39.000000000","message":"s/\u0027Share Type\u0027/\u0027Share Type Name\u0027/","commit_id":"ffaf6ad064b8b81cc74e3d49045b2825ab5390f3"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"7e0c41ec67bc0b30dbd31d8c726080e801900039","unresolved":false,"context_lines":[{"line_number":935,"context_line":"    ]"},{"line_number":936,"context_line":"    columns \u003d args.columns"},{"line_number":937,"context_line":""},{"line_number":938,"context_line":"    if columns is not None:"},{"line_number":939,"context_line":"        columns \u003d columns.split(\",\")"},{"line_number":940,"context_line":"        for key in columns:"},{"line_number":941,"context_line":"            if key.startswith(\"+\"):"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_22759aca","line":938,"updated":"2015-11-04 00:54:39.000000000","message":"If you don\u0027t like the simplification suggested above, can you move this section to a helper method?  Then we could easily reuse it for other list commands.","commit_id":"ffaf6ad064b8b81cc74e3d49045b2825ab5390f3"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"02778518a0af331e7d1933f63d9465b0e85ac500","unresolved":false,"context_lines":[{"line_number":926,"context_line":""},{"line_number":927,"context_line":"    list_of_keys \u003d ["},{"line_number":928,"context_line":"        \u0027ID\u0027, \u0027Name\u0027, \u0027Size\u0027, \u0027Share Proto\u0027, \u0027Status\u0027, \u0027Is Public\u0027,"},{"line_number":929,"context_line":"        \u0027Share Type\u0027, \u0027Host\u0027, \u0027Availability Zone\u0027"},{"line_number":930,"context_line":"    ]"},{"line_number":931,"context_line":""},{"line_number":932,"context_line":"    columns \u003d args.columns"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa80f949_b0ca186d","line":929,"updated":"2015-11-04 16:36:32.000000000","message":"Please change \u0027Share Type\u0027 to \u0027Share Type Name\u0027, since the name is typically much more informative (and shorter) than the UUID.","commit_id":"63c35fef4801f966a8aa25e8e9138f61bbf788d6"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"5cc1d0ae5190b13434518b0cc024fda4d23f2ff1","unresolved":false,"context_lines":[{"line_number":926,"context_line":""},{"line_number":927,"context_line":"    list_of_keys \u003d ["},{"line_number":928,"context_line":"        \u0027ID\u0027, \u0027Name\u0027, \u0027Size\u0027, \u0027Share Proto\u0027, \u0027Status\u0027, \u0027Is Public\u0027,"},{"line_number":929,"context_line":"        \u0027Share Type\u0027, \u0027Host\u0027, \u0027Availability Zone\u0027"},{"line_number":930,"context_line":"    ]"},{"line_number":931,"context_line":""},{"line_number":932,"context_line":"    columns \u003d args.columns"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa80f949_11ff3168","line":929,"in_reply_to":"fa80f949_75732981","updated":"2015-11-05 19:33:13.000000000","message":"What version of Manila and Manila client are you using?  I\u0027m running master (Mikata), and I clearly see the share_type field containing the type UUID, and the share_type_name field with the type name.  But that is only expected for the v2 API, which should be the default as of Liberty.  Try \u0027manila --debug list\u0027 to see what version of the API you are requesting and which version is coming back from Manila.  You may need to restack if you haven\u0027t done that recently.\n\nclinton@mitaka:/opt/stack/manila$ manila --debug list\n\nREQ: curl -i -X GET http://192.168.228.14:8786/v2/924939f18d864f9f8a2edf6a2661d1bc/shares/detail -H \"X-Openstack-Manila-Api-Version: 2.6\" -H \"X-Auth-Token: be07becf9f1f486397145e450cb2f360\" -H \"Accept: application/json\" -H \"User-Agent: python-manilaclient\"\n\nRESP: [200] {\u0027content-length\u0027: \u00271167\u0027, \u0027x-compute-request-id\u0027: \u0027req-0eb2bd39-0a63-491e-8a53-21b34679f2f9\u0027, \u0027vary\u0027: \u0027X-OpenStack-Manila-API-Version\u0027, \u0027connection\u0027: \u0027close\u0027, \u0027x-openstack-manila-api-version\u0027: \u00272.6\u0027, \u0027date\u0027: \u0027Thu, 05 Nov 2015 19:32:22 GMT\u0027, \u0027content-type\u0027: \u0027application/json\u0027}\nRESP BODY: {\"shares\": [{\"share_type_name\": \"compression\", \"links\": [{\"href\": \"http://192.168.228.14:8786/v2/924939f18d864f9f8a2edf6a2661d1bc/shares/db8ced8d-4086-4acd-8529-9af969545ff1\", \"rel\": \"self\"}, {\"href\": \"http://192.168.228.14:8786/924939f18d864f9f8a2edf6a2661d1bc/shares/db8ced8d-4086-4acd-8529-9af969545ff1\", \"rel\": \"bookmark\"}], \"availability_zone\": \"nova\", \"share_network_id\": null, \"export_locations\": [\"192.168.228.102:/share_2ee3a3a1_fe38_4af0_aeba_27e1d46e8c24\", \"10.0.0.100:/share_2ee3a3a1_fe38_4af0_aeba_27e1d46e8c24\"], \"share_server_id\": null, \"snapshot_id\": null, \"id\": \"db8ced8d-4086-4acd-8529-9af969545ff1\", \"size\": 1, \"share_type\": \"5c5c890f-3d8d-4c48-a456-4e827bd43416\", \"export_location\": \"192.168.228.102:/share_2ee3a3a1_fe38_4af0_aeba_27e1d46e8c24\", \"consistency_group_id\": null, \"project_id\": \"924939f18d864f9f8a2edf6a2661d1bc\", \"metadata\": {}, \"status\": \"available\", \"description\": null, \"host\": \"mitaka@cmode_single_svm_nfs#manila2\", \"is_public\": false, \"task_state\": null, \"snapshot_support\": true, \"name\": null, \"created_at\": \"2015-10-25T06:25:11.000000\", \"share_proto\": \"NFS\", \"volume_type\": \"compression\", \"source_cgsnapshot_member_id\": null}]}\n\n+--------------------------------------+------+------+-------------+-----------+-----------+--------------------------------------+-------------------------------------+-------------------+\n| ID                                   | Name | Size | Share Proto | Status    | Is Public | Share Type                           | Host                                | Availability Zone |\n+--------------------------------------+------+------+-------------+-----------+-----------+--------------------------------------+-------------------------------------+-------------------+\n| db8ced8d-4086-4acd-8529-9af969545ff1 | None | 1    | NFS         | available | False     | 5c5c890f-3d8d-4c48-a456-4e827bd43416 | mitaka@cmode_single_svm_nfs#manila2 | nova              |\n+--------------------------------------+------+------+-------------+-----------+-----------+--------------------------------------+-------------------------------------+-------------------+","commit_id":"63c35fef4801f966a8aa25e8e9138f61bbf788d6"},{"author":{"_account_id":16305,"name":"NidhiMittalHada","email":"nidhimittal19@gmail.com","username":"nidhimittalhada"},"change_message_id":"931c1ed727984b55e652659beabb325f31f3767a","unresolved":false,"context_lines":[{"line_number":926,"context_line":""},{"line_number":927,"context_line":"    list_of_keys \u003d ["},{"line_number":928,"context_line":"        \u0027ID\u0027, \u0027Name\u0027, \u0027Size\u0027, \u0027Share Proto\u0027, \u0027Status\u0027, \u0027Is Public\u0027,"},{"line_number":929,"context_line":"        \u0027Share Type\u0027, \u0027Host\u0027, \u0027Availability Zone\u0027"},{"line_number":930,"context_line":"    ]"},{"line_number":931,"context_line":""},{"line_number":932,"context_line":"    columns \u003d args.columns"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa80f949_75732981","line":929,"in_reply_to":"fa80f949_b0ca186d","updated":"2015-11-05 06:39:49.000000000","message":"Its displaying share type name only even in current state.\n\nstack@controller:~/devstack$ manila list\n+--------------------------------------+---------------------------+------+-------------+--------------+-----------+-----------------+-----------------------------+-------------------+\n| ID                                   | Name                      | Size | Share Proto | Status       | Is Public | Share Type      | Host                        | Availability Zone |\n+--------------------------------------+---------------------------+------+-------------+--------------+-----------+-----------------+-----------------------------+-------------------+\n| cf20d140-7ad5-4da6-aa64-7ac54fdf42c4 | new_share_with_nexenta567 | 1    | NFS         | manage_error | True      | Nexenta_Storage | controller@generic1#GENERIC | None              |\n+--------------------------------------+---------------------------+------+-------------+--------------+-----------+-----------------+-----------------------------+-------------------+\nstack@controller:~/devstack$","commit_id":"63c35fef4801f966a8aa25e8e9138f61bbf788d6"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"24eb78444d9dac736a715b22319747a17b9b2782","unresolved":false,"context_lines":[{"line_number":943,"context_line":""},{"line_number":944,"context_line":"    columns \u003d args.columns"},{"line_number":945,"context_line":"    if columns is not None:"},{"line_number":946,"context_line":"        columns \u003d columns.split(\",\")"},{"line_number":947,"context_line":"        for index in range(len(columns)):"},{"line_number":948,"context_line":"            columns[index] \u003d columns[index].strip().title()"},{"line_number":949,"context_line":"        list_of_keys \u003d columns"}],"source_content_type":"text/x-python","patch_set":5,"id":"da85f559_8731f60d","line":946,"updated":"2015-11-09 09:28:50.000000000","message":"this loop is to complicated and alters the columns var which is unneeded. you could use enumerate(). or just: list_of_keys\u003dmap(lambda x: x.strip().title(), columns.split(\",\"))","commit_id":"ebf02978fb3072c87cac7fed8d34b89c855a0c02"}]}
