)]}'
{"shade/openstackcloud.py":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"f57b0fed0f4767f022ebc5baab2b07fb30dd73e2","unresolved":false,"context_lines":[{"line_number":5892,"context_line":""},{"line_number":5893,"context_line":"        # Add optional attributes to the message."},{"line_number":5894,"context_line":"        if cidr:"},{"line_number":5895,"context_line":"            subnet[\u0027cidr\u0027] \u003d cidr"},{"line_number":5896,"context_line":"        if subnet_name:"},{"line_number":5897,"context_line":"            subnet[\u0027name\u0027] \u003d subnet_name"},{"line_number":5898,"context_line":"        if tenant_id:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_40646ce4","line":5895,"updated":"2017-01-03 18:47:28.000000000","message":"Cidr is a required parameter to this shade method so it will always be passed in. Looking at API docs [0] it isn\u0027t clear to me if cidr and use_default_subnetpool are mutually exclusive because the use_default_subnetpool param isn\u0027t documented at all.\n\nIf you pass both a valid cidr and use_default_subnetpool\u003dTrue what happens? Does that result in an error? does the cidr win? does the default subnet pool win? Regardless of what happens I think we should document that here in the method docstring so that users know if they need to pass in \u0027\u0027 as the cidr when using the default subnetpool. Also we may want to be more strict here in checking and make cidr and use_default_subnetpool mutually exclusive options.\n\nAlso probably worth a bug against neutron\u0027s api docs as far as updating to include use_default_subnetpool.\n\n[0] http://developer.openstack.org/api-ref/networking/v2/?expanded\u003dcreate-subnet-detail","commit_id":"d11065f194ca90f8401d11437f531a4cd9cd8035"},{"author":{"_account_id":21902,"name":"Paulo Matias","email":"matias@ufscar.br","username":"matias"},"change_message_id":"d098da4a0f363942be6d2849a5298c9ec11f7e10","unresolved":false,"context_lines":[{"line_number":5892,"context_line":""},{"line_number":5893,"context_line":"        # Add optional attributes to the message."},{"line_number":5894,"context_line":"        if cidr:"},{"line_number":5895,"context_line":"            subnet[\u0027cidr\u0027] \u003d cidr"},{"line_number":5896,"context_line":"        if subnet_name:"},{"line_number":5897,"context_line":"            subnet[\u0027name\u0027] \u003d subnet_name"},{"line_number":5898,"context_line":"        if tenant_id:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_c07cdced","line":5895,"in_reply_to":"ba5201f7_40646ce4","updated":"2017-01-03 19:13:21.000000000","message":"Thanks for the review!\n\n\u003e If you pass both a valid cidr and use_default_subnetpool\u003dTrue what happens?\n\nNeutron API returns a 500 error in this case. The cidr can\u0027t even be \u0027\u0027. It must not be included in the request dictionary.\n\nI will follow up with another changeset documenting this in the docstring and adding argument tests.","commit_id":"d11065f194ca90f8401d11437f531a4cd9cd8035"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"99ffe3c83999976b05c7d08eeb2d82c6447ff816","unresolved":false,"context_lines":[{"line_number":5791,"context_line":"                return None"},{"line_number":5792,"context_line":"            raise"},{"line_number":5793,"context_line":""},{"line_number":5794,"context_line":"    def create_subnet(self, network_name_or_id, cidr, ip_version\u003d4,"},{"line_number":5795,"context_line":"                      enable_dhcp\u003dFalse, subnet_name\u003dNone, tenant_id\u003dNone,"},{"line_number":5796,"context_line":"                      allocation_pools\u003dNone,"},{"line_number":5797,"context_line":"                      gateway_ip\u003dNone, disable_gateway_ip\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_7735add8","line":5794,"updated":"2017-01-03 23:01:15.000000000","message":"You could update this so that the arglist is:\n\n   def create_subnet(self, network_name_or_id, cidr\u003dNone, ip_version\u003d4,\n\nSo that users don\u0027t need to explicitly set cidr when using use_default_subnetpool\u003dTrue.\n\nWill be backward comaptible too due to its location in the arg list.","commit_id":"d9b75149d481a74ac666ac6a277facf2ec3ddd55"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"99ffe3c83999976b05c7d08eeb2d82c6447ff816","unresolved":false,"context_lines":[{"line_number":5862,"context_line":"        :param bool use_default_subnetpool:"},{"line_number":5863,"context_line":"           Use the default subnetpool for ``ip_version`` to obtain a CIDR. It"},{"line_number":5864,"context_line":"           is required to pass ``None`` to the ``cidr`` argument when enabling"},{"line_number":5865,"context_line":"           this option."},{"line_number":5866,"context_line":""},{"line_number":5867,"context_line":"        :returns: The new subnet object."},{"line_number":5868,"context_line":"        :raises: OpenStackCloudException on operation error."}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_e41bad7e","line":5865,"updated":"2017-01-03 23:01:15.000000000","message":"Thank you for the doc update here.","commit_id":"d9b75149d481a74ac666ac6a277facf2ec3ddd55"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"99ffe3c83999976b05c7d08eeb2d82c6447ff816","unresolved":false,"context_lines":[{"line_number":5883,"context_line":""},{"line_number":5884,"context_line":"        if cidr and use_default_subnetpool:"},{"line_number":5885,"context_line":"            raise OpenStackCloudException("},{"line_number":5886,"context_line":"                \u0027arg:cidr is not allowed with arg:use_default_subnetpool\u0027)"},{"line_number":5887,"context_line":""},{"line_number":5888,"context_line":"        # Be friendly on ip_version and allow strings"},{"line_number":5889,"context_line":"        if isinstance(ip_version, six.string_types):"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_570fc92d","line":5886,"updated":"2017-01-03 23:01:15.000000000","message":"This might be slightly more clear if it says \"arg:cidr must be set to None when use_default_subnetpool \u003d\u003d True\".","commit_id":"d9b75149d481a74ac666ac6a277facf2ec3ddd55"},{"author":{"_account_id":21902,"name":"Paulo Matias","email":"matias@ufscar.br","username":"matias"},"change_message_id":"0d74df37cb9309705649e5c0da55e5455c2fb8ea","unresolved":false,"context_lines":[{"line_number":5879,"context_line":""},{"line_number":5880,"context_line":"        if not cidr and not use_default_subnetpool:"},{"line_number":5881,"context_line":"            raise OpenStackCloudException("},{"line_number":5882,"context_line":"                \u0027arg:cidr must be set to None when use_default_subnetpool \u003d\u003d True\u0027)"},{"line_number":5883,"context_line":""},{"line_number":5884,"context_line":"        if cidr and use_default_subnetpool:"},{"line_number":5885,"context_line":"            raise OpenStackCloudException("}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_f935fdd9","line":5882,"updated":"2017-01-04 12:15:33.000000000","message":"Oops, fixing in the next patchset","commit_id":"1724448505c5cb5cf50bb3263c7200816b36f123"}]}
