aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProvider.java7
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapCluster.java10
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterClient.java4
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterConsole.java4
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProviderTemplate.java2
-rw-r--r--ncomp-cdap-model/META-INF/MANIFEST.MF3
-rw-r--r--ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapApi.java4
-rw-r--r--ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapPackage.java12
-rw-r--r--ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapApiImpl.java6
-rw-r--r--ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapClusterImpl.java8
-rw-r--r--ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapPackageImpl.java7
-rw-r--r--ncomp-cdap-model/src/main/xcore/adaptor.xcore2
12 files changed, 36 insertions, 33 deletions
diff --git a/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProvider.java b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProvider.java
index 2de8297..41885b8 100644
--- a/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProvider.java
+++ b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProvider.java
@@ -420,8 +420,11 @@ public class CdapCdapClusterProvider extends BasicAdaptorProvider {
return customRunCDAPcliCommand(namespace, "set stream ttl " + streamName + " " + ttlSeconds);
}
- public String stopApp(String namespace, String appName) {
- return customRunCDAPcliCommand(namespace, "stop app " + appName + " programs");
+ public String stopApp(String namespace, String appName, String programTypes) {
+ if (programTypes == null)
+ return customRunCDAPcliCommand(namespace, "stop app " + appName + " programs");
+ else
+ return customRunCDAPcliCommand(namespace, "stop app " + appName + " programs " + programTypes);
}
public String startWorker(String namespace, String appName,
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapCluster.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapCluster.java
index 75c3598..22f75f9 100644
--- a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapCluster.java
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapCluster.java
@@ -380,21 +380,21 @@ public class CdapCdapCluster extends CdapClusterImpl implements ISiriusProvider,
return res;
}
- public java.lang.String stopApp(java.lang.String namespace, java.lang.String appName) {
+ public java.lang.String stopApp(java.lang.String namespace, java.lang.String appName, java.lang.String programTypes) {
java.lang.String res = null;
long duration_ = 0;
if (server != null)
- server.getServer().recordApi(null, this, "stopApp", ApiRequestStatus.START, duration_,namespace,appName);
+ server.getServer().recordApi(null, this, "stopApp", ApiRequestStatus.START, duration_,namespace,appName,programTypes);
Date now_ = new Date();
ecomplogger.recordAuditEventStartIfNeeded(CdapClusterOperationEnum.CdapCluster_stopApp,server,this);
ecomplogger.recordMetricEventStart(CdapClusterOperationEnum.CdapCluster_stopApp,"self:" + ManagementServer.object2ref(this));
try {
- res = controller.stopApp(namespace,appName);
+ res = controller.stopApp(namespace,appName,programTypes);
}
catch (Exception e) {
duration_ = new Date().getTime()-now_.getTime();
if (server != null)
- server.getServer().recordApi(null, this, "stopApp", ApiRequestStatus.ERROR, duration_,namespace,appName);
+ server.getServer().recordApi(null, this, "stopApp", ApiRequestStatus.ERROR, duration_,namespace,appName,programTypes);
System.err.println("ERROR: " + e);
ecomplogger.warn(CdapClusterMessageEnum.REQUEST_FAILED_stopApp, e.toString());
EcompException e1 = EcompException.create(CdapClusterMessageEnum.REQUEST_FAILED_stopApp,e,e.getMessage());
@@ -404,7 +404,7 @@ public class CdapCdapCluster extends CdapClusterImpl implements ISiriusProvider,
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
if (server != null)
- server.getServer().recordApi(null, this, "stopApp", ApiRequestStatus.OKAY, duration_,namespace,appName);
+ server.getServer().recordApi(null, this, "stopApp", ApiRequestStatus.OKAY, duration_,namespace,appName,programTypes);
return res;
}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterClient.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterClient.java
index e49315d..18a7c9d 100644
--- a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterClient.java
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterClient.java
@@ -274,12 +274,12 @@ public class CdapCdapClusterClient extends CdapClusterImpl {
}
- public java.lang.String stopApp(String path, java.lang.String namespace, java.lang.String appName) {
+ public java.lang.String stopApp(String path, java.lang.String namespace, java.lang.String appName, java.lang.String programTypes) {
EClass c = CdapPackage.eINSTANCE.getCdapCluster();
ecomplogger.recordMetricEventStart(CdapClusterOperationEnum.CdapCluster_stopApp,client.getRemote());
java.lang.String res;
try {
- res = (java.lang.String) client.operationPath(path, c, "stopApp", null, namespace,appName);
+ res = (java.lang.String) client.operationPath(path, c, "stopApp", null, namespace,appName,programTypes);
}
catch (Exception e) {
ecomplogger.warn(CdapClusterMessageEnum.REMOTE_CALL_FAILED_stopApp, e.toString());
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterConsole.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterConsole.java
index bd302cd..e58c2a1 100644
--- a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterConsole.java
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterConsole.java
@@ -175,10 +175,10 @@ public class CdapCdapClusterConsole extends Console {
return res;
}
- public java.lang.String stopApp(String path, java.lang.String namespace, java.lang.String appName) {
+ public java.lang.String stopApp(String path, java.lang.String namespace, java.lang.String appName, java.lang.String programTypes) {
java.lang.String res = null;
try {
- res = controller.stopApp(path,namespace,appName);
+ res = controller.stopApp(path,namespace,appName,programTypes);
}
catch (ManagementServerError e) {
System.err.println("ERROR: " + e.getJson().toString(2));
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProviderTemplate.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProviderTemplate.java
index c5956b7..12dd085 100644
--- a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProviderTemplate.java
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProviderTemplate.java
@@ -121,7 +121,7 @@ public class CdapCdapClusterProviderTemplate extends BasicAdaptorProvider {
throw new UnsupportedOperationException();
}
- public java.lang.String stopApp(java.lang.String namespace, java.lang.String appName) {
+ public java.lang.String stopApp(java.lang.String namespace, java.lang.String appName, java.lang.String programTypes) {
java.lang.String res = null;
// TODO IMPLEMENT
throw new UnsupportedOperationException();
diff --git a/ncomp-cdap-model/META-INF/MANIFEST.MF b/ncomp-cdap-model/META-INF/MANIFEST.MF
index d4d7529..ad04c21 100644
--- a/ncomp-cdap-model/META-INF/MANIFEST.MF
+++ b/ncomp-cdap-model/META-INF/MANIFEST.MF
@@ -13,6 +13,5 @@ Export-Package: org.openecomp.ncomp.cdap,
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.xtext.xbase.lib,
- org.eclipse.emf.ecore.xcore.lib,
- ncomp-core-model;visibility:=reexport
+ org.eclipse.emf.ecore.xcore.lib
Bundle-ActivationPolicy: lazy
diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapApi.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapApi.java
index 5738de9..6a7caa4 100644
--- a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapApi.java
+++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapApi.java
@@ -121,10 +121,10 @@ public interface CdapApi extends EObject {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @model unique="false" namespaceUnique="false" appNameUnique="false"
+ * @model unique="false" namespaceUnique="false" appNameUnique="false" programTypesUnique="false"
* @generated
*/
- String stopApp(String namespace, String appName);
+ String stopApp(String namespace, String appName, String programTypes);
/**
* <!-- begin-user-doc -->
diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapPackage.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapPackage.java
index 56e366f..9485de0 100644
--- a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapPackage.java
+++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapPackage.java
@@ -324,7 +324,7 @@ public interface CdapPackage extends EPackage {
* @generated
* @ordered
*/
- int CDAP_CLUSTER___STOP_APP__STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 10;
+ int CDAP_CLUSTER___STOP_APP__STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 10;
/**
* The operation id for the '<em>Delete App</em>' operation.
@@ -730,7 +730,7 @@ public interface CdapPackage extends EPackage {
* @generated
* @ordered
*/
- int CDAP_API___STOP_APP__STRING_STRING = 10;
+ int CDAP_API___STOP_APP__STRING_STRING_STRING = 10;
/**
* The operation id for the '<em>Delete App</em>' operation.
@@ -1982,14 +1982,14 @@ public interface CdapPackage extends EPackage {
EOperation getCdapApi__StartApp__String_String();
/**
- * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#stopApp(java.lang.String, java.lang.String) <em>Stop App</em>}' operation.
+ * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#stopApp(java.lang.String, java.lang.String, java.lang.String) <em>Stop App</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the '<em>Stop App</em>' operation.
- * @see org.openecomp.ncomp.cdap.CdapApi#stopApp(java.lang.String, java.lang.String)
+ * @see org.openecomp.ncomp.cdap.CdapApi#stopApp(java.lang.String, java.lang.String, java.lang.String)
* @generated
*/
- EOperation getCdapApi__StopApp__String_String();
+ EOperation getCdapApi__StopApp__String_String_String();
/**
* Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#deleteApp(java.lang.String, java.lang.String) <em>Delete App</em>}' operation.
@@ -2810,7 +2810,7 @@ public interface CdapPackage extends EPackage {
* <!-- end-user-doc -->
* @generated
*/
- EOperation CDAP_API___STOP_APP__STRING_STRING = eINSTANCE.getCdapApi__StopApp__String_String();
+ EOperation CDAP_API___STOP_APP__STRING_STRING_STRING = eINSTANCE.getCdapApi__StopApp__String_String_String();
/**
* The meta object literal for the '<em><b>Delete App</b></em>' operation.
diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapApiImpl.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapApiImpl.java
index 55f05a7..0c016d6 100644
--- a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapApiImpl.java
+++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapApiImpl.java
@@ -176,7 +176,7 @@ public class CdapApiImpl extends MinimalEObjectImpl.Container implements CdapApi
* <!-- end-user-doc -->
* @generated
*/
- public String stopApp(String namespace, String appName) {
+ public String stopApp(String namespace, String appName, String programTypes) {
// TODO: implement this method
// Ensure that you remove @generated or mark it @generated NOT
throw new UnsupportedOperationException();
@@ -540,8 +540,8 @@ public class CdapApiImpl extends MinimalEObjectImpl.Container implements CdapApi
return startService((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3));
case CdapPackage.CDAP_API___START_APP__STRING_STRING:
return startApp((String)arguments.get(0), (String)arguments.get(1));
- case CdapPackage.CDAP_API___STOP_APP__STRING_STRING:
- return stopApp((String)arguments.get(0), (String)arguments.get(1));
+ case CdapPackage.CDAP_API___STOP_APP__STRING_STRING_STRING:
+ return stopApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2));
case CdapPackage.CDAP_API___DELETE_APP__STRING_STRING:
return deleteApp((String)arguments.get(0), (String)arguments.get(1));
case CdapPackage.CDAP_API___LOAD_PREFERENCES_APP__STRING_STRING_STRING:
diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapClusterImpl.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapClusterImpl.java
index 544292a..8510979 100644
--- a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapClusterImpl.java
+++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapClusterImpl.java
@@ -379,7 +379,7 @@ public class CdapClusterImpl extends NamedEntityImpl implements CdapCluster {
* <!-- end-user-doc -->
* @generated
*/
- public String stopApp(String namespace, String appName) {
+ public String stopApp(String namespace, String appName, String programTypes) {
// TODO: implement this method
// Ensure that you remove @generated or mark it @generated NOT
throw new UnsupportedOperationException();
@@ -866,7 +866,7 @@ public class CdapClusterImpl extends NamedEntityImpl implements CdapCluster {
case CdapPackage.CDAP_API___START_WORKER__STRING_STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___START_WORKER__STRING_STRING_STRING_STRING;
case CdapPackage.CDAP_API___START_SERVICE__STRING_STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___START_SERVICE__STRING_STRING_STRING_STRING;
case CdapPackage.CDAP_API___START_APP__STRING_STRING: return CdapPackage.CDAP_CLUSTER___START_APP__STRING_STRING;
- case CdapPackage.CDAP_API___STOP_APP__STRING_STRING: return CdapPackage.CDAP_CLUSTER___STOP_APP__STRING_STRING;
+ case CdapPackage.CDAP_API___STOP_APP__STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___STOP_APP__STRING_STRING_STRING;
case CdapPackage.CDAP_API___DELETE_APP__STRING_STRING: return CdapPackage.CDAP_CLUSTER___DELETE_APP__STRING_STRING;
case CdapPackage.CDAP_API___LOAD_PREFERENCES_APP__STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___LOAD_PREFERENCES_APP__STRING_STRING_STRING;
case CdapPackage.CDAP_API___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING;
@@ -934,8 +934,8 @@ public class CdapClusterImpl extends NamedEntityImpl implements CdapCluster {
return startService((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3));
case CdapPackage.CDAP_CLUSTER___START_APP__STRING_STRING:
return startApp((String)arguments.get(0), (String)arguments.get(1));
- case CdapPackage.CDAP_CLUSTER___STOP_APP__STRING_STRING:
- return stopApp((String)arguments.get(0), (String)arguments.get(1));
+ case CdapPackage.CDAP_CLUSTER___STOP_APP__STRING_STRING_STRING:
+ return stopApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2));
case CdapPackage.CDAP_CLUSTER___DELETE_APP__STRING_STRING:
return deleteApp((String)arguments.get(0), (String)arguments.get(1));
case CdapPackage.CDAP_CLUSTER___LOAD_PREFERENCES_APP__STRING_STRING_STRING:
diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapPackageImpl.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapPackageImpl.java
index 95539e5..d1226a3 100644
--- a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapPackageImpl.java
+++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapPackageImpl.java
@@ -380,7 +380,7 @@ public class CdapPackageImpl extends EPackageImpl implements CdapPackage {
* <!-- end-user-doc -->
* @generated
*/
- public EOperation getCdapApi__StopApp__String_String() {
+ public EOperation getCdapApi__StopApp__String_String_String() {
return cdapApiEClass.getEOperations().get(10);
}
@@ -982,7 +982,7 @@ public class CdapPackageImpl extends EPackageImpl implements CdapPackage {
createEOperation(cdapApiEClass, CDAP_API___START_WORKER__STRING_STRING_STRING_STRING);
createEOperation(cdapApiEClass, CDAP_API___START_SERVICE__STRING_STRING_STRING_STRING);
createEOperation(cdapApiEClass, CDAP_API___START_APP__STRING_STRING);
- createEOperation(cdapApiEClass, CDAP_API___STOP_APP__STRING_STRING);
+ createEOperation(cdapApiEClass, CDAP_API___STOP_APP__STRING_STRING_STRING);
createEOperation(cdapApiEClass, CDAP_API___DELETE_APP__STRING_STRING);
createEOperation(cdapApiEClass, CDAP_API___LOAD_PREFERENCES_APP__STRING_STRING_STRING);
createEOperation(cdapApiEClass, CDAP_API___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING);
@@ -1163,9 +1163,10 @@ public class CdapPackageImpl extends EPackageImpl implements CdapPackage {
addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED);
addEParameter(op, theEcorePackage.getEString(), "appName", 0, 1, !IS_UNIQUE, IS_ORDERED);
- op = initEOperation(getCdapApi__StopApp__String_String(), theEcorePackage.getEString(), "stopApp", 0, 1, !IS_UNIQUE, IS_ORDERED);
+ op = initEOperation(getCdapApi__StopApp__String_String_String(), theEcorePackage.getEString(), "stopApp", 0, 1, !IS_UNIQUE, IS_ORDERED);
addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED);
addEParameter(op, theEcorePackage.getEString(), "appName", 0, 1, !IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, theEcorePackage.getEString(), "programTypes", 0, 1, !IS_UNIQUE, IS_ORDERED);
op = initEOperation(getCdapApi__DeleteApp__String_String(), theEcorePackage.getEString(), "deleteApp", 0, 1, !IS_UNIQUE, IS_ORDERED);
addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED);
diff --git a/ncomp-cdap-model/src/main/xcore/adaptor.xcore b/ncomp-cdap-model/src/main/xcore/adaptor.xcore
index bc21841..bdf8941 100644
--- a/ncomp-cdap-model/src/main/xcore/adaptor.xcore
+++ b/ncomp-cdap-model/src/main/xcore/adaptor.xcore
@@ -61,7 +61,7 @@ class CdapApi {
op String startApp(String namespace, String appName)
- op String stopApp(String namespace, String appName)
+ op String stopApp(String namespace, String appName, String programTypes)
op String deleteApp(String namespace, String appName)