Class: RHC::Rest::Mock::MockRestUser

Inherits:
User show all
Includes:
Helpers
Defined in:
lib/rhc/rest/mock.rb

Instance Method Summary collapse

Methods included from Helpers

#challenge, #credentials_for, #define_exceptional_test_on_wizard, #empty_domains, #empty_keys, #empty_response_list, #example_allows_gear_sizes?, #example_allows_members?, #expect_authorization, #mock_alias_links, #mock_alias_response, #mock_api_with_authorizations, #mock_app_links, #mock_cart_links, #mock_cartridge_response, #mock_client_links, #mock_date_1, #mock_domain_links, #mock_gear_groups_response, #mock_href, #mock_key_links, #mock_pass, #mock_real_client_links, #mock_response_links, #mock_team_links, #mock_teams_links, #mock_uri, #mock_user, #mock_user_auth, #mock_user_links, #new_authorization, #new_domain, #simple_carts, #simple_user, #stub_add_authorization, #stub_add_key, #stub_add_key_error, #stub_api, #stub_api_request, #stub_api_v12, #stub_application_cartridges, #stub_authorizations, #stub_create_domain, #stub_delete_authorization, #stub_delete_authorizations, #stub_mock_ssh_keys, #stub_no_domains, #stub_no_keys, #stub_one_application, #stub_one_domain, #stub_one_key, #stub_relative_application, #stub_simple_carts, #stub_update_key, #stub_user

Methods inherited from User

#capabilities, #find_key, #max_domains

Methods inherited from Base

#add_message, #has_param?, #link_href, #links, #rest_method, #supports?

Methods included from AttributesClass

#define_attr, #model_name

Methods included from Attributes

#attribute, #attributes, #attributes=, #clear_attribute

Constructor Details

#initialize(client, login) ⇒ MockRestUser

Returns a new instance of MockRestUser.



676
677
678
679
680
681
682
683
684
# File 'lib/rhc/rest/mock.rb', line 676

def initialize(client, )
  super({}, client)
  @login = 
  @keys = [
    MockRestKey.new(client, 'mockkey1', 'ssh-rsa', 'AAAAB3NzaC1yc2EAAAADAQABAAABAQDNK8xT3O+kSltmCMsSqBfAgheB3YFJ9Y0ESJnFjFASVxH70AcCQAgdQSD/r31+atYShJdP7f0AMWiQUTw2tK434XSylnZWEyIR0V+j+cyOPdVQlns6D5gPOnOtweFF0o18YulwCOK8Q1H28GK8qyWhLe0FcMmxtKbbQgaVRvQdXZz4ThzutCJOyJm9xVb93+fatvwZW76oLLvfFJcJSOK2sgW7tJM2A83bm4mwixFDF7wO/+C9WA+PgPKJUIjvy1gZjBhRB+3b58vLOnYhPOgMNruJwzB+wJ3pg8tLJEjxSbHyyoi6OqMBs4BVV7LdzvwTDxEjcgtHVvaVNXgO5iRX'),
    MockRestKey.new(client, 'mockkey2', 'ssh-dsa', 'AAAAB3NzaC1kc3MAAACBAPaaFj6Xjrjd8Dc4AAkJe0HigqaXMxj/87xHoV+nPgerHIceJWhPUWdW40lSASrgpAV9Eq4zzD+L19kgYdbMw0vSX5Cj3XtNOsow9MmMxFsYjTxCv4eSs/rLdGPaYZ5GVRPDu8tN42Bm8lj5o+ky3HzwW+mkQMZwcADQIgqtn6QhAAAAFQCirDfIMf/JoMOFf8CTnsTKWw/0zwAAAIAIQp6t2sLIp1d2TBfd/qLjOJA10rPADcnhBzWB/cd/oFJ8a/2nmxeSPR5Ov18T6itWqbKwvZw2UC0MrXoYbgcfVNP/ym1bCd9rB5hu1sg8WO4JIxA/47PZooT6PwTKVxHuENEzQyJL2o6ZJq+wuV0taLvm6IaM5TAZuEJ2p4TC/gAAAIBpLcVXZREa7XLY55nyidt/+UC+PxpjhPHOHbzL1OvWEaumN4wcJk/JZPppgXX9+WDkTm1SD891U0cXnGMTP0OZOHkOUHF2ZcfUe7p9kX4WjHs0OccoxV0Lny6MC4DjalJyaaEbijJHSUX3QlLcBOlPHJWpEpvWQ9P8AN4PokiGzA=='),
    MockRestKey.new(client, 'mockkey3', 'krb5-principal', 'mockuser@mockdomain')
  ]
end

Instance Method Details

#add_key(name, type, content) ⇒ Object



690
691
692
# File 'lib/rhc/rest/mock.rb', line 690

def add_key(name, type, content)
  @keys << MockRestKey.new(client, name, type, content)
end

#keysObject



686
687
688
# File 'lib/rhc/rest/mock.rb', line 686

def keys
  @keys
end