Class: ComputeResourcePreference

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

Overview

Gateway specific preferences for a Computer Resource

computeResourceId:

Corelate the preference to a compute resource.

overridebyAiravata:

If turned true, Airavata will override the preferences of better alternatives exist.

loginUserName:

If turned true, Airavata will override the preferences of better alternatives exist.

preferredJobSubmissionProtocol:

For resources with multiple job submission protocols, the gateway can pick a preferred option.

preferredDataMovementProtocol:

For resources with multiple data movement protocols, the gateway can pick a preferred option.

preferredBatchQueue:

Gateways can choose a defualt batch queue based on average job dimention, reservations or other metrics.

scratchLocation:

Path to the local scratch space on a HPC cluster. Typically used to create working directory for job execution.

allocationProjectNumber:

Typically used on HPC machines to charge computing usage to a account number. For instance, on XSEDE once an
  allocation is approved, an allocation number is assigned. Before passing this number with job submittions, the
  account to be used has to be added to the allocation.

resourceSpecificCredentialStoreToken:

Resource specific credential store token. If this token is specified, then it is superceeded by the gateway's
 default credential store.

Constant Summary collapse

COMPUTERESOURCEID =
1
OVERRIDEBYAIRAVATA =
2
LOGINUSERNAME =
3
PREFERREDJOBSUBMISSIONPROTOCOL =
4
PREFERREDDATAMOVEMENTPROTOCOL =
5
PREFERREDBATCHQUEUE =
6
SCRATCHLOCATION =
7
ALLOCATIONPROJECTNUMBER =
8
RESOURCESPECIFICCREDENTIALSTORETOKEN =
9
USAGEREPORTINGGATEWAYID =
10
QUALITYOFSERVICE =
11
RESERVATION =
12
RESERVATIONSTARTTIME =
13
RESERVATIONENDTIME =
14
SSHACCOUNTPROVISIONER =
15
SSHACCOUNTPROVISIONERCONFIG =
16
SSHACCOUNTPROVISIONERADDITIONALINFO =
17
FIELDS =
{
  COMPUTERESOURCEID => {:type => ::Thrift::Types::STRING, :name => 'computeResourceId'},
  OVERRIDEBYAIRAVATA => {:type => ::Thrift::Types::BOOL, :name => 'overridebyAiravata', :default => true},
  LOGINUSERNAME => {:type => ::Thrift::Types::STRING, :name => 'loginUserName', :optional => true},
  PREFERREDJOBSUBMISSIONPROTOCOL => {:type => ::Thrift::Types::I32, :name => 'preferredJobSubmissionProtocol', :optional => true, :enum_class => ::JobSubmissionProtocol},
  PREFERREDDATAMOVEMENTPROTOCOL => {:type => ::Thrift::Types::I32, :name => 'preferredDataMovementProtocol', :optional => true, :enum_class => ::DataMovementProtocol},
  PREFERREDBATCHQUEUE => {:type => ::Thrift::Types::STRING, :name => 'preferredBatchQueue', :optional => true},
  SCRATCHLOCATION => {:type => ::Thrift::Types::STRING, :name => 'scratchLocation', :optional => true},
  ALLOCATIONPROJECTNUMBER => {:type => ::Thrift::Types::STRING, :name => 'allocationProjectNumber', :optional => true},
  RESOURCESPECIFICCREDENTIALSTORETOKEN => {:type => ::Thrift::Types::STRING, :name => 'resourceSpecificCredentialStoreToken', :optional => true},
  USAGEREPORTINGGATEWAYID => {:type => ::Thrift::Types::STRING, :name => 'usageReportingGatewayId', :optional => true},
  QUALITYOFSERVICE => {:type => ::Thrift::Types::STRING, :name => 'qualityOfService', :optional => true},
  RESERVATION => {:type => ::Thrift::Types::STRING, :name => 'reservation', :optional => true},
  RESERVATIONSTARTTIME => {:type => ::Thrift::Types::I64, :name => 'reservationStartTime', :optional => true},
  RESERVATIONENDTIME => {:type => ::Thrift::Types::I64, :name => 'reservationEndTime', :optional => true},
  SSHACCOUNTPROVISIONER => {:type => ::Thrift::Types::STRING, :name => 'sshAccountProvisioner', :optional => true},
  SSHACCOUNTPROVISIONERCONFIG => {:type => ::Thrift::Types::MAP, :name => 'sshAccountProvisionerConfig', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true},
  SSHACCOUNTPROVISIONERADDITIONALINFO => {:type => ::Thrift::Types::STRING, :name => 'sshAccountProvisionerAdditionalInfo', :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



85
# File 'lib/gateway_resource_profile_model_types.rb', line 85

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


87
88
89
90
91
92
93
94
95
96
# File 'lib/gateway_resource_profile_model_types.rb', line 87

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field computeResourceId is unset!') unless @computeResourceId
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field overridebyAiravata is unset!') if @overridebyAiravata.nil?
  unless @preferredJobSubmissionProtocol.nil? || ::JobSubmissionProtocol::VALID_VALUES.include?(@preferredJobSubmissionProtocol)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field preferredJobSubmissionProtocol!')
  end
  unless @preferredDataMovementProtocol.nil? || ::DataMovementProtocol::VALID_VALUES.include?(@preferredDataMovementProtocol)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field preferredDataMovementProtocol!')
  end
end