)]}'
{"specs/juno/oslo-config-generator.rst":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"808cafcf811b55ee93f6f2d56762286918e8f097","unresolved":false,"context_lines":[{"line_number":80,"context_line":"  cfg.CONF.register_opts(opts, group\u003d\u0027blaa\u0027)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"  def list_opts():"},{"line_number":83,"context_line":"      return [(\u0027blaa\u0027, opts)]"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"You might choose to return a copy of the options so that the return value can\u0027t"},{"line_number":86,"context_line":"be modified for nefarious purposes::"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1ae5cdf2_2cb251e5","line":83,"updated":"2014-06-25 15:43:52.000000000","message":"It looks weird to me that you don\u0027t simplify the Config object, and let the config generator introspect its group, options etc. Maybe I miss something.\n\nPlus this spec still uses the global CONF object, I think it\u0027d be better to show how it\u0027s not \"mandatory\" anymore.","commit_id":"f987ce3a82cdaf44fd5faf0138bff0b60e65b595"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"4fb7c9512faa52013c50ab6fc75e35d238623229","unresolved":false,"context_lines":[{"line_number":80,"context_line":"  cfg.CONF.register_opts(opts, group\u003d\u0027blaa\u0027)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"  def list_opts():"},{"line_number":83,"context_line":"      return [(\u0027blaa\u0027, opts)]"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"You might choose to return a copy of the options so that the return value can\u0027t"},{"line_number":86,"context_line":"be modified for nefarious purposes::"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1ae5cdf2_d216e457","line":83,"in_reply_to":"1ae5cdf2_2cb251e5","updated":"2014-06-25 16:39:05.000000000","message":"On allowing the generator to introspect the config object - options aren\u0027t associated with a config object (or a group) until runtime, and may even be associated with multiple config objects or groups at runtime\n\nOne interesting case in nova was this:\n\n [image_file_url]\n\n #\n # From nova\n #\n\n # List of file systems that are configured in this file in the\n # image_file_url:\u003clist entry name\u003e sections (list value)\n #filesystems \u003d \n\n\n [image_file_url:FILESYSTEM_ID]\n\n #\n # From nova\n #\n\n # A unique ID given to each file system.  This is value is set in\n # Glance and agreed upon here so that the operator knowns they are\n # dealing with the same file system. (string value)\n #id \u003d \u003cNone\u003e\n\n # The path at which the file system is mounted. (string value)\n #mountpoint \u003d \u003cNone\u003e\n\nThe group with the image_file_url prefix only exists when you register the id/mountpoint options with it at runtime after looking at the image_file_url.filesystems option\n\nSo I made nova.config.list_opts() return these options with a sample image_file_url:FILESYSTEM_ID group\n\nBasically, if we\u0027re careful about how we use oslo.config then the current generator works for most use cases ... but we want to allow for a generator that can work predictably in all use cases without weird tricks, and without relying on the use of the global object\n\n\nAnd yeah, we should have examples of using non-global and global config objects. All of this stuff is in the docs, we can add another example there easily","commit_id":"f987ce3a82cdaf44fd5faf0138bff0b60e65b595"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"808cafcf811b55ee93f6f2d56762286918e8f097","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            return \u0027.\u0027"},{"line_number":140,"context_line":"        else:"},{"line_number":141,"context_line":"            return default_str"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"the callable is registered as a entry point::"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"  [entry_points]"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1ae5cdf2_8cf0c592","line":142,"updated":"2014-06-25 15:43:52.000000000","message":"I\u0027m thinking that application should use something like None as value and not set dynamically computed values as default ones. That would avoid to use such tricks. :(\n\nAnd if the problem is that the user isn\u0027t able to discover what default will be used, we could add a computed_default option to Opt, so you could do computed_default\u003dsocket.gethostbyname(). Then we could have a tool able to show you what the actual value of the conf is; it would parse the .conf file and applies the computed_default where no value is provided and shows you the result. A bit like postconf in postfix I think.","commit_id":"f987ce3a82cdaf44fd5faf0138bff0b60e65b595"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"4fb7c9512faa52013c50ab6fc75e35d238623229","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            return \u0027.\u0027"},{"line_number":140,"context_line":"        else:"},{"line_number":141,"context_line":"            return default_str"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"the callable is registered as a entry point::"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"  [entry_points]"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1ae5cdf2_ddd19557","line":142,"in_reply_to":"1ae5cdf2_8cf0c592","updated":"2014-06-25 16:39:05.000000000","message":"I\u0027m not 100% sure I\u0027m following you there, but I\u0027d be in favour of trying out stuff like this\n\nSimple solution might be to add a sample_default attribute which the config generator would use if available rather than the actual default\n\nI wouldn\u0027t like to require us to change all of these types of options in order to adopt oslo-config-generator though - i.e. let\u0027s introduce the sanitizer, but reduce its usage over time","commit_id":"f987ce3a82cdaf44fd5faf0138bff0b60e65b595"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"e87e3527c1dc2a91a50d75d6829d67363511e708","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            return \u0027.\u0027"},{"line_number":140,"context_line":"        else:"},{"line_number":141,"context_line":"            return default_str"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"the callable is registered as a entry point::"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"  [entry_points]"}],"source_content_type":"text/x-rst","patch_set":1,"id":"baada198_26de3140","line":142,"in_reply_to":"1ae5cdf2_ddd19557","updated":"2014-07-01 20:00:24.000000000","message":"I like the idea of the static default as an optional value for Opt() because it is simpler to understand. If we have that, do we still need the sanitization function?","commit_id":"f987ce3a82cdaf44fd5faf0138bff0b60e65b595"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"c4e51799bef0e69da3eb86aeb35c94498b4c1c61","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            return \u0027.\u0027"},{"line_number":140,"context_line":"        else:"},{"line_number":141,"context_line":"            return default_str"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"the callable is registered as a entry point::"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"  [entry_points]"}],"source_content_type":"text/x-rst","patch_set":1,"id":"baada198_a641483b","line":142,"in_reply_to":"baada198_26de3140","updated":"2014-07-02 11:57:44.000000000","message":"Good question, quite possibly not\n\nI\u0027ll hack up the sample_default idea (help_default?) and see how it works out","commit_id":"f987ce3a82cdaf44fd5faf0138bff0b60e65b595"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"a8cf3a8433a1838f7617d590cb59203e4514158e","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            return \u0027.\u0027"},{"line_number":140,"context_line":"        else:"},{"line_number":141,"context_line":"            return default_str"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"the callable is registered as a entry point::"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"  [entry_points]"}],"source_content_type":"text/x-rst","patch_set":1,"id":"baada198_68645649","line":142,"in_reply_to":"baada198_a641483b","updated":"2014-07-02 15:22:12.000000000","message":"Ok, let\u0027s give this sample_default idea a shot -  I319d128a0a88b1197d8e2be105681f2b56240439","commit_id":"f987ce3a82cdaf44fd5faf0138bff0b60e65b595"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"d5a983b8c7c234d40771cfdcbcee23610ee80bd5","unresolved":false,"context_lines":[{"line_number":181,"context_line":"This shouldn\u0027t be a huge burden because it typically is a list which"},{"line_number":182,"context_line":"references existing lists of options."},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"However, some sort of automated assistance to help catch cases where"},{"line_number":185,"context_line":"the list needs updating would be hugely helpful. How exactly that will"},{"line_number":186,"context_line":"work remains to be seen."},{"line_number":187,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"baada198_1ef0bbc8","line":184,"updated":"2014-07-08 18:59:17.000000000","message":"I wonder if it could be as simple as writing a tool that takes a project\u0027s sample conf files and looks directly at the source code to make sure all of the cfg.*Opt objects in the source also appear in at least one conf file.","commit_id":"ec539d4c14fc60763b05439bd7a7753866a994dc"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"ba16755873b73cf19496729061924bf1b69729b6","unresolved":false,"context_lines":[{"line_number":181,"context_line":"This shouldn\u0027t be a huge burden because it typically is a list which"},{"line_number":182,"context_line":"references existing lists of options."},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"However, some sort of automated assistance to help catch cases where"},{"line_number":185,"context_line":"the list needs updating would be hugely helpful. How exactly that will"},{"line_number":186,"context_line":"work remains to be seen."},{"line_number":187,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"baada198_0f7219e3","line":184,"in_reply_to":"baada198_1ee43bab","updated":"2014-07-09 22:38:01.000000000","message":"Ok, I think I\u0027m getting somewhere with this: https://github.com/markmc/nova/commit/dd2aaac15d18a064c92bea589ec4586d8583cbe3","commit_id":"ec539d4c14fc60763b05439bd7a7753866a994dc"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"a1048ac2bc5dedfbc3b200ba9af3d7472bfd0f4b","unresolved":false,"context_lines":[{"line_number":181,"context_line":"This shouldn\u0027t be a huge burden because it typically is a list which"},{"line_number":182,"context_line":"references existing lists of options."},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"However, some sort of automated assistance to help catch cases where"},{"line_number":185,"context_line":"the list needs updating would be hugely helpful. How exactly that will"},{"line_number":186,"context_line":"work remains to be seen."},{"line_number":187,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"baada198_1ee43bab","line":184,"in_reply_to":"baada198_1ef0bbc8","updated":"2014-07-08 19:08:41.000000000","message":"Yeah, I\u0027m going to play around with something like that in Nova. Just not 100% sure yet how best to do it.","commit_id":"ec539d4c14fc60763b05439bd7a7753866a994dc"}]}
