Class: UU::OperationRegistry::AppDeployment

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

Overview

App deployment.

Constant Summary

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (AppDeployment) initialize(session = nil)

Creates a new instance of AppDeployment.

Parameters:

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

    Session to use for remote calls.



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

def initialize(session = nil)
  super
end

Class Method Details

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

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

Parameters:

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

    Resource pool URI.

  • attributes (Hash)

    Application attributes.

Returns:

  • (UU::OS::UESURI)

    UESURI of the created deployment.



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

+ (void) delete(app_deployment_uri)

This method returns an undefined value.

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

Parameters:

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

    Application URI.



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

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

Returns list of deployments. This method is a convenience shortcut for the #get_app_deployment_list instance method.

Returns:

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

    Paged result set.

See Also:



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

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

+ (Hash) get_attributes(app_deployment_uri)

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

Parameters:

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

    Application URI.

Returns:

  • (Hash)

    Application attributes.



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

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

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

Parameters:

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

    Application URI.

Returns:

  • (UU::OS::UESURI)

    UESURI of the updated deployment.



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

Instance Method Details

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

Creates a new deployment.

Parameters:

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

    Resource pool URI.

  • attributes (Hash)

    Application attributes.

Options Hash (attributes):

  • name (String)

    Application name. May be nil.

  • code (String)

    Application code. May be nil.

  • description (String)

    Application description. May be nil.

  • appBoxUri (UU::OS::UESURI)

    AppBox URI.

  • state (String)

    Application state. Value must be one from UU::OperationRegistry::AppDeploymentState. May be nil.

Returns:

  • (UU::OS::UESURI)

    UESURI of the created deployment.



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

- (void) delete(app_deployment_uri)

This method returns an undefined value.

Deletes the specified deployment from the registry.

Parameters:

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

    Application URI.



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

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

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

Parameters:

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

    Resource pool URI.

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

    Criteria for listing deployments.

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/app_deployment.rb', line 97

def get_app_deployment_list(resource_pool_uri, criteria = {})
  client.invoke(:getAppDeploymentList, resource_pool_uri, parameters: criteria)
end

- (Hash) get_attributes(app_deployment_uri)

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

Parameters:

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

    Application URI.

Returns:

  • (Hash)

    Application attributes.



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

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

Sets attributes of an deployment.

Parameters:

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

    Application URI.

  • attributes (Hash)

    Application attributes.

Options Hash (attributes):

  • name (String)

    Application name. May be nil.

  • code (String)

    Application code. May be nil.

  • description (String)

    Application description. May be nil.

  • state (String)

    Application state. May be nil.

  • runningProcess (String)

    Identification of the currently running asynchronous process modifying this deployment. May be nil.

Returns:

  • (UU::OS::UESURI)

    UESURI of the updated deployment.



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