)]}'
{"manifests/profile/base/neutron/plugins/ml2/opendaylight.pp":[{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"a92043ccb4b45c7459d9d00b32ab7b5c4ddc0dbc","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    class { \u0027::neutron::plugins::ml2::opendaylight\u0027:"},{"line_number":51,"context_line":"      odl_username  \u003d\u003e hiera(\u0027opendaylight::username\u0027),"},{"line_number":52,"context_line":"      odl_password  \u003d\u003e hiera(\u0027opendaylight::password\u0027),"},{"line_number":53,"context_line":"      odl_url       \u003d\u003e \"${conn_proto}://${odl_url_ip}:${odl_port}/controller/nb/v2/neutron\";"},{"line_number":54,"context_line":"    }"},{"line_number":55,"context_line":"  }"}],"source_content_type":"text/x-puppet","patch_set":1,"id":"fa6399be_eb8804c9","line":52,"updated":"2016-10-18 16:28:24.000000000","message":"Please put odl_username and odl_password as paramters to this class. It\u0027ll help in testing this at later date.  I\u0027m working on writing rspec tests for the profiles and it\u0027s much easier to test this if the hiera calls are in parameters","commit_id":"043b5f7e34234017a2c0dbd9fb48c1dbd4b713e4"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"c7fe36690e0018b5e68e3e54aee82ba341363a74","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    class { \u0027::neutron::plugins::ml2::opendaylight\u0027:"},{"line_number":51,"context_line":"      odl_username  \u003d\u003e hiera(\u0027opendaylight::username\u0027),"},{"line_number":52,"context_line":"      odl_password  \u003d\u003e hiera(\u0027opendaylight::password\u0027),"},{"line_number":53,"context_line":"      odl_url       \u003d\u003e \"${conn_proto}://${odl_url_ip}:${odl_port}/controller/nb/v2/neutron\";"},{"line_number":54,"context_line":"    }"},{"line_number":55,"context_line":"  }"}],"source_content_type":"text/x-puppet","patch_set":1,"id":"fa6399be_c1ba3f6e","line":52,"in_reply_to":"fa6399be_6125f3ac","updated":"2016-10-18 17:19:23.000000000","message":"Unfortunately puppet-tripleo severely lacks proper unit testings and as I started to write it, I uncovered these hiera calls sprinkled through the code. This makes it very hard to properly test things.  For these types of calls and as a general puppet best practice to make these parameters to the class and not rely on hiera just in the code itself.  This gets into one of those grey areas because technically in hiera, the better practice would be to specifically write out the parameter and use the automatic databinding rather than the hiera lookup in puppet. You can read a bit more of this in the Why section of https://docs.puppet.com/hiera/3.2/puppet.html#automatic-parameter-lookup\n\nPersonally, it\u0027s better to keep the separation of this logic at the parameter level than within the classes themselves. This also allows for better reuse of the existing puppet code so that there is not a hard dependency on specific hiera values (and their existance).   I\u0027m not asking that you update the templates to generate tripleo::profile::base::neutron::plugins::ml2::opendaylight::odl_username: \u0027user\u0027 in THT, I\u0027m asking that you add a $odl_username \u003d hiera(\u0027opendaylight::username\u0027) and $odl_password \u003d hiera(\u0027opendaylight::password\u0027) to the profile class and then just use those. If we don\u0027t generate these, then it might also make sense to add a sensible default should those hieradata items not exist.","commit_id":"043b5f7e34234017a2c0dbd9fb48c1dbd4b713e4"},{"author":{"_account_id":17280,"name":"Tim Rozet","email":"trozet@redhat.com","username":"trozet"},"change_message_id":"6ce6c8b4c869de37ff5127264ea8a7264b4e0c92","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    class { \u0027::neutron::plugins::ml2::opendaylight\u0027:"},{"line_number":51,"context_line":"      odl_username  \u003d\u003e hiera(\u0027opendaylight::username\u0027),"},{"line_number":52,"context_line":"      odl_password  \u003d\u003e hiera(\u0027opendaylight::password\u0027),"},{"line_number":53,"context_line":"      odl_url       \u003d\u003e \"${conn_proto}://${odl_url_ip}:${odl_port}/controller/nb/v2/neutron\";"},{"line_number":54,"context_line":"    }"},{"line_number":55,"context_line":"  }"}],"source_content_type":"text/x-puppet","patch_set":1,"id":"fa6399be_e2173e52","line":52,"in_reply_to":"fa6399be_c1ba3f6e","updated":"2016-10-18 20:00:16.000000000","message":"Makes sense.  So then I should have a follow up patch to clean up anywhere hiera calls are not parameterized to the class.  Correct?","commit_id":"043b5f7e34234017a2c0dbd9fb48c1dbd4b713e4"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"9a4f157c005d8baeaada2c550d5497684e435d08","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    class { \u0027::neutron::plugins::ml2::opendaylight\u0027:"},{"line_number":51,"context_line":"      odl_username  \u003d\u003e hiera(\u0027opendaylight::username\u0027),"},{"line_number":52,"context_line":"      odl_password  \u003d\u003e hiera(\u0027opendaylight::password\u0027),"},{"line_number":53,"context_line":"      odl_url       \u003d\u003e \"${conn_proto}://${odl_url_ip}:${odl_port}/controller/nb/v2/neutron\";"},{"line_number":54,"context_line":"    }"},{"line_number":55,"context_line":"  }"}],"source_content_type":"text/x-puppet","patch_set":1,"id":"fa6399be_a5e7103f","line":52,"in_reply_to":"fa6399be_e2173e52","updated":"2016-10-18 20:07:44.000000000","message":"Ideally, yes. At the moment I\u0027m just trying to get people not to add more hiera calls in the middle of classes and push for using hiera(...) as the default value for parameters.","commit_id":"043b5f7e34234017a2c0dbd9fb48c1dbd4b713e4"},{"author":{"_account_id":17280,"name":"Tim Rozet","email":"trozet@redhat.com","username":"trozet"},"change_message_id":"c30f4d209d8784f7c3a5992d28506cd14a100e4f","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    class { \u0027::neutron::plugins::ml2::opendaylight\u0027:"},{"line_number":51,"context_line":"      odl_username  \u003d\u003e hiera(\u0027opendaylight::username\u0027),"},{"line_number":52,"context_line":"      odl_password  \u003d\u003e hiera(\u0027opendaylight::password\u0027),"},{"line_number":53,"context_line":"      odl_url       \u003d\u003e \"${conn_proto}://${odl_url_ip}:${odl_port}/controller/nb/v2/neutron\";"},{"line_number":54,"context_line":"    }"},{"line_number":55,"context_line":"  }"}],"source_content_type":"text/x-puppet","patch_set":1,"id":"fa6399be_6125f3ac","line":52,"in_reply_to":"fa6399be_eb8804c9","updated":"2016-10-18 17:00:34.000000000","message":"So I\u0027m confused on the \"best practice\" here.  Should any parameter that is referenced by hiera be parameters to the class for puppet-tripleo?  For example I also need to parameterize hiera calls to opendaylight_api_vip and opendaylight::odl_bind_ip?  Is that agreed on by TripleO team?","commit_id":"043b5f7e34234017a2c0dbd9fb48c1dbd4b713e4"},{"author":{"_account_id":6681,"name":"Brent Eagles","email":"beagles@redhat.com","username":"beagles"},"change_message_id":"db3993af54b1812be1e11f267f261e1678f65f37","unresolved":false,"context_lines":[{"line_number":42,"context_line":"class tripleo::profile::base::neutron::plugins::ml2::opendaylight ("},{"line_number":43,"context_line":"  $odl_port     \u003d hiera(\u0027opendaylight::odl_rest_port\u0027),"},{"line_number":44,"context_line":"  $odl_username \u003d hiera(\u0027opendaylight::username\u0027),"},{"line_number":45,"context_line":"  $odl_password \u003d hiera(\u0027opendaylight::password\u0027),"},{"line_number":46,"context_line":"  $conn_proto   \u003d hiera(\u0027opendaylight::nb_connection_protocol\u0027),"},{"line_number":47,"context_line":"  $step         \u003d hiera(\u0027step\u0027),"},{"line_number":48,"context_line":") {"}],"source_content_type":"text/x-puppet","patch_set":3,"id":"fa6399be_474ee66f","line":45,"updated":"2016-10-20 15:38:48.000000000","message":"It just occurred to me that I\u0027ve been assuming that the opendaylight puppet module is consuming these hiera values. AFAICT, it doesn\u0027t seem to be. If so, wouldn\u0027t it be better just to have it set the neutron::plugins::ml2::opendaylight hiera directly in the heat templates?","commit_id":"a970cf81d8b06c6999966b20ad2b4c980b3b107b"}]}
