<commit_before>module Openstack
  class IdentityService < OpenstackServiceProvider::FogProvider
    def driver(auth_params)
      Fog::IdentityV3::OpenStack.new(auth_params)
    end
        
    # returns domains which user has access to
    def user_domains(options={per_page: 30, page: 1})
      @driver.domains.auth_domains(options)
    end

    # returns domain which user has access to
    def user_domain(domain_id)
      @driver.domains.auth_domains.find_by_id(domain_id)
    end

    # returns domain projects which user has access to
    def user_domain_projects(domain_id,options={per_page: 30, page: 1})
      @driver.projects.all(domain_id: domain_id)  
    end
    
    # returns project which user has access to
    def user_project(project_id)
      @driver.projects.auth_project.find_by_id(project_id) 
    end
    
    # returns all domain projects
    def domain_projects
      api_connection.projects.all(domain_id: domain_id)  
    end<commit_msg>fix bug in identity service<commit_after>module Openstack
  class IdentityService < OpenstackServiceProvider::FogProvider
    def driver(auth_params)
      Fog::IdentityV3::OpenStack.new(auth_params)
    end
        
    # returns domains which user has access to
    def user_domains(options={per_page: 30, page: 1})
      @driver.domains.auth_domains(options)
    end

    # returns domain which user has access to
    def user_domain(domain_id)
      @driver.domains.auth_domains.find_by_id(domain_id)
    end

    # returns domain projects which user has access to
    def user_domain_projects(domain_id,options={per_page: 30, page: 1})
      @driver.projects.all(domain_id: domain_id)  
    end
    
    # returns project which user has access to
    def user_project(project_id)
      @driver.projects.auth_projects.find_by_id(project_id) 
    end
    
    # returns all domain projects
    def domain_projects
      api_connection.projects.all(domain_id: domain_id)  
    end
{'fraction_non_alphanumeric': 0.07080554130323242, 'fraction_numerical': 0.007183170856849667, 'mean_word_length': 3.3820224719101124, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3301446', 'n_tokens_mistral': 609, 'n_tokens_neox': 580, 'n_words': 143}