)]}'
{"lib/puppet/provider/keystone.rb":[{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"d2cc1776baae1d2e195c6aa2b786752796c2f016","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    url \u003d URI.parse(\"#{url_copy}/users/#{userid}/projects\")"},{"line_number":61,"context_line":"    req \u003d Net::HTTP::Get.new url.path"},{"line_number":62,"context_line":"    req[\u0027content-type\u0027] \u003d \u0027application/json\u0027"},{"line_number":63,"context_line":"    req[\u0027x-auth-token\u0027] \u003d token"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    res \u003d handle_request(req, url)"},{"line_number":66,"context_line":"    data \u003d JSON.parse res.body"}],"source_content_type":"text/x-ruby","patch_set":9,"id":"3a961159_5fd0b852","line":63,"updated":"2015-01-16 22:01:49.000000000","message":"Implementing this entirely in HTTP requests means this forces the provider to use the admin service token defined in keystone.conf. Part of the reason the providers now allow username/password authentication is because we don\u0027t want to rely on this service token any longer: it might not be in keystone.conf, or keystone.conf might not be on the system, and in any case disabling that admin token is recommended: http://docs.openstack.org/developer/keystone/configuringservices.html","commit_id":"7d0531b08781f83a5b679d648b6f91f62f1515cc"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"d2cc1776baae1d2e195c6aa2b786752796c2f016","unresolved":false,"context_lines":[{"line_number":275,"context_line":"  # v2.0 \"tenant\" \u003d\u003d v3 \"project\""},{"line_number":276,"context_line":"  def self.get_tenants_for_user(userid)"},{"line_number":277,"context_line":"    keystone_v3_projects_for_user(admin_endpoint, admin_token, userid)"},{"line_number":278,"context_line":"  end"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"  private"},{"line_number":281,"context_line":""}],"source_content_type":"text/x-ruby","patch_set":9,"id":"3a961159_ed59c18d","line":278,"updated":"2015-01-16 22:01:49.000000000","message":"Why have these two methods? Internally we should just start calling them projects.","commit_id":"7d0531b08781f83a5b679d648b6f91f62f1515cc"}],"lib/puppet/provider/keystone_user/keystone.rb":[{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"46a34138330b7e896fbd4f70ff7a8762035b1eb6","unresolved":false,"context_lines":[{"line_number":20,"context_line":"  optional_commands :keystone \u003d\u003e \"keystone\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"  def self.prefetch(resource)"},{"line_number":23,"context_line":"    debug(\"keystone_user.prefetch\")"},{"line_number":24,"context_line":"    # rebuild the cache for every puppet run"},{"line_number":25,"context_line":"    @user_hash \u003d nil"},{"line_number":26,"context_line":"  end"}],"source_content_type":"text/x-ruby","patch_set":4,"id":"5a890539_a8532715","line":23,"updated":"2014-11-18 01:27:52.000000000","message":"Are all the \"debug\" required? I can\u0027t see the reason in your commit message.","commit_id":"cce036aa8f8e6f0f190c470382de5a4aa6a9ca0d"},{"author":{"_account_id":9983,"name":"Richard Megginson","email":"rmeggins@redhat.com","username":"rmeggins"},"change_message_id":"d6da080b853af4251aec417981e488615e2d72f0","unresolved":false,"context_lines":[{"line_number":20,"context_line":"  optional_commands :keystone \u003d\u003e \"keystone\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"  def self.prefetch(resource)"},{"line_number":23,"context_line":"    debug(\"keystone_user.prefetch\")"},{"line_number":24,"context_line":"    # rebuild the cache for every puppet run"},{"line_number":25,"context_line":"    @user_hash \u003d nil"},{"line_number":26,"context_line":"  end"}],"source_content_type":"text/x-ruby","patch_set":4,"id":"5a890539_a8cde732","line":23,"in_reply_to":"5a890539_a8532715","updated":"2014-11-18 02:04:37.000000000","message":"No, not required.  But they really helped trying to trace what was going on in this code.","commit_id":"cce036aa8f8e6f0f190c470382de5a4aa6a9ca0d"}],"lib/puppet/provider/keystone_user/openstack.rb":[{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"d2cc1776baae1d2e195c6aa2b786752796c2f016","unresolved":false,"context_lines":[{"line_number":125,"context_line":"      if tenant_name"},{"line_number":126,"context_line":"        idx \u003d tenants.index{|ii| ii[\u0027name\u0027] \u003d\u003d tenant_name}"},{"line_number":127,"context_line":"        if idx.nil?"},{"line_number":128,"context_line":"          warning(\"Keystone user #{resource[:name]} was specified with project (tenant) #{tenant_name}, but keystone says this user is not associated with this tenant\")"},{"line_number":129,"context_line":"        else"},{"line_number":130,"context_line":"          tenant_id \u003d tenants[idx][\u0027id\u0027]"},{"line_number":131,"context_line":"        end"}],"source_content_type":"text/x-ruby","patch_set":9,"id":"3a961159_6c26b7cc","line":128,"updated":"2015-01-16 22:01:49.000000000","message":"Why would this happen?","commit_id":"7d0531b08781f83a5b679d648b6f91f62f1515cc"},{"author":{"_account_id":9983,"name":"Richard Megginson","email":"rmeggins@redhat.com","username":"rmeggins"},"change_message_id":"50a1c89a63deb13717083d2a1a6cd1ae5ca19639","unresolved":false,"context_lines":[{"line_number":125,"context_line":"      if tenant_name"},{"line_number":126,"context_line":"        idx \u003d tenants.index{|ii| ii[\u0027name\u0027] \u003d\u003d tenant_name}"},{"line_number":127,"context_line":"        if idx.nil?"},{"line_number":128,"context_line":"          warning(\"Keystone user #{resource[:name]} was specified with project (tenant) #{tenant_name}, but keystone says this user is not associated with this tenant\")"},{"line_number":129,"context_line":"        else"},{"line_number":130,"context_line":"          tenant_id \u003d tenants[idx][\u0027id\u0027]"},{"line_number":131,"context_line":"        end"}],"source_content_type":"text/x-ruby","patch_set":9,"id":"3a961159_1fee30b5","line":128,"in_reply_to":"3a961159_6c26b7cc","updated":"2015-01-16 22:12:14.000000000","message":"It shouldn\u0027t happen - it means someone has messed up ldap/database out-of-band.","commit_id":"7d0531b08781f83a5b679d648b6f91f62f1515cc"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"d2cc1776baae1d2e195c6aa2b786752796c2f016","unresolved":false,"context_lines":[{"line_number":130,"context_line":"          tenant_id \u003d tenants[idx][\u0027id\u0027]"},{"line_number":131,"context_line":"        end"},{"line_number":132,"context_line":"      elsif tenants.length \u003e 1"},{"line_number":133,"context_line":"        warning(\"More than one project ID for user #{resource[:name]} - using first one\")"},{"line_number":134,"context_line":"      end"},{"line_number":135,"context_line":"      if tenant_id.nil?"},{"line_number":136,"context_line":"        tenant_id \u003d tenants[0][\u0027id\u0027]"}],"source_content_type":"text/x-ruby","patch_set":9,"id":"3a961159_8d12fdb1","line":133,"updated":"2015-01-16 22:01:49.000000000","message":"Why implement a method to get all of them if we only use one?","commit_id":"7d0531b08781f83a5b679d648b6f91f62f1515cc"},{"author":{"_account_id":9983,"name":"Richard Megginson","email":"rmeggins@redhat.com","username":"rmeggins"},"change_message_id":"50a1c89a63deb13717083d2a1a6cd1ae5ca19639","unresolved":false,"context_lines":[{"line_number":130,"context_line":"          tenant_id \u003d tenants[idx][\u0027id\u0027]"},{"line_number":131,"context_line":"        end"},{"line_number":132,"context_line":"      elsif tenants.length \u003e 1"},{"line_number":133,"context_line":"        warning(\"More than one project ID for user #{resource[:name]} - using first one\")"},{"line_number":134,"context_line":"      end"},{"line_number":135,"context_line":"      if tenant_id.nil?"},{"line_number":136,"context_line":"        tenant_id \u003d tenants[0][\u0027id\u0027]"}],"source_content_type":"text/x-ruby","patch_set":9,"id":"3a961159_5f2b58ea","line":133,"in_reply_to":"3a961159_8d12fdb1","updated":"2015-01-16 22:12:14.000000000","message":"Because I wanted to know if there were more than one, so I could warn the user that the first one is being used.","commit_id":"7d0531b08781f83a5b679d648b6f91f62f1515cc"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"d2cc1776baae1d2e195c6aa2b786752796c2f016","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    if tenant_id.nil? or tenant_id \u003d\u003d \u0027None\u0027 or tenant_id.empty?"},{"line_number":142,"context_line":"      tenant_name \u003d \u0027None\u0027"},{"line_number":143,"context_line":"    else"},{"line_number":144,"context_line":"      # this prevents us from failing if tenant no longer exists"},{"line_number":145,"context_line":"      begin"},{"line_number":146,"context_line":"        tenant_name \u003d request(\u0027project\u0027, \u0027show\u0027, tenant_id, resource[:auth])[:name]"},{"line_number":147,"context_line":"      rescue"}],"source_content_type":"text/x-ruby","patch_set":9,"id":"3a961159_87265cb8","line":144,"updated":"2015-01-16 22:01:49.000000000","message":"Why would this happen?","commit_id":"7d0531b08781f83a5b679d648b6f91f62f1515cc"},{"author":{"_account_id":9983,"name":"Richard Megginson","email":"rmeggins@redhat.com","username":"rmeggins"},"change_message_id":"50a1c89a63deb13717083d2a1a6cd1ae5ca19639","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    if tenant_id.nil? or tenant_id \u003d\u003d \u0027None\u0027 or tenant_id.empty?"},{"line_number":142,"context_line":"      tenant_name \u003d \u0027None\u0027"},{"line_number":143,"context_line":"    else"},{"line_number":144,"context_line":"      # this prevents us from failing if tenant no longer exists"},{"line_number":145,"context_line":"      begin"},{"line_number":146,"context_line":"        tenant_name \u003d request(\u0027project\u0027, \u0027show\u0027, tenant_id, resource[:auth])[:name]"},{"line_number":147,"context_line":"      rescue"}],"source_content_type":"text/x-ruby","patch_set":9,"id":"3a961159_5f1278b4","line":144,"in_reply_to":"3a961159_87265cb8","updated":"2015-01-16 22:12:14.000000000","message":"I don\u0027t know - I\u0027m just preserving the original code - perhaps it is cargo culted but I didn\u0027t want to introduce a regression or break a corner case.","commit_id":"7d0531b08781f83a5b679d648b6f91f62f1515cc"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"d2cc1776baae1d2e195c6aa2b786752796c2f016","unresolved":false,"context_lines":[{"line_number":210,"context_line":"      request(\u0027role\u0027, \u0027show\u0027, default_role, resource[:auth])"},{"line_number":211,"context_line":"    rescue"},{"line_number":212,"context_line":"      debug(\"Keystone role #{default_role} does not exist - creating\")"},{"line_number":213,"context_line":"      request(\u0027role\u0027, \u0027create\u0027, default_role, resource[:auth])"},{"line_number":214,"context_line":"    end"},{"line_number":215,"context_line":"    request(\u0027role\u0027, \u0027add\u0027, default_role, resource[:auth],"},{"line_number":216,"context_line":"            \u0027--project\u0027, newproject, \u0027--user\u0027, resource[:name])"}],"source_content_type":"text/x-ruby","patch_set":9,"id":"3a961159_3f4ccc3e","line":213,"updated":"2015-01-16 22:01:49.000000000","message":"While it is not likely that _member_ will not be there, if it isn\u0027t there we should assume it\u0027s on purpose: recreating it would go against the user\u0027s intention and would cause idempotency issues if the user has ensured absent that role.","commit_id":"7d0531b08781f83a5b679d648b6f91f62f1515cc"},{"author":{"_account_id":9983,"name":"Richard Megginson","email":"rmeggins@redhat.com","username":"rmeggins"},"change_message_id":"50a1c89a63deb13717083d2a1a6cd1ae5ca19639","unresolved":false,"context_lines":[{"line_number":210,"context_line":"      request(\u0027role\u0027, \u0027show\u0027, default_role, resource[:auth])"},{"line_number":211,"context_line":"    rescue"},{"line_number":212,"context_line":"      debug(\"Keystone role #{default_role} does not exist - creating\")"},{"line_number":213,"context_line":"      request(\u0027role\u0027, \u0027create\u0027, default_role, resource[:auth])"},{"line_number":214,"context_line":"    end"},{"line_number":215,"context_line":"    request(\u0027role\u0027, \u0027add\u0027, default_role, resource[:auth],"},{"line_number":216,"context_line":"            \u0027--project\u0027, newproject, \u0027--user\u0027, resource[:name])"}],"source_content_type":"text/x-ruby","patch_set":9,"id":"3a961159_ff2084f9","line":213,"in_reply_to":"3a961159_3f4ccc3e","updated":"2015-01-16 22:12:14.000000000","message":"hmm - then what would you suggest?  Creating some unique, ephemeral role?","commit_id":"7d0531b08781f83a5b679d648b6f91f62f1515cc"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"2ac8332dfb29ee6958e0935081d6665a50b03a4e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"require \u0027net/http\u0027"},{"line_number":2,"context_line":"require \u0027puppet/provider/keystone\u0027"},{"line_number":3,"context_line":"require \u0027json\u0027"},{"line_number":4,"context_line":"Puppet::Type.type(:keystone_user).provide("},{"line_number":5,"context_line":"  :openstack,"},{"line_number":6,"context_line":"  :parent \u003d\u003e Puppet::Provider::Keystone"}],"source_content_type":"text/x-ruby","patch_set":13,"id":"1a930d6b_d2d8ab81","line":3,"updated":"2015-01-22 23:27:07.000000000","message":"Is this needed?","commit_id":"3968b404db2b599b8f630da47fe946a48050a229"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"82d61ffcb4f18f97a13f3f332f0307bb43ddadc8","unresolved":false,"context_lines":[{"line_number":1,"context_line":"require \u0027net/http\u0027"},{"line_number":2,"context_line":"require \u0027puppet/provider/keystone\u0027"},{"line_number":3,"context_line":"require \u0027json\u0027"},{"line_number":4,"context_line":"Puppet::Type.type(:keystone_user).provide("},{"line_number":5,"context_line":"  :openstack,"},{"line_number":6,"context_line":"  :parent \u003d\u003e Puppet::Provider::Keystone"}],"source_content_type":"text/x-ruby","patch_set":13,"id":"1a930d6b_1b0a47d2","line":3,"in_reply_to":"1a930d6b_c3e29f00","updated":"2015-01-23 06:47:16.000000000","message":"Oh, good call. However it should probably be in a different patch.","commit_id":"3968b404db2b599b8f630da47fe946a48050a229"},{"author":{"_account_id":9983,"name":"Richard Megginson","email":"rmeggins@redhat.com","username":"rmeggins"},"change_message_id":"a84e96546dc299e7754e38663e755db44014ac79","unresolved":false,"context_lines":[{"line_number":1,"context_line":"require \u0027net/http\u0027"},{"line_number":2,"context_line":"require \u0027puppet/provider/keystone\u0027"},{"line_number":3,"context_line":"require \u0027json\u0027"},{"line_number":4,"context_line":"Puppet::Type.type(:keystone_user).provide("},{"line_number":5,"context_line":"  :openstack,"},{"line_number":6,"context_line":"  :parent \u003d\u003e Puppet::Provider::Keystone"}],"source_content_type":"text/x-ruby","patch_set":13,"id":"1a930d6b_c3e29f00","line":3,"in_reply_to":"1a930d6b_d2d8ab81","updated":"2015-01-23 01:52:45.000000000","message":"Yes, for the to_json method used in password","commit_id":"3968b404db2b599b8f630da47fe946a48050a229"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"2ac8332dfb29ee6958e0935081d6665a50b03a4e","unresolved":false,"context_lines":[{"line_number":120,"context_line":"  end"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"  def tenant"},{"line_number":123,"context_line":"    return resource[:tenant] if sym_to_bool(resource[:ignore_default_tenant])"},{"line_number":124,"context_line":"    # If the user list command doesn\u0027t report the project, it might still be there"},{"line_number":125,"context_line":"    # We don\u0027t need to know exactly what it is, we just need to know whether it\u0027s"},{"line_number":126,"context_line":"    # the one we\u0027re trying to set."}],"source_content_type":"text/x-ruby","patch_set":13,"id":"1a930d6b_92f703f5","line":123,"updated":"2015-01-22 23:27:07.000000000","message":"Not sure I understand this. Shouldn\u0027t it at least attempt to get the real default tenant with instance(resource[:name])[:project], and then proceed to this and then the role list if none was found?","commit_id":"3968b404db2b599b8f630da47fe946a48050a229"},{"author":{"_account_id":9983,"name":"Richard Megginson","email":"rmeggins@redhat.com","username":"rmeggins"},"change_message_id":"a84e96546dc299e7754e38663e755db44014ac79","unresolved":false,"context_lines":[{"line_number":120,"context_line":"  end"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"  def tenant"},{"line_number":123,"context_line":"    return resource[:tenant] if sym_to_bool(resource[:ignore_default_tenant])"},{"line_number":124,"context_line":"    # If the user list command doesn\u0027t report the project, it might still be there"},{"line_number":125,"context_line":"    # We don\u0027t need to know exactly what it is, we just need to know whether it\u0027s"},{"line_number":126,"context_line":"    # the one we\u0027re trying to set."}],"source_content_type":"text/x-ruby","patch_set":13,"id":"1a930d6b_a3ce7381","line":123,"in_reply_to":"1a930d6b_92f703f5","updated":"2015-01-23 01:52:45.000000000","message":"I don\u0027t understand the purpose of ignore_default_tenant at all.  This is the code from stable/icehouse:\n\n def tenant\n   return resource[:tenant] if resource[:ignore_default_tenant]\n   ...\n\nIt must be there for a reason, so I just put it back in there the way it was.","commit_id":"3968b404db2b599b8f630da47fe946a48050a229"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"2ac8332dfb29ee6958e0935081d6665a50b03a4e","unresolved":false,"context_lines":[{"line_number":211,"context_line":"      (options \u003c\u003c \u0027--password\u0027 \u003c\u003c resource[:password]) if @property_flush[:password]"},{"line_number":212,"context_line":"      (options \u003c\u003c \u0027--email\u0027    \u003c\u003c resource[:email])    if @property_flush[:email]"},{"line_number":213,"context_line":"      request(\u0027user\u0027, \u0027set\u0027, resource[:name], resource[:auth], options) unless options.empty?"},{"line_number":214,"context_line":"      if @property_flush[:project]"},{"line_number":215,"context_line":"        begin"},{"line_number":216,"context_line":"          request(\u0027user\u0027, \u0027set\u0027, resource[:name], resource[:auth], \u0027--project\u0027, resource[:tenant])"},{"line_number":217,"context_line":"        rescue"}],"source_content_type":"text/x-ruby","patch_set":13,"id":"1a930d6b_b2723f7a","line":214,"updated":"2015-01-22 23:27:07.000000000","message":"I\u0027d prefer to see this moved into the tenant\u003d() method, just because the idea behind the flush method is to be more efficient by setting every property all at once with one command. Since we can\u0027t accomplish that, it makes a little more sense to move this stuff back to tenant\u003d().","commit_id":"3968b404db2b599b8f630da47fe946a48050a229"},{"author":{"_account_id":9983,"name":"Richard Megginson","email":"rmeggins@redhat.com","username":"rmeggins"},"change_message_id":"a84e96546dc299e7754e38663e755db44014ac79","unresolved":false,"context_lines":[{"line_number":211,"context_line":"      (options \u003c\u003c \u0027--password\u0027 \u003c\u003c resource[:password]) if @property_flush[:password]"},{"line_number":212,"context_line":"      (options \u003c\u003c \u0027--email\u0027    \u003c\u003c resource[:email])    if @property_flush[:email]"},{"line_number":213,"context_line":"      request(\u0027user\u0027, \u0027set\u0027, resource[:name], resource[:auth], options) unless options.empty?"},{"line_number":214,"context_line":"      if @property_flush[:project]"},{"line_number":215,"context_line":"        begin"},{"line_number":216,"context_line":"          request(\u0027user\u0027, \u0027set\u0027, resource[:name], resource[:auth], \u0027--project\u0027, resource[:tenant])"},{"line_number":217,"context_line":"        rescue"}],"source_content_type":"text/x-ruby","patch_set":13,"id":"1a930d6b_c3c9bf7a","line":214,"in_reply_to":"1a930d6b_b2723f7a","updated":"2015-01-23 01:52:45.000000000","message":"ok","commit_id":"3968b404db2b599b8f630da47fe946a48050a229"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"e2f15d1870f48786bfd67e306f4673ab5eaa576a","unresolved":false,"context_lines":[{"line_number":118,"context_line":"  def tenant\u003d(value)"},{"line_number":119,"context_line":"    begin"},{"line_number":120,"context_line":"      request(\u0027user\u0027, \u0027set\u0027, resource[:name], resource[:auth], \u0027--project\u0027, value)"},{"line_number":121,"context_line":"    rescue"},{"line_number":122,"context_line":"      # probably a read-only identity backend, just fall through"},{"line_number":123,"context_line":"      # note: read-write ldap will silently fail, not raise an exception"},{"line_number":124,"context_line":"    end"}],"source_content_type":"text/x-ruby","patch_set":14,"id":"1a930d6b_5b468f24","line":121,"updated":"2015-01-23 06:46:18.000000000","message":"I think this should rescue Puppet::ExecutionError (?) and then check the actual message, and if it doesn\u0027t match something related to not having the right permissions, raise it. Otherwise something unexpected might happen and it will get eaten here.","commit_id":"5ec8f35c624d7bd151b9d316a9c4237a092b115a"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"e2f15d1870f48786bfd67e306f4673ab5eaa576a","unresolved":false,"context_lines":[{"line_number":128,"context_line":"  def tenant"},{"line_number":129,"context_line":"    return resource[:tenant] if sym_to_bool(resource[:ignore_default_tenant])"},{"line_number":130,"context_line":"    tenant_name \u003d instance(resource[:name])[:project]"},{"line_number":131,"context_line":"    return tenant_name unless tenant_name.nil?"},{"line_number":132,"context_line":"    # If the user list command doesn\u0027t report the project, it might still be there"},{"line_number":133,"context_line":"    # We don\u0027t need to know exactly what it is, we just need to know whether it\u0027s"},{"line_number":134,"context_line":"    # the one we\u0027re trying to set."}],"source_content_type":"text/x-ruby","patch_set":14,"id":"1a930d6b_7b97cb90","line":131,"updated":"2015-01-23 06:46:18.000000000","message":"I think tenant_name might be returning an empty string instead of nil, at least it does if I set default_project_id to null in the sql table. Can you double check the result against an ldap backend?","commit_id":"5ec8f35c624d7bd151b9d316a9c4237a092b115a"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"83cfb4a93a526625712a6e80780e14697584502e","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    begin"},{"line_number":120,"context_line":"      request(\u0027user\u0027, \u0027set\u0027, resource[:name], resource[:auth], \u0027--project\u0027, value)"},{"line_number":121,"context_line":"    rescue Puppet::ExecutionFailure \u003d\u003e e"},{"line_number":122,"context_line":"      if e.message \u003d~ /You are not authorized to perform the requested action: LDAP user update/"},{"line_number":123,"context_line":"        # read-only LDAP identity backend - just fall through"},{"line_number":124,"context_line":"      else"},{"line_number":125,"context_line":"        raise e"}],"source_content_type":"text/x-ruby","patch_set":15,"id":"1a930d6b_fe0f0d86","line":122,"updated":"2015-01-23 19:28:20.000000000","message":"This is the error I see when trying to change the project for an ldap user:\n\n Error: Execution of \u0027/bin/openstack user set john --project test2 --os-token sosp-kyl --os-url http://127.0.0.1:35357/v2.0/\u0027 returned 1: ERROR: openstack Cannot change user ID (HTTP 400)","commit_id":"f470429ad813ba71d97bb3f856ae6a03e5e2b02a"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"a5c9471d83f2b3a55363ebfa8e22cf26c0189ea3","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    begin"},{"line_number":120,"context_line":"      request(\u0027user\u0027, \u0027set\u0027, resource[:name], resource[:auth], \u0027--project\u0027, value)"},{"line_number":121,"context_line":"    rescue Puppet::ExecutionFailure \u003d\u003e e"},{"line_number":122,"context_line":"      if e.message \u003d~ /You are not authorized to perform the requested action: LDAP user update/"},{"line_number":123,"context_line":"        # read-only LDAP identity backend - just fall through"},{"line_number":124,"context_line":"      else"},{"line_number":125,"context_line":"        raise e"}],"source_content_type":"text/x-ruby","patch_set":15,"id":"1a930d6b_446a0fb4","line":122,"in_reply_to":"1a930d6b_50ae4ae7","updated":"2015-01-23 23:04:36.000000000","message":"Resolved over IRC - I was configuring user_id_attribute\u003duidNumber which doesn\u0027t seem to work. +1 this message.","commit_id":"f470429ad813ba71d97bb3f856ae6a03e5e2b02a"},{"author":{"_account_id":9983,"name":"Richard Megginson","email":"rmeggins@redhat.com","username":"rmeggins"},"change_message_id":"3c93d2351ade20d9e2bcf7c26cd74d58423cafb7","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    begin"},{"line_number":120,"context_line":"      request(\u0027user\u0027, \u0027set\u0027, resource[:name], resource[:auth], \u0027--project\u0027, value)"},{"line_number":121,"context_line":"    rescue Puppet::ExecutionFailure \u003d\u003e e"},{"line_number":122,"context_line":"      if e.message \u003d~ /You are not authorized to perform the requested action: LDAP user update/"},{"line_number":123,"context_line":"        # read-only LDAP identity backend - just fall through"},{"line_number":124,"context_line":"      else"},{"line_number":125,"context_line":"        raise e"}],"source_content_type":"text/x-ruby","patch_set":15,"id":"1a930d6b_50ae4ae7","line":122,"in_reply_to":"1a930d6b_fe0f0d86","updated":"2015-01-23 22:38:56.000000000","message":"How are you configuring keystone to get this error message?","commit_id":"f470429ad813ba71d97bb3f856ae6a03e5e2b02a"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"83cfb4a93a526625712a6e80780e14697584502e","unresolved":false,"context_lines":[{"line_number":136,"context_line":"    # If the user list command doesn\u0027t report the project, it might still be there"},{"line_number":137,"context_line":"    # We don\u0027t need to know exactly what it is, we just need to know whether it\u0027s"},{"line_number":138,"context_line":"    # the one we\u0027re trying to set."},{"line_number":139,"context_line":"    roles \u003d request(\u0027user role\u0027, \u0027list\u0027, resource[:name], resource[:auth], [\u0027--project\u0027, resource[:tenant]])"},{"line_number":140,"context_line":"    if roles.empty?"},{"line_number":141,"context_line":"      return nil"},{"line_number":142,"context_line":"    else"}],"source_content_type":"text/x-ruby","patch_set":15,"id":"1a930d6b_5e7581f8","line":139,"updated":"2015-01-23 19:28:20.000000000","message":"This still needs to check if resource[:tenant] exists, otherwise `puppet resource` doesn\u0027t work:\n\n Error: Could not run: Execution of \u0027/bin/openstack user role list --quiet --format csv john --project --os-token sosp-kyl --os-url http://127.0.0.1:35357/v2.0/\u0027 returned 2: usage: openstack user role list [-h] [-f {csv,table}] [-c COLUMN]\n                                [--max-width \u003cinteger\u003e]\n                                [--quote {all,minimal,none,nonnumeric}]\n                                [--project \u003cproject\u003e]\n                                [\u003cuser\u003e]\n openstack user role list: error: argument --project: expected one argument","commit_id":"f470429ad813ba71d97bb3f856ae6a03e5e2b02a"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"769b0857a8601ce4abc59aedb6eb56fb58c7cf51","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    return resource[:tenant] if sym_to_bool(resource[:ignore_default_tenant])"},{"line_number":134,"context_line":"    # use the one returned from instances"},{"line_number":135,"context_line":"    tenant_name \u003d instance(resource[:name])[:project]"},{"line_number":136,"context_line":"    if tenant_name.nil? or tenant_name.empty?"},{"line_number":137,"context_line":"      # if none (i.e. ldap backend) use the given one"},{"line_number":138,"context_line":"      tenant_name \u003d resource[:tenant]"},{"line_number":139,"context_line":"    end"}],"source_content_type":"text/x-ruby","patch_set":16,"id":"1a930d6b_731fcb08","line":136,"updated":"2015-01-24 05:10:14.000000000","message":"If tenant_name is not nil and not empty, it should be returned here. Otherwise, when running `puppet resource` we get down to line 146 and attempt to use resource[:tenant], when we didn\u0027t need to get that far at all and will fail because resource[:tenant] is empty.","commit_id":"de74abffa0003c98ece7c409b1968c1c64de885e"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"062ce2e073d27f66aa29eaa67269cb7d2df5cbf9","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    return resource[:tenant] if sym_to_bool(resource[:ignore_default_tenant])"},{"line_number":134,"context_line":"    # use the one returned from instances"},{"line_number":135,"context_line":"    tenant_name \u003d instance(resource[:name])[:project]"},{"line_number":136,"context_line":"    if tenant_name.nil? or tenant_name.empty?"},{"line_number":137,"context_line":"      # if none (i.e. ldap backend) use the given one"},{"line_number":138,"context_line":"      tenant_name \u003d resource[:tenant]"},{"line_number":139,"context_line":"    end"}],"source_content_type":"text/x-ruby","patch_set":16,"id":"1a930d6b_8195bc88","line":136,"in_reply_to":"1a930d6b_018aac69","updated":"2015-01-25 02:34:47.000000000","message":"If we are able to find it via instance() then we know it is set as the default (and that we\u0027re using the sql backend) and there\u0027s no reason to check anything else.","commit_id":"de74abffa0003c98ece7c409b1968c1c64de885e"},{"author":{"_account_id":9983,"name":"Richard Megginson","email":"rmeggins@redhat.com","username":"rmeggins"},"change_message_id":"3d9faab2e2969ebc9fd9dfa7e75fced5b3414609","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    return resource[:tenant] if sym_to_bool(resource[:ignore_default_tenant])"},{"line_number":134,"context_line":"    # use the one returned from instances"},{"line_number":135,"context_line":"    tenant_name \u003d instance(resource[:name])[:project]"},{"line_number":136,"context_line":"    if tenant_name.nil? or tenant_name.empty?"},{"line_number":137,"context_line":"      # if none (i.e. ldap backend) use the given one"},{"line_number":138,"context_line":"      tenant_name \u003d resource[:tenant]"},{"line_number":139,"context_line":"    end"}],"source_content_type":"text/x-ruby","patch_set":16,"id":"1a930d6b_018aac69","line":136,"in_reply_to":"1a930d6b_731fcb08","updated":"2015-01-25 02:32:15.000000000","message":"Why?  I thought we wanted to check it to make sure it is still in use.  Or is that only required when using the ldap backend?","commit_id":"de74abffa0003c98ece7c409b1968c1c64de885e"},{"author":{"_account_id":9983,"name":"Richard Megginson","email":"rmeggins@redhat.com","username":"rmeggins"},"change_message_id":"0cefbfc0a6d1f260ab0250df3640a69d2cc8249b","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    return resource[:tenant] if sym_to_bool(resource[:ignore_default_tenant])"},{"line_number":134,"context_line":"    # use the one returned from instances"},{"line_number":135,"context_line":"    tenant_name \u003d instance(resource[:name])[:project]"},{"line_number":136,"context_line":"    if tenant_name.nil? or tenant_name.empty?"},{"line_number":137,"context_line":"      # if none (i.e. ldap backend) use the given one"},{"line_number":138,"context_line":"      tenant_name \u003d resource[:tenant]"},{"line_number":139,"context_line":"    end"}],"source_content_type":"text/x-ruby","patch_set":16,"id":"1a930d6b_c1e2642e","line":136,"in_reply_to":"1a930d6b_8195bc88","updated":"2015-01-25 02:39:58.000000000","message":"Done","commit_id":"de74abffa0003c98ece7c409b1968c1c64de885e"}],"lib/puppet/provider/openstack.rb":[{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"d2cc1776baae1d2e195c6aa2b786752796c2f016","unresolved":false,"context_lines":[{"line_number":67,"context_line":"          # shell output is name\u003d\"value\"\\nid\u003d\"value2\"\\ndescription\u003d\"value3\" etc."},{"line_number":68,"context_line":"          openstack(service, action, \u0027--format\u0027, \u0027shell\u0027, args).split(\"\\n\").each do |line|"},{"line_number":69,"context_line":"            # key is everything before the first \"\u003d\""},{"line_number":70,"context_line":"            key \u003d line.split(\"\u003d\", 2).first"},{"line_number":71,"context_line":"            # value is everything after the first \"\u003d\", with leading and trailing double quotes stripped"},{"line_number":72,"context_line":"            val \u003d line.split(\"\u003d\", 2).last.gsub(/\\A\"|\"\\Z/, \u0027\u0027)"},{"line_number":73,"context_line":"            rv[key.to_sym] \u003d val"}],"source_content_type":"text/x-ruby","patch_set":9,"id":"3a961159_8ce9231c","line":70,"updated":"2015-01-16 22:01:49.000000000","message":"You could make this a little cleaner by doing \n\n key, val \u003d line.split(\"\u003d\", 2)\n val \u003d val.gsub(...etc...)","commit_id":"7d0531b08781f83a5b679d648b6f91f62f1515cc"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"769b0857a8601ce4abc59aedb6eb56fb58c7cf51","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            # key is everything before the first \"\u003d\""},{"line_number":70,"context_line":"            key \u003d line.split(\"\u003d\", 2).first"},{"line_number":71,"context_line":"            # value is everything after the first \"\u003d\", with leading and trailing double quotes stripped"},{"line_number":72,"context_line":"            val \u003d line.split(\"\u003d\", 2).last.gsub(/\\A\"|\"\\Z/, \u0027\u0027)"},{"line_number":73,"context_line":"            rv[key.downcase.to_sym] \u003d val"},{"line_number":74,"context_line":"          end"},{"line_number":75,"context_line":"        else"}],"source_content_type":"text/x-ruby","patch_set":16,"id":"1a930d6b_53e9efe4","line":72,"range":{"start_line":72,"start_character":47,"end_line":72,"end_character":60},"updated":"2015-01-24 05:10:14.000000000","message":"This would be better if it was \n\n key, val \u003d line.split(\"\u003d\", 2)\n val \u003d val.gsub(/\\A\"|\"\\Z/, \u0027\u0027)\n\nThen it doesn\u0027t have to call split twice.","commit_id":"de74abffa0003c98ece7c409b1968c1c64de885e"},{"author":{"_account_id":9983,"name":"Richard Megginson","email":"rmeggins@redhat.com","username":"rmeggins"},"change_message_id":"3d9faab2e2969ebc9fd9dfa7e75fced5b3414609","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            # key is everything before the first \"\u003d\""},{"line_number":70,"context_line":"            key \u003d line.split(\"\u003d\", 2).first"},{"line_number":71,"context_line":"            # value is everything after the first \"\u003d\", with leading and trailing double quotes stripped"},{"line_number":72,"context_line":"            val \u003d line.split(\"\u003d\", 2).last.gsub(/\\A\"|\"\\Z/, \u0027\u0027)"},{"line_number":73,"context_line":"            rv[key.downcase.to_sym] \u003d val"},{"line_number":74,"context_line":"          end"},{"line_number":75,"context_line":"        else"}],"source_content_type":"text/x-ruby","patch_set":16,"id":"1a930d6b_217b287c","line":72,"in_reply_to":"1a930d6b_53e9efe4","updated":"2015-01-25 02:32:15.000000000","message":"Done","commit_id":"de74abffa0003c98ece7c409b1968c1c64de885e"}]}
