Class: ApplicationDeploymentDescription

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/application_deployment_model_types.rb

Overview

Application Deployment Description

appDeploymentId: Airavata Internal Unique Job ID. This is set by the registry.

appModuleName:

Application Module Name. This has to be precise describing the binary.

computeHostId:

This ID maps application deployment to a particular resource previously described within Airavata.
Example: Stampede is first registered and refered when registering WRF.

moduleLoadCmd:

Command string to load modules. This will be placed in the job submisison
Ex: module load amber

libPrependPaths:

prepend to a path variable the value

libAppendPaths:

append to a path variable the value

setEnvironment:

assigns to the environment variable "NAME" the value

Constant Summary collapse

APPDEPLOYMENTID =
1
APPMODULEID =
2
COMPUTEHOSTID =
3
EXECUTABLEPATH =
4
PARALLELISM =
5
APPDEPLOYMENTDESCRIPTION =
6
MODULELOADCMDS =
7
LIBPREPENDPATHS =
8
LIBAPPENDPATHS =
9
SETENVIRONMENT =
10
PREJOBCOMMANDS =
11
POSTJOBCOMMANDS =
12
DEFAULTQUEUENAME =
13
DEFAULTNODECOUNT =
14
DEFAULTCPUCOUNT =
15
DEFAULTWALLTIME =
16
EDITABLEBYUSER =
17
FIELDS =
{
  APPDEPLOYMENTID => {:type => ::Thrift::Types::STRING, :name => 'appDeploymentId', :default => %q"DO_NOT_SET_AT_CLIENTS"},
  APPMODULEID => {:type => ::Thrift::Types::STRING, :name => 'appModuleId'},
  COMPUTEHOSTID => {:type => ::Thrift::Types::STRING, :name => 'computeHostId'},
  EXECUTABLEPATH => {:type => ::Thrift::Types::STRING, :name => 'executablePath'},
  PARALLELISM => {:type => ::Thrift::Types::I32, :name => 'parallelism', :default =>     0, :enum_class => ::ApplicationParallelismType},
  APPDEPLOYMENTDESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'appDeploymentDescription', :optional => true},
  MODULELOADCMDS => {:type => ::Thrift::Types::LIST, :name => 'moduleLoadCmds', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CommandObject}, :optional => true},
  LIBPREPENDPATHS => {:type => ::Thrift::Types::LIST, :name => 'libPrependPaths', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SetEnvPaths}, :optional => true},
  LIBAPPENDPATHS => {:type => ::Thrift::Types::LIST, :name => 'libAppendPaths', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SetEnvPaths}, :optional => true},
  SETENVIRONMENT => {:type => ::Thrift::Types::LIST, :name => 'setEnvironment', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SetEnvPaths}, :optional => true},
  PREJOBCOMMANDS => {:type => ::Thrift::Types::LIST, :name => 'preJobCommands', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CommandObject}, :optional => true},
  POSTJOBCOMMANDS => {:type => ::Thrift::Types::LIST, :name => 'postJobCommands', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CommandObject}, :optional => true},
  DEFAULTQUEUENAME => {:type => ::Thrift::Types::STRING, :name => 'defaultQueueName', :optional => true},
  DEFAULTNODECOUNT => {:type => ::Thrift::Types::I32, :name => 'defaultNodeCount', :optional => true},
  DEFAULTCPUCOUNT => {:type => ::Thrift::Types::I32, :name => 'defaultCPUCount', :optional => true},
  DEFAULTWALLTIME => {:type => ::Thrift::Types::I32, :name => 'defaultWalltime', :optional => true},
  EDITABLEBYUSER => {:type => ::Thrift::Types::BOOL, :name => 'editableByUser', :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



171
# File 'lib/application_deployment_model_types.rb', line 171

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


173
174
175
176
177
178
179
180
181
182
# File 'lib/application_deployment_model_types.rb', line 173

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field appDeploymentId is unset!') unless @appDeploymentId
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field appModuleId is unset!') unless @appModuleId
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field computeHostId is unset!') unless @computeHostId
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field executablePath is unset!') unless @executablePath
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field parallelism is unset!') unless @parallelism
  unless @parallelism.nil? || ::ApplicationParallelismType::VALID_VALUES.include?(@parallelism)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field parallelism!')
  end
end