Class: UU::OperationRegistry::NodeSet

Inherits:
BaseMethods
  • Object
show all
Defined in:
lib/uu/operation_registry/node_set.rb

Overview

Node set.

Constant Summary

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (NodeSet) initialize(session = nil)

Creates a new instance of NodeSet.

Parameters:

  • session (UU::OS::Security::Session) (defaults to: nil)

    Session to use for remote calls.



18
19
20
# File 'lib/uu/operation_registry/node_set.rb', line 18

def initialize(session = nil)
  super
end

Class Method Details

+ (UU::OS::UESURI) create(resource_pool_uri, attributes)

Creates a new node set. This method is a convenience shortcut for the #create instance method.

Parameters:

  • resource_pool_uri (String, UU::OS::UESURI)

    Resource pool URI.

  • attributes (Hash)

    Node set attributes.

Returns:

  • (UU::OS::UESURI)

    UESURI of the created node set.



# File 'lib/uu/operation_registry/node_set.rb', line 35

+ (void) delete(node_set_uri)

This method returns an undefined value.

Deletes the specified node set from the registry. This method is a convenience shortcut for the #delete instance method.

Parameters:

  • node_set_uri (String, UU::OS::UESURI)

    Node set URI.



# File 'lib/uu/operation_registry/node_set.rb', line 79

+ (Hash) get_attributes(node_set_uri)

Gets the attributes of the node set specified by container URI and returns its detail. This method is a convenience shortcut for the #get_attributes instance method.

Parameters:

  • node_set_uri (String, UU::OS::UESURI)

    Node set URI.

Returns:

  • (Hash)

    Node set attributes.



# File 'lib/uu/operation_registry/node_set.rb', line 48

+ (UU::OS::Persistence::PagedResult<Hash>) get_node_set_list(resource_pool_uri, criteria = {})

Returns list of node sets. This method is a convenience shortcut for the #get_node_set_list instance method.

Returns:

  • (UU::OS::Persistence::PagedResult<Hash>)

    Paged result set.

See Also:



106
107
108
# File 'lib/uu/operation_registry/node_set.rb', line 106

def self.get_node_set_list(resource_pool_uri, criteria = {})
  self.new(UU::OS::Security::Session.current_session).get_node_set_list(resource_pool_uri, criteria)
end

+ (UU::OS::UESURI) set_attributes(node_set_uri, attributes)

Sets attributes of a node set. This method is a convenience shortcut for the #set_attributes instance method.

Parameters:

  • node_set_uri (String, UU::OS::UESURI)

    Node set URI.

Returns:

  • (UU::OS::UESURI)

    UESURI of the updated node set.



# File 'lib/uu/operation_registry/node_set.rb', line 68

Instance Method Details

- (UU::OS::UESURI) create(resource_pool_uri, attributes)

Creates a new container.

Parameters:

  • resource_pool_uri (String, UU::OS::UESURI)

    Resource pool URI.

  • attributes (Hash)

    Node node set attributes.

Options Hash (attributes):

  • name (String)

    Node set name.

  • code (String)

    Node set code. May be nil.

  • urlPath (String)

    URL path.

  • balancingStrategy (String)

    Balancing strategy. May be nil.

  • appDeploymentUri (UU::OS::UESURI)

    UESURI of deployment that this node set belongs to.

Returns:

  • (UU::OS::UESURI)

    UESURI of the created node set.



# File 'lib/uu/operation_registry/node_set.rb', line 22

- (void) delete(node_set_uri)

This method returns an undefined value.

Deletes the specified node set from the registry.

Parameters:

  • node_set_uri (String, UU::OS::UESURI)

    Node set URI.



# File 'lib/uu/operation_registry/node_set.rb', line 74

- (Hash) get_attributes(node_set_uri)

Gets the attributes of the node set specified by container URI and returns its detail.

Parameters:

  • node_set_uri (String, UU::OS::UESURI)

    Node set URI.

Returns:

  • (Hash)

    Node set attributes.



# File 'lib/uu/operation_registry/node_set.rb', line 42

- (UU::OS::Persistence::PagedResult<Hash>) get_node_set_list(resource_pool_uri, criteria = {})

Returns a list of node sets in the given resource pool. Command does not return all node sets, only a sublist. The list of returned node sets could be filtered using Mongo Query.

Parameters:

  • resource_pool_uri (String, UU::OS::UESURI)

    Resource pool URI.

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

    Criteria for listing node sets.

Options Hash (criteria):

  • query (String)

    Mongo Query to filter the result set. See Mongo Query tutorial.

  • pageIndex (Fixnum)

    Result set page index.

  • pageSize (Fixnum)

    Result set page size.

Returns:

  • (UU::OS::Persistence::PagedResult<Hash>)

    Paged result set.



97
98
99
# File 'lib/uu/operation_registry/node_set.rb', line 97

def get_node_set_list(resource_pool_uri, criteria = {})
  @client.invoke(:getNodeSetList, resource_pool_uri, parameters: criteria)
end

- (UU::OS::UESURI) set_attributes(node_set_uri, attributes)

Sets attributes of a node set.

Parameters:

  • node_set_uri (String, UU::OS::UESURI)

    Node set URI.

  • attributes (Hash)

    Node set attributes.

Options Hash (attributes):

  • name (String)

    Node set name. May be nil.

  • code (String)

    Node set code. May be nil.

  • urlPath (String)

    URL path. May be nil.

  • balancingStrategy (String)

    Balancing strategy. May be nil.

  • appDeploymentUri (UU::OS::UESURI)

    UESURI of deployment that this node set belongs to. May be nil.

Returns:

  • (UU::OS::UESURI)

    UESURI of the updated node set.



# File 'lib/uu/operation_registry/node_set.rb', line 55