Class: Vcloud::Core::ApiInterface

Inherits:
Object
  • Object
show all
Defined in:
lib/vcloud/core/api_interface.rb

Overview

Public interface to allow direct access to the API if functionality does not exist in Core

Instance Method Summary collapse

Instance Method Details

#current_organizationFog::Compute::VcloudDirector::Organization

Returns a Fog::Compute::VcloudDirector::Organization instance representing the current organization



61
62
63
# File 'lib/vcloud/core/api_interface.rb', line 61

def current_organization
  fog_model_interface.current_organization
end

#delete_network(id) ⇒ Boolean

Delete a network by id



53
54
55
# File 'lib/vcloud/core/api_interface.rb', line 53

def delete_network(id)
  fog_service_interface.delete_network(id)
end

#delete_vapp(id) ⇒ Boolean

Delete a vApp by id



45
46
47
# File 'lib/vcloud/core/api_interface.rb', line 45

def delete_vapp(id)
  fog_service_interface.delete_vapp(id)
end

#fog_model_interfaceObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Private interface to Fog model layer to allow direct access to Fog for functionality not exposed elsewhere in Vcloud::Core.



20
21
22
# File 'lib/vcloud/core/api_interface.rb', line 20

def fog_model_interface
  @fog_model_interface ||= Vcloud::Core::Fog::ModelInterface.new
end

#fog_service_interfaceObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Private interface to Fog service layer to allow direct access to Fog for functionality not exposed elsewhere in Vcloud::Core.



12
13
14
# File 'lib/vcloud/core/api_interface.rb', line 12

def fog_service_interface
  @fog_service_interface ||= Vcloud::Core::Fog::ServiceInterface.new
end

#get_vapp(id) ⇒ String

Get a vApp by id



37
38
39
# File 'lib/vcloud/core/api_interface.rb', line 37

def get_vapp(id)
  fog_service_interface.get_vapp(id)
end

#get_vapp_by_name_and_vdc_name(name, vdc_name) ⇒ String

Get a vApp by name and vdc_name



29
30
31
# File 'lib/vcloud/core/api_interface.rb', line 29

def get_vapp_by_name_and_vdc_name(name, vdc_name)
  fog_service_interface.get_vapp_by_name_and_vdc_name(name, vdc_name)
end