Class: Fog::Compute::Ecloud::AdminOrganization

Inherits:
Ecloud::Model
  • Object
show all
Defined in:
lib/fog/compute/ecloud/models/admin_organization.rb

Instance Attribute Summary

Attributes inherited from Ecloud::Model

#loaded

Instance Method Summary collapse

Methods inherited from Ecloud::Model

#load_unless_loaded!

Instance Method Details

#authentication_levelsObject



25
26
27
# File 'lib/fog/compute/ecloud/models/admin_organization.rb', line 25

def authentication_levels
  @authentication_levels = Fog::Compute::Ecloud::AuthenticationLevels.new(:service => service, :href => "#{service.base_path}/admin/organizations/#{organization.id}/authenticationLevels")
end

#idObject



29
30
31
# File 'lib/fog/compute/ecloud/models/admin_organization.rb', line 29

def id
  href.scan(/\d+/)[0]
end

#login_bannerObject



21
22
23
# File 'lib/fog/compute/ecloud/models/admin_organization.rb', line 21

def 
  @login_banner = Fog::Compute::Ecloud::LoginBanner.new(:service => service, :href => "#{service.base_path}/admin/organizations/#{organization.id}/loginBanner")
end

#organizationObject



33
34
35
36
37
38
39
# File 'lib/fog/compute/ecloud/models/admin_organization.rb', line 33

def organization
  @organization ||= begin
                      reload unless other_links
                      organization_link = other_links.find{|l| l[:type] == "application/vnd.tmrk.cloud.organization"}
                      self.service.organizations.new(organization_link)
                    end
end

#password_complexity_rulesObject



17
18
19
# File 'lib/fog/compute/ecloud/models/admin_organization.rb', line 17

def password_complexity_rules
  @password_complexity_rules = Fog::Compute::Ecloud::PasswordComplexityRules.new(:service => service, :href => "#{service.base_path}/admin/organizations/#{organization.id}/passwordComplexityRules")
end

#reloadObject



41
42
43
44
# File 'lib/fog/compute/ecloud/models/admin_organization.rb', line 41

def reload
  @organization = nil
  super
end

#ssh_keysObject



13
14
15
# File 'lib/fog/compute/ecloud/models/admin_organization.rb', line 13

def ssh_keys
  @ssh_keys = Fog::Compute::Ecloud::SshKeys.new(:service => service, :href => "#{service.base_path}/admin/sshKeys/organizations/#{organization.id}")
end