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:
parent
8f034e57a9
commit
c08195be7f
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue