Module: ViprTenant

Included in:
Vipr
Defined in:
lib/vipruby/objects/tenant.rb

Overview

The following Tenant calls will get and execute tenant items

Instance Method Summary collapse

Instance Method Details

#get_subtenants(tenant_id, auth = nil, cert = nil) ⇒ JSON

Get single tenant subtenants information

Parameters:

  • tenant_id (urn:id)

    URN of a tenant. Required Param

Returns:

  • (JSON)

    The JSON object of all subtenants of a tenant



26
27
28
# File 'lib/vipruby/objects/tenant.rb', line 26

def get_subtenants(tenant_id,auth=nil, cert=nil)
	rest_get("#{@base_url}/tenants/#{tenant_id}/subtenants", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#get_tenant(tenant_id, auth = nil, cert = nil) ⇒ JSON

Get single tenant information

Parameters:

  • tenant_id (urn:id)

    URN of a tenant. Required Param

Returns:

  • (JSON)

    The JSON object of the tenant



17
18
19
# File 'lib/vipruby/objects/tenant.rb', line 17

def get_tenant(tenant_id,auth=nil, cert=nil)
	rest_get("#{@base_url}/tenants/#{tenant_id}", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#get_tenant_projects(tenant_id, auth = nil, cert = nil) ⇒ JSON

Get single tenant projects information

Parameters:

  • tenant_id (urn:id)

    URN of a tenant. Required Param

Returns:

  • (JSON)

    The JSON object of all projects of a tenant



35
36
37
# File 'lib/vipruby/objects/tenant.rb', line 35

def get_tenant_projects(tenant_id,auth=nil, cert=nil)
	rest_get("#{@base_url}/tenants/#{tenant_id}/projects", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end

#get_tenants(auth = nil, cert = nil) ⇒ json

Get tenants

Returns:

  • (json)

    JSON object of all the tenants in URN forman



8
9
10
# File 'lib/vipruby/objects/tenant.rb', line 8

def get_tenants(auth=nil, cert=nil)
	rest_get("#{@base_url}/tenants/bulk", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
end