Class: VFabric::VFabric

Inherits:
Shared::Resource show all
Defined in:
lib/vas/vfabric/v_fabric.rb

Overview

The entry point of the vFabric API

Instance Attribute Summary collapse

Attributes inherited from Shared::Resource

#location, #security

Instance Method Summary collapse

Constructor Details

#initialize(location, client) ⇒ VFabric

Returns a new instance of VFabric.



29
30
31
32
33
# File 'lib/vas/vfabric/v_fabric.rb', line 29

def initialize(location, client)
  json = client.get(location)
  @nodes = Nodes.new(Util::LinkUtils.get_link_href(json, 'nodes'), client)
  @agent_image = AgentImage.new(Util::LinkUtils.get_link_href(json, 'agent-image'), client)
end

Instance Attribute Details

#agent_imageAgentImage (readonly)

Returns the installation image for the vFabric Administration agent.

Returns:

  • (AgentImage)

    the installation image for the vFabric Administration agent



26
27
28
# File 'lib/vas/vfabric/v_fabric.rb', line 26

def agent_image
  @agent_image
end

#nodesNodes (readonly)

Returns the nodes that are known to the server.

Returns:

  • (Nodes)

    the nodes that are known to the server



23
24
25
# File 'lib/vas/vfabric/v_fabric.rb', line 23

def nodes
  @nodes
end