)]}'
{"heat/engine/resources/neutron/port.py":[{"author":{"_account_id":4571,"name":"Steve Baker","email":"sbaker@redhat.com","username":"steve-stevebaker"},"change_message_id":"2ddfa6933e48e44924b9ff4b420e177a0e4b626d","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        FIXED_IPS: properties.Schema("},{"line_number":73,"context_line":"            properties.Schema.LIST,"},{"line_number":74,"context_line":"            _(\u0027Desired IPs for this port.\u0027),"},{"line_number":75,"context_line":"            default\u003d[],"},{"line_number":76,"context_line":"            schema\u003dproperties.Schema("},{"line_number":77,"context_line":"                properties.Schema.MAP,"},{"line_number":78,"context_line":"                schema\u003d{"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2BBs8%3D","side":"PARENT","line":75,"updated":"2014-01-30 21:29:43.000000000","message":"properties.Schema.LIST might set its default to [] in the future, so I wouldn\u0027t want to trust this. Also the user could still specify an empty list.","commit_id":"371bbdea47dce1c7ccea9b55dc769d48c38a4167"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"b5565af955810bcc613ea5023e17beed2885c6f2","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        FIXED_IPS: properties.Schema("},{"line_number":73,"context_line":"            properties.Schema.LIST,"},{"line_number":74,"context_line":"            _(\u0027Desired IPs for this port.\u0027),"},{"line_number":75,"context_line":"            default\u003d[],"},{"line_number":76,"context_line":"            schema\u003dproperties.Schema("},{"line_number":77,"context_line":"                properties.Schema.MAP,"},{"line_number":78,"context_line":"                schema\u003d{"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F9%2Frg%3D","side":"PARENT","line":75,"in_reply_to":"AAAAUH%2F%2BBs8%3D","updated":"2014-01-31 09:23:08.000000000","message":"Steve, with this default value we lose similar behavior with original neutron client, because without defined fixed_ips in template we will get ports without any assigned ips. When we will try to do it with neutron client (I mean create port and don\u0027t mention  fixed_ips) we will get port with assigned ip address.\n\nSo I think, we should support similar behavior at least for neutron users.","commit_id":"371bbdea47dce1c7ccea9b55dc769d48c38a4167"},{"author":{"_account_id":4571,"name":"Steve Baker","email":"sbaker@redhat.com","username":"steve-stevebaker"},"change_message_id":"2ddfa6933e48e44924b9ff4b420e177a0e4b626d","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            self.properties,"},{"line_number":160,"context_line":"            self.physical_resource_name())"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        self._prepare_list_properties(props)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        port \u003d self.neutron().create_port({\u0027port\u0027: props})[\u0027port\u0027]"},{"line_number":165,"context_line":"        self.resource_id_set(port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2BBrQ%3D","line":162,"updated":"2014-01-30 21:29:43.000000000","message":"I would rather you completely remove fixed_ips from the dict if it is \u0027empty\u0027, ie\n\nif not props[\u0027fixed_ips\u0027]:\n    del(props[\u0027fixed_ips\u0027])","commit_id":"b251da7a9454c24f5cf0d92cf510c52de408fb23"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"b5565af955810bcc613ea5023e17beed2885c6f2","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            self.properties,"},{"line_number":160,"context_line":"            self.physical_resource_name())"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        self._prepare_list_properties(props)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        port \u003d self.neutron().create_port({\u0027port\u0027: props})[\u0027port\u0027]"},{"line_number":165,"context_line":"        self.resource_id_set(port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F9%2FZ8%3D","line":162,"in_reply_to":"AAAAUH%2F%2BBrQ%3D","updated":"2014-01-31 09:23:08.000000000","message":"I remember, that you recommended me it in our discussion in IRC. \nAlso I have tried to use it, unfortunately it have been failed.\nThe main reason, why I cann\u0027t use it, is:\nself.properties and props too contain fixed_ips with default value [] already.\nMay be I not clear understand code, but in properties class we have getitem function, which generate default values. So we will never get props[\u0027fixed_ips\u0027] \u003d\u003d None.\n\nIn case if I use code:\n            if not props[\u0027fixed_ips\u0027]:\nI cann\u0027t never set \u0027fixed_ips\u0027 to [], because always I delete it from props.\nBut [] option is possible too. (look at commit message).","commit_id":"b251da7a9454c24f5cf0d92cf510c52de408fb23"},{"author":{"_account_id":4571,"name":"Steve Baker","email":"sbaker@redhat.com","username":"steve-stevebaker"},"change_message_id":"73838470ef2ac817a6753cd56d9f80947b4b4d47","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            self.properties,"},{"line_number":160,"context_line":"            self.physical_resource_name())"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        self._prepare_list_properties(props)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        port \u003d self.neutron().create_port({\u0027port\u0027: props})[\u0027port\u0027]"},{"line_number":165,"context_line":"        self.resource_id_set(port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F93f0%3D","line":162,"in_reply_to":"AAAAUH%2F9%2FZ8%3D","updated":"2014-02-03 03:25:40.000000000","message":"If you look at prepare_properties, it returns a new dict which you are free to modify.\n\nFrom your commit message it seems like you would want:\n\nif not props[\u0027fixed_ips\u0027]:\n    props[\u0027fixed_ips\u0027] \u003d None\n\nThat is assuming that a user would *never* want fixed_ips\u003d[], which I am not sure of.","commit_id":"b251da7a9454c24f5cf0d92cf510c52de408fb23"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ab723f8a6c2cd96b296901599ab4e1489c0afec7","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            self.properties,"},{"line_number":160,"context_line":"            self.physical_resource_name())"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        self._prepare_list_properties(props)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        port \u003d self.neutron().create_port({\u0027port\u0027: props})[\u0027port\u0027]"},{"line_number":165,"context_line":"        self.resource_id_set(port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F9vrk%3D","line":162,"in_reply_to":"AAAAUH%2F92ow%3D","updated":"2014-02-04 13:16:28.000000000","message":"About default value \u003d None. I miss, that it should be MAP. So the only way, that can open all possible variants for using fixed_ips, is removing default value.\nIn other solution we get incorrect behavior.","commit_id":"b251da7a9454c24f5cf0d92cf510c52de408fb23"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"ca4b708cd384ff9c62b6ad4d2c142c40169f9ff3","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            self.properties,"},{"line_number":160,"context_line":"            self.physical_resource_name())"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        self._prepare_list_properties(props)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        port \u003d self.neutron().create_port({\u0027port\u0027: props})[\u0027port\u0027]"},{"line_number":165,"context_line":"        self.resource_id_set(port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F92ow%3D","line":162,"in_reply_to":"AAAAUH%2F93f0%3D","updated":"2014-02-03 09:45:15.000000000","message":"Yes. You are right, that this code example better for me.\nUnfortunately it\u0027s steel not the best variant, because as you said: user may want to use  fixed_ips\u003d[].\n\nWhen we try to modify property dictionary, we always remove one of two different and (I am sure) important options. As I said previously, I would get supporting for next options:\n\n1.  fixed_ips \u003d None, port get first free ip.\n2.  fixed_ips \u003d [], port don\u0027t get any ip.\n3.  fixed_ips \u003d [\u003cip1\u003e], port get \u003cip1\u003e.\n\nAs other approach, I would suggest define default option as None.\nIn this case user could choose option fixed_ips \u003d [].","commit_id":"b251da7a9454c24f5cf0d92cf510c52de408fb23"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"60c0b43cd110657943f831354233b52b05918fc5","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            self.properties,"},{"line_number":160,"context_line":"            self.physical_resource_name())"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        self._prepare_list_properties(props)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        port \u003d self.neutron().create_port({\u0027port\u0027: props})[\u0027port\u0027]"},{"line_number":165,"context_line":"        self.resource_id_set(port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F9h%2BM%3D","line":162,"in_reply_to":"AAAAUH%2F9lwo%3D","updated":"2014-02-06 09:11:21.000000000","message":"Heh. I cann\u0027t imagine use cases for using [] right now.\nSo, I will use your example and will add comment about this behavior just in case.","commit_id":"b251da7a9454c24f5cf0d92cf510c52de408fb23"},{"author":{"_account_id":4571,"name":"Steve Baker","email":"sbaker@redhat.com","username":"steve-stevebaker"},"change_message_id":"9535535e56861288302bec1c9a7be7628d02cc1e","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            self.properties,"},{"line_number":160,"context_line":"            self.physical_resource_name())"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        self._prepare_list_properties(props)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        port \u003d self.neutron().create_port({\u0027port\u0027: props})[\u0027port\u0027]"},{"line_number":165,"context_line":"        self.resource_id_set(port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F9lwo%3D","line":162,"in_reply_to":"AAAAUH%2F9vrk%3D","updated":"2014-02-05 20:08:22.000000000","message":"What I really need is the use cases for why anybody would ever want a port with no IP address. If the answer is \"there are no use cases\" then there is no reason to make that possible, and we could implement the solution in my previous comment.","commit_id":"b251da7a9454c24f5cf0d92cf510c52de408fb23"}]}
