)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"82f5a80bf4ba1c0a941d433cba47f3c5f1942d76","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Rushil Chugh \u003crushil@netapp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-04-03 20:42:03 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Prevent share servers from being created with unsupported network types"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The segmentation approach used by the network plugin associated with a share"},{"line_number":10,"context_line":"server was not declared to the driver. This made it impossible for a driver"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9aa53dc9_22c1502f","line":7,"updated":"2015-04-06 12:40:23.000000000","message":"Topic does not say that it is related to only NetApp driver.","commit_id":"38fa831106760c784c7156146bf8bcbb21dc656e"}],"manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py":[{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"3e17aef21899135a146a1d3fadc21951e3c4df66","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                network_info[\u0027segmentation_id\u0027]):"},{"line_number":128,"context_line":"            msg \u003d _(\u0027A segmentation ID %(vlan_id)s was specified but can not \u0027"},{"line_number":129,"context_line":"                    \u0027be used with a network of type %(seg_type)s; the \u0027"},{"line_number":130,"context_line":"                    \u0027segmentation ID must be set to None.\u0027)"},{"line_number":131,"context_line":"            raise exception.NetAppException("},{"line_number":132,"context_line":"                msg % {\u0027vlan_id\u0027: network_info[\u0027segmentation_id\u0027],"},{"line_number":133,"context_line":"                       \u0027seg_type\u0027: network_info[\u0027network_type\u0027]})"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa041b7_00e7f7b0","line":130,"updated":"2015-04-05 03:48:41.000000000","message":"Did you test this?  The StandaloneNetworkPlugin does not accept a segmentation ID of \u0027None\u0027; it must be omitted entirely or set to zero, since it is stored as an integer in the database.  (As an aside, I do think the standalone plug-in should be fixed to accept None in the segmentation ID field, since that would seem a natural choice by a user wanting a non-segmented network.)","commit_id":"38fa831106760c784c7156146bf8bcbb21dc656e"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"b42978de07bb8648d3f0509153a4d3091fdf6ecd","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                network_info[\u0027segmentation_id\u0027]):"},{"line_number":128,"context_line":"            msg \u003d _(\u0027A segmentation ID %(vlan_id)s was specified but can not \u0027"},{"line_number":129,"context_line":"                    \u0027be used with a network of type %(seg_type)s; the \u0027"},{"line_number":130,"context_line":"                    \u0027segmentation ID must be set to None.\u0027)"},{"line_number":131,"context_line":"            raise exception.NetAppException("},{"line_number":132,"context_line":"                msg % {\u0027vlan_id\u0027: network_info[\u0027segmentation_id\u0027],"},{"line_number":133,"context_line":"                       \u0027seg_type\u0027: network_info[\u0027network_type\u0027]})"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa041b7_e9c51f3c","line":130,"in_reply_to":"baa041b7_00e7f7b0","updated":"2015-04-05 12:07:48.000000000","message":"Segmentation ID can be None, appropriate field in DB is \u0027nullable\u0027. Nothing to \"fix\" in plugin itself. This value can be either integer or None. It is up to driver either to use value of this variable or not.","commit_id":"38fa831106760c784c7156146bf8bcbb21dc656e"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"ba03f8669c67b6de92f9e4b2e56b63912e6407c6","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                network_info[\u0027segmentation_id\u0027]):"},{"line_number":128,"context_line":"            msg \u003d _(\u0027A segmentation ID %(vlan_id)s was specified but can not \u0027"},{"line_number":129,"context_line":"                    \u0027be used with a network of type %(seg_type)s; the \u0027"},{"line_number":130,"context_line":"                    \u0027segmentation ID must be set to None.\u0027)"},{"line_number":131,"context_line":"            raise exception.NetAppException("},{"line_number":132,"context_line":"                msg % {\u0027vlan_id\u0027: network_info[\u0027segmentation_id\u0027],"},{"line_number":133,"context_line":"                       \u0027seg_type\u0027: network_info[\u0027network_type\u0027]})"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa041b7_6fb58fec","line":130,"in_reply_to":"baa041b7_cffffba8","updated":"2015-04-05 17:36:07.000000000","message":"Yes, you do it wrong.\n\noslo_config has \"types\" for options. And \"standalone_network_plugin_segmentation_id\" is type of string.\n\nSee: https://github.com/openstack/manila/blob/bfa1bbac/manila/network/standalone_network_plugin.py#L37\n\n\"StrOpt\" means everything you set there will be translated to string. So, you set string \"None\" and get proper error.\n\n\"None\" value as standalone literal can be achieved by default value without set value in config.","commit_id":"38fa831106760c784c7156146bf8bcbb21dc656e"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"e201f6bb252fe1466385d891aa7e1959d1175263","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                network_info[\u0027segmentation_id\u0027]):"},{"line_number":128,"context_line":"            msg \u003d _(\u0027A segmentation ID %(vlan_id)s was specified but can not \u0027"},{"line_number":129,"context_line":"                    \u0027be used with a network of type %(seg_type)s; the \u0027"},{"line_number":130,"context_line":"                    \u0027segmentation ID must be set to None.\u0027)"},{"line_number":131,"context_line":"            raise exception.NetAppException("},{"line_number":132,"context_line":"                msg % {\u0027vlan_id\u0027: network_info[\u0027segmentation_id\u0027],"},{"line_number":133,"context_line":"                       \u0027seg_type\u0027: network_info[\u0027network_type\u0027]})"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa041b7_cffffba8","line":130,"in_reply_to":"baa041b7_e9c51f3c","updated":"2015-04-05 17:23:18.000000000","message":"I must be doing something wrong, then.  If I set this in manila.conf:\n\nstandalone_network_plugin_segmentation_id \u003d None\n\nand then try to create a new share \u0026 share server, both the new share and share server are set to error state and I see this in the m-shr log:\n\n2015-04-05 13:16:10.129 TRACE oslo_messaging.rpc.dispatcher   File \"/usr/lib/python2.7/dist-packages/MySQLdb/connections.py\", line 36, in defaulterrorhandler\n2015-04-05 13:16:10.129 TRACE oslo_messaging.rpc.dispatcher     raise errorclass, errorvalue\n2015-04-05 13:16:10.129 TRACE oslo_messaging.rpc.dispatcher OperationalError: (OperationalError) (1366, \"Incorrect integer value: \u0027None\u0027 for column \u0027segmentation_id\u0027 at row 1\") \u0027UPDATE share_networks SET updated_at\u003d%s, segmentation_id\u003d%s, cidr\u003d%s WHERE share_networks.id \u003d %s\u0027 (datetime.datetime(2015, 4, 5, 17, 16, 9, 907695), \u0027None\u0027, IPNetwork(\u0027192.168.228.0/24\u0027), \u00279727ec71-e7f2-421e-a2d0-8c3acedfdf76\u0027)","commit_id":"38fa831106760c784c7156146bf8bcbb21dc656e"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"3e17aef21899135a146a1d3fadc21951e3c4df66","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                msg % {\u0027vlan_id\u0027: network_info[\u0027segmentation_id\u0027],"},{"line_number":133,"context_line":"                       \u0027seg_type\u0027: network_info[\u0027network_type\u0027]})"},{"line_number":134,"context_line":"        elif (network_info[\u0027network_type\u0027] \u003d\u003d \u0027vlan\u0027"},{"line_number":135,"context_line":"              and (int(network_info[\u0027segmentation_id\u0027]) \u003e 4094"},{"line_number":136,"context_line":"                   or int(network_info[\u0027segmentation_id\u0027] \u003c 1))):"},{"line_number":137,"context_line":"            msg \u003d _(\u0027A segmentation ID %s was specified but is not valid for \u0027"},{"line_number":138,"context_line":"                    \u0027a VLAN network type; the segmentation ID must be an \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa041b7_e0e1b39b","line":135,"updated":"2015-04-05 03:48:41.000000000","message":"A VLAN tag outside the range [1,4094] is clearly invalid, but I think this check belongs in one of the upper layers so that all drivers benefit equally without having to add their own checks.  Please look to see if this check can be done when creating a share network, or at the very least in the share manager.  The same applies to the previous elif block.","commit_id":"38fa831106760c784c7156146bf8bcbb21dc656e"}]}
