1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[vcloud_director] Cater for email@org_name usernames.

This commit is contained in:
Nick Osborn 2013-10-09 15:29:12 +01:00
parent 8f034e57a9
commit c08195be7f

View file

@ -497,10 +497,12 @@ module Fog
@org_name ||=
begin
username = @vcloud_director_username.split('@')
unless username.size == 2
if username.size >= 2 # may be 'email_address@org_name'
username.last
else
Fog::Logger.warning('vcloud_director_username should be in the form user@org_name')
'vcd_org_name'
end
username.last || 'vcd_org_name'
end
end