)]}'
{"README.md":[{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"eff06ca4172f4a9d5c8268b71f21f4bbcaa14e7c","unresolved":false,"context_lines":[{"line_number":35,"context_line":"```"},{"line_number":36,"context_line":"vs_config { \u0027external_ids:ovn-remote\u0027:"},{"line_number":37,"context_line":"  ensure \u003d\u003e present,"},{"line_number":38,"context_line":"  value \u003d\u003e \"tcp://remote-ip:5566\""},{"line_number":39,"context_line":"}"},{"line_number":40,"context_line":"```"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-gfm","patch_set":1,"id":"9aed3d3a_d9ae3c80","line":38,"updated":"2016-02-29 14:17:34.000000000","message":"Is this a valid example value?  I think it\u0027s \"tcp:REMOTE_IP:PORT\", without the \"//\"","commit_id":"8c0d3d2fe6447cd1cd4d74514623e4c6bccd1dcf"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"1effa256f27fa9d038b3445d723903589b3cdf83","unresolved":false,"context_lines":[{"line_number":35,"context_line":"```"},{"line_number":36,"context_line":"vs_config { \u0027external_ids:ovn-remote\u0027:"},{"line_number":37,"context_line":"  ensure \u003d\u003e present,"},{"line_number":38,"context_line":"  value \u003d\u003e \"tcp://remote-ip:5566\""},{"line_number":39,"context_line":"}"},{"line_number":40,"context_line":"```"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-gfm","patch_set":1,"id":"9aed3d3a_7f8b8b68","line":38,"in_reply_to":"9aed3d3a_d9ae3c80","updated":"2016-02-29 15:49:30.000000000","message":"You are right Russell. I will correct this in my next revision.","commit_id":"8c0d3d2fe6447cd1cd4d74514623e4c6bccd1dcf"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"fbc6739509897421407fc44708ed184a41b9cee6","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"You can change the vswitch configuration settings using"},{"line_number":35,"context_line":"```"},{"line_number":36,"context_line":"vs_config { \u0027external_ids:ovn-remote\u0027:"},{"line_number":37,"context_line":"  ensure \u003d\u003e present,"},{"line_number":38,"context_line":"  value \u003d\u003e \"tcp:remote-ip:5566\""},{"line_number":39,"context_line":"}"},{"line_number":40,"context_line":"```"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"## Beaker-Rspec"}],"source_content_type":"text/x-gfm","patch_set":5,"id":"1af94dfe_0186c164","line":39,"range":{"start_line":36,"start_character":0,"end_line":39,"end_character":1},"updated":"2016-03-16 15:12:27.000000000","message":"i\u0027m not a openvswitch expert, just to clarify this moment. After this comment we will have next:\n\n\u003e\u003e # ovs-vsctl list Open_vSwitch .\n\n\u003e\u003e external_ids:ovn-remote        : {\"tcp:remote-ip:5566\"}\n\nam i correct?","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"c0ede25e42aba3c325aea57dae7a788dd2454f15","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"You can change the vswitch configuration settings using"},{"line_number":35,"context_line":"```"},{"line_number":36,"context_line":"vs_config { \u0027external_ids:ovn-remote\u0027:"},{"line_number":37,"context_line":"  ensure \u003d\u003e present,"},{"line_number":38,"context_line":"  value \u003d\u003e \"tcp:remote-ip:5566\""},{"line_number":39,"context_line":"}"},{"line_number":40,"context_line":"```"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"## Beaker-Rspec"}],"source_content_type":"text/x-gfm","patch_set":5,"id":"1af94dfe_5293544f","line":39,"range":{"start_line":36,"start_character":0,"end_line":39,"end_character":1},"in_reply_to":"1af94dfe_0186c164","updated":"2016-03-17 06:15:19.000000000","message":"ovs-vsctl list will infact return like the following\n\nexterna_ids        : {\"ovn-remote\"\u003d\"tcp:remote-ip:5566\", \"some_key\"\u003d\"some_value\"}","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"c55d66843f94baf37b827a2db126dbbc0aaf380c","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"You can change the vswitch configuration settings using"},{"line_number":35,"context_line":"```"},{"line_number":36,"context_line":"vs_config { \u0027external_ids:ovn-remote\u0027:"},{"line_number":37,"context_line":"  ensure \u003d\u003e present,"},{"line_number":38,"context_line":"  value \u003d\u003e \"tcp:remote-ip:5566\""},{"line_number":39,"context_line":"}"},{"line_number":40,"context_line":"```"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"## Beaker-Rspec"}],"source_content_type":"text/x-gfm","patch_set":5,"id":"1af94dfe_5c9d1e58","line":39,"range":{"start_line":36,"start_character":0,"end_line":39,"end_character":1},"in_reply_to":"1af94dfe_5293544f","updated":"2016-03-17 10:50:36.000000000","message":"For such way, using \u0027external_ids:ovn-remote\u0027 can help to avoid duplication resource, if we want add some hash to key \u0027external_ids\u0027. That\u0027s fine. +1 on this.\n\nAlso then you should document it somehow, that \u0027:\u0027 is separator for hash values.","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"043509e70e21d2363aeda7bd277a3ff8cdccaaca","unresolved":false,"context_lines":[{"line_number":44,"context_line":"```"},{"line_number":45,"context_line":"parameter-name:key-name"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"Ex. "},{"line_number":48,"context_line":"vs_config { \u0027external_ids:ovn-remote\u0027:"},{"line_number":49,"context_line":"  ensure \u003d\u003e present,"},{"line_number":50,"context_line":"  value \u003d\u003e \u0027tcp:127.0.0.1:6640\u0027"}],"source_content_type":"text/x-gfm","patch_set":6,"id":"1af94dfe_439b3e18","line":47,"updated":"2016-03-18 14:19:37.000000000","message":"looks good to me :) remove please empty space at 47 line.","commit_id":"5f3ad41314d130b4f229dee28da034fa0f212624"}],"lib/puppet/provider/vs_config/ovs.rb":[{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"a92a89e1fa38ac2f2f8fc6269b5c5a77a76b8154","unresolved":false,"context_lines":[{"line_number":10,"context_line":"  def exists?"},{"line_number":11,"context_line":"    result \u003d _get_param()"},{"line_number":12,"context_line":"    return result \u003d\u003d \"\\\"#{@resource[:value]}\\\"\""},{"line_number":13,"context_line":"  rescue Puppet::ExecutionFailure"},{"line_number":14,"context_line":"    return false"},{"line_number":15,"context_line":"  end"},{"line_number":16,"context_line":""}],"source_content_type":"text/x-ruby","patch_set":3,"id":"1af94dfe_4125b6c0","line":13,"updated":"2016-03-15 12:08:41.000000000","message":"i\u0027m personally disagree with such approach - using rescue in exists.\n\nWe can use vsctl(\"list\", \"Open_vSwitch\")\n\nand to try find our @resource[:name] in output. Only then we can call _get_param() to check is option equals to our @resource[:value] or not.\n\nPlease update it.","commit_id":"e2e01df431dbe70496ca6415ccf227b74f54d3ea"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"1519e83b4186519679dc330b00cef32edc22b610","unresolved":false,"context_lines":[{"line_number":10,"context_line":"  def exists?"},{"line_number":11,"context_line":"    result \u003d _get_param()"},{"line_number":12,"context_line":"    return result \u003d\u003d \"\\\"#{@resource[:value]}\\\"\""},{"line_number":13,"context_line":"  rescue Puppet::ExecutionFailure"},{"line_number":14,"context_line":"    return false"},{"line_number":15,"context_line":"  end"},{"line_number":16,"context_line":""}],"source_content_type":"text/x-ruby","patch_set":3,"id":"1af94dfe_84f18cd0","line":13,"in_reply_to":"1af94dfe_4125b6c0","updated":"2016-03-15 12:17:13.000000000","message":"Thanks for the review. I will revise this patch accordingly.","commit_id":"e2e01df431dbe70496ca6415ccf227b74f54d3ea"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"fbc6739509897421407fc44708ed184a41b9cee6","unresolved":false,"context_lines":[{"line_number":2,"context_line":""},{"line_number":3,"context_line":"Puppet::Type.type(:vs_config).provide(:ovs) do"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"  commands :vsctl     \u003d\u003e \u0027ovs-vsctl\u0027"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"  class OvsRec"},{"line_number":8,"context_line":"    def initialize(line)"}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_66599bfe","line":5,"range":{"start_line":5,"start_character":17,"end_line":5,"end_character":22},"updated":"2016-03-16 15:12:27.000000000","message":"nit: alignment","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"fbc6739509897421407fc44708ed184a41b9cee6","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    @ovsconf \u003d {}"},{"line_number":56,"context_line":"    open_vs \u003d vsctl(\"list\", \"Open_vSwitch\", \".\")"},{"line_number":57,"context_line":"    open_vs.each_line do |line|"},{"line_number":58,"context_line":"      obj \u003d OvsRec.new(line)"},{"line_number":59,"context_line":"      @ovsconf[obj.get_key()] \u003d obj"},{"line_number":60,"context_line":"    end"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_66423b12","line":58,"range":{"start_line":58,"start_character":6,"end_line":58,"end_character":28},"updated":"2016-03-16 15:12:27.000000000","message":"you don\u0027t need to declare a new class here.\n\nSo, you have some output from cli, you can parse it then line-to-line and return some hash. I don\u0027t see any reason complicate it.","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"f87ed778911ae1fc32290754af3655e195a2b5ba","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    @ovsconf \u003d {}"},{"line_number":56,"context_line":"    open_vs \u003d vsctl(\"list\", \"Open_vSwitch\", \".\")"},{"line_number":57,"context_line":"    open_vs.each_line do |line|"},{"line_number":58,"context_line":"      obj \u003d OvsRec.new(line)"},{"line_number":59,"context_line":"      @ovsconf[obj.get_key()] \u003d obj"},{"line_number":60,"context_line":"    end"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_e1728748","line":58,"range":{"start_line":58,"start_character":6,"end_line":58,"end_character":28},"in_reply_to":"1af94dfe_12eeeceb","updated":"2016-03-17 10:48:12.000000000","message":"You can take a look on other modules (like keystone, cinder, neutron) and you will see that this way is different from puppet providers common way.","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"c0ede25e42aba3c325aea57dae7a788dd2454f15","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    @ovsconf \u003d {}"},{"line_number":56,"context_line":"    open_vs \u003d vsctl(\"list\", \"Open_vSwitch\", \".\")"},{"line_number":57,"context_line":"    open_vs.each_line do |line|"},{"line_number":58,"context_line":"      obj \u003d OvsRec.new(line)"},{"line_number":59,"context_line":"      @ovsconf[obj.get_key()] \u003d obj"},{"line_number":60,"context_line":"    end"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_12eeeceb","line":58,"range":{"start_line":58,"start_character":6,"end_line":58,"end_character":28},"in_reply_to":"1af94dfe_66423b12","updated":"2016-03-17 06:15:19.000000000","message":"I just thought it would be more readable this way.","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"fbc6739509897421407fc44708ed184a41b9cee6","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    open_vs.each_line do |line|"},{"line_number":58,"context_line":"      obj \u003d OvsRec.new(line)"},{"line_number":59,"context_line":"      @ovsconf[obj.get_key()] \u003d obj"},{"line_number":60,"context_line":"    end"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    if @resource[:name].include?(\u0027:\u0027) then"},{"line_number":63,"context_line":"      @resource_name, @resource_key \u003d @resource[:name].split(\u0027:\u0027)"}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_0bf2606f","line":60,"updated":"2016-03-16 15:12:27.000000000","message":"well, this is wrong approach again :) initialize method is not going to collect information about existing resources.\n\nI see here two possible ways:\n1) using self.instances and prefetch methods, as it done for example for cinder, keystone: https://github.com/openstack/puppet-cinder/blob/master/lib/puppet/provider/cinder_type/openstack.rb#L46-L65\n2) use call for list directly from exists? method.","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"c0ede25e42aba3c325aea57dae7a788dd2454f15","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    open_vs.each_line do |line|"},{"line_number":58,"context_line":"      obj \u003d OvsRec.new(line)"},{"line_number":59,"context_line":"      @ovsconf[obj.get_key()] \u003d obj"},{"line_number":60,"context_line":"    end"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    if @resource[:name].include?(\u0027:\u0027) then"},{"line_number":63,"context_line":"      @resource_name, @resource_key \u003d @resource[:name].split(\u0027:\u0027)"}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_9224bcaf","line":60,"in_reply_to":"1af94dfe_0bf2606f","updated":"2016-03-17 06:15:19.000000000","message":"I used the list call to just get the prototype of the columns in the configuration table and the list of column names. The values will not be used at all. \nThis is needed even before exists?. In exists? we can assert earlier when we see that the column name does not exist","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"f87ed778911ae1fc32290754af3655e195a2b5ba","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    open_vs.each_line do |line|"},{"line_number":58,"context_line":"      obj \u003d OvsRec.new(line)"},{"line_number":59,"context_line":"      @ovsconf[obj.get_key()] \u003d obj"},{"line_number":60,"context_line":"    end"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    if @resource[:name].include?(\u0027:\u0027) then"},{"line_number":63,"context_line":"      @resource_name, @resource_key \u003d @resource[:name].split(\u0027:\u0027)"}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_81ff4366","line":60,"in_reply_to":"1af94dfe_9224bcaf","updated":"2016-03-17 10:48:12.000000000","message":"Puppet has own common ways and rules for writing providers. Possibly, not a strong rules, but style rules.\n\nAnd we should follow to this style rules. So, please move any checks existing resources out of initialize method. As i said above, more appropriate way is using self.prefetch and self.instances modules. You can find description of this on puppetlabs official documentation. As an example you can use link above (it\u0027s for cinder).","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"fbc6739509897421407fc44708ed184a41b9cee6","unresolved":false,"context_lines":[{"line_number":66,"context_line":"      @resource_key \u003d nil"},{"line_number":67,"context_line":"    end"},{"line_number":68,"context_line":"  end"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"  def _get_ovsrec"},{"line_number":71,"context_line":"    if !@ovsconf.key?(@resource_name) then"},{"line_number":72,"context_line":"      raise Puppet::Error, \"Invalid configuration parameter #{@resource_name}\""}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_a696034a","line":69,"updated":"2016-03-16 15:12:27.000000000","message":"do not forget to add mk_resource_methods","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"fbc6739509897421407fc44708ed184a41b9cee6","unresolved":false,"context_lines":[{"line_number":75,"context_line":"  end"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"  def exists?"},{"line_number":78,"context_line":"    rec \u003d _get_ovsrec()"},{"line_number":79,"context_line":"    value \u003d vsctl(\"get\", \"Open_vSwitch\", \".\", @resource_name)"},{"line_number":80,"context_line":"    rec.refresh(value)"},{"line_number":81,"context_line":""}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_26d4b31e","line":78,"updated":"2016-03-16 15:12:27.000000000","message":"So, let\u0027s imagine that you cover two first comments.\n\nWhat\u0027s will be here? (per to my second comment)\n\n1) only @property_hash[:ensure] \u003d\u003d :present ;\n2) implementation of list,calling parse function and checking present or not our new element in output;","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"c0ede25e42aba3c325aea57dae7a788dd2454f15","unresolved":false,"context_lines":[{"line_number":75,"context_line":"  end"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"  def exists?"},{"line_number":78,"context_line":"    rec \u003d _get_ovsrec()"},{"line_number":79,"context_line":"    value \u003d vsctl(\"get\", \"Open_vSwitch\", \".\", @resource_name)"},{"line_number":80,"context_line":"    rec.refresh(value)"},{"line_number":81,"context_line":""}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_52ed1424","line":78,"in_reply_to":"1af94dfe_26d4b31e","updated":"2016-03-17 06:15:19.000000000","message":"By the time exists? is executed, the list of columns are known from the \"ovs-vsctl list\" called during initialize. \nIn exists? we refresh the column\u0027s value by fetching the latest from ovsdb.\n1. If the data type of the column is string, a one-on-one match is performed.\n2. If the data type is hash, I check for the key inside the latest value. If key is present, the value of the resource key is compared with @resource[:value] and this result is returned. If key is not present return false.\n3. If the data type is set, I see if the value is a subset of the column values. If so, return true, else false.","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"f87ed778911ae1fc32290754af3655e195a2b5ba","unresolved":false,"context_lines":[{"line_number":75,"context_line":"  end"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"  def exists?"},{"line_number":78,"context_line":"    rec \u003d _get_ovsrec()"},{"line_number":79,"context_line":"    value \u003d vsctl(\"get\", \"Open_vSwitch\", \".\", @resource_name)"},{"line_number":80,"context_line":"    rec.refresh(value)"},{"line_number":81,"context_line":""}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_c155cb50","line":78,"in_reply_to":"1af94dfe_52ed1424","updated":"2016-03-17 10:48:12.000000000","message":"So, exists? method is using for:\n1) checking current ensure value;\n2) sometime really for checking exists resource or don\u0027t.\n\nIn your situation, resource exists? should be true, when ovs-vsctl list already contain some key. For example:\n\nvs_config { \u0027external_ids:ovn-remote\u0027:\n  ensure \u003d\u003e present,\n  value \u003d\u003e \"tcp:remote-ip:5566\"\n}\n\nand let\u0027s we have list output:\nexternal_ids        : {\"ovn-remote\"\u003d\"tcp:remote-ip:5566\", \"some_key\"\u003d\"some_value\"}\n\nIn this case exists? should be true. Because you have \u0027external_ids\u0027 key. Then you should only update it (from setter or on flush stage).\n\nThis means, that you can implement aux function for parsing if hash and call it from instances method. Then provider will see, that your input data is different from existing and will call setter method and will update current property.","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"fbc6739509897421407fc44708ed184a41b9cee6","unresolved":false,"context_lines":[{"line_number":97,"context_line":"  end"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"  def create"},{"line_number":100,"context_line":"    rec \u003d _get_ovsrec()"},{"line_number":101,"context_line":"    if rec.get_type \u003d\u003d \"hash\" then"},{"line_number":102,"context_line":"      vsctl(\"set\", \"Open_vSwitch\", \".\", \"#{@resource_name}:#{@resource_key}\u003d#{@resource[:value]}\")"},{"line_number":103,"context_line":"    elsif rec.get_type \u003d\u003d \"set\""}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_c61cefc3","line":100,"updated":"2016-03-16 15:12:27.000000000","message":"Please note, then create method should be only called *on creating* resource, not updating, not adding some values.\n\nIf you want to update some value, it\u0027s better to use:\n1) flush stage;\n2) value setter (i like this one) - this way will be better to mix with 1) option from my comment to initialize method.","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"f87ed778911ae1fc32290754af3655e195a2b5ba","unresolved":false,"context_lines":[{"line_number":97,"context_line":"  end"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"  def create"},{"line_number":100,"context_line":"    rec \u003d _get_ovsrec()"},{"line_number":101,"context_line":"    if rec.get_type \u003d\u003d \"hash\" then"},{"line_number":102,"context_line":"      vsctl(\"set\", \"Open_vSwitch\", \".\", \"#{@resource_name}:#{@resource_key}\u003d#{@resource[:value]}\")"},{"line_number":103,"context_line":"    elsif rec.get_type \u003d\u003d \"set\""}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_5cf7def4","line":100,"in_reply_to":"1af94dfe_92f79cf4","updated":"2016-03-17 10:48:12.000000000","message":"So, if we have different command for adding differs data (string - hash) for some key - then ok.","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"c0ede25e42aba3c325aea57dae7a788dd2454f15","unresolved":false,"context_lines":[{"line_number":97,"context_line":"  end"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"  def create"},{"line_number":100,"context_line":"    rec \u003d _get_ovsrec()"},{"line_number":101,"context_line":"    if rec.get_type \u003d\u003d \"hash\" then"},{"line_number":102,"context_line":"      vsctl(\"set\", \"Open_vSwitch\", \".\", \"#{@resource_name}:#{@resource_key}\u003d#{@resource[:value]}\")"},{"line_number":103,"context_line":"    elsif rec.get_type \u003d\u003d \"set\""}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_92f79cf4","line":100,"in_reply_to":"1af94dfe_c61cefc3","updated":"2016-03-17 06:15:19.000000000","message":"ok. I will explore on the \u0027value setter\u0027 part. I think your comments are more for the data type \u0027set\u0027.\nFor \u0027hash\u0027 and \u0027string\u0027 types, this is infact creating the data.","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"fbc6739509897421407fc44708ed184a41b9cee6","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"  def destroy"},{"line_number":111,"context_line":"    rec \u003d _get_ovsrec()"},{"line_number":112,"context_line":"    if rec.get_type \u003d\u003d \"hash\" then"},{"line_number":113,"context_line":"      vsctl(\"remove\", \"Open_vSwitch\", \".\", \"#{@resource_name}\", \"#{@resource_key}\u003d#{@resource[:value]}\")"},{"line_number":114,"context_line":"    elsif rec.get_type \u003d\u003d \"set\""},{"line_number":115,"context_line":"      vsctl(\"remove\", \"Open_vSwitch\", \".\", \"#{@resource_name}\", \"#{@resource[:value]}\")"}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_264b1389","line":112,"updated":"2016-03-16 15:12:27.000000000","message":"same here: this method should only destroy/remove value at all.","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"c0ede25e42aba3c325aea57dae7a788dd2454f15","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"  def destroy"},{"line_number":111,"context_line":"    rec \u003d _get_ovsrec()"},{"line_number":112,"context_line":"    if rec.get_type \u003d\u003d \"hash\" then"},{"line_number":113,"context_line":"      vsctl(\"remove\", \"Open_vSwitch\", \".\", \"#{@resource_name}\", \"#{@resource_key}\u003d#{@resource[:value]}\")"},{"line_number":114,"context_line":"    elsif rec.get_type \u003d\u003d \"set\""},{"line_number":115,"context_line":"      vsctl(\"remove\", \"Open_vSwitch\", \".\", \"#{@resource_name}\", \"#{@resource[:value]}\")"}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_321cc811","line":112,"in_reply_to":"1af94dfe_264b1389","updated":"2016-03-17 06:15:19.000000000","message":"I think for \u0027hash\u0027 type we cannot do much. I think we can use \u0027clear\u0027 for data-type\u003d\u003d\u0027set\u0027.","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"f87ed778911ae1fc32290754af3655e195a2b5ba","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"  def destroy"},{"line_number":111,"context_line":"    rec \u003d _get_ovsrec()"},{"line_number":112,"context_line":"    if rec.get_type \u003d\u003d \"hash\" then"},{"line_number":113,"context_line":"      vsctl(\"remove\", \"Open_vSwitch\", \".\", \"#{@resource_name}\", \"#{@resource_key}\u003d#{@resource[:value]}\")"},{"line_number":114,"context_line":"    elsif rec.get_type \u003d\u003d \"set\""},{"line_number":115,"context_line":"      vsctl(\"remove\", \"Open_vSwitch\", \".\", \"#{@resource_name}\", \"#{@resource[:value]}\")"}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_5c451e15","line":112,"in_reply_to":"1af94dfe_321cc811","updated":"2016-03-17 10:48:12.000000000","message":"Well, again here. Destroy method should remove key at all. If you want to clear that - pass empty value.","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"043509e70e21d2363aeda7bd277a3ff8cdccaaca","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"  def self.parse_column_value(value)"},{"line_number":10,"context_line":"    value \u003d value.chomp"},{"line_number":11,"context_line":"    if value[0] \u003d\u003d \u0027{\u0027 or value[0] \u003d\u003d \u0027[\u0027 then"},{"line_number":12,"context_line":"      type \u003d value[0] \u003d\u003d \u0027{\u0027?\"hash\":\"set\""},{"line_number":13,"context_line":"      value \u003d value[1, value.length - 2]"},{"line_number":14,"context_line":"      value_split \u003d value.split(/,(?\u003d[ ])/)"}],"source_content_type":"text/x-ruby","patch_set":6,"id":"1af94dfe_4966bd51","line":11,"range":{"start_line":11,"start_character":42,"end_line":11,"end_character":46},"updated":"2016-03-18 14:19:37.000000000","message":"we don\u0027t use \u0027then\u0027","commit_id":"5f3ad41314d130b4f229dee28da034fa0f212624"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"e040275619d6dbb959ddebd974bfc4710bf04b6e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"  def self.parse_column_value(value)"},{"line_number":10,"context_line":"    value \u003d value.chomp"},{"line_number":11,"context_line":"    if value[0] \u003d\u003d \u0027{\u0027 or value[0] \u003d\u003d \u0027[\u0027 then"},{"line_number":12,"context_line":"      type \u003d value[0] \u003d\u003d \u0027{\u0027?\"hash\":\"set\""},{"line_number":13,"context_line":"      value \u003d value[1, value.length - 2]"},{"line_number":14,"context_line":"      value_split \u003d value.split(/,(?\u003d[ ])/)"}],"source_content_type":"text/x-ruby","patch_set":6,"id":"fa0719c6_b59f975e","line":11,"range":{"start_line":11,"start_character":42,"end_line":11,"end_character":46},"in_reply_to":"1af94dfe_4966bd51","updated":"2016-03-21 06:32:11.000000000","message":"Done","commit_id":"5f3ad41314d130b4f229dee28da034fa0f212624"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"043509e70e21d2363aeda7bd277a3ff8cdccaaca","unresolved":false,"context_lines":[{"line_number":11,"context_line":"    if value[0] \u003d\u003d \u0027{\u0027 or value[0] \u003d\u003d \u0027[\u0027 then"},{"line_number":12,"context_line":"      type \u003d value[0] \u003d\u003d \u0027{\u0027?\"hash\":\"set\""},{"line_number":13,"context_line":"      value \u003d value[1, value.length - 2]"},{"line_number":14,"context_line":"      value_split \u003d value.split(/,(?\u003d[ ])/)"},{"line_number":15,"context_line":"      if type \u003d\u003d \"hash\" then"},{"line_number":16,"context_line":"        value \u003d {}"},{"line_number":17,"context_line":"        value_split.each do |v|"}],"source_content_type":"text/x-ruby","patch_set":6,"id":"1af94dfe_d20a7225","line":14,"range":{"start_line":14,"start_character":6,"end_line":14,"end_character":43},"updated":"2016-03-18 14:19:37.000000000","message":"will not work for hash, when it has multiple key-value values.","commit_id":"5f3ad41314d130b4f229dee28da034fa0f212624"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"e040275619d6dbb959ddebd974bfc4710bf04b6e","unresolved":false,"context_lines":[{"line_number":11,"context_line":"    if value[0] \u003d\u003d \u0027{\u0027 or value[0] \u003d\u003d \u0027[\u0027 then"},{"line_number":12,"context_line":"      type \u003d value[0] \u003d\u003d \u0027{\u0027?\"hash\":\"set\""},{"line_number":13,"context_line":"      value \u003d value[1, value.length - 2]"},{"line_number":14,"context_line":"      value_split \u003d value.split(/,(?\u003d[ ])/)"},{"line_number":15,"context_line":"      if type \u003d\u003d \"hash\" then"},{"line_number":16,"context_line":"        value \u003d {}"},{"line_number":17,"context_line":"        value_split.each do |v|"}],"source_content_type":"text/x-ruby","patch_set":6,"id":"fa0719c6_d58ccb37","line":14,"range":{"start_line":14,"start_character":6,"end_line":14,"end_character":43},"in_reply_to":"1af94dfe_d20a7225","updated":"2016-03-21 06:32:11.000000000","message":"The above logic worked even for multiple key-value values. I still used your code below to make it more neat.","commit_id":"5f3ad41314d130b4f229dee28da034fa0f212624"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"043509e70e21d2363aeda7bd277a3ff8cdccaaca","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"  def self.parse_column_value(value)"},{"line_number":10,"context_line":"    value \u003d value.chomp"},{"line_number":11,"context_line":"    if value[0] \u003d\u003d \u0027{\u0027 or value[0] \u003d\u003d \u0027[\u0027 then"},{"line_number":12,"context_line":"      type \u003d value[0] \u003d\u003d \u0027{\u0027?\"hash\":\"set\""},{"line_number":13,"context_line":"      value \u003d value[1, value.length - 2]"},{"line_number":14,"context_line":"      value_split \u003d value.split(/,(?\u003d[ ])/)"},{"line_number":15,"context_line":"      if type \u003d\u003d \"hash\" then"},{"line_number":16,"context_line":"        value \u003d {}"},{"line_number":17,"context_line":"        value_split.each do |v|"},{"line_number":18,"context_line":"          k, v \u003d v.strip.split(\"\u003d\")"},{"line_number":19,"context_line":"          value[k] \u003d v"},{"line_number":20,"context_line":"        end"},{"line_number":21,"context_line":"      else"},{"line_number":22,"context_line":"        value \u003d value_split"},{"line_number":23,"context_line":"      end"},{"line_number":24,"context_line":"    else"},{"line_number":25,"context_line":"      type \u003d \"string\""},{"line_number":26,"context_line":"    end"},{"line_number":27,"context_line":"    {"},{"line_number":28,"context_line":"      :type \u003d\u003e type,"},{"line_number":29,"context_line":"      :value \u003d\u003e value"}],"source_content_type":"text/x-ruby","patch_set":6,"id":"1af94dfe_9df59bee","line":26,"range":{"start_line":11,"start_character":0,"end_line":26,"end_character":7},"updated":"2016-03-18 14:19:37.000000000","message":"can be rewritten like:\n\nif value[0] \u003d\u003d \u0027{\u0027\n  # hash case, like {system-id\u003d\\\"some-id\\\", name\u003d\\\"some-name\\\"}\n  type \u003d \u0027hash\u0027\n  value[1..-2].gsub(\u0027\"\u0027,\u0027\u0027).split(\u0027,\u0027).map(\u0026:strip).each do |v|\n     k,val \u003d v.split(\u0027\u003d\u0027)\n     res[k] \u003d val\n  end\nelsif value[0] \u003d\u003d \u0027[\u0027\n  # set case, like [\u0027id1\u0027, \u0027id2\u0027, \u0027id3\u0027]\n  type \u003d \u0027set\u0027\n  res \u003d value[1..-2].split(\u0027,\u0027).map(\u0026:strip)\nelse\n  # simple string\n  type \u003d \u0027string\u0027\n  res \u003d value\nend\n\n{\n  :type \u003d\u003e type,\n  :value \u003d\u003e res\n}","commit_id":"5f3ad41314d130b4f229dee28da034fa0f212624"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"e040275619d6dbb959ddebd974bfc4710bf04b6e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"  def self.parse_column_value(value)"},{"line_number":10,"context_line":"    value \u003d value.chomp"},{"line_number":11,"context_line":"    if value[0] \u003d\u003d \u0027{\u0027 or value[0] \u003d\u003d \u0027[\u0027 then"},{"line_number":12,"context_line":"      type \u003d value[0] \u003d\u003d \u0027{\u0027?\"hash\":\"set\""},{"line_number":13,"context_line":"      value \u003d value[1, value.length - 2]"},{"line_number":14,"context_line":"      value_split \u003d value.split(/,(?\u003d[ ])/)"},{"line_number":15,"context_line":"      if type \u003d\u003d \"hash\" then"},{"line_number":16,"context_line":"        value \u003d {}"},{"line_number":17,"context_line":"        value_split.each do |v|"},{"line_number":18,"context_line":"          k, v \u003d v.strip.split(\"\u003d\")"},{"line_number":19,"context_line":"          value[k] \u003d v"},{"line_number":20,"context_line":"        end"},{"line_number":21,"context_line":"      else"},{"line_number":22,"context_line":"        value \u003d value_split"},{"line_number":23,"context_line":"      end"},{"line_number":24,"context_line":"    else"},{"line_number":25,"context_line":"      type \u003d \"string\""},{"line_number":26,"context_line":"    end"},{"line_number":27,"context_line":"    {"},{"line_number":28,"context_line":"      :type \u003d\u003e type,"},{"line_number":29,"context_line":"      :value \u003d\u003e value"}],"source_content_type":"text/x-ruby","patch_set":6,"id":"fa0719c6_b576773c","line":26,"range":{"start_line":11,"start_character":0,"end_line":26,"end_character":7},"in_reply_to":"1af94dfe_9df59bee","updated":"2016-03-21 06:32:11.000000000","message":"Done","commit_id":"5f3ad41314d130b4f229dee28da034fa0f212624"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"043509e70e21d2363aeda7bd277a3ff8cdccaaca","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    open_vs \u003d vsctl(\"list\", \"Open_vSwitch\", \".\").split(\"\\n\")"},{"line_number":35,"context_line":"    configs \u003d []"},{"line_number":36,"context_line":"    open_vs.each do |line|"},{"line_number":37,"context_line":"      key, value \u003d line.split(/ : /)"},{"line_number":38,"context_line":"      parsed_value \u003d parse_column_value(value.strip)"},{"line_number":39,"context_line":"      if parsed_value[:type] \u003d\u003d \"hash\" then"},{"line_number":40,"context_line":"        parsed_value[:value].each do |k, v|"}],"source_content_type":"text/x-ruby","patch_set":6,"id":"1af94dfe_463d0c8e","line":37,"range":{"start_line":37,"start_character":31,"end_line":37,"end_character":34},"updated":"2016-03-18 14:19:37.000000000","message":"We can simplify that:\n\nkey, value \u003d line.split(\u0027:\u0027).map(\u0026:strip)\n\nvalue.strip in next line is not needed and key.strip on 42 line too.","commit_id":"5f3ad41314d130b4f229dee28da034fa0f212624"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"e040275619d6dbb959ddebd974bfc4710bf04b6e","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    open_vs \u003d vsctl(\"list\", \"Open_vSwitch\", \".\").split(\"\\n\")"},{"line_number":35,"context_line":"    configs \u003d []"},{"line_number":36,"context_line":"    open_vs.each do |line|"},{"line_number":37,"context_line":"      key, value \u003d line.split(/ : /)"},{"line_number":38,"context_line":"      parsed_value \u003d parse_column_value(value.strip)"},{"line_number":39,"context_line":"      if parsed_value[:type] \u003d\u003d \"hash\" then"},{"line_number":40,"context_line":"        parsed_value[:value].each do |k, v|"}],"source_content_type":"text/x-ruby","patch_set":6,"id":"fa0719c6_f58e2f26","line":37,"range":{"start_line":37,"start_character":31,"end_line":37,"end_character":34},"in_reply_to":"1af94dfe_463d0c8e","updated":"2016-03-21 06:32:11.000000000","message":"Done","commit_id":"5f3ad41314d130b4f229dee28da034fa0f212624"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"043509e70e21d2363aeda7bd277a3ff8cdccaaca","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    configs \u003d list_config_entries"},{"line_number":60,"context_line":"    configs.collect do |config|"},{"line_number":61,"context_line":"      new(config)"},{"line_number":62,"context_line":"    end"},{"line_number":63,"context_line":"  end"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"  def self.prefetch(resources)"}],"source_content_type":"text/x-ruby","patch_set":6,"id":"1af94dfe_9814894d","line":62,"updated":"2016-03-18 14:19:37.000000000","message":"fyi, after this method, we must have same format of value, that you provided to provider and that we had from existing data (from instances).\n\nBut you also can use munge method in type, if you want to convert some data (like, from string to array or hash)\n\nAs i see now, your input and output after all parses has different format. You probably don\u0027t get my point, or i was not clear in my explanation.\n\nI suggest you to answer on following question:\n1) what is format of data, which we should compare? (is, should) - just strings or final data, like: arrays, hashes and simpel strings. For last option you need some transformation in type also, you can use munge method.\n2) What is your way of updating value? Flush, setter? Setter is easily to understand btw.\n\nI want to show my vision of working this provider:\n- we have some input data. We must transform it to format, which will be used exactly for creating resources. The same format, we should have from instance method.\n- we have create if it is a new resource + ensure\u003dpresent, destroy if resource exists and ensure\u003dabsent - it\u0027s clear;\n- we also want to update some property. Here you can use flush (as it now), but you should call it only for update. No any other calls. Or. Or you can use\n\ndef value\u003d(value)\n   \u003cbody with updating\u003e\nend\n\nwithout flush method.\n\nI hope, that\u0027s now i clearly explain my ideas. Sorry for being confused. If you have questions you can also use #puppet-openstack channel.","commit_id":"5f3ad41314d130b4f229dee28da034fa0f212624"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"e040275619d6dbb959ddebd974bfc4710bf04b6e","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    configs \u003d list_config_entries"},{"line_number":60,"context_line":"    configs.collect do |config|"},{"line_number":61,"context_line":"      new(config)"},{"line_number":62,"context_line":"    end"},{"line_number":63,"context_line":"  end"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"  def self.prefetch(resources)"}],"source_content_type":"text/x-ruby","patch_set":6,"id":"fa0719c6_55a0bb90","line":62,"in_reply_to":"1af94dfe_9814894d","updated":"2016-03-21 06:32:11.000000000","message":"With the new patch, I modified the value for array type to hold a string value, and used the munge method to return a string value that will be insync while comparing.\nThe value types for \u0027hash\u0027 and \u0027string\u0027 parameters are just \u0027strings\u0027.\nThanks for the clarification.","commit_id":"5f3ad41314d130b4f229dee28da034fa0f212624"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"043509e70e21d2363aeda7bd277a3ff8cdccaaca","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"  def initialize(value)"},{"line_number":74,"context_line":"    super(value)"},{"line_number":75,"context_line":"    @resource_action \u003d \"\""},{"line_number":76,"context_line":"  end"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"  def exists?"}],"source_content_type":"text/x-ruby","patch_set":6,"id":"1af94dfe_3df2879a","line":75,"range":{"start_line":75,"start_character":4,"end_line":75,"end_character":25},"updated":"2016-03-18 14:19:37.000000000","message":"don\u0027t get it, why we need this?","commit_id":"5f3ad41314d130b4f229dee28da034fa0f212624"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"e040275619d6dbb959ddebd974bfc4710bf04b6e","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"  def initialize(value)"},{"line_number":74,"context_line":"    super(value)"},{"line_number":75,"context_line":"    @resource_action \u003d \"\""},{"line_number":76,"context_line":"  end"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"  def exists?"}],"source_content_type":"text/x-ruby","patch_set":6,"id":"fa0719c6_95aa536f","line":75,"range":{"start_line":75,"start_character":4,"end_line":75,"end_character":25},"in_reply_to":"1af94dfe_3df2879a","updated":"2016-03-21 06:32:11.000000000","message":"Done","commit_id":"5f3ad41314d130b4f229dee28da034fa0f212624"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"043509e70e21d2363aeda7bd277a3ff8cdccaaca","unresolved":false,"context_lines":[{"line_number":80,"context_line":"  end"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"  def create"},{"line_number":83,"context_line":"    @resource_action \u003d \"create\""},{"line_number":84,"context_line":"  end"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"  def destroy"}],"source_content_type":"text/x-ruby","patch_set":6,"id":"1af94dfe_18719944","line":83,"updated":"2016-03-18 14:19:37.000000000","message":"just call create method from here","commit_id":"5f3ad41314d130b4f229dee28da034fa0f212624"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"e040275619d6dbb959ddebd974bfc4710bf04b6e","unresolved":false,"context_lines":[{"line_number":80,"context_line":"  end"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"  def create"},{"line_number":83,"context_line":"    @resource_action \u003d \"create\""},{"line_number":84,"context_line":"  end"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"  def destroy"}],"source_content_type":"text/x-ruby","patch_set":6,"id":"fa0719c6_35b0a7dd","line":83,"in_reply_to":"1af94dfe_18719944","updated":"2016-03-21 06:32:11.000000000","message":"Done","commit_id":"5f3ad41314d130b4f229dee28da034fa0f212624"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"043509e70e21d2363aeda7bd277a3ff8cdccaaca","unresolved":false,"context_lines":[{"line_number":84,"context_line":"  end"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"  def destroy"},{"line_number":87,"context_line":"    @resource_action \u003d \"destroy\""},{"line_number":88,"context_line":"  end"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"  def _set"}],"source_content_type":"text/x-ruby","patch_set":6,"id":"1af94dfe_78b9bdcb","line":87,"updated":"2016-03-18 14:19:37.000000000","message":"call destroy (your body of your _clear?)","commit_id":"5f3ad41314d130b4f229dee28da034fa0f212624"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"e040275619d6dbb959ddebd974bfc4710bf04b6e","unresolved":false,"context_lines":[{"line_number":84,"context_line":"  end"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"  def destroy"},{"line_number":87,"context_line":"    @resource_action \u003d \"destroy\""},{"line_number":88,"context_line":"  end"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"  def _set"}],"source_content_type":"text/x-ruby","patch_set":6,"id":"fa0719c6_f5b58fd0","line":87,"in_reply_to":"1af94dfe_78b9bdcb","updated":"2016-03-21 06:32:11.000000000","message":"Done","commit_id":"5f3ad41314d130b4f229dee28da034fa0f212624"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"33a67821a4d9c5e8e42fc13b5d120b9a67d388d5","unresolved":false,"context_lines":[{"line_number":7,"context_line":"  mk_resource_methods"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"  def self.munge_array_value(value)"},{"line_number":10,"context_line":"    \"[#{value[1..-2].split(\u0027,\u0027).map(\u0026:strip).sort.join(\",\")}]\""},{"line_number":11,"context_line":"  end"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"  def self.parse_column_value(value)"}],"source_content_type":"text/x-ruby","patch_set":7,"id":"fa0719c6_9626c866","line":10,"range":{"start_line":10,"start_character":49,"end_line":10,"end_character":61},"updated":"2016-03-21 13:36:53.000000000","message":"not sure that we need here join. Let\u0027s have proper data structure for each :type value.\n\nAlso sort can be applied to array only, because i think this method also can be used for array, see comment below.","commit_id":"c8806ec2e271924391ae993989f7463b203548fc"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"79013fa9febe52faa6cb898fe72c038baf3e20c8","unresolved":false,"context_lines":[{"line_number":7,"context_line":"  mk_resource_methods"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"  def self.munge_array_value(value)"},{"line_number":10,"context_line":"    \"[#{value[1..-2].split(\u0027,\u0027).map(\u0026:strip).sort.join(\",\")}]\""},{"line_number":11,"context_line":"  end"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"  def self.parse_column_value(value)"}],"source_content_type":"text/x-ruby","patch_set":7,"id":"fa0719c6_7664b0e4","line":10,"range":{"start_line":10,"start_character":49,"end_line":10,"end_character":61},"in_reply_to":"fa0719c6_9626c866","updated":"2016-03-22 05:36:09.000000000","message":"This method is used only for the array values. The main objective of this method is to convert the array (that was parsed earlier) to comma separated string after sorting it. This will be the \u0027:value\u0027 of the resource that might contain \u0027set\u0027 data types. \n\u0027munge\u0027 method in vs_config.type converts the \u0027should\u0027 value in this same format, so \u0027set\u0027 data comparison of \u0027is\u0027 and \u0027should\u0027 value can be done easily.","commit_id":"c8806ec2e271924391ae993989f7463b203548fc"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"33a67821a4d9c5e8e42fc13b5d120b9a67d388d5","unresolved":false,"context_lines":[{"line_number":16,"context_line":"      # hash case, like {system-id\u003d\\\"some-id\\\", name\u003d\\\"some-name\\\"}"},{"line_number":17,"context_line":"      type \u003d \u0027hash\u0027"},{"line_number":18,"context_line":"      res \u003d {}"},{"line_number":19,"context_line":"      value[1..-2].gsub(\u0027\"\u0027,\u0027\u0027).split(\u0027, \u0027).map(\u0026:strip).each do |v|"},{"line_number":20,"context_line":"        k,val \u003d v.split(\"\u003d\")"},{"line_number":21,"context_line":"        res[k] \u003d val"},{"line_number":22,"context_line":"      end"}],"source_content_type":"text/x-ruby","patch_set":7,"id":"fa0719c6_543b8beb","line":19,"range":{"start_line":19,"start_character":6,"end_line":19,"end_character":56},"updated":"2016-03-21 13:36:53.000000000","message":"i think you can pass it to munge_array_value:\n\nmunge_array_value(value.gsub(\u0027\"\u0027,\u0027\u0027))","commit_id":"c8806ec2e271924391ae993989f7463b203548fc"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"79013fa9febe52faa6cb898fe72c038baf3e20c8","unresolved":false,"context_lines":[{"line_number":16,"context_line":"      # hash case, like {system-id\u003d\\\"some-id\\\", name\u003d\\\"some-name\\\"}"},{"line_number":17,"context_line":"      type \u003d \u0027hash\u0027"},{"line_number":18,"context_line":"      res \u003d {}"},{"line_number":19,"context_line":"      value[1..-2].gsub(\u0027\"\u0027,\u0027\u0027).split(\u0027, \u0027).map(\u0026:strip).each do |v|"},{"line_number":20,"context_line":"        k,val \u003d v.split(\"\u003d\")"},{"line_number":21,"context_line":"        res[k] \u003d val"},{"line_number":22,"context_line":"      end"}],"source_content_type":"text/x-ruby","patch_set":7,"id":"fa0719c6_76ab10d7","line":19,"range":{"start_line":19,"start_character":6,"end_line":19,"end_character":56},"in_reply_to":"fa0719c6_543b8beb","updated":"2016-03-22 05:36:09.000000000","message":"munge_array_value is only for \u0027set\u0027 data types","commit_id":"c8806ec2e271924391ae993989f7463b203548fc"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"33a67821a4d9c5e8e42fc13b5d120b9a67d388d5","unresolved":false,"context_lines":[{"line_number":85,"context_line":"  end"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"  def create"},{"line_number":88,"context_line":"    _set"},{"line_number":89,"context_line":"  end"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"  def destroy"}],"source_content_type":"text/x-ruby","patch_set":7,"id":"fa0719c6_74f5ef81","line":88,"range":{"start_line":88,"start_character":4,"end_line":88,"end_character":8},"updated":"2016-03-21 13:36:53.000000000","message":"What\u0027s about \u0027add\u0027 command?\n\ni think we need use here \u0027add\u0027, because we are creating a new column, don\u0027t we?\n\nIf so, then no need to create _set method, the body of _set method can be placed to setter of value.","commit_id":"c8806ec2e271924391ae993989f7463b203548fc"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"79013fa9febe52faa6cb898fe72c038baf3e20c8","unresolved":false,"context_lines":[{"line_number":85,"context_line":"  end"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"  def create"},{"line_number":88,"context_line":"    _set"},{"line_number":89,"context_line":"  end"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"  def destroy"}],"source_content_type":"text/x-ruby","patch_set":7,"id":"fa0719c6_8b403da7","line":88,"range":{"start_line":88,"start_character":4,"end_line":88,"end_character":8},"in_reply_to":"fa0719c6_74f5ef81","updated":"2016-03-22 05:36:09.000000000","message":"The openvswitch default configuration table has fixed set of columns. We are just manipulating those columns.","commit_id":"c8806ec2e271924391ae993989f7463b203548fc"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"33a67821a4d9c5e8e42fc13b5d120b9a67d388d5","unresolved":false,"context_lines":[{"line_number":89,"context_line":"  end"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"  def destroy"},{"line_number":92,"context_line":"    _clear"},{"line_number":93,"context_line":"  end"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"  def _set"}],"source_content_type":"text/x-ruby","patch_set":7,"id":"fa0719c6_f4be1fd3","line":92,"range":{"start_line":92,"start_character":4,"end_line":92,"end_character":10},"updated":"2016-03-21 13:36:53.000000000","message":"body of _clear method should be placed under destroy, there is no reason to spawn _clear method calling.","commit_id":"c8806ec2e271924391ae993989f7463b203548fc"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"79013fa9febe52faa6cb898fe72c038baf3e20c8","unresolved":false,"context_lines":[{"line_number":89,"context_line":"  end"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"  def destroy"},{"line_number":92,"context_line":"    _clear"},{"line_number":93,"context_line":"  end"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"  def _set"}],"source_content_type":"text/x-ruby","patch_set":7,"id":"fa0719c6_ab4541b4","line":92,"range":{"start_line":92,"start_character":4,"end_line":92,"end_character":10},"in_reply_to":"fa0719c6_f4be1fd3","updated":"2016-03-22 05:36:09.000000000","message":"Sure","commit_id":"c8806ec2e271924391ae993989f7463b203548fc"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"33a67821a4d9c5e8e42fc13b5d120b9a67d388d5","unresolved":false,"context_lines":[{"line_number":93,"context_line":"  end"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"  def _set"},{"line_number":96,"context_line":"    vsctl(\"set\", \"Open_vSwitch\", \".\", \"#{@resource[:name]}\u003d#{@resource[:value]}\")"},{"line_number":97,"context_line":"  end"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"  def _clear"}],"source_content_type":"text/x-ruby","patch_set":7,"id":"fa0719c6_343a5737","line":96,"range":{"start_line":96,"start_character":34,"end_line":96,"end_character":35},"updated":"2016-03-21 13:36:53.000000000","message":"Just to clarify this moment, we always working with default record \u0027.\u0027, right?","commit_id":"c8806ec2e271924391ae993989f7463b203548fc"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"79013fa9febe52faa6cb898fe72c038baf3e20c8","unresolved":false,"context_lines":[{"line_number":93,"context_line":"  end"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"  def _set"},{"line_number":96,"context_line":"    vsctl(\"set\", \"Open_vSwitch\", \".\", \"#{@resource[:name]}\u003d#{@resource[:value]}\")"},{"line_number":97,"context_line":"  end"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"  def _clear"}],"source_content_type":"text/x-ruby","patch_set":7,"id":"fa0719c6_0b138db9","line":96,"range":{"start_line":96,"start_character":34,"end_line":96,"end_character":35},"in_reply_to":"fa0719c6_343a5737","updated":"2016-03-22 05:36:09.000000000","message":"Yes. This is the only record on OPenvSwitch table.","commit_id":"c8806ec2e271924391ae993989f7463b203548fc"}],"lib/puppet/type/vs_config.rb":[{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"fbc6739509897421407fc44708ed184a41b9cee6","unresolved":false,"context_lines":[{"line_number":15,"context_line":"    end"},{"line_number":16,"context_line":"  end"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"  newparam(:value) do"},{"line_number":19,"context_line":"    desc \u0027Configuration value for the paramter\u0027"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    validate do |value|"}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_e6dc8b14","line":18,"range":{"start_line":18,"start_character":2,"end_line":18,"end_character":10},"updated":"2016-03-16 15:12:27.000000000","message":"i think it\u0027s better to use property here.\n\nBecause a property is something that can be inspected and changed by Puppet, while a parameter is just helper data that Puppet uses to do its job.","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"f87ed778911ae1fc32290754af3655e195a2b5ba","unresolved":false,"context_lines":[{"line_number":15,"context_line":"    end"},{"line_number":16,"context_line":"  end"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"  newparam(:value) do"},{"line_number":19,"context_line":"    desc \u0027Configuration value for the paramter\u0027"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    validate do |value|"}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_dc164ef0","line":18,"range":{"start_line":18,"start_character":2,"end_line":18,"end_character":10},"in_reply_to":"1af94dfe_b20d7892","updated":"2016-03-17 10:48:12.000000000","message":"Again. newparam is usually used for helping provider do his job, like auth_url for creating user in keystone. Auth_url for provider, which creates user - is param.\n\nFor this case, it should be property exactly. Because provider is managing some resource by this value.\n\n+ for example below: if you want to create user, you need to pass auth creds - that\u0027s params - and then you need pass name of user, tenant and etc - that\u0027s property (in puppet terms)","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"c0ede25e42aba3c325aea57dae7a788dd2454f15","unresolved":false,"context_lines":[{"line_number":15,"context_line":"    end"},{"line_number":16,"context_line":"  end"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"  newparam(:value) do"},{"line_number":19,"context_line":"    desc \u0027Configuration value for the paramter\u0027"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    validate do |value|"}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_b20d7892","line":18,"range":{"start_line":18,"start_character":2,"end_line":18,"end_character":10},"in_reply_to":"1af94dfe_e6dc8b14","updated":"2016-03-17 06:15:19.000000000","message":"I thought a parameter is more suited for this, as this value just needs to be known to the provider.\nI am sorry if, what I say doesn\u0027t make sense, I am new to puppet/ruby :)","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"043509e70e21d2363aeda7bd277a3ff8cdccaaca","unresolved":false,"context_lines":[{"line_number":18,"context_line":"  newproperty(:value) do"},{"line_number":19,"context_line":"    desc \u0027Configuration value for the paramter\u0027"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    def insync?(is)"},{"line_number":22,"context_line":"      is \u003d\u003d should || is \u003d\u003d \"\\\"#{should}\\\"\""},{"line_number":23,"context_line":"    end"},{"line_number":24,"context_line":"    validate do |value|"},{"line_number":25,"context_line":"      if !value.is_a?(String)"},{"line_number":26,"context_line":"        raise ArgumentError, \"Invalid external_ids #{value}. Requires a String, not a #{value.class}\""}],"source_content_type":"text/x-ruby","patch_set":6,"id":"1af94dfe_66ec882a","line":23,"range":{"start_line":21,"start_character":4,"end_line":23,"end_character":7},"updated":"2016-03-18 14:19:37.000000000","message":"well, the main purpose of this method is to check structured data types. We can have here simple strings. So:\n1) we should remove this method;\n2) improve this method, by adding some checks like do we have array or hash as input and then compare \u0027is\u0027-\u0027should\u0027 values.","commit_id":"5f3ad41314d130b4f229dee28da034fa0f212624"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"e040275619d6dbb959ddebd974bfc4710bf04b6e","unresolved":false,"context_lines":[{"line_number":18,"context_line":"  newproperty(:value) do"},{"line_number":19,"context_line":"    desc \u0027Configuration value for the paramter\u0027"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    def insync?(is)"},{"line_number":22,"context_line":"      is \u003d\u003d should || is \u003d\u003d \"\\\"#{should}\\\"\""},{"line_number":23,"context_line":"    end"},{"line_number":24,"context_line":"    validate do |value|"},{"line_number":25,"context_line":"      if !value.is_a?(String)"},{"line_number":26,"context_line":"        raise ArgumentError, \"Invalid external_ids #{value}. Requires a String, not a #{value.class}\""}],"source_content_type":"text/x-ruby","patch_set":6,"id":"fa0719c6_d5e16bd2","line":23,"range":{"start_line":21,"start_character":4,"end_line":23,"end_character":7},"in_reply_to":"1af94dfe_66ec882a","updated":"2016-03-21 06:32:11.000000000","message":"Done","commit_id":"5f3ad41314d130b4f229dee28da034fa0f212624"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"33a67821a4d9c5e8e42fc13b5d120b9a67d388d5","unresolved":false,"context_lines":[{"line_number":24,"context_line":"      end"},{"line_number":25,"context_line":"    end"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    munge do |value|"},{"line_number":28,"context_line":"      if value[0] \u003d\u003d \u0027[\u0027 \u0026\u0026 value[-1] \u003d\u003d \u0027]\u0027"},{"line_number":29,"context_line":"        \"[#{value[1..-2].split(\u0027,\u0027).map(\u0026:strip).sort.join(\",\")}]\""},{"line_number":30,"context_line":"      else"}],"source_content_type":"text/x-ruby","patch_set":7,"id":"fa0719c6_760e9435","line":27,"updated":"2016-03-21 13:36:53.000000000","message":"let\u0027s have this proper data structure, see my first comment in provider. That\u0027s because you should have same data from instances method and from type properties.","commit_id":"c8806ec2e271924391ae993989f7463b203548fc"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"79013fa9febe52faa6cb898fe72c038baf3e20c8","unresolved":false,"context_lines":[{"line_number":24,"context_line":"      end"},{"line_number":25,"context_line":"    end"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    munge do |value|"},{"line_number":28,"context_line":"      if value[0] \u003d\u003d \u0027[\u0027 \u0026\u0026 value[-1] \u003d\u003d \u0027]\u0027"},{"line_number":29,"context_line":"        \"[#{value[1..-2].split(\u0027,\u0027).map(\u0026:strip).sort.join(\",\")}]\""},{"line_number":30,"context_line":"      else"}],"source_content_type":"text/x-ruby","patch_set":7,"id":"fa0719c6_f6ec402b","line":27,"in_reply_to":"fa0719c6_760e9435","updated":"2016-03-22 05:36:09.000000000","message":"This is infact in place to have the same data structure for \u0027is\u0027 and \u0027should\u0027 values. \nFor data types other than \u0027set\u0027 it is just \u0027is\u0027 and \u0027should\u0027 are just string values.\nNow for \u0027set\u0027 the \u0027should\u0027 value given by the user will be a string (please see the updated README.md) like \u0027[4, 5, 1, 3]\u0027. So with this method, the \u0027should\u0027 value will be munged to \u0027[1,3,4,5]\u0027. \nThe \u0027is\u0027 value given by the provider will also be munged like this.","commit_id":"c8806ec2e271924391ae993989f7463b203548fc"}],"spec/acceptance/basic_vswitch_spec.rb":[{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"fbc6739509897421407fc44708ed184a41b9cee6","unresolved":false,"context_lines":[{"line_number":18,"context_line":"      vs_config { \u0027external_ids:ovn-remote\u0027:"},{"line_number":19,"context_line":"        ensure \u003d\u003e present,"},{"line_number":20,"context_line":"        value \u003d\u003e \u0027tcp:127.0.0.1:2300\u0027,"},{"line_number":21,"context_line":"      }"},{"line_number":22,"context_line":"      EOS"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_862147b7","line":21,"updated":"2016-03-16 15:12:27.000000000","message":"that\u0027s nice, but also will be nice if you will add unit tests for your type/provider - that\u0027s really can help understand how works your code without real deployment.","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"},{"author":{"_account_id":8298,"name":"Babu Shanmugam","email":"bschanmu@redhat.com","username":"anbu"},"change_message_id":"c0ede25e42aba3c325aea57dae7a788dd2454f15","unresolved":false,"context_lines":[{"line_number":18,"context_line":"      vs_config { \u0027external_ids:ovn-remote\u0027:"},{"line_number":19,"context_line":"        ensure \u003d\u003e present,"},{"line_number":20,"context_line":"        value \u003d\u003e \u0027tcp:127.0.0.1:2300\u0027,"},{"line_number":21,"context_line":"      }"},{"line_number":22,"context_line":"      EOS"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""}],"source_content_type":"text/x-ruby","patch_set":5,"id":"1af94dfe_12f9cc4d","line":21,"in_reply_to":"1af94dfe_862147b7","updated":"2016-03-17 06:15:19.000000000","message":"Sure. Thanks","commit_id":"6a386ac518003fcad533bfe75a7efe4150bf582e"}]}
