diff options
author | Carsten Lund <lund@research.att.com> | 2017-04-16 14:10:02 +0000 |
---|---|---|
committer | Carsten Lund <lund@research.att.com> | 2017-04-16 14:10:02 +0000 |
commit | c9beb141d5ee6af8ead53f5486d77649c410dd64 (patch) | |
tree | fb3678f9b517f1172f54cd08cace113c8ff9e4f2 /ncomp-cdap-adaptor/src/main/java/org | |
parent | f84df08cfd9b249a5f7beebd5f258f59e87fddb0 (diff) |
[DCAE-15] Changes related to version 1.1
See Jira for details
Change-Id: I5ad7af00664e9bede87b5f6939aa8996081572f6
Signed-off-by: Carsten Lund <lund@research.att.com>
Diffstat (limited to 'ncomp-cdap-adaptor/src/main/java/org')
2 files changed, 25 insertions, 1 deletions
diff --git a/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/cdap/adaptor/tools/Generator.java b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/cdap/adaptor/tools/Generator.java index e61709d..1fb499f 100644 --- a/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/cdap/adaptor/tools/Generator.java +++ b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/cdap/adaptor/tools/Generator.java @@ -46,12 +46,13 @@ public class Generator { String dir = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix();
dir= "src/main/sirius-gen/" + dir.replace('.', '/');
ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel();
- m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates");
+ m.setTemplateDirectory("../../ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates");
m.setPrefix("Cdap");
m.setPluginName(p.getNsURI());
m.setName("Cdap");
m.setTitle("Cdap");
ControllerGenerator g = new ControllerGenerator(o,m);
+ g.setVersion("ONAP-R2"); g.setEnableIRequestHandler(false);
g.setEnableISiriusPlugin(false);
EObject gui = ModelFactory.eINSTANCE.createGuiClientApi();
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 84ce4a3..737a98c 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 @@ -444,4 +444,27 @@ public class CdapCdapClusterProvider extends BasicAdaptorProvider { + serviceId); } + public String suspendSchedule(String namespace, String appId, String scheduleId) { + return customRunCDAPcliCommand(namespace, "suspend schedule " + appId + "." + scheduleId); + } + + public String resumeSchedule(String namespace, String appId, String scheduleId) { + return customRunCDAPcliCommand(namespace, "resume schedule " + appId + "." + scheduleId); + } + + public String loadArtifactWithConfig(String namespace, String artifactName, String jarfile, String version, + String config) { + Date now = new Date(); + String filename = "/tmp/"+ now.getTime() + ".appConfig"; + try { + OutputStreamWriter w = FileUtils.filename2writer(filename); + w.append(config); + w.close(); + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("configurationChanged" + e); + } + return customRunCDAPcliCommand(namespace, "load artifact " + jarfile + " config-file " + filename + " name " + artifactName + " version " + version); + } + } |