Class: UU::OperationRegistry::AppDeployment

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

Overview

App deployment.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(session = nil) ⇒ AppDeployment

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

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

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 60

.delete(app_deployment_uri) ⇒ void

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 132

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

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:



160
161
162
# File 'lib/uu/operation_registry/app_deployment.rb', line 160

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

.get_attributes(app_deployment) ⇒ Hash

Returns attributes of the deployment specified by deployment URI or tid-asid string and returns its detail. This method is a convenience shortcut for the #get_attributes instance method.

Parameters:

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

    Application URI or tid-asid string.

Returns:

  • (Hash)

    Application attributes.



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

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

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 121

Instance Method Details

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

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.

  • asid (String)

    uuAppServer ID. 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.

  • version (String)

    Version specified in uuApp deployment descriptor. May be nil.

  • urlPath (String)

    URL path (/vendor-app) specified in uuApp deployment descriptor.

  • multitenant (TrueClass, FalseClass)

    Value of the multitenant attribute specified in uuApp deployment descriptor. May be nil.

  • config (String)

    JSON string containing copy of important data from uuApp deployment descriptor and deployment-time configuration for the PRODUCTION slot. These information should allow to redeploy the app when the corresponding uuApp Box does not exist. May be nil.

  • appBoxCode (String)

    AppBox code. Used when AppBox can no longer be addressed by appBoxUri (i.e. the AppBox artifact has been deleted). If an artifact with this code exists, it will used instead. May be nil.

  • slotConfig (Hash)

    Keys are lowercase names of slots (e.g. beta for the BETA slot) and values are JSON strings containing copy of important data from uuApp deployment descriptor and deployment-time configuration. These information should allow to redeploy the app when the corresponding uuApp Box does not exist. Config for PRODUCTION slot is in the config attribute, see above. NONE is not a regular slot and cannot be specified in slotConfig. May be nil.

Returns:

  • (UU::OS::UESURI)

    UESURI of the created deployment.



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

#delete(app_deployment_uri) ⇒ void

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 127

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

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. Allowed query filter document fields: code, appBoxUri, resourcePoolUri, tenantUri, state, urlPath. State must be one from UU::OperationRegistry::AppDeploymentState

  • pageIndex (Fixnum)

    Result set page index.

  • pageSize (Fixnum)

    Result set page size.

Returns:

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

    Paged result set.



151
152
153
# File 'lib/uu/operation_registry/app_deployment.rb', line 151

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

#get_attributes(app_deployment) ⇒ Hash

Returns attributes of the deployment specified by deployment URI or tid-asid string and returns its detail.

Parameters:

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

    Application URI or tid-asid string.

Returns:

  • (Hash)

    Application attributes.



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

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

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.

  • asid (String)

    uuAppServer ID. May be nil.

  • description (String)

    Application description. May be nil.

  • state (String)

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

  • runningProcess (String)

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

  • version (String)

    Version specified in uuApp deployment descriptor. May be nil.

  • urlPath (String)

    URL path (/vendor-app) specified in uuApp deployment descriptor. May be nil.

  • multitenant (TrueClass, FalseClass)

    Value of the multitenant attribute specified in uuApp deployment descriptor. May be nil.

  • config (String)

    JSON string containing copy of important data from uuApp deployment descriptor and deployment-time configuration for the PRODUCTION slot. These information should allow to redeploy the app when the corresponding uuApp Box does not exist. May be nil.

  • slotConfig (Hash)

    Keys are lowercase names of slots (e.g. beta for the BETA slot) and values are JSON strings containing copy of important data from uuApp deployment descriptor and deployment-time configuration. These information should allow to redeploy the app when the corresponding uuApp Box does not exist. Config for PRODUCTION slot is in the config attribute, see above. NONE is not a regular slot and cannot be specified in slotConfig. May be nil.

  • appBoxCode (String)

    AppBox code. Used when AppBox can no longer be addressed by appBoxUri (i.e. the AppBox artifact has been deleted). If an artifact with this code exists, it will used instead. May be nil.

Returns:

  • (UU::OS::UESURI)

    UESURI of the updated deployment.



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