Class: UU::OperationRegistry::RuntimeStack

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

Overview

Runtime Stack.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(session = nil) ⇒ RuntimeStack

Creates a new instance of RuntimeStack.

Parameters:

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

    Session to use for remote calls.



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

def initialize(session = nil)
  super
end

Class Method Details

.create(cloud_uri, attributes) ⇒ UU::OS::UESURI

Creates a new runtime stack. This method is a convenience shortcut for the #create instance method.

Parameters:

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

    Cloud URI.

  • attributes (Hash)

    Runtime stack attributes.

Returns:

  • (UU::OS::UESURI)

    UESURI of the created runtime stack.



# File 'lib/uu/operation_registry/runtime_stack.rb', line 43

.delete(runtime_stack_uri) ⇒ void

This method returns an undefined value.

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

Parameters:

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

    Runtime stack URI.



# File 'lib/uu/operation_registry/runtime_stack.rb', line 93

.get_attributes(runtime_stack_uri) ⇒ Hash

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

Parameters:

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

    Runtime stack URI.

Returns:

  • (Hash)

    Runtime stack attributes.



# File 'lib/uu/operation_registry/runtime_stack.rb', line 56

.get_runtime_stack_list(cloud_uri, criteria = {}) ⇒ UU::OS::Persistence::PagedResult<Hash>

Returns list of runtime stacks. This method is a convenience shortcut for the #get_runtime_stack_list instance method.

Returns:

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

    Paged result set.

See Also:



121
122
123
# File 'lib/uu/operation_registry/runtime_stack.rb', line 121

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

.set_attributes(runtime_stack_uri, attributes) ⇒ UU::OS::UESURI

Sets attributes of a runtime stack. This method is a convenience shortcut for the #set_attributes instance method.

Parameters:

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

    Runtime stack URI.

Returns:

  • (UU::OS::UESURI)

    UESURI of the updated runtime stack.



# File 'lib/uu/operation_registry/runtime_stack.rb', line 82

Instance Method Details

#create(cloud_uri, attributes) ⇒ UU::OS::UESURI

Creates a new runtime stack.

Parameters:

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

    Cloud URI.

  • attributes (Hash)

    Runtime stack attributes.

Options Hash (attributes):

  • scalable (String)

    Whether node images using this runtime stack can be scaled out/in. Value can be either true, false or nil. Default value is false.

  • name (String)

    Runtime stack name. May be nil.

  • code (String)

    Runtime stack code. May be nil.

  • description (String)

    Runtime stack description. May be nil.

  • alias (String)

    Runtime stack alias. May be nil.

  • nodeImageUri (UU::OS::UESURI)

    Base image URI.

  • buildRecipe (String)

    Build recipe. May be nil.

  • version (String)

    Runtime stack version. Different versions can use different mechanisms of building node images. May be nil. If not specified, version 1.0 is assumed. Supported versions: 1.0, 2.0.

  • state (String)

    Runtime stack state. Value must be one from UU::OperationRegistry::RuntimeStackState. May be nil.

Returns:

  • (UU::OS::UESURI)

    UESURI of the created runtime stack.



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

#delete(runtime_stack_uri) ⇒ void

This method returns an undefined value.

Deletes the specified runtime stack from the registry.

Parameters:

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

    Runtime stack URI.



# File 'lib/uu/operation_registry/runtime_stack.rb', line 88

#get_attributes(runtime_stack_uri) ⇒ Hash

Gets the attributes of the runtime stack specified by runtime stack URI and returns its detail.

Parameters:

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

    Runtime stack URI.

Returns:

  • (Hash)

    Runtime stack attributes.



# File 'lib/uu/operation_registry/runtime_stack.rb', line 50

#get_runtime_stack_list(cloud_uri, criteria = {}) ⇒ UU::OS::Persistence::PagedResult<Hash>

Returns a list of runtime stacks in the given cloud. Command does not return all runtime stacks, only a sublist. The list of returned runtime stacks could be filtered using Mongo Query.

Parameters:

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

    Cloud URI.

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

    Criteria for listing runtime stacks.

Options Hash (criteria):

  • query (String)

    Mongo Query to filter the result set. See Mongo Query tutorial. Allowed query filter document fields: code, nodeImageUri, cloudUri

  • pageIndex (Fixnum)

    Result set page index.

  • pageSize (Fixnum)

    Result set page size.

Returns:

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

    Paged result set.



112
113
114
# File 'lib/uu/operation_registry/runtime_stack.rb', line 112

def get_runtime_stack_list(cloud_uri, criteria = {})
  @client.invoke(:getRuntimeStackList, cloud_uri, parameters: criteria)
end

#set_attributes(runtime_stack_uri, attributes) ⇒ UU::OS::UESURI

Sets attributes of a runtime stack.

Parameters:

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

    Runtime stack URI.

  • attributes (Hash)

    Runtime stack attributes.

Options Hash (attributes):

  • scalable (String)

    Whether node images using this runtime stack can be scaled out/in. Value can be either true, false or nil. Default value is false.

  • name (String)

    Runtime stack name. May be nil.

  • code (String)

    Runtime stack code. May be nil.

  • description (String)

    Runtime stack description. May be nil.

  • alias (String)

    Runtime stack alias. May be nil.

  • buildRecipe (String)

    Build recipe. May be nil.

  • version (String)

    Runtime stack version. Different versions can use different mechanisms of building node images. May be nil. Supported versions: 1.0, 2.0.

  • state (String)

    Runtime stack state. Value must be one from UU::OperationRegistry::RuntimeStackState. May be nil.

Returns:

  • (UU::OS::UESURI)

    UESURI of the updated runtime stack.



# File 'lib/uu/operation_registry/runtime_stack.rb', line 63