Class: UU::OperationRegistry::RuntimeStack

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

Overview

Runtime Stack.

Constant Summary

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (RuntimeStack) initialize(session = nil)

Creates a new instance of Stack.

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

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

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

Parameters:

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

    Cloud URI.

  • attributes (Hash)

    Stack attributes.

Returns:

  • (UU::OS::UESURI)

    UESURI of the created stack.



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

+ (void) delete(runtime_stack_uri)

This method returns an undefined value.

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

Parameters:

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

    Stack URI.



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

+ (Hash) get_attributes(runtime_stack_uri)

Gets the attributes of the stack specified by 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)

    Stack URI.

Returns:

  • (Hash)

    Stack attributes.



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

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

Returns list of 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:



105
106
107
# File 'lib/uu/operation_registry/runtime_stack.rb', line 105

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

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

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

Parameters:

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

    Stack URI.

Returns:

  • (UU::OS::UESURI)

    UESURI of the updated stack.



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

Instance Method Details

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

Creates a new stack.

Parameters:

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

    Cloud URI.

  • attributes (Hash)

    Stack attributes.

Options Hash (attributes):

  • name (String)

    Stack name. May be nil.

  • code (String)

    Stack code. May be nil.

  • description (String)

    Stack description. May be nil.

  • alias (String)

    Stack alias. May be nil.

  • nodeImageUri (UU::OS::UESURI)

    Base image URI.

  • buildRecipe (String)

    Build recipe. May be nil.

Returns:

  • (UU::OS::UESURI)

    UESURI of the created stack.



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

- (void) delete(runtime_stack_uri)

This method returns an undefined value.

Deletes the specified stack from the registry.

Parameters:

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

    Stack URI.



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

- (Hash) get_attributes(runtime_stack_uri)

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

Parameters:

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

    Stack URI.

Returns:

  • (Hash)

    Stack attributes.



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

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

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

Parameters:

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

    Cloud URI.

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

    Criteria for listing stacks.

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.



96
97
98
# File 'lib/uu/operation_registry/runtime_stack.rb', line 96

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

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

Sets attributes of an stack.

Parameters:

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

    Stack URI.

  • attributes (Hash)

    Stack attributes.

Options Hash (attributes):

  • name (String)

    Stack name. May be nil.

  • code (String)

    Stack code. May be nil.

  • description (String)

    Stack description. May be nil.

  • alias (String)

    Stack alias. May be nil.

  • buildRecipe (String)

    Build recipe. May be nil.

Returns:

  • (UU::OS::UESURI)

    UESURI of the updated stack.



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