Parent

Class/Module Index [+]

Quicksearch

Fog::Identity::OpenStack::Tenant

Public Instance Methods

create() click to toggle source
# File lib/fog/openstack/models/identity/tenant.rb, line 46
def create
  merge_attributes(
    service.create_tenant(attributes).body['tenant'])
  self
end
destroy() click to toggle source
# File lib/fog/openstack/models/identity/tenant.rb, line 28
def destroy
  requires :id
  service.delete_tenant(self.id)
  true
end
grant_user_role(user_id, role_id) click to toggle source
# File lib/fog/openstack/models/identity/tenant.rb, line 52
def grant_user_role(user_id, role_id)
  service.add_user_to_tenant(self.id, user_id, role_id)
end
revoke_user_role(user_id, role_id) click to toggle source
# File lib/fog/openstack/models/identity/tenant.rb, line 56
def revoke_user_role(user_id, role_id)
  service.remove_user_from_tenant(self.id, user_id, role_id)
end
roles_for(user) click to toggle source
# File lib/fog/openstack/models/identity/tenant.rb, line 17
def roles_for(user)
  service.roles(
    :tenant => self,
    :user   => user)
end
save() click to toggle source
# File lib/fog/openstack/models/identity/tenant.rb, line 41
def save
  requires :name
  identity ? update : create
end
to_s() click to toggle source
# File lib/fog/openstack/models/identity/tenant.rb, line 13
def to_s
  self.name
end
update(attr = nil) click to toggle source
# File lib/fog/openstack/models/identity/tenant.rb, line 34
def update(attr = nil)
  requires :id
  merge_attributes(
    service.update_tenant(self.id, attr || attributes).body['tenant'])
  self
end
users() click to toggle source
# File lib/fog/openstack/models/identity/tenant.rb, line 23
def users
  requires :id
  service.users(:tenant_id => self.id)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.