Class: VFabricAdministrationServer

Inherits:
Object
  • Object
show all
Defined in:
lib/vas/vfabric_administration_server.rb

Overview

The main entry point to the vFabric Administration Server API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration = {}) ⇒ VFabricAdministrationServer

Creates an entry point that will connect to a vFabric Administration Server.

Parameters:

  • configuration (Hash) (defaults to: {})

    the connection configuration

Options Hash (configuration):

  • :username (String) — default: 'admin'

    The username to use to authenticate with the server

  • :password (String) — default: 'vmware'

    The password to use to authenticate with the server

  • :host (String) — default: 'localhost'

    The host of the server

  • :port (Integer) — default: 8443

    The HTTPS port of the server



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/vas/vfabric_administration_server.rb', line 44

def initialize(configuration = {})

  configuration.has_key?(:client) ?
      client = configuration[:client] :
      client = Util::Client.new(configuration[:username] || "admin", configuration[:password] || "vmware")

  host = configuration[:host] || "localhost"
  port = configuration[:port] || 8443

  @gemfire = Gemfire::Gemfire.new("https://#{host}:#{port}/gemfire/v1/", client)
  @rabbitmq = RabbitMq::RabbitMq.new("https://#{host}:#{port}/rabbitmq/v1/", client)

  sqlfire_location = "https://#{host}:#{port}/sqlfire/v1/"
  @sqlfire = Sqlfire::Sqlfire.new(sqlfire_location, client) if available? sqlfire_location, client

  @tc_server = TcServer::TcServer.new("https://#{host}:#{port}/tc-server/v1/", client)
  @vfabric = VFabric::VFabric.new("https://#{host}:#{port}/vfabric/v1/", client)

  web_server_location = "https://#{host}:#{port}/web-server/v1/"
  @web_server = WebServer::WebServer.new(web_server_location, client) if available? web_server_location, client
end

Instance Attribute Details

#gemfireGemfire::Gemfire (readonly)

Returns the GemFire API.

Returns:



21
22
23
# File 'lib/vas/vfabric_administration_server.rb', line 21

def gemfire
  @gemfire
end

#rabbitmqRabbitMq::RabbitMq (readonly)

Returns the RabbitMQ API.

Returns:



24
25
26
# File 'lib/vas/vfabric_administration_server.rb', line 24

def rabbitmq
  @rabbitmq
end

#sqlfireSqlfire::Sqlfire? (readonly)

Returns the SQLFire API, or nil if the server is not version 1.1.0 or later.

Returns:

  • (Sqlfire::Sqlfire, nil)

    the SQLFire API, or nil if the server is not version 1.1.0 or later



27
28
29
# File 'lib/vas/vfabric_administration_server.rb', line 27

def sqlfire
  @sqlfire
end

#tc_serverTcServer::TcServer (readonly)

Returns the tc Server API.

Returns:



30
31
32
# File 'lib/vas/vfabric_administration_server.rb', line 30

def tc_server
  @tc_server
end

#vfabricVFabric::VFabric (readonly)

Returns the vFabric API.

Returns:



33
34
35
# File 'lib/vas/vfabric_administration_server.rb', line 33

def vfabric
  @vfabric
end

#web_serverWebServer::WebServer? (readonly)

Returns the vFabric Web Server API, or nil if the server is not version 1.1.0 or later.

Returns:

  • (WebServer::WebServer, nil)

    the vFabric Web Server API, or nil if the server is not version 1.1.0 or later



36
37
38
# File 'lib/vas/vfabric_administration_server.rb', line 36

def web_server
  @web_server
end