Class: Zona::VDCPool

Inherits:
OZonesPool show all
Defined in:
zona/VDCPool.rb

Overview

This class represents a set of VDCs. It allows to list the defined VDCs and iterate on them.

Constant Summary

VDC_POOL_KIND =

String describing the kind of this resource

"vdc"

Instance Method Summary (collapse)

Methods inherited from OZonesPool

#each

Methods inherited from JSONPool

#each_element

Methods inherited from JSONElement

#[], #initialize_json

Constructor Details

- (VDCPool) initialize(client)

Initializes a VDC Pool instance

Parameters:



29
30
31
# File 'zona/VDCPool.rb', line 29

def initialize(client)
    super(:VDC_POOL, :VDC, client)
end

Instance Method Details

- (String) factory(element_json)

Produces a new VDC element with the provided description

Parameters:

  • element_json (String)

    JSON string of the element

Returns:

  • (String)

    Element’s name or nil



36
37
38
# File 'zona/VDCPool.rb', line 36

def factory(element_json)
    VDC.new(element_json,@client)
end

- (Zona:Error) info

Retrieves the information for this pool

Returns:

  • (Zona:Error)

    nil or Error



42
43
44
# File 'zona/VDCPool.rb', line 42

def info
    super(VDC_POOL_KIND)
end