)]}'
{"shade/__init__.py":[{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"ae87b1f9c19c0b712dfad4a7c2f2774a680858c5","unresolved":false,"context_lines":[{"line_number":2157,"context_line":"        :param name: A symbolic name for the port. (Optional)"},{"line_number":2158,"context_line":"        :param admin_state_up: The administrative status of the port,"},{"line_number":2159,"context_line":"            which is up (true, default) or down (false). (Optional)"},{"line_number":2160,"context_line":"        :param tenant_id: The ID of the tenant who owns the network. (Optional)"},{"line_number":2161,"context_line":"            Only administrative users can specify a tenant ID other than their"},{"line_number":2162,"context_line":"            own."},{"line_number":2163,"context_line":"        :param mac_address: The MAC address. (Optional)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9af37de9_2a7c8071","line":2160,"updated":"2015-05-11 12:31:56.000000000","message":"Sorry - we\u0027re trying to use the modern names for these consistently - so this should be project_id. If we need to translate that below, that\u0027s fine.","commit_id":"6d2d12562523b861f7a8aaaab1ad2f9e0cb5121c"},{"author":{"_account_id":6550,"name":"Davide Guerri","email":"davide.guerri@gmail.com","username":"davide-guerri"},"change_message_id":"b47da8276660a8bf714b2d7341aaaf3ef4cbaca9","unresolved":false,"context_lines":[{"line_number":2157,"context_line":"        :param name: A symbolic name for the port. (Optional)"},{"line_number":2158,"context_line":"        :param admin_state_up: The administrative status of the port,"},{"line_number":2159,"context_line":"            which is up (true, default) or down (false). (Optional)"},{"line_number":2160,"context_line":"        :param tenant_id: The ID of the tenant who owns the network. (Optional)"},{"line_number":2161,"context_line":"            Only administrative users can specify a tenant ID other than their"},{"line_number":2162,"context_line":"            own."},{"line_number":2163,"context_line":"        :param mac_address: The MAC address. (Optional)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7ad8896b_d4ba54c0","line":2160,"in_reply_to":"9af37de9_2a7c8071","updated":"2015-05-11 17:00:27.000000000","message":"I will remove this altogether, as it should be used only in OperatorCloud","commit_id":"6d2d12562523b861f7a8aaaab1ad2f9e0cb5121c"},{"author":{"_account_id":10035,"name":"greghaynes","email":"greg@greghaynes.net","username":"greghaynes"},"change_message_id":"14756cf81c06719369a51e773d713287788b5b9b","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            argspec \u003d inspect.getargspec(func)"},{"line_number":80,"context_line":"            for k in kwargs:"},{"line_number":81,"context_line":"                if k not in argspec.args[1:] and k not in valid_args:"},{"line_number":82,"context_line":"                    raise TypeError("},{"line_number":83,"context_line":"                        \"{f}() got an unexpected keyword argument \""},{"line_number":84,"context_line":"                        \"\u0027{arg}\u0027\".format(f\u003dinspect.stack()[1][3], arg\u003dk))"},{"line_number":85,"context_line":"            return func(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a016987_02d17457","line":82,"updated":"2015-05-15 20:04:10.000000000","message":"I think you want to raise ValueError here (raised when you pass invalid number of args), were not actually checking the types of the args.\n\n(nit)","commit_id":"0ea48d4d8c568aed104be04b55f8b954c31ca6e8"},{"author":{"_account_id":6550,"name":"Davide Guerri","email":"davide.guerri@gmail.com","username":"davide-guerri"},"change_message_id":"cb421db95b315c7edb84d1144951d692a71d645e","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            argspec \u003d inspect.getargspec(func)"},{"line_number":80,"context_line":"            for k in kwargs:"},{"line_number":81,"context_line":"                if k not in argspec.args[1:] and k not in valid_args:"},{"line_number":82,"context_line":"                    raise TypeError("},{"line_number":83,"context_line":"                        \"{f}() got an unexpected keyword argument \""},{"line_number":84,"context_line":"                        \"\u0027{arg}\u0027\".format(f\u003dinspect.stack()[1][3], arg\u003dk))"},{"line_number":85,"context_line":"            return func(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a016987_1072de49","line":82,"in_reply_to":"7a016987_02d17457","updated":"2015-05-15 20:54:31.000000000","message":"What I would like to emulate is \"unexpected keyword argument\". Specifically this behaviour:\n\n(.venv)(davide:murray)-[0]-(~/D/shade) # python\n    Python 2.7.6 (default, Sep  9 2014, 15:04:36) \n    [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin\n    Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n    \u003e\u003e\u003e def f(a,b,c):\n    ...   pass\n    ... \n    \u003e\u003e\u003e f(a\u003d1,b\u003d2,c\u003d3)\n    \u003e\u003e\u003e f(b\u003d1,c\u003d2,f\u003d3)\n    Traceback (most recent call last):\n      File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n    TypeError: f() got an unexpected keyword argument \u0027f\u0027\n    \u003e\u003e\u003e","commit_id":"0ea48d4d8c568aed104be04b55f8b954c31ca6e8"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"d0d33f7074b397efdbf2d8056bb422497ba4b7ff","unresolved":false,"context_lines":[{"line_number":2276,"context_line":"                \"\u0027{net}\u0027: {msg}\".format(net\u003dnetwork_id, msg\u003dstr(e)))"},{"line_number":2277,"context_line":""},{"line_number":2278,"context_line":"    @valid_kwargs(\u0027name\u0027, \u0027admin_state_up\u0027, \u0027fixed_ips\u0027, \u0027security_groups\u0027)"},{"line_number":2279,"context_line":"    def update_port(self, port_id, **kwargs):"},{"line_number":2280,"context_line":"        \"\"\"Update a port"},{"line_number":2281,"context_line":""},{"line_number":2282,"context_line":"        Note: to unset an attribute use None value. To leave an attribute"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a016987_2a8662db","line":2279,"updated":"2015-05-28 13:44:52.000000000","message":"I thin this should be just id - but I feel less strongly about it than the one below.","commit_id":"200545dd0eae8ed6c9887d84746a8e1e5c7c189d"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"577c4e351d12951c520995ad94b671041b86446c","unresolved":false,"context_lines":[{"line_number":2276,"context_line":"                \"\u0027{net}\u0027: {msg}\".format(net\u003dnetwork_id, msg\u003dstr(e)))"},{"line_number":2277,"context_line":""},{"line_number":2278,"context_line":"    @valid_kwargs(\u0027name\u0027, \u0027admin_state_up\u0027, \u0027fixed_ips\u0027, \u0027security_groups\u0027)"},{"line_number":2279,"context_line":"    def update_port(self, port_id, **kwargs):"},{"line_number":2280,"context_line":"        \"\"\"Update a port"},{"line_number":2281,"context_line":""},{"line_number":2282,"context_line":"        Note: to unset an attribute use None value. To leave an attribute"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a016987_bd34dedd","line":2279,"in_reply_to":"7a016987_2a8662db","updated":"2015-05-28 13:53:42.000000000","message":"Should be name_or_id here, too.","commit_id":"200545dd0eae8ed6c9887d84746a8e1e5c7c189d"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"d0d33f7074b397efdbf2d8056bb422497ba4b7ff","unresolved":false,"context_lines":[{"line_number":2305,"context_line":"                \"failed to update port \u0027{port}\u0027: {msg}\".format("},{"line_number":2306,"context_line":"                    port\u003dport_id, msg\u003dstr(e)))"},{"line_number":2307,"context_line":""},{"line_number":2308,"context_line":"    def delete_port(self, port_name_or_id):"},{"line_number":2309,"context_line":"        \"\"\"Delete a port"},{"line_number":2310,"context_line":""},{"line_number":2311,"context_line":"        :param port_name_or_id: id or name of the port to delete."}],"source_content_type":"text/x-python","patch_set":14,"id":"7a016987_ea216afd","line":2308,"updated":"2015-05-28 13:44:52.000000000","message":"This should be name_or_id","commit_id":"200545dd0eae8ed6c9887d84746a8e1e5c7c189d"}],"shade/tests/functional/test_port.py":[{"author":{"_account_id":10035,"name":"greghaynes","email":"greg@greghaynes.net","username":"greghaynes"},"change_message_id":"27f8b26496034bd8f9fd641cbab5b67c15bd9311","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def _cleanup_ports(self):"},{"line_number":41,"context_line":"        for p in self.cloud.list_ports():"},{"line_number":42,"context_line":"            if p[\u0027name\u0027].startswith(\u0027test_port\u0027):"},{"line_number":43,"context_line":"                self.cloud.delete_port(name_or_id\u003dp[\u0027id\u0027])"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def test_create_port(self):"},{"line_number":46,"context_line":"        networks \u003d self.cloud.list_networks()"}],"source_content_type":"text/x-python","patch_set":16,"id":"5afe65bd_99240bb0","line":43,"updated":"2015-06-01 16:59:04.000000000","message":"This is an antipattern we do in a few places, its good for tests to clean up as much as possible and looping over resources and deleting them in a single method like this means a failure will cause other resources to not be deleted.\n\nIt also looks like we use the same name for every port here, which might cause racey test issues when they are run in parallel. How about we make a method here that wraps create_port and makes a port with a unique name, registers a cleanup for that single port, and then returns the port info?","commit_id":"80cba22210d3db499488ccc397cdb2a01d30ffe6"},{"author":{"_account_id":6550,"name":"Davide Guerri","email":"davide.guerri@gmail.com","username":"davide-guerri"},"change_message_id":"840035891276bdd2bb879d5b95d451cbd260482e","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def _cleanup_ports(self):"},{"line_number":41,"context_line":"        for p in self.cloud.list_ports():"},{"line_number":42,"context_line":"            if p[\u0027name\u0027].startswith(\u0027test_port\u0027):"},{"line_number":43,"context_line":"                self.cloud.delete_port(name_or_id\u003dp[\u0027id\u0027])"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def test_create_port(self):"},{"line_number":46,"context_line":"        networks \u003d self.cloud.list_networks()"}],"source_content_type":"text/x-python","patch_set":16,"id":"5afe65bd_5876843f","line":43,"in_reply_to":"5afe65bd_99240bb0","updated":"2015-06-01 21:50:21.000000000","message":"Done","commit_id":"80cba22210d3db499488ccc397cdb2a01d30ffe6"},{"author":{"_account_id":10035,"name":"greghaynes","email":"greg@greghaynes.net","username":"greghaynes"},"change_message_id":"0a33d3f223fa17c748f84de79073e5d15deb6e17","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            network_id\u003dnetworks[0][\u0027id\u0027], name\u003dport_name)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        port \u003d self.cloud.update_port(name_or_id\u003dport_name,"},{"line_number":108,"context_line":"                                      name\u003d\u0027new_port_name\u0027)"},{"line_number":109,"context_line":"        self.assertIsInstance(port, dict)"},{"line_number":110,"context_line":"        self.assertEqual(port.get(\u0027name\u0027), \u0027new_port_name\u0027)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5afe65bd_b787a660","line":108,"updated":"2015-06-02 15:47:09.000000000","message":"This is a continuation of my previous comment - I think this is racey because other tests running in parallel can create ports with the same name. I bet there are also other racey bits, but its hard to find them all...\n\nWhy not create a method to create a port with a unique name then register a cleanup for each? This should avoid these types of races all together, and make our cleanup code trivial while still DTRT.","commit_id":"0c95b3bee715275ecd5070212ef753660c6e790b"},{"author":{"_account_id":6550,"name":"Davide Guerri","email":"davide.guerri@gmail.com","username":"davide-guerri"},"change_message_id":"f68b4dc127ef437fd94c341a63feedd047f6ae57","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            network_id\u003dnetworks[0][\u0027id\u0027], name\u003dport_name)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        port \u003d self.cloud.update_port(name_or_id\u003dport_name,"},{"line_number":108,"context_line":"                                      name\u003d\u0027new_port_name\u0027)"},{"line_number":109,"context_line":"        self.assertIsInstance(port, dict)"},{"line_number":110,"context_line":"        self.assertEqual(port.get(\u0027name\u0027), \u0027new_port_name\u0027)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5afe65bd_57a4f2a4","line":108,"in_reply_to":"5afe65bd_17c9da78","updated":"2015-06-02 15:53:05.000000000","message":"sorry I mean port_name....\nAnyhow. Will resend...","commit_id":"0c95b3bee715275ecd5070212ef753660c6e790b"},{"author":{"_account_id":6550,"name":"Davide Guerri","email":"davide.guerri@gmail.com","username":"davide-guerri"},"change_message_id":"62167c5631ba16cae9bf577deb2ca8fd03efc67b","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            network_id\u003dnetworks[0][\u0027id\u0027], name\u003dport_name)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        port \u003d self.cloud.update_port(name_or_id\u003dport_name,"},{"line_number":108,"context_line":"                                      name\u003d\u0027new_port_name\u0027)"},{"line_number":109,"context_line":"        self.assertIsInstance(port, dict)"},{"line_number":110,"context_line":"        self.assertEqual(port.get(\u0027name\u0027), \u0027new_port_name\u0027)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5afe65bd_17c9da78","line":108,"in_reply_to":"5afe65bd_b787a660","updated":"2015-06-02 15:51:50.000000000","message":"something went wrong while amending my prev commit... that should read `self.new_port_name`! (see above)","commit_id":"0c95b3bee715275ecd5070212ef753660c6e790b"}],"shade/tests/unit/test_port.py":[{"author":{"_account_id":10035,"name":"greghaynes","email":"greg@greghaynes.net","username":"greghaynes"},"change_message_id":"27f8b26496034bd8f9fd641cbab5b67c15bd9311","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        super(TestPort, self).setUp()"},{"line_number":146,"context_line":"        self.client \u003d OpenStackCloud(\u0027cloud\u0027, {})"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    @patch.object(OpenStackCloud, \u0027neutron_client\u0027)"},{"line_number":149,"context_line":"    def test_create_port(self, mock_neutron_client):"},{"line_number":150,"context_line":"        mock_neutron_client.create_port.return_value \u003d \\"},{"line_number":151,"context_line":"            self.mock_neutron_port_create_rep"}],"source_content_type":"text/x-python","patch_set":16,"id":"5afe65bd_2b06dd20","line":148,"updated":"2015-06-01 16:59:04.000000000","message":"nit - you can just add this to the setup since were doing it on every test here.","commit_id":"80cba22210d3db499488ccc397cdb2a01d30ffe6"},{"author":{"_account_id":6550,"name":"Davide Guerri","email":"davide.guerri@gmail.com","username":"davide-guerri"},"change_message_id":"840035891276bdd2bb879d5b95d451cbd260482e","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        super(TestPort, self).setUp()"},{"line_number":146,"context_line":"        self.client \u003d OpenStackCloud(\u0027cloud\u0027, {})"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    @patch.object(OpenStackCloud, \u0027neutron_client\u0027)"},{"line_number":149,"context_line":"    def test_create_port(self, mock_neutron_client):"},{"line_number":150,"context_line":"        mock_neutron_client.create_port.return_value \u003d \\"},{"line_number":151,"context_line":"            self.mock_neutron_port_create_rep"}],"source_content_type":"text/x-python","patch_set":16,"id":"5afe65bd_987cfc21","line":148,"in_reply_to":"5afe65bd_2b06dd20","updated":"2015-06-01 21:50:21.000000000","message":"there is actually an error in test_create_port_parameters(): it doesn\u0027t need it!","commit_id":"80cba22210d3db499488ccc397cdb2a01d30ffe6"}]}
