)]}'
{"manifests/host/sriov.pp":[{"author":{"_account_id":6681,"name":"Brent Eagles","email":"beagles@redhat.com","username":"beagles"},"change_message_id":"aedfa72d1e6b86cf4458d3a88c5170f451703e5c","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#   it as [\u0027eth1:4\u0027,\u0027eth2:10\u0027]"},{"line_number":12,"context_line":"#   Defaults to $::os_service_default."},{"line_number":13,"context_line":"#"},{"line_number":14,"context_line":"class tripleo::host::sriov ("},{"line_number":15,"context_line":"  $number_of_vfs              \u003d $::os_service_default,"},{"line_number":16,"context_line":") {"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-puppet","patch_set":1,"id":"fa7ab95a_206e8601","line":14,"updated":"2016-08-26 19:36:00.000000000","message":"I was wondering why not put in networks.. but I think this is the right choice since it is a host configuration thing.","commit_id":"34c9c52f30ec263f2069195d68b2d4ca513be72e"},{"author":{"_account_id":6681,"name":"Brent Eagles","email":"beagles@redhat.com","username":"beagles"},"change_message_id":"aedfa72d1e6b86cf4458d3a88c5170f451703e5c","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"  if !is_service_default($number_of_vfs) and !empty($number_of_vfs) {"},{"line_number":19,"context_line":"    sriov_vf_config { $number_of_vfs: ensure \u003d\u003e present }"},{"line_number":20,"context_line":"  }"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"}"}],"source_content_type":"text/x-puppet","patch_set":1,"id":"fa7ab95a_4fb815e6","line":20,"updated":"2016-08-26 19:36:00.000000000","message":"I hate to be the one to bring this up... but now that this is in a proper context, I find myself wondering if we shouldn\u0027t remove the persistent stuff from the provider and implement it in terms of puppet (leaving the initial configuration there of course). It would facilitate making it more configurable and, I think, make it more maintainable. A cobbled example (this is probably the height of bad form using a paste site for snippets):\n\nhttp://paste.openstack.org/show/564049/","commit_id":"34c9c52f30ec263f2069195d68b2d4ca513be72e"},{"author":{"_account_id":18904,"name":"Karthik S","email":"ksundara@redhat.com","username":"karthiks"},"change_message_id":"5fe21cea964651d6411e926b8a2f4b9d2a23a9db","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"  if !is_service_default($number_of_vfs) and !empty($number_of_vfs) {"},{"line_number":19,"context_line":"    sriov_vf_config { $number_of_vfs: ensure \u003d\u003e present }"},{"line_number":20,"context_line":"  }"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"}"}],"source_content_type":"text/x-puppet","patch_set":1,"id":"fa7ab95a_a347e749","line":20,"in_reply_to":"fa7ab95a_4fb815e6","updated":"2016-08-27 12:55:56.000000000","message":"Brent, As far as I see , functions for iterating like \u0027reduce\u0027, \u0027each\u0027 are available from versions 4.0.0.  But i find the overcloud images have 3.6.2. I think, if we have to do the iteration in puppet, then we may have to write another puppet file. something like https://github.com/openstack/puppet-neutron/blob/master/manifests/plugins/ml2/mech_driver.pp#L26. Please let me know your thoughts on this.","commit_id":"34c9c52f30ec263f2069195d68b2d4ca513be72e"},{"author":{"_account_id":6681,"name":"Brent Eagles","email":"beagles@redhat.com","username":"beagles"},"change_message_id":"67b1322f626b4103e1eae76e78cb7fb90036120e","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    # the numvfs configuration needs to be persisted for every boot"},{"line_number":22,"context_line":"    tripleo::host::sriov::numvfs_persistence {\u0027persistent_numvfs\u0027:"},{"line_number":23,"context_line":"      vf_defs        \u003d\u003e $number_of_vfs,"},{"line_number":24,"context_line":"      current_string \u003d\u003e \"#!/bin/bash\\n\""},{"line_number":25,"context_line":"    }"},{"line_number":26,"context_line":"  }"},{"line_number":27,"context_line":"}"}],"source_content_type":"text/x-puppet","patch_set":6,"id":"fa7ab95a_fc9de666","line":24,"updated":"2016-08-29 12:55:03.000000000","message":"Nit: I know where the name \u0027current_string\u0027 came from, but something like \"prefix\" or something might be better.","commit_id":"90a3c954ea537e69035bdabb6990e10eca021a90"},{"author":{"_account_id":18904,"name":"Karthik S","email":"ksundara@redhat.com","username":"karthiks"},"change_message_id":"4c3eecd30f7ce0c4300cc68b11d6bd319aacfc13","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    # the numvfs configuration needs to be persisted for every boot"},{"line_number":22,"context_line":"    tripleo::host::sriov::numvfs_persistence {\u0027persistent_numvfs\u0027:"},{"line_number":23,"context_line":"      vf_defs        \u003d\u003e $number_of_vfs,"},{"line_number":24,"context_line":"      current_string \u003d\u003e \"#!/bin/bash\\n\""},{"line_number":25,"context_line":"    }"},{"line_number":26,"context_line":"  }"},{"line_number":27,"context_line":"}"}],"source_content_type":"text/x-puppet","patch_set":6,"id":"fa7ab95a_528f9929","line":24,"in_reply_to":"fa7ab95a_fc9de666","updated":"2016-08-29 13:35:49.000000000","message":"Done","commit_id":"90a3c954ea537e69035bdabb6990e10eca021a90"}],"manifests/host/sriov/numvfs_persistence.pp":[{"author":{"_account_id":6681,"name":"Brent Eagles","email":"beagles@redhat.com","username":"beagles"},"change_message_id":"67b1322f626b4103e1eae76e78cb7fb90036120e","unresolved":false,"context_lines":[{"line_number":14,"context_line":"  $vf_defs,"},{"line_number":15,"context_line":"  $current_string"},{"line_number":16,"context_line":"){"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"    include ::stdlib"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"    if empty($vf_defs) {"}],"source_content_type":"text/x-puppet","patch_set":6,"id":"fa7ab95a_6f8116c3","line":17,"updated":"2016-08-29 12:55:03.000000000","message":"Please include some description of what is happening with this resource - ie. using recursion for iteration, etc.","commit_id":"90a3c954ea537e69035bdabb6990e10eca021a90"},{"author":{"_account_id":18904,"name":"Karthik S","email":"ksundara@redhat.com","username":"karthiks"},"change_message_id":"4c3eecd30f7ce0c4300cc68b11d6bd319aacfc13","unresolved":false,"context_lines":[{"line_number":14,"context_line":"  $vf_defs,"},{"line_number":15,"context_line":"  $current_string"},{"line_number":16,"context_line":"){"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"    include ::stdlib"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"    if empty($vf_defs) {"}],"source_content_type":"text/x-puppet","patch_set":6,"id":"fa7ab95a_2d19d679","line":17,"in_reply_to":"fa7ab95a_6f8116c3","updated":"2016-08-29 13:35:49.000000000","message":"Done","commit_id":"90a3c954ea537e69035bdabb6990e10eca021a90"},{"author":{"_account_id":6681,"name":"Brent Eagles","email":"beagles@redhat.com","username":"beagles"},"change_message_id":"67b1322f626b4103e1eae76e78cb7fb90036120e","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        mode         \u003d\u003e \u00270755\u0027,"},{"line_number":32,"context_line":"        owner        \u003d\u003e \u0027root\u0027,"},{"line_number":33,"context_line":"        content      \u003d\u003e \u0027#!/bin/bash\u0027,"},{"line_number":34,"context_line":"        validate_cmd \u003d\u003e \u0027ls %\u0027,"},{"line_number":35,"context_line":"      }"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"      file_line { \u0027call_ifup-local\u0027:"}],"source_content_type":"text/x-puppet","patch_set":6,"id":"fa7ab95a_2fb8eec7","line":34,"updated":"2016-08-29 12:55:03.000000000","message":"I got this wrong in the sample code. The intent is only to initialize the file if it does not exist, so this line should be replaced with \u0027replace \u003d\u003e false\u0027","commit_id":"90a3c954ea537e69035bdabb6990e10eca021a90"},{"author":{"_account_id":18904,"name":"Karthik S","email":"ksundara@redhat.com","username":"karthiks"},"change_message_id":"4c3eecd30f7ce0c4300cc68b11d6bd319aacfc13","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        mode         \u003d\u003e \u00270755\u0027,"},{"line_number":32,"context_line":"        owner        \u003d\u003e \u0027root\u0027,"},{"line_number":33,"context_line":"        content      \u003d\u003e \u0027#!/bin/bash\u0027,"},{"line_number":34,"context_line":"        validate_cmd \u003d\u003e \u0027ls %\u0027,"},{"line_number":35,"context_line":"      }"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"      file_line { \u0027call_ifup-local\u0027:"}],"source_content_type":"text/x-puppet","patch_set":6,"id":"fa7ab95a_8dfca273","line":34,"in_reply_to":"fa7ab95a_2fb8eec7","updated":"2016-08-29 13:35:49.000000000","message":"Done","commit_id":"90a3c954ea537e69035bdabb6990e10eca021a90"},{"author":{"_account_id":6681,"name":"Brent Eagles","email":"beagles@redhat.com","username":"beagles"},"change_message_id":"67b1322f626b4103e1eae76e78cb7fb90036120e","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"      file_line { \u0027call_ifup-local\u0027:"},{"line_number":38,"context_line":"        path    \u003d\u003e \u0027/sbin/ifup-local\u0027,"},{"line_number":39,"context_line":"        line    \u003d\u003e \u0027source /etc/sysconfig/allocate_vfs $1\u0027,"},{"line_number":40,"context_line":"        require \u003d\u003e File[\u0027/sbin/ifup-local\u0027],"},{"line_number":41,"context_line":"      }"},{"line_number":42,"context_line":"    } else {"}],"source_content_type":"text/x-puppet","patch_set":6,"id":"fa7ab95a_0f024a0b","line":39,"updated":"2016-08-29 12:55:03.000000000","message":"It shouldn\u0027t be source, it\u0027s an execution. You should just be able to run it, ie. /etc/sysconfig/allocate_vfs","commit_id":"90a3c954ea537e69035bdabb6990e10eca021a90"},{"author":{"_account_id":18904,"name":"Karthik S","email":"ksundara@redhat.com","username":"karthiks"},"change_message_id":"4c3eecd30f7ce0c4300cc68b11d6bd319aacfc13","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"      file_line { \u0027call_ifup-local\u0027:"},{"line_number":38,"context_line":"        path    \u003d\u003e \u0027/sbin/ifup-local\u0027,"},{"line_number":39,"context_line":"        line    \u003d\u003e \u0027source /etc/sysconfig/allocate_vfs $1\u0027,"},{"line_number":40,"context_line":"        require \u003d\u003e File[\u0027/sbin/ifup-local\u0027],"},{"line_number":41,"context_line":"      }"},{"line_number":42,"context_line":"    } else {"}],"source_content_type":"text/x-puppet","patch_set":6,"id":"fa7ab95a_e8399cd8","line":39,"in_reply_to":"fa7ab95a_0f024a0b","updated":"2016-08-29 13:35:49.000000000","message":"Done","commit_id":"90a3c954ea537e69035bdabb6990e10eca021a90"},{"author":{"_account_id":6681,"name":"Brent Eagles","email":"beagles@redhat.com","username":"beagles"},"change_message_id":"ed56ee051a1b2bf53f7993d02d739a6e2f8b0f8a","unresolved":false,"context_lines":[{"line_number":14,"context_line":"  $vf_defs,"},{"line_number":15,"context_line":"  $content_string"},{"line_number":16,"context_line":"){"},{"line_number":17,"context_line":"    # Since reduce isn\u0027t available, we use recursion to iterate each entries of"},{"line_number":18,"context_line":"    # \"physical_interface:vfs\" and accumulate the content that needs to be"},{"line_number":19,"context_line":"    # written to the script file."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-puppet","patch_set":8,"id":"fa7ab95a_de4ad225","line":17,"updated":"2016-08-29 14:00:29.000000000","message":"Unless my eyes deceive, you are overindenting by two spaces. I think running \u0027bundle exec rake lint\u0027 and \u0027bundle exec rake syntax\u0027 before submitting might catch this.","commit_id":"77d55492b31b710bb7f6cb36f6f091f8e6b2d11f"},{"author":{"_account_id":6681,"name":"Brent Eagles","email":"beagles@redhat.com","username":"beagles"},"change_message_id":"ed56ee051a1b2bf53f7993d02d739a6e2f8b0f8a","unresolved":false,"context_lines":[{"line_number":50,"context_line":"      tripleo::host::sriov::numvfs_persistence{\"mapped ${interface}\":"},{"line_number":51,"context_line":"      vf_defs        \u003d\u003e delete_at($vf_defs, 0),"},{"line_number":52,"context_line":"      content_string \u003d\u003e $vfdef_str"},{"line_number":53,"context_line":"    }"},{"line_number":54,"context_line":"  }"},{"line_number":55,"context_line":"}"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-puppet","patch_set":8,"id":"fa7ab95a_def812c6","line":53,"updated":"2016-08-29 14:00:29.000000000","message":"Your indentation is off here as well, 51-53 should be indented relative to 50.","commit_id":"77d55492b31b710bb7f6cb36f6f091f8e6b2d11f"}],"spec/defines/tripleo_host_sriov_numvfs_persistence_spec.rb":[{"author":{"_account_id":6681,"name":"Brent Eagles","email":"beagles@redhat.com","username":"beagles"},"change_message_id":"ed56ee051a1b2bf53f7993d02d739a6e2f8b0f8a","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        :line \u003d\u003e \u0027/etc/sysconfig/allocate_vfs $1\u0027,"},{"line_number":37,"context_line":"      )"},{"line_number":38,"context_line":"    end"},{"line_number":39,"context_line":"  end"},{"line_number":40,"context_line":"end"}],"source_content_type":"text/x-ruby","patch_set":8,"id":"fa7ab95a_7ee546da","line":39,"updated":"2016-08-29 14:00:29.000000000","message":"Testing not overwriting the existing ifup-local would be good. I know this is targeted at tripleo and we don\u0027t have anything else (I think) that is using that file, but we have to allow for the possibility that someone might have custom images or configs that do something with that file.","commit_id":"77d55492b31b710bb7f6cb36f6f091f8e6b2d11f"},{"author":{"_account_id":6681,"name":"Brent Eagles","email":"beagles@redhat.com","username":"beagles"},"change_message_id":"38743ccfef3e9c4dc33144ec6f301635d297f8e1","unresolved":false,"context_lines":[{"line_number":19,"context_line":"    it \u0027configures persistence\u0027 do"},{"line_number":20,"context_line":"      is_expected.to contain_file(\u0027/etc/sysconfig/allocate_vfs\u0027).with("},{"line_number":21,"context_line":"        :ensure  \u003d\u003e \u0027file\u0027,"},{"line_number":22,"context_line":"        :content \u003d\u003e \"Hashbang\\n[ \\\"eth0\\\" \u003d\u003d \\\"\\$1\\\" ] \u0026\u0026 echo 10 \u003e /sys/class/net/eth0/device/sriov_numvfs\\n[ \\\"eth1\\\" \u003d\u003d \\\"\\$1\\\" ] \u0026\u0026 echo 8 \u003e /sys/class/net/eth1/device/sriov_numvfs\\n\","},{"line_number":23,"context_line":"        :group   \u003d\u003e \u0027root\u0027,"},{"line_number":24,"context_line":"        :mode    \u003d\u003e \u00270755\u0027,"},{"line_number":25,"context_line":"        :owner   \u003d\u003e \u0027root\u0027,"}],"source_content_type":"text/x-ruby","patch_set":9,"id":"fa7ab95a_293383f7","line":22,"updated":"2016-08-29 15:12:23.000000000","message":"A style/nit: you can use the equivalent of \u0027here\u0027 documents in ruby for this kind of thing.  You can see examples of this in the functional tests for puppet-neutron (as well as a lot of other places). It would make the test easier to read and maintain. Something to think about in the future anyways.","commit_id":"eec3bba44b5a7e09dba4d427bd0d3d71a4956a7a"}]}
