You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2014/01/20 18:03:06 UTC
svn commit: r1559778 - in /airavata/trunk/modules/thrift-interfaces: ./
airavata-api.thrift airavata-errors.thrift
Author: smarru
Date: Mon Jan 20 17:03:05 2014
New Revision: 1559778
URL: http://svn.apache.org/r1559778
Log:
an initial partial commit of thrift files to address AIRAVATA-990. The data structure will follow
Added:
airavata/trunk/modules/thrift-interfaces/
airavata/trunk/modules/thrift-interfaces/airavata-api.thrift
airavata/trunk/modules/thrift-interfaces/airavata-errors.thrift
Added: airavata/trunk/modules/thrift-interfaces/airavata-api.thrift
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/thrift-interfaces/airavata-api.thrift?rev=1559778&view=auto
==============================================================================
--- airavata/trunk/modules/thrift-interfaces/airavata-api.thrift (added)
+++ airavata/trunk/modules/thrift-interfaces/airavata-api.thrift Mon Jan 20 17:03:05 2014
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+/*
+* Application Programming Interface definition for Apache Airavata
+*/
+
+include "airavata-errors.thrift"
+
+namespace java org.apache.airavata.api
+namespace php Airavata.API
+namespace cpp airavata.api
+namespace perl AiravataAPI
+namespace py airavata.api
+namespace js AiravataAPI
+
+/*
+* Airavata Interface Versions depend upon this Thrift Interface File. When Making changes, please edit the
+* Version Constants according to Semantic Versioning Specification (SemVer) http://semver.org.
+*
+* Note: The Airavata API version may be different from the Airavata software release versions.
+*
+* The Airavata API version is composed as a dot delimited string with major, minor, and patch level components.
+*
+* - Major: Incremented for backward incompatible changes. An example would be changes to interfaces.
+* - Minor: Incremented for backward compatible changes. An example would be the addition of a new optional methods.
+* - Patch: Incremented for bug fixes. The patch level should be increased for every edit that doesn't result
+* in a change to major/minor version numbers.
+*/
+const string VERSION = "0.12.0"
+
+service Airavata {
+
+/*
+* Apache Airavata API Service Methods. For data structures associated in the signatures, please see included thrift files
+*/
+
+ /** Query Airavata to fetch the API version */
+ string GetAPIVersion(),
+
+ /**
+ * Create an experiment for the specified user belonging to the gateway. The gateway identity is not explicitly passed
+ * but infered from the authentication header. This experiment is just a persistant place holder. The client
+ * has to subsequently configure and launch the created experiment. No action is taken on Airavata Server except
+ * registering the experiment in a persistant store.
+ *
+ * @param userName
+ * The user name of the targetted gateway end user on whos behalf the experiment is being created.
+ * the associated gateway identity can only be infered from the security hand-shake so as to avoid
+ * authorized Airavata Clients mimicing an unauthorized request. If a gateway is not registered with
+ * Airavata, an authorization exception is thrown.
+ *
+ * @param experimentName
+ * The name of the expeiment as defined by the user. The name need not be unique as uniqueness is enforced
+ * by the generated experiment id.
+ *
+ * @param experimentDescription
+ * The verbose description of the experiment. This is an optional parameter.
+ *
+ * @return
+ * The server-side geneated experiment GUID.
+ *
+ * @throws InvalidRequestException
+ * For any incorrect forming of the request itself.
+ *
+ * @throws AiravataClientException
+ * The following list of exceptions are thrown which Airavata Client can take corrective actions to resolve
+ * UNKNOWN_GATEWAY_ID - If a Gateway is not registered with Airavata as a one time adminstrative
+ * step, then Airavata Registry will not have a provenance area setup. The client has to follow
+ * gateway registration steps and retry this request.
+ * AUTHENTICATION_FAILURE - How Authentication will be implemented is yet to be determined.
+ * For now this is a place holder.
+ * INVALID_AUTHORIZATION - This will throw an authorization exception. When a more robust security hand-shake
+ * is implemented, the authorization will be more substantial.
+ * @throws AiravataSystemException
+ * This exception will be thrown for any Airavata Server side issues and if the problem cannot be corrected by the client
+ * rather an Airavata Adminstrator will be notified to take corrective action. *
+ *
+ */
+ string CreateExperiment(1: required string userName,
+ 2: required string experimentName,
+ 3: optional string experimentDescription)
+ throws (1:InvalidRequestException ire
+ 2:AiravataClientException ace,
+ 3:AiravataSystemException ase)
+
+ string LaunchConfiguredExperiment()
+ throws (1:InvalidRequestException ire,
+ 2:ExperimentNotFoundException enf,
+ 3:AiravataClientException ace,
+ 4:AiravataSystemException ase)
+
+ string ConfigureAndLaunchExperiment extends ConfigureExperiment()
+ throws (1:InvalidRequestException ire,
+ 2:ExperimentNotFoundException enf,
+ 3:AiravataClientException ace,
+ 4:AiravataSystemException ase)
+
+ string ConfigureExperiment()
+ throws (1:InvalidRequestException ire,
+ 2:ExperimentNotFoundException enf,
+ 3:AiravataClientException ace,
+ 4:AiravataSystemException ase)
+
+ string CloneExperimentConfiguration()
+ throws (1:InvalidRequestException ire,
+ 2:ExperimentNotFoundException enf,
+ 3:AiravataClientException ace,
+ 4:AiravataSystemException ase)
+
+ string TerminateExperiment()
+ throws (1:InvalidRequestException ire,
+ 2:ExperimentNotFoundException enf,
+ 3:AiravataClientException ace,
+ 4:AiravataSystemException ase)
+
+}
Added: airavata/trunk/modules/thrift-interfaces/airavata-errors.thrift
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/thrift-interfaces/airavata-errors.thrift?rev=1559778&view=auto
==============================================================================
--- airavata/trunk/modules/thrift-interfaces/airavata-errors.thrift (added)
+++ airavata/trunk/modules/thrift-interfaces/airavata-errors.thrift Mon Jan 20 17:03:05 2014
@@ -0,0 +1,147 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+/*
+* This file describes the definations of the Error Messages that can occur
+* when invoking Apache Airavata Services through the API.
+*/
+
+namespace java org.apache.airavata.api.error
+namespace php Airavata.API.Error
+namespace cpp airavata.api.error
+namespace perl AiravataAPIError
+namespace py airavata.api.error
+namespace js AiravataAPIError
+
+/**
+ * A list of Airavata API Error Message Types
+ *
+ * UNKNOWN: No information available about the error
+ *
+ * PERMISSION_DENIED: Not permitted to perform action
+ *
+ * INTERNAL_ERROR: Unexpected problem with the service
+ *
+ * AUTHENTICATION_FAILURE: The client failed to authenticate.
+ *
+ * INVALID_AUTHORIZATION: Security Token and/or Username and/or password is incorrect
+ *
+ * AUTHORIZATION_EXPIRED: Authentication token expired
+ *
+ * UNKNOWN_GATEWAY_ID: The gateway is not registered with Airavata.
+ *
+ * UNSUPPORTED_OPERATION: Operation denied because it is currently unsupported.
+ */
+enum AiravataErrorType {
+ UNKNOWN,
+ PERMISSION_DENIED,
+ INTERNAL_ERROR,
+ AUTHENTICATION_FAILURE,
+ INVALID_AUTHORIZATION,
+ AUTHORIZATION_EXPIRED,
+ UNKNOWN_GATEWAY_ID,
+ UNSUPPORTED_OPERATION
+}
+
+/**
+ * This exception is thrown when a client asks to perform an operation on an experiment that does not exist.
+ *
+ * identifier: A description of the experiment that was not found on the server.
+ *
+ * key: The value passed from the client in the identifier, which was not found.
+ */
+exception ExperimentNotFoundException {
+ 1: optional string identifier,
+ 2: optional string key
+}
+
+/**
+* This exception is thrown for invalid requests that occur from any reasons like required input parameters are missing,
+* or a parameter is malformed.
+*
+* message: contains the associated error message.
+*/
+exception InvalidRequestException {
+ 1: required string message
+}
+
+
+/**
+* This exception is thrown when RPC timeout gets exceeded.
+*/
+exception TimedOutException {
+}
+
+/**
+* This exception is thrown for invalid authentication requests.
+*
+* message: contains the cause of the authorization failure.
+*/
+exception AuthenticationException {
+ 1: required string message
+}
+
+/**
+* This exception is thrown for invalid authorization requests such user does not have acces to an aplication or resource.
+*
+* message: contains the authorization failure message
+*/
+exception AuthorizationException {
+ 1: required string message
+}
+
+
+/**
+ * This exception is thrown by Airavata Services when a call fails as a result of
+ * a problem that a client may be able to resolve. For example, if the user
+ * attempts to execute an application on a resource gateway does not have access to.
+ *
+ * This exception would not be used for internal system errors that do not
+ * reflect user actions, but rather reflect a problem within the service that
+ * the client cannot resolve.
+ *
+ * airavataErrorType: The message type indicating the error that occurred.
+ * must be one of the values of AiravataErrorType.
+ *
+ * parameter: If the error applied to a particular input parameter, this will
+ * indicate which parameter.
+ */
+exception AiravataClientException {
+ 1: required AiravataErrorType airavataErrorType,
+ 2: optional string parameter
+}
+
+
+/**
+ * This exception is thrown by Airavata Services when a call fails as a result of
+ * a problem in the service that could not be changed through client's action.
+ *
+ * airavataErrorType: The message type indicating the error that occurred.
+ * must be one of the values of AiravataErrorType.
+ *
+ * message: This may contain additional information about the error
+ *
+ */
+exception AiravataSystemException {
+ 1: required AiravataErrorType airavataErrorType,
+ 2: optional string message,
+}
+
+