Permalink
Browse files

proper user creation in OS create_server mock

  • Loading branch information...
1 parent f653aee commit e5447c8f2c1d0989440ec67e3232c482ce065d91 @kuinak committed Dec 13, 2012
Showing with 4 additions and 6 deletions.
  1. +4 −6 lib/fog/openstack/requests/compute/create_server.rb
View
10 lib/fog/openstack/requests/compute/create_server.rb
@@ -70,12 +70,10 @@ def create_server(name, image_ref, flavor_ref, options = {})
user_id = if user then
user.id
else
- identity.user.create(:name => @openstack_username,
- :password => 'password',
- :email =>
- "#{@openstack_username}@example",
- :tenant_id => @openstack_tenant,
- :enabled => true).id
+ response = identity.create_user(@openstack_username,
+ 'password',
+ "#{@openstack_username}@example.com")
+ response.body["user"]["id"]
end

0 comments on commit e5447c8

Please sign in to comment.